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: cfdc7ee066 ("spirv: Use nir_var_mem_image")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926>
This commit is contained in:
Boris Brezillon 2022-04-22 14:45:49 +02:00 committed by Marge Bot
parent cdbc8a8c85
commit 303175cfec

View file

@ -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