mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Set all available ICDs for 'Auto' ICD option rather than none
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.
This commit is contained in:
parent
9541841cd5
commit
2dd0f9c11a
|
@ -65,7 +65,7 @@ def get_optirun_choices():
|
|||
|
||||
def get_vk_icd_choices():
|
||||
"""Return available Vulkan ICD loaders"""
|
||||
choices = [(_("Auto"), "")]
|
||||
loaders = []
|
||||
icd_files = defaultdict(list)
|
||||
# Add loaders
|
||||
for data_dir in VULKAN_DATA_DIRS:
|
||||
|
@ -73,10 +73,15 @@ def get_vk_icd_choices():
|
|||
for loader in glob.glob(path):
|
||||
icd_key = os.path.basename(loader).split(".")[0]
|
||||
icd_files[icd_key].append(os.path.join(path, loader))
|
||||
loaders.append(loader)
|
||||
|
||||
loader_files = ":".join(loaders)
|
||||
choices = [(_("Auto"), loader_files)]
|
||||
|
||||
for icd_key in icd_files:
|
||||
files = ":".join(icd_files[icd_key])
|
||||
choices.append((icd_key.capitalize().replace("_icd", " ICD"), files))
|
||||
|
||||
return choices
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue