OSDN Git Service

i965: Check for alpha channel just like in gen6+.
authorRafael Antognolli <rafael.antognolli@intel.com>
Fri, 2 Jun 2017 21:41:19 +0000 (14:41 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Thu, 13 Jul 2017 22:39:49 +0000 (15:39 -0700)
commit5246d3eb835c8b5a9fe4fd65032f9d0f993efea7
treee9bf35dbe2c29ef689745825f87ded57ac4c391d
parent1d2d3dbc8a13ee036794b0825543f65d66859630
i965: Check for alpha channel just like in gen6+.

gen6+ uses _mesa_base_format_has_channel() to check for the alpha
channel, while gen4-5 use ctx->DrawBuffer->Visual.alphaBits. By using
_mesa_base_format_has_channel() here we keep the same behavior accross
all gen.

While initially both ways of checking the alpha channel seemed correct
to me, this change also seems to fix fbo-blending-formats piglit test on
gen4.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_cc.c