clamp group physicalDeviceCount to VK_MAX_DEVICE_GROUP_SIZE#1945
Merged
charles-lunarg merged 1 commit intoJun 23, 2026
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 23, 2026
|
CI Vulkan-Loader build queued with queue ID 15195. |
|
CI Vulkan-Loader build # 3582 running. |
|
CI Vulkan-Loader build # 3582 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.
Tracing how driver-reported counts flow into the device-group sort.
VkPhysicalDeviceGroupProperties::physicalDevicesis a fixed[VK_MAX_DEVICE_GROUP_SIZE]array, andloader_physical_device_group_termembeds a matchinginternal_device_info[VK_MAX_DEVICE_GROUP_SIZE]. terminator_EnumeratePhysicalDeviceGroups copies each group straight from the ICD intolocal_phys_dev_groups[...].group_propsand trustsphysicalDeviceCountunmodified.An ICD that reports
physicalDeviceCountgreater than 32 then drives the consumers off the end of those fixed arrays: the Linux sort writes pastinternal_device_info, while the Windows sort andsetup_loader_tramp_phys_dev_groupsread pastphysicalDevices. The count from the first (group-count) query is already clamped, but the per-group device count never was.Clamp it to
VK_MAX_DEVICE_GROUP_SIZEat the two points where the group is copied in, so every downstream consumer sees a count that fits its array. The plain-device path already sets the count to 1.