i965: Disable dual source blending when shader doesn't support it on gen8+
authorDanylo Piliaiev <danylo.piliaiev@gmail.com>
Mon, 2 Jul 2018 14:04:23 +0000 (17:04 +0300)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Oct 2018 19:59:53 +0000 (12:59 -0700)
commiteca4a6548d07bbbb02a7768edb397bad7b72cfc2
treeb41b5e10d281c07f20549d15ab0d9d84b55540ca
parent337a808062c756b474ee80a9ac04b5a3dbbeb67e
i965: Disable dual source blending when shader doesn't support it on gen8+

Dual source blending behaviour is undefined when shader doesn't
have second color output, dismissing fragment in such situation
leads to a hang on gen8+ if depth test in enabled.

Since blending cannot be gracefully fixed in such case and the result
is undefined - blending is simply disabled.

v2 (Kenneth Graunke):
 - Listen to BRW_NEW_FS_PROG_DATA in 3DSTATE_PS_BLEND
 - Also whack BLEND_STATE[] to keep the two in sync, since we're not
   sure exactly which copy of the redundant info the hardware will use.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107088
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/genX_state_upload.c