radv: dirty the dynamic vertex input state only when needed
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 May 2023 10:44:48 +0000 (12:44 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 12 May 2023 06:20:02 +0000 (06:20 +0000)
This shouldn't be necessary when the VS doesn't have a prolog.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22944>

src/amd/vulkan/radv_cmd_buffer.c

index ba15a27..7ac57e9 100644 (file)
@@ -6737,7 +6737,7 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
       cmd_buffer->state.graphics_pipeline = graphics_pipeline;
 
       cmd_buffer->state.has_nggc = graphics_pipeline->has_ngg_culling;
-      cmd_buffer->state.dirty |= RADV_CMD_DIRTY_PIPELINE | RADV_CMD_DIRTY_DYNAMIC_VERTEX_INPUT;
+      cmd_buffer->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
       cmd_buffer->push_constant_stages |= graphics_pipeline->active_stages;
 
       /* Prefetch all pipeline shaders at first draw time. */
@@ -6771,6 +6771,7 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
          /* Re-emit the VS prolog when a new vertex shader is bound. */
          if (vs->info.vs.has_prolog) {
             cmd_buffer->state.emitted_vs_prolog = NULL;
+            cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_VERTEX_INPUT;
          }
 
          /* Re-emit the vertex buffer descriptors because they are really tied to the pipeline. */