Module: Mesa Branch: staging/23.2 Commit: 2e4ecc4dbe428d94326f0db9e527a36675f2d64a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e4ecc4dbe428d94326f0db9e527a36675f2d64a
Author: Tapani Pälli <[email protected]> Date: Tue Sep 26 12:25:42 2023 +0300 iris: flush data cache when flushing HDC on GFX < 12 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 <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25399> (cherry picked from commit c02db0d90ff749977170163479c06a87429de942) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_state.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 88dcc9207a0..2c1ff27d22b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2034,7 +2034,7 @@ "description": "iris: flush data cache when flushing HDC on GFX < 12", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a969ad1ddfd6b0b94cc484da45293c407203e3ac", "notes": null diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 72660f8f54f..879445e7893 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -8634,6 +8634,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]
