summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2014-01-06 15:11:40 -0800
committerPaul Berry <stereotype441@gmail.com>2014-02-05 09:02:30 -0800
commitc85c50997f073993b86c694dda7c18bbaca30bbf (patch)
treee69f338c0fac2c9bf9151cc3c2091f5ed3ac4535 /src
parent347dde82e65663562d6d2930bf861ec8c8079362 (diff)
downloadexternal_mesa3d-c85c50997f073993b86c694dda7c18bbaca30bbf.zip
external_mesa3d-c85c50997f073993b86c694dda7c18bbaca30bbf.tar.gz
external_mesa3d-c85c50997f073993b86c694dda7c18bbaca30bbf.tar.bz2
mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant.
Reviewed-by: Matt Turner <mattst88@gmail.com> v2: Use CONTEXT_INT rather than CONTEXT_ENUM. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/main.cpp1
-rw-r--r--src/glsl/standalone_scaffolding.cpp1
-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
6 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index bb2054f..94bc1cc 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -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 */
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 748d7e9..475fbd8 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -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 */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index abebd82..4cf86bc 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 acd4d8c..2833a15 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 3a7f531..2e8a116 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 08c5505..40e2e68 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;
};