[Mesa-dev] [PATCH] st/mesa: Disable blending for integer formats.

Marek Olšák maraeo at gmail.com
Mon Aug 27 18:07:35 UTC 2018


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Sat, Aug 25, 2018 at 3:19 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Blending isn't valid for integer formats.  Rather than having drivers
> worry about this, just disable blending in this case.  This hopefully
> will increase hits in the CSO cache as well, by eliminating most of the
> meaningless fields in this case.
> ---
>  src/mesa/state_tracker/st_atom_blend.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
> index 57400e2e791..804de2f154f 100644
> --- a/src/mesa/state_tracker/st_atom_blend.c
> +++ b/src/mesa/state_tracker/st_atom_blend.c
> @@ -171,6 +171,7 @@ st_update_blend( struct st_context *st )
>        /* blending enabled */
>        for (i = 0, j = 0; i < num_state; i++) {
>           if (!(ctx->Color.BlendEnabled & (1 << i)) ||
> +             (ctx->DrawBuffer->_IntegerBuffers & (1 << i)) ||
>               !blend->rt[i].colormask)
>              continue;
>
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list