From 81e6c612f14e4f985133e67ad3a963aebda14b9c Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 14 Jun 2024 18:50:02 -0500 Subject: [PATCH] nvk: Use NVK_VK_GRAPHICS_STAGE_BITS in dirty_cbufs_for_descriprots() This is a no-op change for now but it'll be a problem when we hook up task/mesh if we don't consider those to be graphics stages. Part-of: --- src/nouveau/vulkan/nvk_cmd_buffer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/nouveau/vulkan/nvk_cmd_buffer.c b/src/nouveau/vulkan/nvk_cmd_buffer.c index 26b348447e6..5d47ce0f3c5 100644 --- a/src/nouveau/vulkan/nvk_cmd_buffer.c +++ b/src/nouveau/vulkan/nvk_cmd_buffer.c @@ -603,11 +603,11 @@ nvk_cmd_dirty_cbufs_for_descriptors(struct nvk_cmd_buffer *cmd, uint32_t sets_start, uint32_t sets_end, uint32_t dyn_start, uint32_t dyn_end) { - if (!(stages & VK_SHADER_STAGE_ALL_GRAPHICS)) + if (!(stages & NVK_VK_GRAPHICS_STAGE_BITS)) return; uint32_t groups = 0; - u_foreach_bit(i, stages & VK_SHADER_STAGE_ALL_GRAPHICS) { + u_foreach_bit(i, stages & NVK_VK_GRAPHICS_STAGE_BITS) { gl_shader_stage stage = vk_to_mesa_shader_stage(1 << i); uint32_t g = nvk_cbuf_binding_for_stage(stage); groups |= BITFIELD_BIT(g); @@ -995,11 +995,12 @@ nvk_CmdPushDescriptorSetWithTemplate2KHR( pPushDescriptorSetWithTemplateInfo->descriptorUpdateTemplate); VK_FROM_HANDLE(vk_pipeline_layout, pipeline_layout, pPushDescriptorSetWithTemplateInfo->layout); + const uint32_t set = pPushDescriptorSetWithTemplateInfo->set; struct nvk_descriptor_state *desc = nvk_get_descriptors_state(cmd, template->bind_point); struct nvk_push_descriptor_set *push_set = - nvk_cmd_push_descriptors(cmd, desc, pPushDescriptorSetWithTemplateInfo->set); + nvk_cmd_push_descriptors(cmd, desc, set); if (unlikely(push_set == NULL)) return; @@ -1008,4 +1009,7 @@ nvk_CmdPushDescriptorSetWithTemplate2KHR( nvk_push_descriptor_set_update_template(dev, push_set, set_layout, template, pPushDescriptorSetWithTemplateInfo->pData); + + nvk_cmd_dirty_cbufs_for_descriptors(cmd, info->stageFlags, + set, set + 1, 0, 0); }