summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2023-09-26 12:25:42 +0300
committerDylan Baker <dylan.c.baker@intel.com>2023-10-06 13:44:12 -0700
commit2e4ecc4dbe428d94326f0db9e527a36675f2d64a (patch)
tree3f6e0e4a5538443d61a68ed7ed7d7ace6a125247
parentf497e05f40577f6fdfbf787519ddaf7666bdba63 (diff)
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 <tapani.palli@intel.com> Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25399> (cherry picked from commit c02db0d90ff749977170163479c06a87429de942)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/iris/iris_state.c8
2 files changed, 9 insertions, 1 deletions
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]