[Mesa-dev] [PATCH 1/3] st/mesa: don't translate blend state when it's disabled for a colorbuffer
Eric Anholt
eric at anholt.net
Fri Feb 9 11:01:41 UTC 2018
Marek Olšák <maraeo at gmail.com> writes:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/mesa/state_tracker/st_atom_blend.c | 7 ++++---
> 1 file 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 f7327d6..a5f7edb 100644
> --- a/src/mesa/state_tracker/st_atom_blend.c
> +++ b/src/mesa/state_tracker/st_atom_blend.c
> @@ -154,26 +154,27 @@ st_update_blend( struct st_context *st )
> blend->independent_blend_enable = 1;
> }
> if (ctx->Color.ColorLogicOpEnabled) {
> /* logicop enabled */
> blend->logicop_enable = 1;
> blend->logicop_func = ctx->Color._LogicOp;
> }
> 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;
maybe 'true' instead of '1'?
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180209/078ba257/attachment.sig>
More information about the mesa-dev
mailing list