radv: dirty the dynamic vertex input state only when needed

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>
This commit is contained in:
Samuel Pitoiset 2023-05-10 12:44:48 +02:00 committed by Marge Bot
parent 8688e11013
commit 041cf2d48e

View 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. */