From: Bas Nieuwenhuizen Date: Tue, 6 Jun 2017 16:43:38 +0000 (+0200) Subject: radv: Remove vertex_descriptors_dirty. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ec89727b28bcfcc24cf2fa8b6d0a7eb6927fd3f;p=mesa.git radv: Remove vertex_descriptors_dirty. Redundant. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Dave Airlie --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index ed0aa8020ce..ca9d606a7ca 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1527,7 +1527,7 @@ radv_cmd_buffer_flush_state(struct radv_cmd_buffer *cmd_buffer, MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 4096); - if ((cmd_buffer->state.vertex_descriptors_dirty || cmd_buffer->state.vb_dirty) && + if ((cmd_buffer->state.pipeline != cmd_buffer->state.emitted_pipeline || cmd_buffer->state.vb_dirty) && cmd_buffer->state.pipeline->num_vertex_attribs && cmd_buffer->state.pipeline->shaders[MESA_SHADER_VERTEX]->info.info.vs.has_vertex_buffers) { unsigned vb_offset; @@ -1568,7 +1568,6 @@ radv_cmd_buffer_flush_state(struct radv_cmd_buffer *cmd_buffer, AC_UD_VS_VERTEX_BUFFERS, va); } - cmd_buffer->state.vertex_descriptors_dirty = false; cmd_buffer->state.vb_dirty = 0; if (cmd_buffer->state.dirty & RADV_CMD_DIRTY_PIPELINE) radv_emit_graphics_pipeline(cmd_buffer, pipeline); @@ -2268,7 +2267,6 @@ void radv_CmdBindPipeline( if (!pipeline) break; - cmd_buffer->state.vertex_descriptors_dirty = true; cmd_buffer->state.dirty |= RADV_CMD_DIRTY_PIPELINE; cmd_buffer->push_constant_stages |= pipeline->active_stages; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index a3920a72702..5e629d72783 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -750,7 +750,6 @@ struct radv_attachment_state { struct radv_cmd_state { uint32_t vb_dirty; radv_cmd_dirty_mask_t dirty; - bool vertex_descriptors_dirty; bool push_descriptors_dirty; struct radv_pipeline * pipeline;