aco: fix nir_var_shader_out barriers for task shaders
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 31 Mar 2023 12:59:59 +0000 (13:59 +0100)
committerMarge Bot <emma+marge@anholt.net>
Sat, 1 Apr 2023 14:46:50 +0000 (14:46 +0000)
These will be used in a future commit.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22211>

src/amd/compiler/aco_instruction_selection.cpp

index d11257b..1cd3c42 100644 (file)
@@ -7242,7 +7242,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.