diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-09-06 15:46:18 +0200 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-09-07 10:01:21 +0200 |
commit | 86b99893eba531b881eabe96840dbf6b58b2d37e (patch) | |
tree | 393d858a0e4e26a5ba4875d256a54486085189bf | |
parent | 2408f616e80f4b5dc022a1ed650778c312f15997 (diff) |
radv: do not use a bitfield when dirtying the vertex buffers
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>
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 5 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b3721237ab..f4ec57dc04 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -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( diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index e73ba1a169..e32fa576fb 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -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; |