summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-12-01 10:34:18 +1100
committerTimothy Arceri <[email protected]>2015-12-15 13:10:44 +1100
commit0aeb9b3e5eab57ae5d96047cee7b2c58811b455b (patch)
tree92d2368f2f6e7122cd6ec95aa4fa6167f5eb3b32 /src/glsl/glsl_parser.yy
parent183c606066b1b260acb189e46a40cb71e63b44aa (diff)
glsl: add support for explicit locations inside interface blocks
This change also adds explicit location support for structs and interfaces which is currently missing in Mesa but is allowed with SSO and GLSL 1.50+. Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r--src/glsl/glsl_parser.yy4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 7eb383ac60c..51796a65df9 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1130,6 +1130,10 @@ fully_specified_type:
$$->set_location_range(@1, @2);
$$->qualifier = $1;
$$->specifier = $2;
+ if ($$->specifier->structure != NULL &&
+ $$->specifier->structure->is_declaration) {
+ $$->specifier->structure->layout = &$$->qualifier;
+ }
}
;