radv: do not use a bitfield when dirtying the vertex buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 Sep 2017 13:46:18 +0000 (15:46 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 7 Sep 2017 08:01:21 +0000 (10:01 +0200)
Useless to track which one has been updated because we
re-upload all the vertex buffers in one shot.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h

index b3721237ab8a37444b7238c89118f0d5ff05c72d..f4ec57dc043f12629dfafc8bf9f2a457f5eb81d1 100644 (file)
@@ -1623,7 +1623,7 @@ radv_cmd_buffer_update_vertex_descriptors(struct radv_cmd_buffer *cmd_buffer)
                radv_emit_userdata_address(cmd_buffer, cmd_buffer->state.pipeline, MESA_SHADER_VERTEX,
                                           AC_UD_VS_VERTEX_BUFFERS, va);
        }
-       cmd_buffer->state.vb_dirty = 0;
+       cmd_buffer->state.vb_dirty = false;
 }
 
 static void
@@ -2043,8 +2043,9 @@ void radv_CmdBindVertexBuffers(
        for (uint32_t i = 0; i < bindingCount; i++) {
                vb[firstBinding + i].buffer = radv_buffer_from_handle(pBuffers[i]);
                vb[firstBinding + i].offset = pOffsets[i];
-               cmd_buffer->state.vb_dirty |= 1 << (firstBinding + i);
        }
+
+       cmd_buffer->state.vb_dirty = true;
 }
 
 void radv_CmdBindIndexBuffer(
index e73ba1a16943aaca6b68b9144cbc3b5e04cafb84..e32fa576fb7934a056aac895047fbd80f9731363 100644 (file)
@@ -760,7 +760,7 @@ struct radv_attachment_state {
 };
 
 struct radv_cmd_state {
-       uint32_t                                      vb_dirty;
+       bool                                          vb_dirty;
        radv_cmd_dirty_mask_t                         dirty;
        bool                                          push_descriptors_dirty;
        bool predicating;