Module: Mesa
Branch: staging/23.0
Commit: 8f7da2aecdd539943e227393012851e3c8b73f1e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f7da2aecdd539943e227393012851e3c8b73f1e

Author: Rhys Perry <[email protected]>
Date:   Fri Mar 31 13:59:59 2023 +0100

aco: fix nir_var_shader_out barriers for task shaders

These will be used in a future commit.

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Timur Kristóf <[email protected]>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22211>
(cherry picked from commit 6974e5479ce35720c9898558fcfd45434669c451)

---

 .pick_status.json                              | 2 +-
 src/amd/compiler/aco_instruction_selection.cpp | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 8be92a3e489..e12325320e6 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -238,7 +238,7 @@
         "description": "aco: fix nir_var_shader_out barriers for task shaders",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/compiler/aco_instruction_selection.cpp 
b/src/amd/compiler/aco_instruction_selection.cpp
index e9fbd255354..8f9b43c6a8b 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -7394,7 +7394,8 @@ emit_scoped_barrier(isel_context* ctx, 
nir_intrinsic_instr* instr)
       storage_allowed |= storage_task_payload;
 
    /* Allow VMEM output for all stages that can have outputs. */
-   if (ctx->stage.hw != HWStage::CS && ctx->stage.hw != HWStage::FS)
+   if ((ctx->stage.hw != HWStage::CS && ctx->stage.hw != HWStage::FS) ||
+       ctx->stage.has(SWStage::TS))
       storage_allowed |= storage_vmem_output;
 
    /* Workgroup barriers can hang merged shaders that can potentially have 0 
threads in either half.

Reply via email to