Ian Romanick <i...@freedesktop.org> writes: > From: Ian Romanick <ian.d.roman...@intel.com> > > Almost all of the time the location set by layout(location=...) is the > location that will be used for the variable. Vertex shader inputs and > fragment shader outputs, for example, are visible to the API. We just > use those actual settings. > > Locations set for varyings, however, are a different story. In those > cases, the locations set in the shader are just used to facilitate > matching outputs to inputs. We need to track the value so that we can > ensure that > > layout(location=2) out float foo; > > will be assigned the same resource as > > layout(location=2) in float bar; > > but we probably don't want to use 2 as the actual location in the set of > varyings.
I assumed that layout(location=2) would be using VARYING_SLOT_VARx -- I don't know of any reason to try and pack these, and it sucks to see another field in our already-bloated ir_variables. It looks like other code in the series would go away if we just mapped things directly to VARYING_SLOTs.
pgpuWZazqqnXT.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev