From 303175cfecb166cc69736c1405ac2d3bbee9d82c Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 22 Apr 2022 14:45:49 +0200 Subject: [PATCH] microsoft/compiler: Images are no longer reprensented by uniform vars emit_barrier_impl() was still checking the nir_var_uniform flag to detect images, which is no longer correct. Fixes: cfdc7ee066e ("spirv: Use nir_var_mem_image") Reviewed-by: Erik Faye-Lund Reviewed-by: Jesse Natalie Part-of: --- src/microsoft/compiler/nir_to_dxil.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 5b4b6c9..3eb4a59 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -2501,11 +2501,7 @@ emit_barrier_impl(struct ntd_context *ctx, nir_variable_mode modes, nir_scope ex if (execution_scope == NIR_SCOPE_WORKGROUP) flags |= DXIL_BARRIER_MODE_SYNC_THREAD_GROUP; - /* Currently vtn uses uniform to indicate image memory, which DXIL considers global */ - if (modes & nir_var_uniform) - modes |= nir_var_mem_global; - - if (modes & (nir_var_mem_ssbo | nir_var_mem_global)) { + if (modes & (nir_var_mem_ssbo | nir_var_mem_global | nir_var_image)) { if (mem_scope > NIR_SCOPE_WORKGROUP) flags |= DXIL_BARRIER_MODE_UAV_FENCE_GLOBAL; else -- 2.7.4