Module: Mesa Branch: main Commit: 4588453815c58ec848b0ff6f18a08836e70f55df URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4588453815c58ec848b0ff6f18a08836e70f55df
Author: Eric Engestrom <[email protected]> Date: Fri Aug 12 17:51:51 2022 +0100 vk/device-select-layer: fix .sType of VkPhysicalDeviceGroupProperties The validation layers complained: > Validation Error: [ VUID-VkPhysicalDeviceGroupProperties-sType-sType ] Object > 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xc9edee8b | > vkEnumeratePhysicalDeviceGroups: parameter > pPhysicalDeviceGroupProperties[0].sType must be > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES The Vulkan spec states: > sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES > (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPhysicalDeviceGroupProperties-sType-sType) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Georg Lehmann <[email protected]> Fixes: c196ffaca6d ("vk-device-select: add device group support") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18037> --- src/vulkan/device-select-layer/device_select_layer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vulkan/device-select-layer/device_select_layer.c b/src/vulkan/device-select-layer/device_select_layer.c index 70fb091c51c..5a8bbe68ed8 100644 --- a/src/vulkan/device-select-layer/device_select_layer.c +++ b/src/vulkan/device-select-layer/device_select_layer.c @@ -570,6 +570,9 @@ static VkResult device_select_EnumeratePhysicalDeviceGroups(VkInstance instance, goto out; } + for (unsigned i = 0; i < physical_device_group_count; i++) + physical_device_groups[i].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES; + result = info->EnumeratePhysicalDeviceGroups(instance, &physical_device_group_count, physical_device_groups); if (result != VK_SUCCESS) goto out;
