Vulkan-Loader allow using VK_ICD_FILENAMES in addition to the default search paths

In Dawn, Chromium's WebGPU implementation, we would like to use the loader both to discover the system drivers as well as Swiftshader's software implementation. We can use VK_ICD_FILENAMES but that only allows finding Swiftshader.

Would it be possible to have a special path for VK_ICD_FILENAMES, or another environment variable that makes the ICD files be searched in addition to the regular system ICD files? It would make it much easier for Dawn to surface "WebGPU adapters" corresponding to all relevant drivers. (the alternative would be to create multiple instances, changing VK_ICD_FILENAMES each time, but that sounds very brittle).

Asked Jan 13 '22 15:01
avatar Kangz

1 Answer:

Is there a reason you can't install Swiftshader?

Swiftshader isn't like other drivers because it can be shipped along with applications, instead of being something that's hardware dependent and installed directly by users. For example imagine both Chromium and Firefox want to ship their own version of swiftshader (because they tested against it), they can't install it in the user-specific location because it risks conflicting with the other browser's.

What they want is to see all the default ICDs, both system-wide and user-specific, and inject an additional ICD.

+CC @null77 that had a similar issue in ANGLE, and @kvark for the Firefox side.

Answered Nov 22 '19 at 17:11
avatar  of Kangz