diff options
author | Timothy Arceri <[email protected]> | 2015-11-10 12:47:46 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-05-01 23:12:52 +1000 |
commit | daa8df590b68926c3fbde897ebae7d5f0a92bf45 (patch) | |
tree | 8c8693181fed2e3be6b8f12516ef44afafcb10d7 /src/compiler/glsl/glsl_parser.yy | |
parent | ea4c1afd050fbfab4bd4d3d79cf7784e0fd0825f (diff) |
glsl: parse component layout qualifier
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser.yy')
-rw-r--r-- | src/compiler/glsl/glsl_parser.yy | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index 1cecc09b8c8..09e346da164 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -1497,6 +1497,17 @@ layout_qualifier_id: $$.location = $3; } + if (match_layout_qualifier("component", $1, state) == 0) { + if (!state->has_enhanced_layouts()) { + _mesa_glsl_error(& @1, state, + "component qualifier requires " + "GLSL 4.40 or ARB_enhanced_layouts"); + } else { + $$.flags.q.explicit_component = 1; + $$.component = $3; + } + } + if (match_layout_qualifier("index", $1, state) == 0) { if (state->es_shader && !state->EXT_blend_func_extended_enable) { _mesa_glsl_error(& @3, state, "index layout qualifier requires EXT_blend_func_extended"); |