iris: Disable dual source blending when shader doesn't handle it
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 3 May 2019 04:14:49 +0000 (21:14 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 3 May 2019 04:14:49 +0000 (21:14 -0700)
commit5ff5d0a89531474ad181f5b1f5bd018e2e354999
tree2f9fe60831b2487374840e262bb6d4658fc8d063
parentbe7e9870d620460a91e8fbdbb8bf39b5c462aed3
iris: Disable dual source blending when shader doesn't handle it

This is a port of Danylo's eca4a6548d07bbbb02a7768edb397bad7b72cfc2
which fixed the hang on i965.  It fixes GPU hangs in his new Piglit
test, arb_blend_func_extended-dual-src-blending-discard-without-src1.

I avoided my own review feedback here, and decided to simply adjust
3DSTATE_PS_BLEND rather than BLEND_STATE_ENTRY[0].  It has never been
clear to me which the hardware uses in every case.  However, whacking
the enable in 3DSTATE_PS_BLEND seems to be sufficient to fix the hang,
and that packet is already dynamic, so it's easy to handle.  I'd rather
avoid making BLEND_STATE_ENTRY[0] dynamic unless I have to.
src/gallium/drivers/iris/iris_state.c