mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant.
authorPaul Berry <stereotype441@gmail.com>
Mon, 6 Jan 2014 23:11:40 +0000 (15:11 -0800)
committerPaul Berry <stereotype441@gmail.com>
Wed, 5 Feb 2014 17:02:30 +0000 (09:02 -0800)
Reviewed-by: Matt Turner <mattst88@gmail.com>
v2: Use CONTEXT_INT rather than CONTEXT_ENUM.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glsl/main.cpp
src/glsl/standalone_scaffolding.cpp
src/mesa/main/context.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h

index bb2054f9866413a477e3fcb60ac59e18f89902cb..94bc1cc5e915a5cbdaa4ec669361b60ed4357976 100644 (file)
@@ -53,6 +53,7 @@ initialize_context(struct gl_context *ctx, gl_api api)
    ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
    ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
    ctx->Const.MaxComputeWorkGroupSize[2] = 64;
+   ctx->Const.MaxComputeWorkGroupInvocations = 1024;
    ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits = 16;
    ctx->Const.Program[MESA_SHADER_COMPUTE].MaxUniformComponents = 1024;
    ctx->Const.Program[MESA_SHADER_COMPUTE].MaxInputComponents = 0; /* not used */
index 748d7e964d21afec120c00e3fe57ec69a396de64..475fbd8edc84cf9140752a821ecf2846ff3aa5d8 100644 (file)
@@ -144,6 +144,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
    ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
    ctx->Const.MaxComputeWorkGroupSize[2] = 64;
+   ctx->Const.MaxComputeWorkGroupInvocations = 1024;
    ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits = 16;
    ctx->Const.Program[MESA_SHADER_COMPUTE].MaxUniformComponents = 1024;
    ctx->Const.Program[MESA_SHADER_COMPUTE].MaxInputComponents = 0; /* not used */
index abebd82874a288e91a07ebaad9a43501dfddef24..4cf86bc5150411d1c0530523e36db5008ccf5e2d 100644 (file)
@@ -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;
 }
 
 
index acd4d8c290b5c90e18dda8b54592f7c2c44963e2..2833a15a43397e14f489ec80a3a663910f697f4c 100644 (file)
@@ -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[] = {
index 3a7f531b1e897266f3e29762cd14d677431a287e..2e8a11682de4f017de1dad4a206e4207f9261639 100644 (file)
@@ -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
index 08c5505f8c191159da618a4d271d90de1c9bbde4..40e2e68f2d7b082e966f953ee0e92db992d7bb21 100644 (file)
@@ -3381,6 +3381,7 @@ struct gl_constants
 
    /** GL_ARB_compute_shader */
    GLuint MaxComputeWorkGroupSize[3]; /* Array of x, y, z dimensions */
+   GLuint MaxComputeWorkGroupInvocations;
 };