[Mesa-dev] [PATCH 0/4] glsl/linker: fix location aliasing checks

Iago Toral Quiroga itoral at igalia.com
Thu Oct 19 16:31:35 UTC 2017


This series implements various fixes for location aliasing checks in the
GLSL linker. It fixes 3 CTS tests and also a couple of piglit
tests that were passing for incorrect reasons.

The series does the following:
- Implement the alising checks for interface block members.
- Check that aliased locations have the same interpolation
- Check that aliased locations have the same auxiliary storage.

As a side note, while implementing these fixes, I noticed that Mesa doesn't
implement support for the component layout qualifier on interface block members,
however this is required by the GLSL 4.60 spec:

"As with input layout qualifiers, all shaders except compute shaders allow
 location layout qualifiers on output variable declarations, output block
  declarations, and output block member declarations. Of these, variables and
  block members (but not blocks) additionally allow the component layout
  qualifier."

At least uur glsl_struct_field, which we use to store data for interface block
members only has location data, but not component information so I guess we
should fix that some day too.

Iago Toral Quiroga (4):
  glsl/linker: refactor link-time validation of output locations
  glsl/linker: fix location aliasing checks for interface variables
  glsl/linker: outputs in the same location must share interpolation
  glsl/linker: outputs in the same location must share auxiliary storage

 src/compiler/glsl/link_varyings.cpp | 210 ++++++++++++++++++++++++++----------
 1 file changed, 155 insertions(+), 55 deletions(-)

-- 
2.11.0



More information about the mesa-dev mailing list