summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/builtin_variables.cpp
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/builtin_variables.cpp
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/builtin_variables.cpp')
-rw-r--r--src/compiler/glsl/builtin_variables.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
index f63dc3a0b16..20d1d75f596 100644
--- a/src/compiler/glsl/builtin_variables.cpp
+++ b/src/compiler/glsl/builtin_variables.cpp
@@ -861,8 +861,7 @@ builtin_variable_generator::generate_constants()
state->Const.MaxImageSamples);
}
- if (state->is_version(400, 0) ||
- state->ARB_tessellation_shader_enable) {
+ if (state->has_tessellation_shader()) {
add_const("gl_MaxTessControlImageUniforms",
state->Const.MaxTessControlImageUniforms);
add_const("gl_MaxTessEvaluationImageUniforms",
@@ -880,8 +879,7 @@ builtin_variable_generator::generate_constants()
state->ARB_viewport_array_enable)
add_const("gl_MaxViewports", state->Const.MaxViewports);
- if (state->is_version(400, 0) ||
- state->ARB_tessellation_shader_enable) {
+ if (state->has_tessellation_shader()) {
add_const("gl_MaxPatchVertices", state->Const.MaxPatchVertices);
add_const("gl_MaxTessGenLevel", state->Const.MaxTessGenLevel);
add_const("gl_MaxTessControlInputComponents", state->Const.MaxTessControlInputComponents);