mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
zink: don't modify the u_foreach_bit64 bit inside the loop in loop_io_var_mask()
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:
parent
14608f1469
commit
ef0bf50ae9
1 changed files with 4 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue