mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
r600: Fix comparison of strides array when emitting vertex buffers
The comparison was only comparing a number of bytes where we actually
have to compare a number of dwords (Thanks QuadShader for digging into this)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14067
Fixes: 659b7eb279 ("r600: better tracking for vertex buffer emission")
v2: use element size instead of type size (Vitaly)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37856>
This commit is contained in:
parent
49226692e5
commit
673351bbf3
1 changed files with 3 additions and 1 deletions
|
|
@ -564,7 +564,9 @@ static void r600_bind_vertex_elements(struct pipe_context *ctx, void *state)
|
|||
|
||||
r600_set_cso_state(rctx, &rctx->vertex_fetch_shader, state);
|
||||
if (!prev || (cso && cso->buffer_mask &&
|
||||
(prev->buffer_mask != cso->buffer_mask || memcmp(cso->strides, prev->strides, util_last_bit(cso->buffer_mask))))) {
|
||||
(prev->buffer_mask != cso->buffer_mask ||
|
||||
memcmp(cso->strides, prev->strides,
|
||||
util_last_bit(cso->buffer_mask) * sizeof(cso->strides[0]))))) {
|
||||
rctx->vertex_buffer_state.dirty_mask |= cso ? cso->buffer_mask : 0;
|
||||
r600_vertex_buffers_dirty(rctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue