i965: Only do depth resolves prior to clearing when needed
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 15 Jun 2017 01:54:28 +0000 (18:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 26 Jul 2017 21:43:01 +0000 (14:43 -0700)
commit6db193701e7d03e0eadd54fc3e1b3d75719bc4ae
treeb28ca72b32761bf6bcf6b9a15ba81dcf9babc054
parente1d4030b0bc1c5ec4e48afcd6895b48b9ab5bfea
i965: Only do depth resolves prior to clearing when needed

When changing the clear value, we need to resolve any fast cleared data.

Previously, we were performing resolves on every slice with HiZ enabled.
We only need to resolve slices that a) have fast clear data, and b)
aren't about to be cleared to the new color.  In the latter case, we
were actually doing a resolve, and then a fast clear - when we could
skip both, causing the existing fast cleared area to be updated to the
new clear value for no additional work.

This patch stops using intel_miptree_prepare_access in favor of a more
optimal open coded loop that knows about our clear operation.

v2: (by Ken) Rebase on islification, write a real commit message.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/mesa/drivers/dri/i965/brw_clear.c