Mesa (master): iris: Prepare depth resource if clear_depth enable

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 29 21:50:35 UTC 2019


Module: Mesa
Branch: master
Commit: 4e0ed40ed7b39e70198dda0e589c73bbbb93af7c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4e0ed40ed7b39e70198dda0e589c73bbbb93af7c

Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date:   Wed Aug 28 00:21:20 2019 -0700

iris: Prepare depth resource if clear_depth enable

Avoid preparing depth resource, if we did fast depth clear before.

Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>

---

 src/gallium/drivers/iris/iris_clear.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index cdc96471ce7..58c219e9af3 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -581,7 +581,7 @@ clear_depth_stencil(struct iris_context *ice,
       return;
    }
 
-   if (z_res) {
+   if (clear_depth && z_res) {
       iris_resource_prepare_depth(ice, batch, z_res, level, box->z, box->depth);
       iris_blorp_surf_for_resource(&ice->vtbl, &z_surf, &z_res->base,
                                    z_res->aux.usage, level, true);
@@ -611,7 +611,7 @@ clear_depth_stencil(struct iris_context *ice,
    iris_flush_and_dirty_for_history(ice, batch, res, 0,
                                     "cache history: post slow ZS clear");
 
-   if (z_res) {
+   if (clear_depth && z_res) {
       iris_resource_finish_depth(ice, z_res, level,
                                  box->z, box->depth, true);
    }




More information about the mesa-commit mailing list