From c02db0d90ff749977170163479c06a87429de942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 26 Sep 2023 12:25:42 +0300 Subject: [PATCH] iris: flush data cache when flushing HDC on GFX < 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This matches what anv driver does. Fixes: a969ad1d ("iris: Demote DC flush to HDC flush in cache tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6314 Signed-off-by: Tapani Pälli Acked-by: Lionel Landwerlin Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_state.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index c6089dbdf03..56fdc1c1a1b 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -8858,6 +8858,14 @@ iris_emit_raw_pipe_control(struct iris_batch *batch, assert(flags & PIPE_CONTROL_WRITE_IMMEDIATE); } + /* Emulate a HDC flush with a full Data Cache Flush on older hardware which + * doesn't support the new lightweight flush. + */ +#if GFX_VER < 12 + if (flags & PIPE_CONTROL_FLUSH_HDC) + flags |= PIPE_CONTROL_DATA_CACHE_FLUSH; +#endif + /* "Post-Sync Operation" workarounds -------------------------------- */ /* Project: All / Argument: Global Snapshot Count Reset [19]