summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-09-07 21:52:08 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-10-07 00:18:57 +0200
commit45ab63c0cb274b20a7ae1f390b123e13a5b46c98 (patch)
tree9961670819d37c96c6da45262ab302bf4f19cb64 /src/mesa/main/get.c
parenta063f3084acfaf9a63ab8af004d94c592b19b8a0 (diff)
downloadexternal_mesa3d-45ab63c0cb274b20a7ae1f390b123e13a5b46c98.zip
external_mesa3d-45ab63c0cb274b20a7ae1f390b123e13a5b46c98.tar.gz
external_mesa3d-45ab63c0cb274b20a7ae1f390b123e13a5b46c98.tar.bz2
mesa/main: add support for ARB_compute_variable_groups_size
v5: - replace fixed_local_size by !LocalSizeVariable (Nicolai) v4: - slightly indent spec quotes (Nicolai) - drop useless _mesa_has_compute_shaders() check (Nicolai) - move the fixed local size outside of the loop (Nicolai) - add missing check for invalid use of work group count v2: - update formatting spec quotations (Ian) - move the total_invocations check outside of the loop (Ian) Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 64a4b0e..bd85bef 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -490,6 +490,7 @@ EXTRA_EXT(ARB_cull_distance);
EXTRA_EXT(EXT_window_rectangles);
EXTRA_EXT(KHR_blend_equation_advanced_coherent);
EXTRA_EXT(OES_primitive_bounding_box);
+EXTRA_EXT(ARB_compute_variable_group_size);
static const int
extra_ARB_color_buffer_float_or_glcore[] = {
@@ -2293,6 +2294,15 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
goto invalid_value;
v->value_int = ctx->Const.MaxComputeWorkGroupSize[index];
return TYPE_INT;
+
+ /* ARB_compute_variable_group_size */
+ case GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB:
+ if (!ctx->Extensions.ARB_compute_variable_group_size)
+ goto invalid_enum;
+ if (index >= 3)
+ goto invalid_value;
+ v->value_int = ctx->Const.MaxComputeVariableGroupSize[index];
+ return TYPE_INT;
}
invalid_enum: