glsl: add missing support for explicit components in interface blocks
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 12 May 2021 05:44:02 +0000 (15:44 +1000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 13 May 2021 08:07:53 +0000 (08:07 +0000)
commit5aabc912739a99ddaee482e54b9ca3fc76a092f1
treef4a4f774e1ab94cfe9f4e4d2ff39acf935c4fcb0
parent1a71d6aa6e13179526b41e627f00af25b1612556
glsl: add missing support for explicit components in interface blocks

From the ARB_enhanced_layouts 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."

We previously had compile tests in piglit to make sure this was not a
compile error but no execution tests.

Fixes: d99a040bbf2c ("i965: enable ARB_enhanced_layouts for gen8+")

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10763>
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/link_interface_blocks.cpp
src/compiler/glsl/lower_named_interface_blocks.cpp
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h