diff options
author | marha <marha@users.sourceforge.net> | 2011-02-16 17:16:41 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-16 17:16:41 +0000 |
commit | 41723858b0effb450ce946297e5a606bc7348be2 (patch) | |
tree | 8831ace435ad11e06f196e62f0fb4d63fa740deb /mesalib/src/mesa/state_tracker/st_atom_blend.c | |
parent | 92fef6a3a6851ee123dd793788aac50c0831a964 (diff) | |
parent | 48d0dcbd5b7f80810ce259bc9ed6f57f99e27ca9 (diff) | |
download | vcxsrv-41723858b0effb450ce946297e5a606bc7348be2.tar.gz vcxsrv-41723858b0effb450ce946297e5a606bc7348be2.tar.bz2 vcxsrv-41723858b0effb450ce946297e5a606bc7348be2.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_blend.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_blend.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_blend.c b/mesalib/src/mesa/state_tracker/st_atom_blend.c index 26bb3dab9..e3b3b9936 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_blend.c +++ b/mesalib/src/mesa/state_tracker/st_atom_blend.c @@ -191,7 +191,7 @@ update_blend( struct st_context *st ) {
struct pipe_blend_state *blend = &st->state.blend;
unsigned num_state = 1;
- unsigned i;
+ unsigned i, j;
memset(blend, 0, sizeof(*blend));
@@ -214,12 +214,15 @@ update_blend( struct st_context *st ) }
else if (st->ctx->Color.BlendEnabled) {
/* blending enabled */
- for (i = 0; i < num_state; i++) {
+ for (i = 0, j = 0; i < num_state; i++) {
blend->rt[i].blend_enable = (st->ctx->Color.BlendEnabled >> i) & 0x1;
+ if (st->ctx->Extensions.ARB_draw_buffers_blend)
+ j = i;
+
blend->rt[i].rgb_func =
- translate_blend(st->ctx->Color.Blend[i].EquationRGB);
+ translate_blend(st->ctx->Color.Blend[j].EquationRGB);
if (st->ctx->Color.Blend[i].EquationRGB == GL_MIN ||
st->ctx->Color.Blend[i].EquationRGB == GL_MAX) {
@@ -229,13 +232,13 @@ update_blend( struct st_context *st ) }
else {
blend->rt[i].rgb_src_factor =
- translate_blend(st->ctx->Color.Blend[i].SrcRGB);
+ translate_blend(st->ctx->Color.Blend[j].SrcRGB);
blend->rt[i].rgb_dst_factor =
- translate_blend(st->ctx->Color.Blend[i].DstRGB);
+ translate_blend(st->ctx->Color.Blend[j].DstRGB);
}
blend->rt[i].alpha_func =
- translate_blend(st->ctx->Color.Blend[i].EquationA);
+ translate_blend(st->ctx->Color.Blend[j].EquationA);
if (st->ctx->Color.Blend[i].EquationA == GL_MIN ||
st->ctx->Color.Blend[i].EquationA == GL_MAX) {
@@ -245,9 +248,9 @@ update_blend( struct st_context *st ) }
else {
blend->rt[i].alpha_src_factor =
- translate_blend(st->ctx->Color.Blend[i].SrcA);
+ translate_blend(st->ctx->Color.Blend[j].SrcA);
blend->rt[i].alpha_dst_factor =
- translate_blend(st->ctx->Color.Blend[i].DstA);
+ translate_blend(st->ctx->Color.Blend[j].DstA);
}
}
}
|