projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c8252b
)
mesa: add blend_equation_separatei() helper
author
Timothy Arceri
<tarceri@itsqueeze.com>
Mon, 15 May 2017 00:48:17 +0000
(10:48 +1000)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Wed, 17 May 2017 00:12:04 +0000
(10:12 +1000)
Will be used to add KHR_no_error support.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/blend.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/blend.c
b/src/mesa/main/blend.c
index 8811ef9a339768564e51520df65ce8e5564e7b61..e91c14aeb9dd0e925f3120e98a42f31b16f2bc7f 100644
(file)
--- a/
src/mesa/main/blend.c
+++ b/
src/mesa/main/blend.c
@@
-599,6
+599,22
@@
_mesa_BlendEquationSeparate( GLenum modeRGB, GLenum modeA )
}
}
+static void
+blend_equation_separatei(struct gl_context *ctx, GLuint buf, GLenum modeRGB,
+ GLenum modeA)
+{
+ if (ctx->Color.Blend[buf].EquationRGB == modeRGB &&
+ ctx->Color.Blend[buf].EquationA == modeA)
+ 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;
+}
+
+
/**
* Set separate blend equations for one color buffer/target.
*/
/**
* Set separate blend equations for one color buffer/target.
*/
@@
-634,15
+650,7
@@
_mesa_BlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA)
return;
}
return;
}
- if (ctx->Color.Blend[buf].EquationRGB == modeRGB &&
- ctx->Color.Blend[buf].EquationA == modeA)
- 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;
+ blend_equation_separatei(ctx, buf, modeRGB, modeA);
}
}