st/glsl: fix broken vertex attrib mapping
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 1 Jul 2022 02:33:08 +0000 (12:33 +1000)
committerMarge Bot <emma+marge@anholt.net>
Mon, 4 Jul 2022 03:33:38 +0000 (03:33 +0000)
commit4e797ac530b02a1d35a86061fe704524d6bab5a5
treefa4497a3c769438262464bd44e6e955fcc810554
parent5d4425ca1cd8c549dbfd0ec3001e9782c7e31f8b
st/glsl: fix broken vertex attrib mapping

Here we move the nir_get_single_slot_attribs_mask() call that sets the
inputs_read mask after NIR optimisations have finished and after
st_nir_assign_vs_in_locations() has been called.

Besides fixing a bug where the mappings would be missaligned if
further NIR optimisations resulted in less inputs being read, it
also allows us to drop an additional nir gather info call.

Fixes: 0909a57b631f ("radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remap")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6240

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17326>
src/mesa/state_tracker/st_glsl_to_nir.cpp