From 3363d41a2064d6d8bdb485945015f1802be6666e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 3 Jan 2024 21:38:18 -0500 Subject: [PATCH] st/mesa: do (inputs_read & ~enabled_arrays) outside st_setup_current also move dual_slot_inputs before inputs_read to match st_setup_array. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-By: Mike Blumenkrantz Part-of: --- src/mesa/state_tracker/st_atom_array.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_array.cpp b/src/mesa/state_tracker/st_atom_array.cpp index 4646b06303e..5a484330714 100644 --- a/src/mesa/state_tracker/st_atom_array.cpp +++ b/src/mesa/state_tracker/st_atom_array.cpp @@ -194,16 +194,15 @@ st_setup_arrays(struct st_context *st, */ template void ALWAYS_INLINE st_setup_current(struct st_context *st, - const GLbitfield inputs_read, const GLbitfield dual_slot_inputs, - const GLbitfield enabled_arrays, + const GLbitfield inputs_read, + GLbitfield curmask, struct cso_velems_state *velements, struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers) { struct gl_context *ctx = st->ctx; /* Process values that should have better been uniforms in the application */ - GLbitfield curmask = inputs_read & ~enabled_arrays; if (curmask) { unsigned num_attribs = util_bitcount_fast(curmask); unsigned num_dual_attribs = util_bitcount_fast(curmask & @@ -329,8 +328,8 @@ st_update_array_templ(struct st_context *st, /* _NEW_CURRENT_ATTRIB */ /* Setup zero-stride attribs. */ - st_setup_current(st, inputs_read, dual_slot_inputs, - enabled_arrays, + st_setup_current(st, dual_slot_inputs, inputs_read, + inputs_read & ~enabled_arrays, &velements, vbuffer, &num_vbuffers); struct cso_context *cso = st->cso_context;