glsl/cs: Add several GLSL compute shader variables
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 11 Jun 2014 00:43:25 +0000 (17:43 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 28 Jul 2014 00:59:28 +0000 (17:59 -0700)
With MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader, this fixes piglit:
built-in-constants tests/spec/arb_compute_shader/minimum-maximums.txt

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/glsl/builtin_variables.cpp

index 34973023fe9ddab58e8e842a8ba47c56494ebd62..4c5b9c07093608e7d87baeb27d6fdd8234429399 100644 (file)
@@ -672,6 +672,12 @@ builtin_variable_generator::generate_constants()
    }
 
    if (state->is_version(430, 0) || state->ARB_compute_shader_enable) {
+      add_const("gl_MaxComputeAtomicCounterBuffers", MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS);
+      add_const("gl_MaxComputeAtomicCounters", MAX_COMPUTE_ATOMIC_COUNTERS);
+      add_const("gl_MaxComputeImageUniforms", MAX_COMPUTE_IMAGE_UNIFORMS);
+      add_const("gl_MaxComputeTextureImageUnits", MAX_COMPUTE_TEXTURE_IMAGE_UNITS);
+      add_const("gl_MaxComputeUniformComponents", MAX_COMPUTE_UNIFORM_COMPONENTS);
+
       add_const_ivec3("gl_MaxComputeWorkGroupCount",
                       state->Const.MaxComputeWorkGroupCount[0],
                       state->Const.MaxComputeWorkGroupCount[1],