[Mesa-dev] [PATCH 009/101] mesa: add KHR_no_error support to glTextureView()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Jul 21 17:39:18 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mapi/glapi/gen/ARB_texture_view.xml | 2 +-
src/mesa/main/textureview.c | 18 ++++++++++++++++++
src/mesa/main/textureview.h | 6 ++++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/ARB_texture_view.xml b/src/mapi/glapi/gen/ARB_texture_view.xml
index 4215fc5bd5..0c20ef97d8 100644
--- a/src/mapi/glapi/gen/ARB_texture_view.xml
+++ b/src/mapi/glapi/gen/ARB_texture_view.xml
@@ -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"/>
diff --git a/src/mesa/main/textureview.c b/src/mesa/main/textureview.c
index 165af3c746..89af068fae 100644
--- a/src/mesa/main/textureview.c
+++ b/src/mesa/main/textureview.c
@@ -697,6 +697,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,
GLuint minlevel, GLuint numlevels,
diff --git a/src/mesa/main/textureview.h b/src/mesa/main/textureview.h
index 39b415d879..e2f18aed01 100644
--- a/src/mesa/main/textureview.h
+++ b/src/mesa/main/textureview.h
@@ -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,
--
2.13.3
More information about the mesa-dev
mailing list