Mesa (staging/22.0): spirv: fix barrier scope assert

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 20 16:27:30 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed May 11 16:01:48 2022 -0400

spirv: fix barrier scope assert

glslang generates barriers with QueueFamily, so this is totally legal

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16462>
(cherry picked from commit 8c8e6e953f0ecb2e7e71a2311e5fc76860a57be8)

---

 .pick_status.json                 | 2 +-
 src/compiler/spirv/spirv_to_nir.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 9f61694da1c..fa284383371 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2028,7 +2028,7 @@
         "description": "spirv: fix barrier scope assert",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": null
     },
     {
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 79e176a2218..5be3c0e4496 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -4128,8 +4128,8 @@ vtn_emit_memory_barrier(struct vtn_builder *b, SpvScope scope,
       return;
    }
 
-   /* There's only two scopes thing left */
-   vtn_assert(scope == SpvScopeInvocation || scope == SpvScopeDevice);
+   /* There's only three scopes left */
+   vtn_assert(scope == SpvScopeInvocation || scope == SpvScopeDevice || scope == SpvScopeQueueFamily);
 
    /* Map the GLSL memoryBarrier() construct and any barriers with more than one
     * semantic to the corresponding NIR one.



More information about the mesa-commit mailing list