i965: Stop disabling aux during texture preparation
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 24 Jan 2018 19:51:08 +0000 (11:51 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 Jan 2018 03:05:36 +0000 (19:05 -0800)
commitdf13588d2176dcf4800a882d926f389667772b46
treeddb15ae73798396562e909237f17ed6841d64eab
parent20f70ae3858bc213e052a8434f0e637eb36203c4
i965: Stop disabling aux during texture preparation

Previously, we were handling self-dependencies by marking the render
buffer and then passing disable_aux=true to prepare_texture so that it
would do a resolve.  This works but ends us up doing to much resolving
in some cases.  Specifically, if we're doing something such as mipmap
generation, this would cause us to resolve all levels of the texture if
even one of them is overlapping.

Instead, this commit makes us wait until we process the framebuffer to
do these resolves and we only resolve the slices needed for rendering.
Doing this resolve puts them into the pass-through state so, even if we
do texture using CCS_E, the CCS data will effectively be ignored and the
real surface contents read.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h