iris: Disable color fast-clears in iris_copy_region
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 5 Jun 2020 21:14:46 +0000 (14:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 13 Nov 2020 21:01:10 +0000 (21:01 +0000)
commit7779b1d71bf053f0c73a1b717e6d2ed91f948378
tree1a004f0e1a7b114bcb70fd8d70dbe6ee3eb89e7d
parent12dec2004ed0b50b0cb0ad7cc635f2a706be9891
iris: Disable color fast-clears in iris_copy_region

During a blorp_copy between two color surfaces, the source and
destination formats are re-interpreted to UINT (if possible) to avoid
losing bits.

If either surface has CCS_E, then extra steps are taken to support
fast-cleared blocks with this format re-interpretation. Each clear value
is packed in the original format, then unpacked in the new UINT format.
This is then placed into the surface state object for some platforms.
There are couple problems here:

1. This is only being done for CCS_E, but MCS also supports fast-clears.

2. These steps aren't enough for fast-clears on gen11+. On gen11+, the
   clear color isn't part of the surface state object that BLORP
   creates. Instead it's stored in a separate BO, that the surface state
   object references. Since that BO doesn't get updated during
   blorp_copy, the incorrect/unconverted clear color is used for the copy
   operation.

I didn't measure any performance gain from this code, so this patch
simply disables the feature.

Makes iris pass the nv_copy_image-simple piglit test on gen11+.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5388>
src/gallium/drivers/iris/iris_blit.c