summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2014-06-10 17:43:25 -0700
committerJordan Justen <[email protected]>2014-07-27 17:59:28 -0700
commitbe8bc588b93286dff6a6c1e8594ec40da50658ff (patch)
treef3cd02f1946666a803f39a977f61886010d51235 /src/glsl/builtin_variables.cpp
parent12029046a276ff6903664a0d0771d85279386360 (diff)
glsl/cs: Add several GLSL compute shader variables
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 <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r--src/glsl/builtin_variables.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 34973023fe9..4c5b9c07093 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -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],