From 7a5800af3dc368326ce262b9d08d85f213968950 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 23 Mar 2021 11:11:00 -0400 Subject: [PATCH] zink: hook up push descriptor and descriptor template extensions Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_device_info.py | 5 +++++ src/gallium/drivers/zink/zink_screen.c | 11 +++++++++++ src/gallium/drivers/zink/zink_screen.h | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/src/gallium/drivers/zink/zink_device_info.py b/src/gallium/drivers/zink/zink_device_info.py index eeef50d..d4f543b 100644 --- a/src/gallium/drivers/zink/zink_device_info.py +++ b/src/gallium/drivers/zink/zink_device_info.py @@ -161,6 +161,11 @@ EXTENSIONS = [ Extension("VK_KHR_shader_float16_int8", alias="shader_float16_int8", features=True), + Extension("VK_KHR_push_descriptor", + alias="push", + properties=True), + Extension("VK_KHR_descriptor_update_template", + alias="template"), ] # constructor: Versions(device_version(major, minor, patch), struct_version(major, minor)) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index bd7acdc..1c8e6db 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1248,6 +1248,17 @@ load_device_extensions(struct zink_screen *screen) if (screen->info.have_KHR_maintenance3) GET_PROC_ADDR_KHR(GetDescriptorSetLayoutSupport); + if (screen->info.have_KHR_push_descriptor) { + GET_PROC_ADDR(CmdPushDescriptorSetKHR); + GET_PROC_ADDR(CmdPushDescriptorSetWithTemplateKHR); + } + + if (screen->info.have_KHR_descriptor_update_template) { + GET_PROC_ADDR_KHR(CreateDescriptorUpdateTemplate); + GET_PROC_ADDR_KHR(DestroyDescriptorUpdateTemplate); + GET_PROC_ADDR_KHR(UpdateDescriptorSetWithTemplate); + } + screen->have_triangle_fans = true; #if defined(VK_EXTX_PORTABILITY_SUBSET_EXTENSION_NAME) if (screen->info.have_EXTX_portability_subset) { diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h index 7f6715b..52b65a2 100644 --- a/src/gallium/drivers/zink/zink_screen.h +++ b/src/gallium/drivers/zink/zink_screen.h @@ -126,6 +126,11 @@ struct zink_screen { PFN_vkWaitSemaphores vk_WaitSemaphores; PFN_vkGetDescriptorSetLayoutSupport vk_GetDescriptorSetLayoutSupport; + PFN_vkCmdPushDescriptorSetKHR vk_CmdPushDescriptorSetKHR; + PFN_vkCreateDescriptorUpdateTemplate vk_CreateDescriptorUpdateTemplate; + PFN_vkDestroyDescriptorUpdateTemplate vk_DestroyDescriptorUpdateTemplate; + PFN_vkUpdateDescriptorSetWithTemplate vk_UpdateDescriptorSetWithTemplate; + PFN_vkCmdPushDescriptorSetWithTemplateKHR vk_CmdPushDescriptorSetWithTemplateKHR; bool (*descriptor_program_init)(struct zink_context *ctx, struct zink_program *pg); void (*descriptor_program_deinit)(struct zink_screen *screen, struct zink_program *pg); void (*descriptors_update)(struct zink_context *ctx, bool is_compute); -- 2.7.4