radv: Remove vertex_descriptors_dirty.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 6 Jun 2017 16:43:38 +0000 (18:43 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 6 Jun 2017 21:23:43 +0000 (23:23 +0200)
Redundant.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h

index ed0aa8020cef81555d3467d98b0bbbd98684fe28..ca9d606a7ca824f6df907eceae46d488baf23b00 100644 (file)
@@ -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;
 
index a3920a72702eaa5f238ebeff2600e22b10ea5a18..5e629d72783ce4881bf8494a40dd78195c62d188 100644 (file)
@@ -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;