aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-06 15:11:40 -0800
committerPaul Berry <[email protected]>2014-02-05 09:02:30 -0800
commitc85c50997f073993b86c694dda7c18bbaca30bbf (patch)
treee69f338c0fac2c9bf9151cc3c2091f5ed3ac4535 /src/mesa
parent347dde82e65663562d6d2930bf861ec8c8079362 (diff)
mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant.
Reviewed-by: Matt Turner <[email protected]> v2: Use CONTEXT_INT rather than CONTEXT_ENUM. Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c1
-rw-r--r--src/mesa/main/get.c1
-rw-r--r--src/mesa/main/get_hash_params.py3
-rw-r--r--src/mesa/main/mtypes.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index abebd82874a..4cf86bc5150 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -705,6 +705,7 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
ctx->Const.MaxComputeWorkGroupSize[2] = 64;
+ ctx->Const.MaxComputeWorkGroupInvocations = 1024;
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index acd4d8c290b..2833a15a433 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -390,6 +390,7 @@ EXTRA_EXT(ARB_shader_atomic_counters);
EXTRA_EXT(ARB_draw_indirect);
EXTRA_EXT(ARB_shader_image_load_store);
EXTRA_EXT(ARB_viewport_array);
+EXTRA_EXT(ARB_compute_shader);
static const int
extra_ARB_color_buffer_float_or_glcore[] = {
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 3a7f531b1e8..2e8a11682de 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -751,6 +751,9 @@ descriptor=[
[ "MAX_GEOMETRY_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxImageUniforms), extra_ARB_shader_image_load_store_and_geometry_shader"],
[ "MAX_FRAGMENT_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_FRAGMENT].MaxImageUniforms), extra_ARB_shader_image_load_store"],
[ "MAX_COMBINED_IMAGE_UNIFORMS", "CONTEXT_INT(Const.MaxCombinedImageUniforms), extra_ARB_shader_image_load_store"],
+
+# GL_ARB_compute_shader
+ [ "MAX_COMPUTE_WORK_GROUP_INVOCATIONS", "CONTEXT_INT(Const.MaxComputeWorkGroupInvocations), extra_ARB_compute_shader" ],
]},
# Enums restricted to OpenGL Core profile
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 08c5505f8c1..40e2e68f2d7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3381,6 +3381,7 @@ struct gl_constants
/** GL_ARB_compute_shader */
GLuint MaxComputeWorkGroupSize[3]; /* Array of x, y, z dimensions */
+ GLuint MaxComputeWorkGroupInvocations;
};