From ce4e54f7a0e5ee1af535451a5b79371818f350b2 Mon Sep 17 00:00:00 2001 From: Skyth <1257961-blueskythlikesclouds@users.noreply.gitlab.freedesktop.org> Date: Thu, 7 May 2026 17:13:42 +0300 Subject: [PATCH] spirv2dxil: Replace UAV_FENCE_THREAD_GROUP usage with UAV_FENCE_GLOBAL. Part-of: --- src/microsoft/compiler/nir_to_dxil.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index e1fada984c4..cfa766a70d7 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -3091,7 +3091,10 @@ emit_barrier_impl(struct ntd_context *ctx, nir_variable_mode modes, mesa_scope e (mem_scope > SCOPE_WORKGROUP || !is_compute)) { flags |= DXIL_BARRIER_MODE_UAV_FENCE_GLOBAL; } else { - flags |= DXIL_BARRIER_MODE_UAV_FENCE_THREAD_GROUP; + /* This used to be DXIL_BARRIER_MODE_UAV_FENCE_THREAD_GROUP. However, since + * it's inaccessible in HLSL, certain drivers (eg. for Intel Iris Xe Graphics) + * do not seem robust against it, and appear to ignore the barrier instruction. */ + flags |= DXIL_BARRIER_MODE_UAV_FENCE_GLOBAL; } if ((modes & nir_var_mem_shared) && is_compute)