nir: Use BITSET for tracking varyings in lower_io_arrays
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 24 Oct 2019 04:41:45 +0000 (21:41 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Thu, 24 Oct 2019 22:32:20 +0000 (15:32 -0700)
commitee2050b1111b65594f3470035f7b6f1330824684
treebdc3b1b4aba40ca2f4a87ad9837c9f672677015f
parent5658b13fb666ca72ae41d84811894aed2639f503
nir: Use BITSET for tracking varyings in lower_io_arrays

MAX_VARYINGS_INCL_PATCH is greater than 64, so we'll need more that 64
bits (per component) to track which vars have indirects. This pass was
trying to track patch varyings (which start at bit 63) in a separate
64 bit word, but failed to subtract VARYING_SLOT_PATCH0 and accessed
out of bounds.

Do away with the ad-hoc bit mask tracking and just use a BITSET.

Fixes: dEQP-GLES31.functional.tessellation.user_defined_io.per_patch_block.vertex_io_array_size_implicit.triangles
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
src/compiler/nir/nir_lower_io_arrays_to_elements.c