summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2020-12-19 16:45:28 -0500
committerMarge Bot <eric+marge@anholt.net>2021-01-18 01:17:19 +0000
commit1ceec51b128660d5f9037dd10ec5b0229a2378d1 (patch)
treeaa4bd52ea563c02c94e74bda857bdacbe7b19a1b
parentdf456312c2a9749ea535820d792b151b73b9757f (diff)
radeonsi: don't clear unaligned bits when unbinding vertex buffers
It's initialized to 0, so &= is a no-op. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index c2916b72f5a..6e9ca6de66e 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4852,10 +4852,8 @@ static void si_set_vertex_buffers(struct pipe_context *ctx, unsigned start_slot,
si_resource(buf)->bind_history |= PIPE_BIND_VERTEX_BUFFER;
}
} else {
- for (i = 0; i < count; i++) {
+ for (i = 0; i < count; i++)
pipe_resource_reference(&dst[i].buffer.resource, NULL);
- }
- unaligned &= ~updated_mask;
}
sctx->vertex_buffers_dirty = true;
sctx->vertex_buffer_unaligned = (orig_unaligned & ~updated_mask) | unaligned;