mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
zink: use vkGetPhysicalDeviceFormatProperties2 when available
technically shouldn't matter but whatever Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9984>
This commit is contained in:
parent
3fa7ce4d46
commit
733e07565f
3 changed files with 9 additions and 2 deletions
|
|
@ -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),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue