mesa: add KHR_no_error support for glDispatchCompute*()
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 15 May 2017 02:28:08 +0000 (12:28 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 17 May 2017 00:12:04 +0000 (10:12 +1000)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mapi/glapi/gen/ARB_compute_shader.xml
src/mapi/glapi/gen/ARB_compute_variable_group_size.xml
src/mesa/main/compute.c
src/mesa/main/compute.h

index c2ec842efe1e4ef593067e898aee062befb80dd5..84cbdf396815b28903a45a33f0774c86637c5e0f 100644 (file)
   <enum name="DISPATCH_INDIRECT_BUFFER_BINDING"                value="0x90EF"/>
   <enum name="COMPUTE_SHADER_BIT"                              value="0x00000020"/>
 
-  <function name="DispatchCompute" es2="3.1">
+  <function name="DispatchCompute" es2="3.1" no_error="true">
     <param name="num_groups_x" type="GLuint"/>
     <param name="num_groups_y" type="GLuint"/>
     <param name="num_groups_z" type="GLuint"/>
   </function>
 
-  <function name="DispatchComputeIndirect" es2="3.1">
+  <function name="DispatchComputeIndirect" es2="3.1" no_error="true">
     <param name="indirect" type="GLintptr"/>
   </function>
 </category>
index b21c52fa1201ff4cd87d9f3db9491716d890e6be..a54c591a84a0593c88d97763b5b09b4cd97cdff9 100644 (file)
@@ -12,7 +12,7 @@
   <enum name="MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB"        value="0x9345"/>
   <enum name="MAX_COMPUTE_FIXED_GROUP_SIZE_ARB"           value="0x91BF"/>
 
-  <function name="DispatchComputeGroupSizeARB">
+  <function name="DispatchComputeGroupSizeARB" no_error="true">
     <param name="num_groups_x" type="GLuint"/>
     <param name="num_groups_y" type="GLuint"/>
     <param name="num_groups_z" type="GLuint"/>
index 16bb11f64d16491be52d400a30e3c6aff9a22702..cbd166b1095cab6bb31ad356658aa73b3534c1c2 100644 (file)
@@ -265,6 +265,13 @@ dispatch_compute(GLuint num_groups_x, GLuint num_groups_y,
    ctx->Driver.DispatchCompute(ctx, num_groups);
 }
 
+void GLAPIENTRY
+_mesa_DispatchCompute_no_error(GLuint num_groups_x, GLuint num_groups_y,
+                               GLuint num_groups_z)
+{
+   dispatch_compute(num_groups_x, num_groups_y, num_groups_z, true);
+}
+
 void GLAPIENTRY
 _mesa_DispatchCompute(GLuint num_groups_x,
                       GLuint num_groups_y,
@@ -289,6 +296,12 @@ dispatch_compute_indirect(GLintptr indirect, bool no_error)
    ctx->Driver.DispatchComputeIndirect(ctx, indirect);
 }
 
+extern void GLAPIENTRY
+_mesa_DispatchComputeIndirect_no_error(GLintptr indirect)
+{
+   dispatch_compute_indirect(indirect, true);
+}
+
 extern void GLAPIENTRY
 _mesa_DispatchComputeIndirect(GLintptr indirect)
 {
@@ -323,6 +336,19 @@ dispatch_compute_group_size(GLuint num_groups_x, GLuint num_groups_y,
    ctx->Driver.DispatchComputeGroupSize(ctx, num_groups, group_size);
 }
 
+void GLAPIENTRY
+_mesa_DispatchComputeGroupSizeARB_no_error(GLuint num_groups_x,
+                                           GLuint num_groups_y,
+                                           GLuint num_groups_z,
+                                           GLuint group_size_x,
+                                           GLuint group_size_y,
+                                           GLuint group_size_z)
+{
+   dispatch_compute_group_size(num_groups_x, num_groups_y, num_groups_z,
+                               group_size_x, group_size_y, group_size_z,
+                               true);
+}
+
 void GLAPIENTRY
 _mesa_DispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y,
                                   GLuint num_groups_z, GLuint group_size_x,
index 8018bbb2858dc06ed104d174d0164856a70c6b77..bfb3223d077d6e6594cf6199ea4ad1e32d4afc66 100644 (file)
 
 #include "glheader.h"
 
+extern void GLAPIENTRY
+_mesa_DispatchCompute_no_error(GLuint num_groups_x, GLuint num_groups_y,
+                               GLuint num_groups_z);
 extern void GLAPIENTRY
 _mesa_DispatchCompute(GLuint num_groups_x,
                       GLuint num_groups_y,
                       GLuint num_groups_z);
 
+extern void GLAPIENTRY
+_mesa_DispatchComputeIndirect_no_error(GLintptr indirect);
 extern void GLAPIENTRY
 _mesa_DispatchComputeIndirect(GLintptr indirect);
 
+extern void GLAPIENTRY
+_mesa_DispatchComputeGroupSizeARB_no_error(GLuint num_groups_x,
+                                           GLuint num_groups_y,
+                                           GLuint num_groups_z,
+                                           GLuint group_size_x,
+                                           GLuint group_size_y,
+                                           GLuint group_size_z);
 extern void GLAPIENTRY
 _mesa_DispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y,
                                   GLuint num_groups_z, GLuint group_size_x,