Mesa (staging/22.1): microsoft/compiler: Images are no longer reprensented by uniform vars
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 16:22:57 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 90cfd31071944bc8baed0e1fd0c3af5a70574f07
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=90cfd31071944bc8baed0e1fd0c3af5a70574f07
Author: Boris Brezillon <boris.brezillon at collabora.com>
Date: Fri Apr 22 14:45:49 2022 +0200
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 <erik.faye-lund at collabora.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926>
(cherry picked from commit 303175cfecb166cc69736c1405ac2d3bbee9d82c)
---
.pick_status.json | 2 +-
src/microsoft/compiler/nir_to_dxil.c | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 2ff22f5eee0..c63d5227044 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -859,7 +859,7 @@
"description": "microsoft/compiler: Images are no longer reprensented by uniform vars",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "cfdc7ee066ea86c87d128e68c43ce7103da3ef5a"
},
diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c
index efe533ba639..2589a74986b 100644
--- a/src/microsoft/compiler/nir_to_dxil.c
+++ b/src/microsoft/compiler/nir_to_dxil.c
@@ -2482,11 +2482,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
More information about the mesa-commit
mailing list