diff --git a/src/vulkan/runtime/vk_physical_device.c b/src/vulkan/runtime/vk_physical_device.c index e6504c88ec0..3fd79713f38 100644 --- a/src/vulkan/runtime/vk_physical_device.c +++ b/src/vulkan/runtime/vk_physical_device.c @@ -126,6 +126,37 @@ vk_common_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, *pProperties = props2.properties; } +VKAPI_ATTR void VKAPI_CALL +vk_common_GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, + uint32_t *pQueueFamilyPropertyCount, + VkQueueFamilyProperties *pQueueFamilyProperties) +{ + VK_FROM_HANDLE(vk_physical_device, pdevice, physicalDevice); + + if (!pQueueFamilyProperties) { + pdevice->dispatch_table.GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, + pQueueFamilyPropertyCount, + NULL); + return; + } + + STACK_ARRAY(VkQueueFamilyProperties2, props2, *pQueueFamilyPropertyCount); + + for (unsigned i = 0; i < *pQueueFamilyPropertyCount; ++i) { + props2[i].sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2; + props2[i].pNext = NULL; + } + + pdevice->dispatch_table.GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, + pQueueFamilyPropertyCount, + props2); + + for (unsigned i = 0; i < *pQueueFamilyPropertyCount; ++i) + pQueueFamilyProperties[i] = props2[i].queueFamilyProperties; + + STACK_ARRAY_FINISH(props2); +} + VKAPI_ATTR void VKAPI_CALL vk_common_GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties)