index pd_details by matched device in settings device config apply#1930
Merged
Conversation
|
Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build. |
1 similar comment
|
Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build. |
charles-lunarg
approved these changes
Jun 9, 2026
charles-lunarg
left a comment
Collaborator
There was a problem hiding this comment.
Classic mixing up i and j. I took a minute to read the description and wasn't certain just how much code would change to need such a long explanation.
|
CI Vulkan-Loader build queued with queue ID 766093. |
|
CI Vulkan-Loader build # 3541 running. |
|
CI Vulkan-Loader build # 3541 passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pd_details in loader_apply_settings_device_configurations is sized by
inst->phys_dev_count_term, one entry per enumerated VkPhysicalDevice. The inner
loop walks the real devices with j and matches each settings-file
device_configuration (outer index i) against them.
Spotted while reading the device_configurations path. The two debug log lines in
the match block read pd_details[i] for driverName and driverVersion. i is the
outer index over inst->settings.device_configuration_count, which comes from
vk_loader_settings.json, not from the device array. The deviceName beside them
already uses pd_details[j], so j is the index that was meant.
A settings file may list more device_configurations than there are devices.
Duplicate one real device's deviceUUID/driverUUID/driverVersion across several
entries and every entry matches that same device. Once i passes
phys_dev_count_term the read walks off the end of the stack allocation.
driverVersion is read unconditionally as a vararg; the driverName %s read
follows when debug logging is on.
All three reads now use pd_details[j].