[Mesa-dev] [PATCH 2/7] r200: support factors for min/max blending
Maxence Le Doré
maxence.ledore at gmail.com
Thu Jan 2 17:18:21 PST 2014
---
src/mesa/drivers/dri/r200/r200_state.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index ee7b945..db232f6 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -252,12 +252,20 @@ static void r200_set_blend_state( struct gl_context * ctx )
(R200_BLEND_GL_ONE << R200_DST_BLEND_SHIFT);
break;
+ case GL_FACTOR_MIN_AMD:
+ eqn = R200_COMB_FCN_MIN;
+ break;
+
case GL_MAX:
eqn = R200_COMB_FCN_MAX;
func = (R200_BLEND_GL_ONE << R200_SRC_BLEND_SHIFT) |
(R200_BLEND_GL_ONE << R200_DST_BLEND_SHIFT);
break;
+ case GL_FACTOR_MAX_AMD:
+ eqn = R200_COMB_FCN_MAX;
+ break;
+
default:
fprintf( stderr, "[%s:%u] Invalid RGB blend equation (0x%04x).\n",
__FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB );
@@ -286,12 +294,20 @@ static void r200_set_blend_state( struct gl_context * ctx )
(R200_BLEND_GL_ONE << R200_DST_BLEND_SHIFT);
break;
+ case GL_FACTOR_MIN_AMD:
+ eqnA = R200_COMB_FCN_MIN;
+ break;
+
case GL_MAX:
eqnA = R200_COMB_FCN_MAX;
funcA = (R200_BLEND_GL_ONE << R200_SRC_BLEND_SHIFT) |
(R200_BLEND_GL_ONE << R200_DST_BLEND_SHIFT);
break;
+ case GL_FACTOR_MAX_AMD:
+ eqnA = R200_COMB_FCN_MAX;
+ break;
+
default:
fprintf( stderr, "[%s:%u] Invalid A blend equation (0x%04x).\n",
__FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA );
--
1.8.5.2
More information about the mesa-dev
mailing list