Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a8374f4678 | ||
|
d2f361fcde | ||
|
48b35b4479 |
@ -1,4 +1,4 @@
|
|||||||
pika-amdgpu-switcher (1.0-99pika1) kinetic; urgency=low
|
pika-amdgpu-switcher (2.0-99pika2-kinetic) lunar; urgency=low
|
||||||
|
|
||||||
* Initial Creation
|
* Initial Creation
|
||||||
|
|
||||||
|
@ -2,19 +2,8 @@
|
|||||||
|
|
||||||
# This script applies amdocl-pro OpenGL driver for specific application.
|
# This script applies amdocl-pro OpenGL driver for specific application.
|
||||||
# You can test the difference with clinfo utility.
|
# You can test the difference with clinfo utility.
|
||||||
#
|
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:/opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu:/opt/amdgpu-pro/pika/opencl/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||||
cl_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:/opt/amdgpu-pro/lib/x86_64-linux-gnu:/opt/amdgpu-pro/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == cl_pro ]]; then
|
|
||||||
cl_pro
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -9,28 +9,7 @@
|
|||||||
# $ gl_pro davinci-resolve
|
# $ gl_pro davinci-resolve
|
||||||
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
||||||
|
|
||||||
gl_mesa() {
|
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_zink() {
|
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:/opt/amdgpu-pro/lib/x86_64-linux-gnu:/opt/amdgpu-pro/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == gl_mesa ]]; then
|
|
||||||
gl_mesa
|
|
||||||
elif [[ $(basename $0) == gl_zink ]]; then
|
|
||||||
gl_zink
|
|
||||||
elif [[ $(basename $0) == gl_pro ]]; then
|
|
||||||
gl_pro
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -9,28 +9,7 @@
|
|||||||
# $ gl_pro davinci-resolve
|
# $ gl_pro davinci-resolve
|
||||||
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
||||||
|
|
||||||
gl_mesa() {
|
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:/opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu:/opt/amdgpu-pro/pika/opengl/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_zink() {
|
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:/opt/amdgpu-pro/lib/x86_64-linux-gnu:/opt/amdgpu-pro/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == gl_mesa ]]; then
|
|
||||||
gl_mesa
|
|
||||||
elif [[ $(basename $0) == gl_zink ]]; then
|
|
||||||
gl_zink
|
|
||||||
elif [[ $(basename $0) == gl_pro ]]; then
|
|
||||||
gl_pro
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -9,28 +9,7 @@
|
|||||||
# $ gl_pro davinci-resolve
|
# $ gl_pro davinci-resolve
|
||||||
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
||||||
|
|
||||||
gl_mesa() {
|
export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_zink() {
|
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:/opt/amdgpu-pro/lib/x86_64-linux-gnu:/opt/amdgpu-pro/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == gl_mesa ]]; then
|
|
||||||
gl_mesa
|
|
||||||
elif [[ $(basename $0) == gl_zink ]]; then
|
|
||||||
gl_zink
|
|
||||||
elif [[ $(basename $0) == gl_pro ]]; then
|
|
||||||
gl_pro
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -11,42 +11,10 @@
|
|||||||
|
|
||||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
||||||
# So we revert this behavior to standard one.
|
# So we revert this behavior to standard one.
|
||||||
|
|
||||||
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
||||||
|
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||||
RADV_DIR="/usr/share/vulkan/icd.d"
|
export VK_ICD_FILENAMES="/opt/amdgpu/share/vulkan/icd.d/amd_icd32.json:/opt/amdgpu/share/vulkan/icd.d/amd_icd64.json"
|
||||||
PRO_DIR="/opt/amdgpu-pro/etc/vulkan/icd.d"
|
|
||||||
VLK_DIR="/etc/vulkan/icd.d"
|
|
||||||
LEGACY_DIR="/opt/amdgpu-pro/vulkan-legacy/etc/vulkan/icd.d"
|
|
||||||
|
|
||||||
vk_radv() {
|
|
||||||
export VK_ICD_FILENAMES="${RADV_DIR}/radeon_icd.i686.json:${RADV_DIR}/radeon_icd.x86_64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_amdvlk() {
|
|
||||||
export VK_ICD_FILENAMES="${VLK_DIR}/amd_icd32.json:${VLK_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
export VK_ICD_FILENAMES="${PRO_DIR}/amd_icd32.json:${PRO_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_legacy() {
|
|
||||||
export VK_ICD_FILENAMES="${LEGACY_DIR}/amd_icd32.json:${LEGACY_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == vk_radv ]]; then
|
|
||||||
vk_radv
|
|
||||||
elif [[ $(basename $0) == vk_amdvlk ]]; then
|
|
||||||
vk_amdvlk
|
|
||||||
elif [[ $(basename $0) == vk_pro ]]; then
|
|
||||||
vk_pro
|
|
||||||
elif [[ $(basename $0) == vk_legacy ]]; then
|
|
||||||
vk_legacy
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# This script applies amdvlk-pro/amdvlk/radv Vulkan driver for specific application.
|
|
||||||
# You can see the list of available drivers with vulkaninfo utility, see the driverName and driverID lines.
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# <vk_radv|vk_amdvlk|vk_pro> <app and its parameters>
|
|
||||||
# For example:
|
|
||||||
# $ vk_pro vkmark
|
|
||||||
# This will start vkmark with AMDGPU PRO vulkan driver.
|
|
||||||
|
|
||||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
|
||||||
# So we revert this behavior to standard one.
|
|
||||||
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
|
||||||
|
|
||||||
RADV_DIR="/usr/share/vulkan/icd.d"
|
|
||||||
PRO_DIR="/opt/amdgpu-pro/etc/vulkan/icd.d"
|
|
||||||
VLK_DIR="/etc/vulkan/icd.d"
|
|
||||||
LEGACY_DIR="/opt/amdgpu-pro/vulkan-legacy/etc/vulkan/icd.d"
|
|
||||||
|
|
||||||
vk_radv() {
|
|
||||||
export VK_ICD_FILENAMES="${RADV_DIR}/radeon_icd.i686.json:${RADV_DIR}/radeon_icd.x86_64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_amdvlk() {
|
|
||||||
export VK_ICD_FILENAMES="${VLK_DIR}/amd_icd32.json:${VLK_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
export VK_ICD_FILENAMES="${PRO_DIR}/amd_icd32.json:${PRO_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_legacy() {
|
|
||||||
export VK_ICD_FILENAMES="${LEGACY_DIR}/amd_icd32.json:${LEGACY_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == vk_radv ]]; then
|
|
||||||
vk_radv
|
|
||||||
elif [[ $(basename $0) == vk_amdvlk ]]; then
|
|
||||||
vk_amdvlk
|
|
||||||
elif [[ $(basename $0) == vk_pro ]]; then
|
|
||||||
vk_pro
|
|
||||||
elif [[ $(basename $0) == vk_legacy ]]; then
|
|
||||||
vk_legacy
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
|
||||||
"$@"
|
|
@ -11,42 +11,10 @@
|
|||||||
|
|
||||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
||||||
# So we revert this behavior to standard one.
|
# So we revert this behavior to standard one.
|
||||||
|
|
||||||
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
||||||
|
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||||
RADV_DIR="/usr/share/vulkan/icd.d"
|
export VK_ICD_FILENAMES="/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd32.json:/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json"
|
||||||
PRO_DIR="/opt/amdgpu-pro/etc/vulkan/icd.d"
|
|
||||||
VLK_DIR="/etc/vulkan/icd.d"
|
|
||||||
LEGACY_DIR="/opt/amdgpu-pro/vulkan-legacy/etc/vulkan/icd.d"
|
|
||||||
|
|
||||||
vk_radv() {
|
|
||||||
export VK_ICD_FILENAMES="${RADV_DIR}/radeon_icd.i686.json:${RADV_DIR}/radeon_icd.x86_64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_amdvlk() {
|
|
||||||
export VK_ICD_FILENAMES="${VLK_DIR}/amd_icd32.json:${VLK_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
export VK_ICD_FILENAMES="${PRO_DIR}/amd_icd32.json:${PRO_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_legacy() {
|
|
||||||
export VK_ICD_FILENAMES="${LEGACY_DIR}/amd_icd32.json:${LEGACY_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == vk_radv ]]; then
|
|
||||||
vk_radv
|
|
||||||
elif [[ $(basename $0) == vk_amdvlk ]]; then
|
|
||||||
vk_amdvlk
|
|
||||||
elif [[ $(basename $0) == vk_pro ]]; then
|
|
||||||
vk_pro
|
|
||||||
elif [[ $(basename $0) == vk_legacy ]]; then
|
|
||||||
vk_legacy
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -11,42 +11,8 @@
|
|||||||
|
|
||||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
||||||
# So we revert this behavior to standard one.
|
# So we revert this behavior to standard one.
|
||||||
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
|
||||||
|
|
||||||
RADV_DIR="/usr/share/vulkan/icd.d"
|
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
|
||||||
PRO_DIR="/opt/amdgpu-pro/etc/vulkan/icd.d"
|
|
||||||
VLK_DIR="/etc/vulkan/icd.d"
|
|
||||||
LEGACY_DIR="/opt/amdgpu-pro/vulkan-legacy/etc/vulkan/icd.d"
|
|
||||||
|
|
||||||
vk_radv() {
|
|
||||||
export VK_ICD_FILENAMES="${RADV_DIR}/radeon_icd.i686.json:${RADV_DIR}/radeon_icd.x86_64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_amdvlk() {
|
|
||||||
export VK_ICD_FILENAMES="${VLK_DIR}/amd_icd32.json:${VLK_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_pro() {
|
|
||||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
|
||||||
export VK_ICD_FILENAMES="${PRO_DIR}/amd_icd32.json:${PRO_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
vk_legacy() {
|
|
||||||
export VK_ICD_FILENAMES="${LEGACY_DIR}/amd_icd32.json:${LEGACY_DIR}/amd_icd64.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $(basename $0) == vk_radv ]]; then
|
|
||||||
vk_radv
|
|
||||||
elif [[ $(basename $0) == vk_amdvlk ]]; then
|
|
||||||
vk_amdvlk
|
|
||||||
elif [[ $(basename $0) == vk_pro ]]; then
|
|
||||||
vk_pro
|
|
||||||
elif [[ $(basename $0) == vk_legacy ]]; then
|
|
||||||
vk_legacy
|
|
||||||
else
|
|
||||||
echo "Unknown function"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# applied variables, now execute the rest of the command
|
# applied variables, now execute the rest of the command
|
||||||
"$@"
|
"$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user