summarylogtreecommitdiffstats
path: root/progl
diff options
context:
space:
mode:
authorlinxlan2022-07-22 20:34:23 +0300
committerlinxlan2022-07-22 20:34:23 +0300
commitbaa956cd00bde1d98070488aff2521222babafb4 (patch)
tree9bf3b640a44ddf24edf2d8c55f2c69049798846e /progl
downloadaur-baa956cd00bde1d98070488aff2521222babafb4.tar.gz
Initial commit
Diffstat (limited to 'progl')
-rwxr-xr-xprogl30
1 files changed, 30 insertions, 0 deletions
diff --git a/progl b/progl
new file mode 100755
index 000000000000..a872bc65bdbb
--- /dev/null
+++ b/progl
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# This script applies amdgpu-pro OpenGL driver for specific application.
+# For example, running "$ progl davinci-resolve" will start DR with AMDGPU PRO driver.
+# You can test the difference (GL_VENDOR, GL_RENDERER, GL_VERSION) with glmark2 utility.
+
+progl() {
+ export LD_LIBRARY_PATH="/usr/lib/amdgpu-pro/:${LD_LIBRARY_PATH}"
+# export LIBGL_DRIVERS_PATH="/usr/lib/dri/" # unneeded, because already a system path
+}
+
+progl32() {
+ export LD_LIBRARY_PATH="/usr/lib32/amdgpu-pro/:${LD_LIBRARY_PATH}"
+# export LIBGL_DRIVERS_PATH="/usr/lib32/dri/" # unneeded, because already a system path
+}
+
+# export dri_driver="amdgpu" # Do not know if needed, there is already a file in drirc.d, is not it sufficient?
+
+
+if [[ $(basename $0) == progl ]]; then
+ progl
+elif [[ $(basename $0) == progl32 ]]; then
+ progl32
+else
+ echo "Unknown function"
+ exit 1
+fi
+
+# applied variables, now execute the rest of the command
+"$@"