Mesa (master): iris: Emit single render target flush PIPE_CONTROL on format mismatch.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 3 23:24:44 UTC 2020


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

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Thu Apr 30 17:40:52 2020 -0700

iris: Emit single render target flush PIPE_CONTROL on format mismatch.

The big-hammer iris_flush_depth_and_render_caches() is largely
redundant whenever a format mismatch is detected from
iris_cache_flush_for_render().  There is no need to kick the depth,
sampler nor constant caches in that case.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>

---

 src/gallium/drivers/iris/iris_resolve.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index 68f37f48bcf..88aa4b1dec7 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -402,7 +402,10 @@ iris_cache_flush_for_render(struct iris_batch *batch,
       _mesa_hash_table_insert_pre_hashed(batch->cache.render, bo->hash, bo,
                                          format_aux_tuple(format, aux_usage));
    } else if (entry->data != format_aux_tuple(format, aux_usage)) {
-      iris_flush_depth_and_render_caches(batch);
+      iris_emit_pipe_control_flush(batch,
+                                   "cache tracker: render format mismatch",
+                                   PIPE_CONTROL_RENDER_TARGET_FLUSH |
+                                   PIPE_CONTROL_CS_STALL);
       entry->data = format_aux_tuple(format, aux_usage);
    }
 }



More information about the mesa-commit mailing list