Skip to content

nir: Use VARYING_SLOT_TESS_MAX to size indirect bitmasks

Kenneth Graunke requested to merge kwg/mesa:tess-bitfield-fix into master

MAX_VARYINGS_INCL_PATCH subtracts VARYING_SLOT_VAR0 giving us a size that's too small, so BITSET_SET writes words out of bounds, corrupting the stack and causing all kinds of chaos. VARYING_SLOT_TESS_MAX is the right value to use here, as it's the largest location.

Closes: 2002 Fixes: ee2050b1 ("nir: Use BITSET for tracking varyings in lower_io_arrays")

Merge request reports