Mesa (staging/21.0): nir: Work around MSVC x86 internal compiler error

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 21 22:55:16 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: e60e3ef8410b5d7cb03cda8c4f2a393f58b22709
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e60e3ef8410b5d7cb03cda8c4f2a393f58b22709

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Tue Jan 19 11:23:39 2021 -0800

nir: Work around MSVC x86 internal compiler error

Fixes: 1fd8b466 ("nir,spirv: add sparse image loads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4108
Acked-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8581>
(cherry picked from commit 13b21156e47daba7545fe7c171ebd5f444692f70)

---

 .pick_status.json                              | 2 +-
 src/compiler/nir/nir_lower_input_attachments.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 46289c5d559..6a34b1922fe 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -580,7 +580,7 @@
         "description": "nir: Work around MSVC x86 internal compiler error",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "1fd8b466672b76ad206af8aac6002e8a658db9fb"
     },
diff --git a/src/compiler/nir/nir_lower_input_attachments.c b/src/compiler/nir/nir_lower_input_attachments.c
index f18aac0df0d..2380b0cc88a 100644
--- a/src/compiler/nir/nir_lower_input_attachments.c
+++ b/src/compiler/nir/nir_lower_input_attachments.c
@@ -151,8 +151,9 @@ try_lower_input_load(nir_function_impl *impl, nir_intrinsic_instr *load,
 
    if (tex->is_sparse) {
       unsigned load_result_size = load->dest.ssa.num_components - 1;
+      unsigned load_result_mask = BITFIELD_MASK(load_result_size);
       nir_ssa_def *res = nir_channels(
-         &b, &tex->dest.ssa, BITFIELD_MASK(load_result_size) | 0x10);
+         &b, &tex->dest.ssa, load_result_mask | 0x10);
 
       nir_ssa_def_rewrite_uses(&load->dest.ssa, nir_src_for_ssa(res));
    } else {



More information about the mesa-commit mailing list