diff options
author | Kenneth Graunke <[email protected]> | 2013-07-15 16:11:00 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-07-18 16:57:22 -0700 |
commit | 89f75e7e7b3ba96f715fb5c2878e3f88036a6533 (patch) | |
tree | 03c6fea805972810dd942ea506e7c3e07178d6fd /src/glsl/glsl_parser.yy | |
parent | 48e3bd33dc28aedcd9fccf4ba3bdc5e8a894b27b (diff) |
glsl: Disable ordering checks on most qualifiers for 420pack.
This makes the compiler accept invariant, storage, layout, and
interpolation qualifiers in any order when ARB_shading_language_420pack
is enabled.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r-- | src/glsl/glsl_parser.yy | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 72bf560f07e..c31f5e26481 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1369,7 +1369,7 @@ type_qualifier: "with layout(...).\n"); } - if ($2.flags.q.invariant) { + if (!state->ARB_shading_language_420pack_enable && $2.flags.q.invariant) { _mesa_glsl_error(&@1, state, "Interpolation qualifiers must come " "after \"invariant\".\n"); } @@ -1409,7 +1409,8 @@ type_qualifier: if ($2.has_storage()) _mesa_glsl_error(&@1, state, "Duplicate storage qualifier.\n"); - if ($2.flags.q.invariant || $2.has_interpolation() || $2.has_layout()) { + if (!state->ARB_shading_language_420pack_enable && + ($2.flags.q.invariant || $2.has_interpolation() || $2.has_layout())) { _mesa_glsl_error(&@1, state, "Storage qualifiers must come after " "invariant, interpolation, and layout qualifiers.\n"); } |