mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-17 08:27:39 +00:00
zink: add KHR_draw_indirect_count detection
this is a vk 1.2 feature Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8233>
This commit is contained in:
parent
ef06f1bb03
commit
1c01ad1b80
@ -7,6 +7,7 @@ EXTENSIONS = [
|
||||
Extension("VK_EXT_debug_utils"),
|
||||
Extension("VK_KHR_maintenance2"),
|
||||
Extension("VK_KHR_get_physical_device_properties2"),
|
||||
Extension("VK_KHR_draw_indirect_count"),
|
||||
Extension("VK_KHR_external_memory_capabilities"),
|
||||
Extension("VK_MVK_moltenvk"),
|
||||
]
|
||||
|
@ -834,6 +834,17 @@ load_instance_extensions(struct zink_screen *screen)
|
||||
GET_PROC_ADDR_INSTANCE(GetPhysicalDeviceProperties2);
|
||||
}
|
||||
|
||||
if (screen->instance_info.have_KHR_draw_indirect_count) {
|
||||
GET_PROC_ADDR_INSTANCE_LOCAL(screen->instance, CmdDrawIndirectCountKHR);
|
||||
GET_PROC_ADDR_INSTANCE_LOCAL(screen->instance, CmdDrawIndexedIndirectCountKHR);
|
||||
screen->vk_CmdDrawIndirectCount = vk_CmdDrawIndirectCountKHR;
|
||||
screen->vk_CmdDrawIndexedIndirectCount = vk_CmdDrawIndexedIndirectCountKHR;
|
||||
} else if (VK_MAKE_VERSION(1,1,0) <= screen->loader_version) {
|
||||
// Get Vk 1.1+ Instance functions
|
||||
GET_PROC_ADDR_INSTANCE(CmdDrawIndirectCount);
|
||||
GET_PROC_ADDR_INSTANCE(CmdDrawIndexedIndirectCount);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,9 @@ struct zink_screen {
|
||||
PFN_vkGetPhysicalDeviceFeatures2 vk_GetPhysicalDeviceFeatures2;
|
||||
PFN_vkGetPhysicalDeviceProperties2 vk_GetPhysicalDeviceProperties2;
|
||||
|
||||
PFN_vkCmdDrawIndirectCount vk_CmdDrawIndirectCount;
|
||||
PFN_vkCmdDrawIndexedIndirectCount vk_CmdDrawIndexedIndirectCount;
|
||||
|
||||
PFN_vkGetMemoryFdKHR vk_GetMemoryFdKHR;
|
||||
PFN_vkCmdBeginConditionalRenderingEXT vk_CmdBeginConditionalRenderingEXT;
|
||||
PFN_vkCmdEndConditionalRenderingEXT vk_CmdEndConditionalRenderingEXT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user