summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-05-20 15:17:37 -0700
committerKenneth Graunke <[email protected]>2016-08-07 23:47:55 -0700
commitd0642c52fce91936443ea64ebbc2719813b95aae (patch)
tree7e0a882df6183c8fa4c11b52cd696d71b798f3ab /src/compiler/glsl/glsl_parser.yy
parent3fb4a9b3b3ef034a3317529197041c25831df286 (diff)
glsl: Add a has_tessellation_shader() helper.
Similar to has_geometry_shader(), has_compute_shader(), and so on. This will make it easier to add more conditions here later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser.yy')
-rw-r--r--src/compiler/glsl/glsl_parser.yy19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy
index 3885688d9b8..61c4723eac8 100644
--- a/src/compiler/glsl/glsl_parser.yy
+++ b/src/compiler/glsl/glsl_parser.yy
@@ -1390,9 +1390,7 @@ layout_qualifier_id:
}
}
- if ($$.flags.i &&
- !state->ARB_tessellation_shader_enable &&
- !state->is_version(400, 0)) {
+ if ($$.flags.i && !state->has_tessellation_shader()) {
_mesa_glsl_error(& @1, state,
"primitive mode qualifier `%s' requires "
"GLSL 4.00 or ARB_tessellation_shader", $1);
@@ -1415,9 +1413,7 @@ layout_qualifier_id:
}
}
- if ($$.flags.i &&
- !state->ARB_tessellation_shader_enable &&
- !state->is_version(400, 0)) {
+ if ($$.flags.i && !state->has_tessellation_shader()) {
_mesa_glsl_error(& @1, state,
"vertex spacing qualifier `%s' requires "
"GLSL 4.00 or ARB_tessellation_shader", $1);
@@ -1432,9 +1428,7 @@ layout_qualifier_id:
$$.ordering = GL_CCW;
}
- if ($$.flags.i &&
- !state->ARB_tessellation_shader_enable &&
- !state->is_version(400, 0)) {
+ if ($$.flags.i && !state->has_tessellation_shader()) {
_mesa_glsl_error(& @1, state,
"ordering qualifier `%s' requires "
"GLSL 4.00 or ARB_tessellation_shader", $1);
@@ -1446,9 +1440,7 @@ layout_qualifier_id:
$$.point_mode = true;
}
- if ($$.flags.i &&
- !state->ARB_tessellation_shader_enable &&
- !state->is_version(400, 0)) {
+ if ($$.flags.i && !state->has_tessellation_shader()) {
_mesa_glsl_error(& @1, state,
"qualifier `point_mode' requires "
"GLSL 4.00 or ARB_tessellation_shader");
@@ -1608,8 +1600,7 @@ layout_qualifier_id:
if (match_layout_qualifier("vertices", $1, state) == 0) {
$$.flags.q.vertices = 1;
$$.vertices = new(ctx) ast_layout_expression(@1, $3);
- if (!state->ARB_tessellation_shader_enable &&
- !state->is_version(400, 0)) {
+ if (!state->has_tessellation_shader()) {
_mesa_glsl_error(& @1, state,
"vertices qualifier requires GLSL 4.00 or "
"ARB_tessellation_shader");