1 parent 8d28601 commit afe5abbCopy full SHA for afe5abb
1 file changed
justfile
@@ -14,7 +14,15 @@ build: configure
14
# Runs the game using the dedicated Nvidia/AMD GPU
15
[default]
16
run config="": build
17
- DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia ./bin/GAME_APPLICATION {{ if config != "" { "-c " + config } else { "" } }}
+ #!/usr/bin/env bash
18
+ if command -v nvidia-smi > /dev/null 2>&1; then
19
+ export DRI_PRIME=1
20
+ export __NV_PRIME_RENDER_OFFLOAD=1
21
+ export __GLX_VENDOR_LIBRARY_NAME=nvidia
22
+ elif lsmod | grep -i "amdgpu" > /dev/null 2>&1; then
23
24
+ fi
25
+ ./bin/GAME_APPLICATION {{ if config != "" { "-c " + config } else { "" } }}
26
27
# Run the game/application on the integrated GPU for testing/sanity checks
28
run-int config="": build
0 commit comments