aco: Split var_mem_image barrier handling from global/ssbo
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 15 Sep 2021 16:51:42 +0000 (11:51 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 15 Oct 2021 14:58:56 +0000 (14:58 +0000)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4743>

src/amd/compiler/aco_instruction_selection.cpp

index a7572e5..fe66ae7 100644 (file)
@@ -7080,8 +7080,10 @@ emit_scoped_barrier(isel_context* ctx, nir_intrinsic_instr* instr)
       ctx->stage.hw == HWStage::CS || ctx->stage.hw == HWStage::HS || ctx->stage.hw == HWStage::NGG;
 
    unsigned nir_storage = nir_intrinsic_memory_modes(instr);
-   if (nir_storage & (nir_var_mem_ssbo | nir_var_mem_global | nir_var_mem_image))
-      storage |= storage_buffer | storage_image; // TODO: split this when NIR gets nir_var_mem_image
+   if (nir_storage & (nir_var_mem_ssbo | nir_var_mem_global))
+      storage |= storage_buffer;
+   if (nir_storage & nir_var_mem_image)
+      storage |= storage_image;
    if (shared_storage_used && (nir_storage & nir_var_mem_shared))
       storage |= storage_shared;