diff options
author | Marek Olšák <[email protected]> | 2018-01-31 00:53:16 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-09 15:52:22 +0100 |
commit | 3d06c8afb5543cce88e331278d92823d88aac7b6 (patch) | |
tree | 7816da276cec920448c66405d68893b43ebbf65d /src | |
parent | 712332ed54f14b5ee34c2990e351ca48992488b2 (diff) |
st/mesa: don't translate blend state when it's disabled for a colorbuffer
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_atom_blend.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index f7327d6838c..a5f7edbcfe4 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -161,12 +161,13 @@ st_update_blend( struct st_context *st ) else if (ctx->Color.BlendEnabled && !ctx->Color._AdvancedBlendMode) { /* blending enabled */ for (i = 0, j = 0; i < num_state; i++) { + if (!(ctx->Color.BlendEnabled & (1 << i))) + continue; - blend->rt[i].blend_enable = (ctx->Color.BlendEnabled >> i) & 0x1; - - if (ctx->Extensions.ARB_draw_buffers_blend) + if (ctx->Extensions.ARB_draw_buffers_blend) j = i; + blend->rt[i].blend_enable = 1; blend->rt[i].rgb_func = translate_blend(ctx->Color.Blend[j].EquationRGB); |