diff --git a/src/gallium/drivers/zink/zink_instance.py b/src/gallium/drivers/zink/zink_instance.py index d926c7ac29e..c4d597106ab 100644 --- a/src/gallium/drivers/zink/zink_instance.py +++ b/src/gallium/drivers/zink/zink_instance.py @@ -43,7 +43,7 @@ import sys EXTENSIONS = [ Extension("VK_EXT_debug_utils"), Extension("VK_KHR_get_physical_device_properties2", - functions=["GetPhysicalDeviceFeatures2", "GetPhysicalDeviceProperties2"]), + functions=["GetPhysicalDeviceFeatures2", "GetPhysicalDeviceProperties2", "GetPhysicalDeviceFormatProperties2"]), Extension("VK_MVK_moltenvk", nonstandard=True), ] diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 529ace85779..8566fa5c673 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1310,7 +1310,13 @@ populate_format_props(struct zink_screen *screen) VkFormat format = zink_get_format(screen, i); if (!format) continue; - vkGetPhysicalDeviceFormatProperties(screen->pdev, format, &screen->format_props[i]); + if (screen->vk_GetPhysicalDeviceFormatProperties2) { + VkFormatProperties2 props = {}; + props.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; + screen->vk_GetPhysicalDeviceFormatProperties2(screen->pdev, format, &props); + screen->format_props[i] = props.formatProperties; + } else + vkGetPhysicalDeviceFormatProperties(screen->pdev, format, &screen->format_props[i]); } } diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h index 038570e028a..4af321d41e4 100644 --- a/src/gallium/drivers/zink/zink_screen.h +++ b/src/gallium/drivers/zink/zink_screen.h @@ -104,6 +104,7 @@ struct zink_screen { PFN_vkGetPhysicalDeviceFeatures2 vk_GetPhysicalDeviceFeatures2; PFN_vkGetPhysicalDeviceProperties2 vk_GetPhysicalDeviceProperties2; + PFN_vkGetPhysicalDeviceFormatProperties2 vk_GetPhysicalDeviceFormatProperties2; PFN_vkCmdDrawIndirectCount vk_CmdDrawIndirectCount; PFN_vkCmdDrawIndexedIndirectCount vk_CmdDrawIndexedIndirectCount;