mesa: add KHR_no_error support for glCompressedTex*SubImage3D()
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 12 May 2017 00:47:14 +0000 (10:47 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 17 May 2017 00:12:03 +0000 (10:12 +1000)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/teximage.c
src/mesa/main/teximage.h

index 21f44b546c9e425ee18aff0d2e75da56fbbdad9d..43e4e05b10f5ef3faf0b5c295822fac3f588ef8c 100644 (file)
       <param name="data" type="const GLvoid *" />
    </function>
 
-   <function name="CompressedTextureSubImage3D">
+   <function name="CompressedTextureSubImage3D" no_error="true">
       <param name="texture" type="GLuint" />
       <param name="level" type="GLint" />
       <param name="xoffset" type="GLint" />
index 755cb311756b7456118b7b3d827d5f246c064664..1a3b306c03cf2742c0efe2fcb039e3e18a34a9e5 100644 (file)
         <glx rop="214" handcode="client"/>
     </function>
 
-    <function name="CompressedTexSubImage3D" es2="3.0" marshal="sync">
+    <function name="CompressedTexSubImage3D" es2="3.0" marshal="sync"
+              no_error="true">
         <param name="target" type="GLenum"/>
         <param name="level" type="GLint"/>
         <param name="xoffset" type="GLint"/>
index 2f9ff309428c45882f1e7c704df2aa1d7c856140..fed1dad2621094372e0be40885018059b0b481a7 100644 (file)
@@ -4583,7 +4583,7 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture,
        * (See texturesubimage in teximage.c for details on why this check is
        * performed.)
        */
-      if (!_mesa_cube_level_complete(texObj, level)) {
+      if (!no_error && !_mesa_cube_level_complete(texObj, level)) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "glCompressedTextureSubImage3D(cube map incomplete)");
          return;
@@ -4713,6 +4713,19 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset,
                             "glCompressedTextureSubImage2D");
 }
 
+void GLAPIENTRY
+_mesa_CompressedTexSubImage3D_no_error(GLenum target, GLint level,
+                                       GLint xoffset, GLint yoffset,
+                                       GLint zoffset, GLsizei width,
+                                       GLsizei height, GLsizei depth,
+                                       GLenum format, GLsizei imageSize,
+                                       const GLvoid *data)
+{
+   compressed_tex_sub_image(3, target, 0, level, xoffset, yoffset, zoffset,
+                            width, height, depth, format, imageSize, data,
+                            false, true, "glCompressedTexSubImage3D");
+}
+
 void GLAPIENTRY
 _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
                               GLint yoffset, GLint zoffset, GLsizei width,
@@ -4724,6 +4737,19 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
                             false, false, "glCompressedTexSubImage3D");
 }
 
+void GLAPIENTRY
+_mesa_CompressedTextureSubImage3D_no_error(GLuint texture, GLint level,
+                                           GLint xoffset, GLint yoffset,
+                                           GLint zoffset, GLsizei width,
+                                           GLsizei height, GLsizei depth,
+                                           GLenum format, GLsizei imageSize,
+                                           const GLvoid *data)
+{
+   compressed_tex_sub_image(3, 0, texture, level, xoffset, yoffset, zoffset,
+                            width, height, depth, format, imageSize, data,
+                            true, true, "glCompressedTextureSubImage3D");
+}
+
 void GLAPIENTRY
 _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
                                   GLint yoffset, GLint zoffset, GLsizei width,
index 6eda7215457c06de350baabb5c0cbc3662b0c388..bc4e235d3876eaf035431d592348771ddb6dd180 100644 (file)
@@ -433,12 +433,26 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset,
                                   const GLvoid *data);
 
 extern void GLAPIENTRY
+_mesa_CompressedTexSubImage3D_no_error(GLenum target, GLint level,
+                                       GLint xoffset, GLint yoffset,
+                                       GLint zoffset, GLsizei width,
+                                       GLsizei height, GLsizei depth,
+                                       GLenum format, GLsizei imageSize,
+                                       const GLvoid *data);
+extern void GLAPIENTRY
 _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
                                  GLint yoffset, GLint zoffset, GLsizei width,
                                  GLsizei height, GLsizei depth, GLenum format,
                                  GLsizei imageSize, const GLvoid *data);
 
 extern void GLAPIENTRY
+_mesa_CompressedTextureSubImage3D_no_error(GLuint texture, GLint level,
+                                           GLint xoffset, GLint yoffset,
+                                           GLint zoffset, GLsizei width,
+                                           GLsizei height, GLsizei depth,
+                                           GLenum format, GLsizei imageSize,
+                                           const GLvoid *data);
+extern void GLAPIENTRY
 _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
                                   GLint yoffset, GLint zoffset,
                                   GLsizei width, GLsizei height,