glapi: add entry points for GL_ARB_compute_variable_group_size
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 6 Sep 2016 14:23:58 +0000 (16:23 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 6 Oct 2016 22:18:57 +0000 (00:18 +0200)
v2: - correctly sort that new extension (Ian)
    - fix up the comment (Ian)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mapi/glapi/gen/ARB_compute_variable_group_size.xml [new file with mode: 0644]
src/mapi/glapi/gen/Makefile.am
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/compute.c
src/mesa/main/compute.h
src/mesa/main/tests/dispatch_sanity.cpp

diff --git a/src/mapi/glapi/gen/ARB_compute_variable_group_size.xml b/src/mapi/glapi/gen/ARB_compute_variable_group_size.xml
new file mode 100644 (file)
index 0000000..b21c52f
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_ARB_compute_variable_group_size" number="153">
+  <enum name="MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB" value="0x9344"/>
+  <enum name="MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB"    value="0x90EB"/>
+  <enum name="MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB"        value="0x9345"/>
+  <enum name="MAX_COMPUTE_FIXED_GROUP_SIZE_ARB"           value="0x91BF"/>
+
+  <function name="DispatchComputeGroupSizeARB">
+    <param name="num_groups_x" type="GLuint"/>
+    <param name="num_groups_y" type="GLuint"/>
+    <param name="num_groups_z" type="GLuint"/>
+    <param name="group_size_x" type="GLuint"/>
+    <param name="group_size_y" type="GLuint"/>
+    <param name="group_size_z" type="GLuint"/>
+  </function>
+</category>
+
+</OpenGLAPI>
index ba5d1442cda8712bcbdd7db1a3703db49db31e46..bd5115798cbddcb88c3e2fcf99d5cc7f5da0e9b5 100644 (file)
@@ -120,6 +120,7 @@ API_XML = \
        ARB_color_buffer_float.xml \
        ARB_compressed_texture_pixel_storage.xml \
        ARB_compute_shader.xml \
+       ARB_compute_variable_group_size.xml \
        ARB_copy_buffer.xml \
        ARB_copy_image.xml \
        ARB_debug_output.xml \
index 17c59db97a7191d0f5621ddfa0136b1ec5150f73..5998ccf95bd5c8f1bd6de1083200403e0215d318 100644 (file)
     <enum name="QUERY_BUFFER_BARRIER_BIT"           value="0x00008000"/>
 </category>
 
-<!-- ARB extensions 149 - 153 -->
+<!-- ARB extensions 149 - 152 -->
+
+<xi:include href="ARB_compute_variable_group_size.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <xi:include href="ARB_indirect_parameters.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
index b71430f2b12ac150a9cc79f6f4c915964eb77f95..b052bae7e91b459d4395e55c36639df6fd789ef1 100644 (file)
@@ -60,3 +60,11 @@ _mesa_DispatchComputeIndirect(GLintptr indirect)
 
    ctx->Driver.DispatchComputeIndirect(ctx, indirect);
 }
+
+void GLAPIENTRY
+_mesa_DispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y,
+                                  GLuint num_groups_z, GLuint group_size_x,
+                                  GLuint group_size_y, GLuint group_size_z)
+{
+
+}
index 0cc034fd61c9a40224a5c79c25064aeae6a8acaa..8018bbb2858dc06ed104d174d0164856a70c6b77 100644 (file)
@@ -35,4 +35,9 @@ _mesa_DispatchCompute(GLuint num_groups_x,
 extern void GLAPIENTRY
 _mesa_DispatchComputeIndirect(GLintptr indirect);
 
+extern void GLAPIENTRY
+_mesa_DispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y,
+                                  GLuint num_groups_z, GLuint group_size_x,
+                                  GLuint group_size_y, GLuint group_size_z);
+
 #endif
index 0d3b6abea39c6b9c3a6d38ab9ac1cf9815a5decf..3fdd80a8a07ca77251d311089b633f403b4a5d55 100644 (file)
@@ -942,6 +942,9 @@ const struct function common_desktop_functions_possible[] = {
    { "glDispatchCompute", 43, -1 },
    { "glDispatchComputeIndirect", 43, -1 },
 
+   /* GL_ARB_compute_variable_group_size */
+   { "glDispatchComputeGroupSizeARB", 43, -1 },
+
    /* GL_EXT_polygon_offset_clamp */
    { "glPolygonOffsetClampEXT", 11, -1 },