aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-08 01:42:58 -0800
committerPaul Berry <[email protected]>2014-02-05 09:03:08 -0800
commit0398b69954eb8e73e9ae663ce200170ff70d216d (patch)
treefb4bf1c166e4fa1b0d6f8a1e4533b58689f9836b /src/mesa/main/get.c
parentc85c50997f073993b86c694dda7c18bbaca30bbf (diff)
mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_COUNT constant.
v2: Document that the 3-element array MaxComputeWorkGroupCount is indexed by dimension. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 2833a15a433..32aa7364a91 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1929,6 +1929,14 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
v->value_int = ctx->ImageUnits[index].Format;
return TYPE_INT;
+ case GL_MAX_COMPUTE_WORK_GROUP_COUNT:
+ if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_compute_shader)
+ goto invalid_enum;
+ if (index >= 3)
+ goto invalid_value;
+ v->value_int = ctx->Const.MaxComputeWorkGroupCount[index];
+ return TYPE_INT;
+
case GL_MAX_COMPUTE_WORK_GROUP_SIZE:
if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_compute_shader)
goto invalid_enum;