iris: Support sRGB fast clears even if the colorspaces differ.
authorRafael Antognolli <rafael.antognolli@intel.com>
Fri, 19 Apr 2019 00:47:36 +0000 (17:47 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Tue, 30 Apr 2019 15:31:44 +0000 (08:31 -0700)
commit56927a8cf5c7ef6330954b3d1b1583c854974520
tree94792fa57ccdf3ff1bf0f9c49aefbd810ae31c20
parentabb2c7c9d333dc350c1a5f2c161e48e12a6e6116
iris: Support sRGB fast clears even if the colorspaces differ.

We were disabling fast clears if the view format had a different
colorspace than the resource format (sRGB vs linear or vice-versa). But
we actually support them if we use the view format to decide if we
should encode the clear color into sRGB colorspace.

Also add a missing linear -> sRGB surface format conversion (we don't
want the clear color to be encoded to sRGB again during resolve).

v2: Do not track sRGB colorspace during fast clears (Nanley).

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