From: Kenneth Graunke Date: Sat, 25 Aug 2018 06:45:27 +0000 (-0700) Subject: st/mesa: Disable blending for integer formats. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8fb966688bc1053a48e8ee7f7394ce030bcfd345;p=mesa.git st/mesa: Disable blending for integer formats. 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. Reviewed-by: Marek Olšák --- 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;