From c85c50997f073993b86c694dda7c18bbaca30bbf Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 6 Jan 2014 15:11:40 -0800 Subject: mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant. Reviewed-by: Matt Turner v2: Use CONTEXT_INT rather than CONTEXT_ENUM. Reviewed-by: Jordan Justen --- src/mesa/main/context.c | 1 + src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py | 3 +++ src/mesa/main/mtypes.h | 1 + 4 files changed, 6 insertions(+) (limited to 'src/mesa') 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; }; -- cgit v1.2.3