glsl: Don't lower vector derefs for SSBOs, UBOs, and shared
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 11 Mar 2019 19:53:31 +0000 (14:53 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 15 Mar 2019 01:02:19 +0000 (01:02 +0000)
commit8f3ab8aa7824a2f306b542a50b304675ce8f7e1a
tree6359d7c4878da83e4f7e7105e72ba5d13737f644
parent3c11fc76543f381ce8ebb315def510978ef274a7
glsl: Don't lower vector derefs for SSBOs, UBOs, and shared

All of these are backed by some sort of memory so if you have multiple
threads writing to different components of the same vector at the same
time, the load-vec-store pattern that GLSL IR emits won't work.  This
shouldn't affect any drivers today as they all call GLSL IR lowering
which lowers access to these variables to index+offset intrinsics before
we get to this point.  However, NIR will start handling the derefs
itself and won't want the lowering.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/glsl/lower_vector_derefs.cpp