View previous topic :: View next topic |
Author |
Message |
ritzmax72 Tux's lil' helper
Joined: 10 Aug 2014 Posts: 114
|
Posted: Tue Oct 29, 2024 10:03 am Post subject: AMD Mesa Vulkan RADV and AMDVLK heads up |
|
|
Despite what the gentoo page says https://wiki.gentoo.org/wiki/AMDVLK
that RADV and AMDVLK can co-exists and simply switching them with environment variables will make application use particular implementation;
that is not correct.
This worked for "Sons of the forest" as I switched between two drivers to measure difference but for Elden Ring the mere presence of amdvlk-bin made it crashed/suspended.
Elden Ring will start but it crashes/suspends before going into game world no matter what value you use for AMD_VULKAN_ICD=RADV/AMDVLK.
Uninstalling amdvlk-bin fixes Elden Ring and it runs fine with RADV. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6065 Location: Removed by Neddy
|
Posted: Fri Nov 01, 2024 10:39 pm Post subject: |
|
|
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 select pro driver.
The best way to manage this, if you have the 3 types of drivers ( radv, amdvlk and pro) is to
1. disable switchable export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
2. set VK_ICD_FILENAMES to the appropriate driver
Code: |
#!/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
ICD_DIR="/usr/share/vulkan/icd.d"
vk_radv() {
export VK_ICD_FILENAMES="${ICD_DIR}/radeon_icd.i686.json:${ICD_DIR}/radeon_icd.x86_64.json"
}
vk_amdvlk() {
export VK_ICD_FILENAMES="${ICD_DIR}/amd_icd32.json:${ICD_DIR}/amd_icd64.json"
}
vk_pro() {
export VK_ICD_FILENAMES="${ICD_DIR}/amd_pro_icd32.json:${ICD_DIR}/amd_pro_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
else
echo "Unknown function"
exit 1
fi
# applied variables, now execute the rest of the command
"$@" |
_________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
ritzmax72 Tux's lil' helper
Joined: 10 Aug 2014 Posts: 114
|
Posted: Thu Nov 07, 2024 4:57 am Post subject: |
|
|
Thanks. I will check that. Wish such kind of info was updated on gentoo's wiki? I don't know how Gentoo pages are managed but that could be a good thing to do. |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 652
|
Posted: Thu Nov 07, 2024 12:14 pm Post subject: |
|
|
ritzmax72 wrote: | I don't know how Gentoo pages are managed but that could be a good thing to do. | New details are managed by users like you, I and Naib as far as I can tell (I recognise some of the names appearing in code hints etc), The info in this thread should be in https://wiki.gentoo.org/wiki/AMDVLK#Mesa_RADV_interoperability IMHO, but other wiki editors will guide you if that's wrong I'm sure. |
|
Back to top |
|
|
|