[Mesa-dev] [PATCH 12/17] mesa: add KHR_no_error support for glBlendEquationSeparateiARB()

Timothy Arceri tarceri at itsqueeze.com
Mon May 15 06:19:21 UTC 2017


---
 src/mapi/glapi/gen/ARB_draw_buffers_blend.xml | 2 +-
 src/mesa/main/blend.c                         | 9 +++++++++
 src/mesa/main/blend.h                         | 3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml b/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
index 4d44adf..1a44f38 100644
--- a/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
+++ b/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
@@ -6,21 +6,21 @@
 
 <OpenGLAPI>
 
 <category name="GL_ARB_draw_buffers_blend" number="69">
 
     <function name="BlendEquationiARB">
         <param name="buf" type="GLuint"/>
         <param name="mode" type="GLenum"/>
     </function>
 
-    <function name="BlendEquationSeparateiARB">
+    <function name="BlendEquationSeparateiARB" no_error="true">
         <param name="buf" type="GLuint"/>
         <param name="modeRGB" type="GLenum"/>
         <param name="modeA" type="GLenum"/>
     </function>
 
     <function name="BlendFunciARB" no_error="true">
         <param name="buf" type="GLuint"/>
         <param name="src" type="GLenum"/>
         <param name="dst" type="GLenum"/>
     </function>
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index e91c14a..8c763ed 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -608,20 +608,29 @@ blend_equation_separatei(struct gl_context *ctx, GLuint buf, GLenum modeRGB,
       return;  /* no change */
 
    FLUSH_VERTICES(ctx, _NEW_COLOR);
    ctx->Color.Blend[buf].EquationRGB = modeRGB;
    ctx->Color.Blend[buf].EquationA = modeA;
    ctx->Color._BlendEquationPerBuffer = GL_TRUE;
    ctx->Color._AdvancedBlendMode = BLEND_NONE;
 }
 
 
+void GLAPIENTRY
+_mesa_BlendEquationSeparateiARB_no_error(GLuint buf, GLenum modeRGB,
+                                         GLenum modeA)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   blend_equation_separatei(ctx, buf, modeRGB, modeA);
+}
+
+
 /**
  * Set separate blend equations for one color buffer/target.
  */
 void GLAPIENTRY
 _mesa_BlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA)
 {
    GET_CURRENT_CONTEXT(ctx);
 
    if (MESA_VERBOSE & VERBOSE_API)
       _mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf,
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index 199345d..54b9ce6 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -70,20 +70,23 @@ _mesa_BlendEquation( GLenum mode );
 
 extern void GLAPIENTRY
 _mesa_BlendEquationiARB(GLuint buf, GLenum mode);
 
 
 extern void GLAPIENTRY
 _mesa_BlendEquationSeparate( GLenum modeRGB, GLenum modeA );
 
 
 extern void GLAPIENTRY
+_mesa_BlendEquationSeparateiARB_no_error(GLuint buf, GLenum modeRGB,
+                                         GLenum modeA);
+extern void GLAPIENTRY
 _mesa_BlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA);
 
 
 extern void GLAPIENTRY
 _mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
 
 
 extern void GLAPIENTRY
 _mesa_AlphaFunc( GLenum func, GLclampf ref );
 
-- 
2.9.3



More information about the mesa-dev mailing list