glsl: expose max atomic counter/buffer consts for tess in ES 3.2
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 28 Aug 2016 19:04:00 +0000 (15:04 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 3 Sep 2016 04:26:36 +0000 (00:26 -0400)
Curiously OES/EXT_tessellation_shader leave these out, while ES 3.2 adds
them in.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/builtin_variables.cpp

index 90278d635c68c32f13ef74b0825e65d0457b5006..f47daab868d22a0ac7b1b0f0ff247c1e5736e36f 100644 (file)
@@ -759,7 +759,7 @@ builtin_variable_generator::generate_constants()
          add_const("gl_MaxGeometryAtomicCounters",
                    state->Const.MaxGeometryAtomicCounters);
       }
-      if (!state->es_shader) {
+      if (state->is_version(110, 320)) {
          add_const("gl_MaxTessControlAtomicCounters",
                    state->Const.MaxTessControlAtomicCounters);
          add_const("gl_MaxTessEvaluationAtomicCounters",
@@ -781,7 +781,7 @@ builtin_variable_generator::generate_constants()
          add_const("gl_MaxGeometryAtomicCounterBuffers",
                    state->Const.MaxGeometryAtomicCounterBuffers);
       }
-      if (!state->es_shader) {
+      if (state->is_version(110, 320)) {
          add_const("gl_MaxTessControlAtomicCounterBuffers",
                    state->Const.MaxTessControlAtomicCounterBuffers);
          add_const("gl_MaxTessEvaluationAtomicCounterBuffers",