mesa: add KHR_no_error support to glTextureStorage*D()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jul 2017 12:42:59 +0000 (14:42 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/texstorage.c
src/mesa/main/texstorage.h

index 0c34b638546b6c79ec318f7a3a49ce9a3ae739aa..f1ae6e979021368ce3b17545ceb3c52d3a71f808 100644 (file)
       <param name="size" type="GLsizeiptr" />
    </function>
 
-   <function name="TextureStorage1D">
+   <function name="TextureStorage1D" no_error="true">
       <param name="texture" type="GLuint" />
       <param name="levels" type="GLsizei" />
       <param name="internalformat" type="GLenum" />
       <param name="width" type="GLsizei" />
    </function>
 
-   <function name="TextureStorage2D">
+   <function name="TextureStorage2D" no_error="true">
       <param name="texture" type="GLuint" />
       <param name="levels" type="GLsizei" />
       <param name="internalformat" type="GLenum" />
       <param name="height" type="GLsizei" />
    </function>
 
-   <function name="TextureStorage3D">
+   <function name="TextureStorage3D" no_error="true">
       <param name="texture" type="GLuint" />
       <param name="levels" type="GLsizei" />
       <param name="internalformat" type="GLenum" />
index 0117ab6c81d47274abc5979d176d8cef8a379fbd..7a61a4f47862d37372c96ab4ba5de14ea7cfea63 100644 (file)
@@ -600,6 +600,19 @@ texturestorage_error(GLuint dims, GLuint texture, GLsizei levels,
 }
 
 
+static void
+texturestorage_no_error(GLuint dims, GLuint texture, GLsizei levels,
+                        GLenum internalformat, GLsizei width, GLsizei height,
+                        GLsizei depth)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture);
+   texture_storage_no_error(ctx, dims, texObj, texObj->Target,
+                            levels, internalformat, width, height, depth, true);
+}
+
+
 void GLAPIENTRY
 _mesa_TexStorage1D_no_error(GLenum target, GLsizei levels,
                             GLenum internalformat, GLsizei width)
@@ -653,6 +666,14 @@ _mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat,
 }
 
 
+void GLAPIENTRY
+_mesa_TextureStorage1D_no_error(GLuint texture, GLsizei levels,
+                                GLenum internalformat, GLsizei width)
+{
+   texturestorage_no_error(1, texture, levels, internalformat, width, 1, 1);
+}
+
+
 void GLAPIENTRY
 _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat,
                        GLsizei width)
@@ -662,6 +683,15 @@ _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat,
 }
 
 
+void GLAPIENTRY
+_mesa_TextureStorage2D_no_error(GLuint texture, GLsizei levels,
+                                GLenum internalformat,
+                                GLsizei width, GLsizei height)
+{
+   texturestorage_no_error(2, texture, levels, internalformat, width, height, 1);
+}
+
+
 void GLAPIENTRY
 _mesa_TextureStorage2D(GLuint texture, GLsizei levels,
                        GLenum internalformat,
@@ -672,6 +702,16 @@ _mesa_TextureStorage2D(GLuint texture, GLsizei levels,
 }
 
 
+void GLAPIENTRY
+_mesa_TextureStorage3D_no_error(GLuint texture, GLsizei levels,
+                                GLenum internalformat, GLsizei width,
+                                GLsizei height, GLsizei depth)
+{
+   texturestorage_no_error(3, texture, levels, internalformat, width, height,
+                           depth);
+}
+
+
 void GLAPIENTRY
 _mesa_TextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat,
                        GLsizei width, GLsizei height, GLsizei depth)
index 269c8bdc2721c987d06b33e1d47bd7d1dcfd04fb..66b77be4e14289eadd96228ffcc6e6118da52a1f 100644 (file)
@@ -85,15 +85,27 @@ extern void GLAPIENTRY
 _mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat,
                    GLsizei width, GLsizei height, GLsizei depth);
 
+void GLAPIENTRY
+_mesa_TextureStorage1D_no_error(GLuint texture, GLsizei levels,
+                                GLenum internalformat, GLsizei width);
+
 extern void GLAPIENTRY
 _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat,
                        GLsizei width);
 
+void GLAPIENTRY
+_mesa_TextureStorage2D_no_error(GLuint texture, GLsizei levels,
+                                GLenum internalformat, GLsizei width,
+                                GLsizei height);
 
 extern void GLAPIENTRY
 _mesa_TextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat,
                        GLsizei width, GLsizei height);
 
+void GLAPIENTRY
+_mesa_TextureStorage3D_no_error(GLuint texture, GLsizei levels,
+                                GLenum internalformat, GLsizei width,
+                                GLsizei height, GLsizei depth);
 
 extern void GLAPIENTRY
 _mesa_TextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat,