zink: don't modify the u_foreach_bit64 bit inside the loop in loop_io_var_mask()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

this breaks the macro and causes infinite loops on patch locations in release builds

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35922>
This commit is contained in:
Mike Blumenkrantz 2025-07-03 12:13:12 -04:00 committed by Marge Bot
parent 14608f1469
commit ef0bf50ae9

View file

@ -5424,16 +5424,17 @@ loop_io_var_mask(nir_shader *nir, nir_variable_mode mode, bool indirect, bool pa
{
ASSERTED bool is_vertex_input = nir->info.stage == MESA_SHADER_VERTEX && mode == nir_var_shader_in;
u_foreach_bit64(slot, mask) {
unsigned location = slot;
if (patch)
slot += VARYING_SLOT_PATCH0;
location += VARYING_SLOT_PATCH0;
/* this should've been handled explicitly */
assert(is_vertex_input || !is_clipcull_dist(slot));
assert(is_vertex_input || !is_clipcull_dist(location));
unsigned remaining = 0;
do {
/* scan the slot for usage */
struct rework_io_state ris = scan_io_var_slot(nir, mode, slot, indirect);
struct rework_io_state ris = scan_io_var_slot(nir, mode, location, indirect);
/* one of these must be true or things have gone very wrong */
assert(indirect || ris.component_mask || find_rework_var(nir, &ris) || remaining);
/* release builds only */