radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remap
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 31 Aug 2018 12:55:07 +0000 (07:55 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Sep 2018 21:07:50 +0000 (16:07 -0500)
commit0909a57b631f2b200a7422907df6302a72930252
treec2fd127451eee11b317c62385e575c7d3b15fb26
parent25efd787cfd842c0b0b900f35399e44a2e01ea39
radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remap

We were going out of our way to disable dual-location re-mapping in NIR
only to then do the remapping in st_glsl_to_nir.cpp.  Presumably, this
was so that double_inputs would be correct for the core state tracker.
However, now that we've it to gl_program::DualSlotInputs which is
unaffected by NIR lowering, we can let NIR lower things for us.  The one
tricky bit here is that we have to remap the inputs_read bitfield back
to the single-slot convention for the gallium state tracker to use.

Since radeonsi is the only NIR-capable gallium driver that also supports
GL_ARB_vertex_attrib_64bit, we only have to worry about radeonsi when
making core gallium state tracker changes.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_lower_io_arrays_to_elements.c
src/gallium/drivers/radeonsi/si_get.c
src/mesa/state_tracker/st_glsl_to_nir.cpp