aboutsummarylogtreecommitdiffstats
path: root/progl
diff options
context:
space:
mode:
Diffstat (limited to 'progl')
-rw-r--r--progl30
1 files changed, 30 insertions, 0 deletions
diff --git a/progl b/progl
new file mode 100644
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
+"$@"