Some env var combination could result in duplicated ICDs in the container
Steps to reproduce
- Ensure to have some valid vulkan json layers in
/usr/share/vulkan/icd.d
, like/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
- Launch Steam as
XDG_CONFIG_DIRS=/usr/share XDG_DATA_DIRS=/usr/share steam
- Check the Steam's system info
Expected behaviour
Under Vulkan->icds we expect to have /usr/share/vulkan/icd.d/radeon_icd.x86_64.json
only listed once.
Actual behaviour
/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
is listed twice.
This happens because in get_vulkan_search_paths()
we search in XDG_CONFIG_DIRS
, XDG_DATA_DIRS
etc. but we don't filter out duplicated ICDs.
And while this is not harmful in most cases, with Red Dead Redemption 2 this causes a crash at startup https://github.com/ValveSoftware/steam-runtime/issues/336