mesa: add KHR_no_error support to glTextureView()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jul 2017 08:56:19 +0000 (10:56 +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_texture_view.xml
src/mesa/main/textureview.c
src/mesa/main/textureview.h

index 4215fc5bd541b7d79df8cae1a44bf67fbcb1b8e1..0c20ef97d89a61c1bf427f91ecd8551a7dcf8e52 100644 (file)
@@ -7,7 +7,7 @@
 
 <category name="GL_ARB_texture_view" number="124">
 
-   <function name="TextureView">
+   <function name="TextureView" no_error="true">
       <param name="texture" type="GLuint"/>
       <param name="target" type="GLenum"/>
       <param name="origtexture" type="GLuint"/>
index 165af3c74693e1d72e2a27036e67e692d7a8a878..89af068fae84d7722f8d666c07a91851041fe04a 100644 (file)
@@ -696,6 +696,24 @@ texture_view(struct gl_context *ctx, struct gl_texture_object *origTexObj,
    }
 }
 
+void GLAPIENTRY
+_mesa_TextureView_no_error(GLuint texture, GLenum target, GLuint origtexture,
+                           GLenum internalformat,
+                           GLuint minlevel, GLuint numlevels,
+                           GLuint minlayer, GLuint numlayers)
+{
+   struct gl_texture_object *texObj;
+   struct gl_texture_object *origTexObj;
+
+   GET_CURRENT_CONTEXT(ctx);
+
+   origTexObj = _mesa_lookup_texture(ctx, origtexture);
+   texObj = _mesa_lookup_texture(ctx, texture);
+
+   texture_view(ctx, origTexObj, texObj, target, internalformat, minlevel,
+                numlevels, minlayer, numlayers, true);
+}
+
 void GLAPIENTRY
 _mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
                   GLenum internalformat,
index 39b415d8793f584f3632f143c65086b572d20fa0..e2f18aed017356350dfb10efe513aea61cd77160 100644 (file)
@@ -42,6 +42,12 @@ GLenum
 _mesa_texture_view_lookup_view_class(const struct gl_context *ctx,
                                      GLenum internalformat);
 
+void GLAPIENTRY
+_mesa_TextureView_no_error(GLuint texture, GLenum target, GLuint origtexture,
+                           GLenum internalformat,
+                           GLuint minlevel, GLuint numlevels,
+                           GLuint minlayer, GLuint numlayers);
+
 extern void GLAPIENTRY
 _mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
                   GLenum internalformat,