Add drivers field to settings file#1695
Conversation
|
CI Vulkan-Loader build queued with queue ID 435747. |
|
CI Vulkan-Loader build queued with queue ID 435764. |
|
CI Vulkan-Loader build # 3017 running. |
|
CI Vulkan-Loader build # 3017 aborted. |
| VkResult res = VK_SUCCESS; | ||
|
|
||
| cJSON* use_additional_drivers_exclusively_json = | ||
| loader_cJSON_GetObjectItem(settings_object, "use_additional_drivers_exclusively"); |
There was a problem hiding this comment.
This is great! I think it allows Vulkan Configurator to fully control Vulkan drivers as I can search for the installed drivers and put them in the additional drivers list as requested by the Vulkan developer in Vulkan Configurator
37abe1a to
cce11ac
Compare
|
CI Vulkan-Loader build queued with queue ID 444249. |
|
CI Vulkan-Loader build queued with queue ID 444266. |
|
CI Vulkan-Loader build # 3039 running. |
|
CI Vulkan-Loader build # 3039 failed. |
cce11ac to
4d8e98c
Compare
|
CI Vulkan-Loader build queued with queue ID 447994. |
|
CI Vulkan-Loader build queued with queue ID 448011. |
|
CI Vulkan-Loader build # 3045 running. |
|
CI Vulkan-Loader build # 3045 failed. |
|
|
||
| The Loader Settings File is located by searching for a file named vk_loader_settings.json in the following locations: | ||
|
|
||
| `$HOME/.local/share/vulkan/loader_settings.d/` |
There was a problem hiding this comment.
@charles-lunarg Not sure if that matters, but this location is the only one I am taking into account with Vulkan Configurator, it's where I am always writing vk_loader_settings.json.
| } | ||
| if (settings->additional_driver_count > 0) { | ||
| loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "----"); | ||
| loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Use Additional Drivers Exclusively = %s", |
There was a problem hiding this comment.
@charles-lunarg I am not convinced it's a debug level message. For me "debug level" is for the Loader developer but this is a relevant information for application developer. So I think it's a VULKAN_LOADER_NOFICATION_BIT level message.
4d8e98c to
623a730
Compare
|
CI Vulkan-Loader build queued with queue ID 457678. |
|
CI Vulkan-Loader build queued with queue ID 457695. |
|
CI Vulkan-Loader build # 3054 running. |
|
CI Vulkan-Loader build # 3054 passed. |
623a730 to
9b8c953
Compare
|
CI Vulkan-Loader build queued with queue ID 458290. |
|
CI Vulkan-Loader build queued with queue ID 458307. |
9b8c953 to
eeb159c
Compare
|
CI Vulkan-Loader build queued with queue ID 458309. |
|
CI Vulkan-Loader build # 3057 running. |
|
CI Vulkan-Loader build queued with queue ID 458344. |
eeb159c to
f7f140f
Compare
|
CI Vulkan-Loader build queued with queue ID 458346. |
|
CI Vulkan-Loader build # 3059 running. |
|
CI Vulkan-Loader build queued with queue ID 458381. |
|
CI Vulkan-Loader build # 3060 running. |
|
CI Vulkan-Loader build # 3060 passed. |
f7f140f to
79298ab
Compare
|
CI Vulkan-Loader build queued with queue ID 458747. |
|
CI Vulkan-Loader build # 3061 running. |
|
CI Vulkan-Loader build queued with queue ID 458765. |
christophe-lunarg
left a comment
There was a problem hiding this comment.
Two mains issues found but being fixed, good to merge to main!
|
CI Vulkan-Loader build # 3062 running. |
|
CI Vulkan-Loader build # 3062 passed. |
The loader settings file now can specify additional drivers to include, whether to use those drivers exclusively, and filter/sort the VkPhysicalDevices using the settings file provided list of deviceUUID's. This lets the settings file control which drivers and/or devices are reported by the loader, giving greater control over the runtime behavior of the loader. device_configurations is an array of JSON objects which contain two fields each, deviceUUID and deviceName. deviceUUID is an array of 16 uint8_t's (expressed simply as numbers) which takes the value of the VkPhysicalDeviceVulkan11Properties::deviceUUID struct member. deviceName is a string taken from VkPhysicalDeviceProperties::deviceName. Only deviceUUID is used to filter and sort VkPhysicalDevices, deviceName is for convenience and ease of understanding the JSON loader settings file. additional_drivers is an array of JSON object which contain just one field, path, which is a path to the Manifest ICD JSON file for a driver. additional_drivers_use_exclusively is a boolean field indicating whether the loader should: if false (default if unspecified) - look for drivers in the normal locations and append the additional_drivers to the back of the driver list. if true - only use drivers in the additional_drivers, ignoring all other driver search locations.
79298ab to
7ca69c4
Compare
|
CI Vulkan-Loader build queued with queue ID 459062. |
|
CI Vulkan-Loader build queued with queue ID 459079. |
|
CI Vulkan-Loader build # 3064 running. |
|
CI Vulkan-Loader build # 3064 passed. |
|
Now that the most recent SDK has shipped, it is time to merge this in so that the feature can be robustly tested during the next handful of weeks. |
Allows the settings file to contain 'additional drivers' which are just paths to ICD manifest files.
Adds the
use_additional_drivers_exclusivelyboolean field andadditional_driverslist to settings array on a per-application basis (AKA in the same object as thelayerslist.TODO:
Finish writing tests. Make sure environment variables work properly or at least don't make things more complicated.
Document changes to manifest file.
Double check that additional drivers are 'last' in the list in all situations (linux ordering, windows ordering).