File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7874,6 +7874,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumeratePhysicalDeviceGroups(
78747874 for (uint32_t group = 0 ; group < count_this_time ; ++ group ) {
78757875 uint32_t cur_index = group + cur_icd_group_count ;
78767876 local_phys_dev_groups [cur_index ].group_props = pPhysicalDeviceGroupProperties [cur_index ];
7877+ // physicalDevices is a fixed VK_MAX_DEVICE_GROUP_SIZE array; don't trust a larger count from the ICD.
7878+ if (local_phys_dev_groups [cur_index ].group_props .physicalDeviceCount > VK_MAX_DEVICE_GROUP_SIZE ) {
7879+ local_phys_dev_groups [cur_index ].group_props .physicalDeviceCount = VK_MAX_DEVICE_GROUP_SIZE ;
7880+ }
78777881 local_phys_dev_groups [cur_index ].this_icd_term = icd_term ;
78787882 }
78797883 } else {
@@ -7904,6 +7908,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumeratePhysicalDeviceGroups(
79047908 for (uint32_t group = 0 ; group < count_this_time ; ++ group ) {
79057909 uint32_t cur_index = group + cur_icd_group_count ;
79067910 local_phys_dev_groups [cur_index ].group_props = tmp_group_props [group ];
7911+ // physicalDevices is a fixed VK_MAX_DEVICE_GROUP_SIZE array; don't trust a larger count from the ICD.
7912+ if (local_phys_dev_groups [cur_index ].group_props .physicalDeviceCount > VK_MAX_DEVICE_GROUP_SIZE ) {
7913+ local_phys_dev_groups [cur_index ].group_props .physicalDeviceCount = VK_MAX_DEVICE_GROUP_SIZE ;
7914+ }
79077915 local_phys_dev_groups [cur_index ].this_icd_term = icd_term ;
79087916 }
79097917 }
You can’t perform that action at this time.
0 commit comments