If the user has AMDGPU-PRO or AMDVLK ICD loaders installed, we don't want to use them unless explicitly set, so we need to remove them from the full 'Auto' list.
Additionally, since the ICD files for AMDVLK/PRO don't end in .i686 or .x86_64, they currently get parsed into individual choices instead of a single concatenated choice for both 32 and 64 bit. This fixes that.
Test results:
/lutris/sysoptions.py
-----------
from lutris.util.log import logger
.....
def get_vk_icd_choices():
.....
logger.info(choices[0])
logger.info(choices[1])
logger.info(choices[2])
return choices
get_vk_icd_choices()
-----------
Results in:
2021-11-03 22:49:55,027: ('Auto', '')
2021-11-03 22:49:55,027: ('Intel ICD', '/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/intel_icd.i686.json')
2021-11-03 22:49:55,027: ('Radeon ICD', '/usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.i686.json')
Which tells us that our 'Auto' option passes a completely blank value to runners/runner.py for VK_ICD_FILENAMES, and this results in the system only using 64 bit icd files and skipping the 32 bit versions.
To fix this, we concatenate all possible ICD file paths to a single list and set this for the Auto option. Doing so allows whatever GPU is used to find the appropriate ICD library, regardless of vendor.
-We don't need to validate the file paths, there are two reasons this is incorrect:
(1) The file paths are already verified when they are auto-added here:
089b865290/lutris/sysoptions.py (L72)
(2) Since the files are concatenated here:
089b865290/lutris/sysoptions.py (L78)
it makes system.path_exists(vk_icd) invalid, because the value of vk_icd is now path1:path2:path3:path4 and so on, instead of a single file path.
Therefore the check for system.path_exists(vk_icd) fails and VK_ICD_FILENAMES never actually gets set by Lutris.