i965: Fix alpha to one with dual color blending.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 30 May 2017 05:07:07 +0000 (22:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 7 Jun 2017 09:13:49 +0000 (02:13 -0700)
commit09c3a00f10861269f2187b5033f754b770a09b16
tree6ac32780a042f56870c1984b9e8da992b085e483
parent98d5667f4b5ba67a482d34779471ddfbbc521d84
i965: Fix alpha to one with dual color blending.

The BLEND_STATE documentation says that alpha to one must be disabled
when dual color blending is enabled.  However, it appears that it simply
fails to override src1 alpha to one.

We can work around this by leaving alpha to one enabled, but overriding
SRC1_ALPHA to ONE and ONE_MINUS_SRC1_ALPHA to ZERO.  This appears to be
what the other driver does, and it looks like it works despite the
documentation saying not to do it.

Fixes spec/ext_framebuffer_multisample/alpha-to-one-dual-src-blend *
Piglit tests.

v2: Add UNUSED to shut up warning on generations which don't use this.

Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/genX_state_upload.c