Mesa (staging/22.0): Revert "zink: always invalidate streamout counter buffer if not resuming"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 24 17:06:47 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: 20420da849e0a35172bbdd87fae360761f5fa8c8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=20420da849e0a35172bbdd87fae360761f5fa8c8

Author: Dylan Baker <dylan.c.baker at intel.com>
Date:   Thu Feb 24 09:06:23 2022 -0800

Revert "zink: always invalidate streamout counter buffer if not resuming"

This reverts commit 7dcc977c06cdf454065d83263adb53467f438b8d.

---

 .pick_status.json                       |  2 +-
 src/gallium/drivers/zink/zink_context.c | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index c68e0386008..cb4e76f5ea3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2470,7 +2470,7 @@
         "description": "zink: always invalidate streamout counter buffer if not resuming",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 1,
+        "resolution": 0,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index c645a6d13ed..8ba6fcbdea4 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -3613,11 +3613,6 @@ zink_set_stream_output_targets(struct pipe_context *pctx,
 {
    struct zink_context *ctx = zink_context(pctx);
 
-   /* always set counter_buffer_valid=false on unbind:
-    * - on resume (indicated by offset==-1), set counter_buffer_valid=true
-    * - otherwise the counter buffer is invalidated
-    */
-
    if (num_targets == 0) {
       for (unsigned i = 0; i < ctx->num_so_targets; i++) {
          if (ctx->so_targets[i]) {
@@ -3637,16 +3632,14 @@ zink_set_stream_output_targets(struct pipe_context *pctx,
          if (!t)
             continue;
          struct zink_resource *res = zink_resource(t->counter_buffer);
-         if (offsets[0] == (unsigned)-1) {
+         if (offsets[0] == (unsigned)-1)
             ctx->xfb_barrier |= zink_resource_buffer_needs_barrier(res,
                                                                    VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT,
                                                                    VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT);
-         } else {
+         else
             ctx->xfb_barrier |= zink_resource_buffer_needs_barrier(res,
                                                                    VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT,
                                                                    VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT);
-            t->counter_buffer_valid = false;
-         }
          struct zink_resource *so = zink_resource(ctx->so_targets[i]->buffer);
          if (so) {
             so->so_bind_count++;



More information about the mesa-commit mailing list