diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 5 | ||||
-rw-r--r-- | src/mesa/main/get.c | 8 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 69835a59eaf..abebd82874a 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -700,6 +700,11 @@ _mesa_init_constants(struct gl_context *ctx) /* GL_ARB_vertex_attrib_binding */ ctx->Const.MaxVertexAttribRelativeOffset = 2047; ctx->Const.MaxVertexAttribBindings = MAX_VERTEX_GENERIC_ATTRIBS; + + /* GL_ARB_compute_shader */ + ctx->Const.MaxComputeWorkGroupSize[0] = 1024; + ctx->Const.MaxComputeWorkGroupSize[1] = 1024; + ctx->Const.MaxComputeWorkGroupSize[2] = 64; } diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index f22acff0b36..acd4d8c290b 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1927,6 +1927,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_SIZE: + 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.MaxComputeWorkGroupSize[index]; + return TYPE_INT; } invalid_enum: diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6af4db65c2e..08c5505f8c1 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3378,6 +3378,9 @@ struct gl_constants GLuint MaxCombinedImageUnitsAndFragmentOutputs; GLuint MaxImageSamples; GLuint MaxCombinedImageUniforms; + + /** GL_ARB_compute_shader */ + GLuint MaxComputeWorkGroupSize[3]; /* Array of x, y, z dimensions */ }; |