[Mesa-dev] [PATCH 053/101] mesa: add KHR_no_error support to glBindTexture()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:40:02 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mapi/glapi/gen/gl_API.xml | 2 +-
 src/mesa/main/texobj.c        | 8 ++++++++
 src/mesa/main/texobj.h        | 3 +++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index fc863be87a..95c448d236 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -3333,7 +3333,7 @@
         <glx sop="143" handcode="client" always_array="true"/>
     </function>
 
-    <function name="BindTexture" es1="1.0" es2="2.0">
+    <function name="BindTexture" es1="1.0" es2="2.0" no_error="true">
         <param name="target" type="GLenum"/>
         <param name="texture" type="GLuint"/>
         <glx rop="4117"/>
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 04f320cbcd..bf48d7595d 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1703,6 +1703,14 @@ bind_texture(struct gl_context *ctx, GLenum target, GLuint texName,
 
 
 void GLAPIENTRY
+_mesa_BindTexture_no_error(GLenum target, GLuint texName)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   bind_texture(ctx, target, texName, true);
+}
+
+
+void GLAPIENTRY
 _mesa_BindTexture(GLenum target, GLuint texName)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index 9b9e4185d7..4971a2075d 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -193,6 +193,9 @@ extern void GLAPIENTRY
 _mesa_DeleteTextures( GLsizei n, const GLuint *textures );
 
 
+void GLAPIENTRY
+_mesa_BindTexture_no_error(GLenum target, GLuint texture);
+
 extern void GLAPIENTRY
 _mesa_BindTexture( GLenum target, GLuint texture );
 
-- 
2.13.3



More information about the mesa-dev mailing list