diff options
author | Samuel Pitoiset <[email protected]> | 2016-09-06 21:48:42 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2016-10-07 00:18:57 +0200 |
commit | dd2bda70022d6d80aee47cea718bab43e5586fe8 (patch) | |
tree | 8e98b0db1683e566f527dea028cdd6f7f4ef412b /src/compiler/glsl/glsl_parser.yy | |
parent | d5c8481d577030f21524ab6e0501d75ba401c887 (diff) |
glsl: process local_size_variable input qualifier
This is the new layout qualifier introduced by
ARB_compute_variable_group_size which allows to use a variable work
group size.
v4: - add missing '%s' in the monster format string
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser.yy')
-rw-r--r-- | src/compiler/glsl/glsl_parser.yy | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index 9e1fd9e3e67..38cbd3fa866 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -1491,6 +1491,19 @@ layout_qualifier_id: } } + /* Layout qualifiers for ARB_compute_variable_group_size. */ + if (!$$.flags.i) { + if (match_layout_qualifier($1, "local_size_variable", state) == 0) { + $$.flags.q.local_size_variable = 1; + } + + if ($$.flags.i && !state->ARB_compute_variable_group_size_enable) { + _mesa_glsl_error(& @1, state, + "qualifier `local_size_variable` requires " + "ARB_compute_variable_group_size"); + } + } + if (!$$.flags.i) { _mesa_glsl_error(& @1, state, "unrecognized layout identifier " "`%s'", $1); |