[Mesa-dev] [PATCH 2/2] mesa: add KHR_no_error support for glActiveTexture()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue May 23 10:41:32 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mapi/glapi/gen/gl_API.xml | 2 +-
src/mesa/main/texstate.c | 10 ++++++++++
src/mesa/main/texstate.h | 3 +++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 630d6b8a5bb..8f93318b95d 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -4268,7 +4268,7 @@
<enum name="DOT3_RGB" value="0x86AE"/>
<enum name="DOT3_RGBA" value="0x86AF"/>
- <function name="ActiveTexture" es1="1.0" es2="2.0">
+ <function name="ActiveTexture" es1="1.0" es2="2.0" no_error="true">
<param name="texture" type="GLenum"/>
<glx rop="197"/>
</function>
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 32d5c0b7f7c..7cc51060c2b 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -296,6 +296,16 @@ static void active_texture(struct gl_context *ctx, const GLuint texUnit)
/* GL_ARB_multitexture */
void GLAPIENTRY
+_mesa_ActiveTexture_no_error(GLenum texture)
+{
+ const GLuint texUnit = texture - GL_TEXTURE0;
+ GET_CURRENT_CONTEXT(ctx);
+
+ active_texture(ctx, texUnit);
+}
+
+
+void GLAPIENTRY
_mesa_ActiveTexture(GLenum texture)
{
const GLuint texUnit = texture - GL_TEXTURE0;
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index cb329b07bfb..7c74329a64e 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -78,6 +78,9 @@ _mesa_print_texunit_state( struct gl_context *ctx, GLuint unit );
/*@{*/
extern void GLAPIENTRY
+_mesa_ActiveTexture_no_error( GLenum target );
+
+extern void GLAPIENTRY
_mesa_ActiveTexture( GLenum target );
extern void GLAPIENTRY
--
2.13.0
More information about the mesa-dev
mailing list