From 54a6c81d3a20e6b5e6ac8b36f291ab2a8761fc95 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 22 Oct 2025 17:53:30 +0200 Subject: [PATCH] radv: dirty dynamic descriptors when required The user SGPRS might be different and dynamic descriptors need to be re-emitted again This fixes a regression with ANGLE, and VCKTS is currently missing coverage. Fixes: a47952d495e ("radv: upload and emit dynamic descriptors separately from push constants") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14146 Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index da8709b6929..4e9412b863f 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -8092,6 +8092,8 @@ radv_mark_descriptors_dirty(struct radv_cmd_buffer *cmd_buffer, VkPipelineBindPo struct radv_descriptor_state *descriptors_state = radv_get_descriptors_state(cmd_buffer, bind_point); descriptors_state->dirty |= descriptors_state->valid; + if (descriptors_state->dynamic_offset_count) + descriptors_state->dirty_dynamic = true; } static void @@ -8620,7 +8622,6 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline if (cmd_buffer->state.compute_pipeline == compute_pipeline) return; - radv_mark_descriptors_dirty(cmd_buffer, pipelineBindPoint); radv_bind_shader(cmd_buffer, compute_pipeline->base.shaders[MESA_SHADER_COMPUTE], MESA_SHADER_COMPUTE); @@ -8634,7 +8635,6 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline if (cmd_buffer->state.rt_pipeline == rt_pipeline) return; - radv_mark_descriptors_dirty(cmd_buffer, pipelineBindPoint); radv_bind_shader(cmd_buffer, rt_pipeline->base.base.shaders[MESA_SHADER_INTERSECTION], MESA_SHADER_INTERSECTION); radv_bind_rt_prolog(cmd_buffer, rt_pipeline->prolog); @@ -8668,7 +8668,6 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline if (cmd_buffer->state.graphics_pipeline == graphics_pipeline) return; - radv_mark_descriptors_dirty(cmd_buffer, pipelineBindPoint); radv_foreach_stage ( stage, (cmd_buffer->state.active_stages | graphics_pipeline->active_stages) & RADV_GRAPHICS_STAGE_BITS) { @@ -8722,6 +8721,8 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline cmd_buffer->descriptors[vk_to_bind_point(pipelineBindPoint)].dynamic_offset_count = pipeline->dynamic_offset_count; cmd_buffer->descriptors[vk_to_bind_point(pipelineBindPoint)].need_indirect_descriptors = pipeline->need_indirect_descriptors; + + radv_mark_descriptors_dirty(cmd_buffer, pipelineBindPoint); } VKAPI_ATTR void VKAPI_CALL