iris/gen8: Re-emit the SURFACE_STATE if the clear color changed.
authorRafael Antognolli <rafael.antognolli@intel.com>
Wed, 27 Mar 2019 20:09:34 +0000 (13:09 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Tue, 2 Apr 2019 22:26:33 +0000 (15:26 -0700)
commit26606672847501b93a4b070165fc23d2d845810a
treeef685ca7dd67a1b2038015443552072d77a76ed9
parent6a02873687f76c08bf4788d2905b9b8abeee2ba7
iris/gen8: Re-emit the SURFACE_STATE if the clear color changed.

The swizzle for rendering surfaces is always identity. So when we are
doing the fast clear, we don't have enough information to store the
clear color OR'ed with the Shader Channel Select bits for the dword in
the SURFACE_STATE.

Instead of trying to patch up the SURFACE_STATE correctly later, by
reading the color from the clear color state buffer and then doing all
the operations to store it, let's just re-emit the whole SURFACE_STATE.
That should make things way simpler on gen8, and we can still use the
clear color state buffer for gen9+.

Fixes: a8b5ea8ef015ed4a "iris: Add function to update clear color in surface state."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_state.c