freedreno: skip depth resolve if not written
authorRob Clark <robdclark@gmail.com>
Wed, 26 Dec 2018 19:09:55 +0000 (14:09 -0500)
committerRob Clark <robdclark@gmail.com>
Thu, 3 Jan 2019 13:09:24 +0000 (08:09 -0500)
commitf1c88336e6af1bb68546b064420d649f63d7ba8c
treec3acf9d89703bdaa26d55b2b867c5c2ad28bb602
parent4d3f6cb9739dfeaf9605fcd2f5318e03acf5066e
freedreno: skip depth resolve if not written

For multi-pass rendering, it is common to keep the same depth buffer
from previous pass, to discard geometry that would be hidden by later
draws.  In the later passes with depth-test enabled, but depth-write
disabled, there is no reason to do gmem2mem resolve.

TODO probably do something similar for stencil.. although stencil
buffer isn't used as commonly these days

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/freedreno/freedreno_gmem.c
src/gallium/drivers/freedreno/freedreno_state.h