Mesa (staging/22.1): anv: ensure tile flush before streamout writes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 27 22:16:30 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 595de716556c6f4f253226f03679cfba1d5d43a8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=595de716556c6f4f253226f03679cfba1d5d43a8

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Wed Jul 13 03:35:06 2022 +0300

anv: ensure tile flush before streamout writes

Streamout is not L3 coherent so previous writes to the same address
might be pending and overwrite the SO writes later when they get
flushed from L3, even though the SO write happened later in the batch.

v2: Use the right flag (not COUNTER)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6680
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17503>
(cherry picked from commit 2cac3b38172980ea51ba0ea2bbb6350d057972b0)

 Conflicts:
	src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt

deleted ci file not present in 22.1

---

 .pick_status.json              | 4 ++--
 src/intel/vulkan/anv_private.h | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 80400d82906..d59c9317de4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -5278,7 +5278,7 @@
         "description": "mesa: update GL_CLAMP emulation when binding/unbinding textures",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "e8f71f6ac48c14d3ec923e3cc819d79095a43070"
     },
@@ -5899,7 +5899,7 @@
         "description": "anv: ensure tile flush before streamout writes",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index e5e1fa27833..93d6d9c1cea 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2618,6 +2618,14 @@ anv_pipe_invalidate_bits_for_access_flags(struct anv_device *device,
           */
          pipe_bits |= ANV_PIPE_FLUSH_BITS;
          break;
+      case VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT:
+         /* We're transitioning a buffer to be written by the streamout fixed
+          * function. This one is apparently not L3 coherent, so we need a
+          * tile cache flush to make sure any previous write is not going to
+          * create WaW hazards.
+          */
+         pipe_bits |= ANV_PIPE_TILE_CACHE_FLUSH_BIT;
+         break;
       default:
          break; /* Nothing to do */
       }



More information about the mesa-commit mailing list