iris: Use the linear version of the surface format during fast clears.
authorRafael Antognolli <rafael.antognolli@intel.com>
Tue, 23 Apr 2019 22:18:01 +0000 (15:18 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Tue, 30 Apr 2019 15:31:44 +0000 (08:31 -0700)
commit91bcbfc35100b64eb230e9bdafc7abe7cb134c06
tree586c78a4e909fc219ee0ab450537d842042e9e84
parent56927a8cf5c7ef6330954b3d1b1583c854974520
iris: Use the linear version of the surface format during fast clears.

Newer gens (> 9) will start doing the linear -> sRGB conversion of the
clear color for us, if we use a sRGB surface format. So let's make sure
that doesn't happen and keep the same semantics as before.

Even though the hardware could convert the clear color for us during
fast clear, that converted color is only used for sampling. For resolve,
the original color would be used (without the conversion). So we convert
it ourselves and the same converted color gets used for both sampling
and resolving, simplifying the whole logic.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_clear.c