Mesa (staging/20.0): nir/lower_explicit_io: fix NON_UNIFORM access for UBO loads

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 18:01:50 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 9ff455439b111d3a5f56936f7706156c3a42ed51
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ff455439b111d3a5f56936f7706156c3a42ed51

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Jun  3 14:35:02 2020 +0200

nir/lower_explicit_io: fix NON_UNIFORM access for UBO loads

Make sure to propagate the NON_UNIFORM access for UBO loads, so
that non-uniform loads are correctly lowered.

Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5311>
(cherry picked from commit 86f21e4eba7ad980109f13bd5480c02593ca19fe)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 652ff6cd683..f390d2e4b5a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -400,7 +400,7 @@
         "description": "nir/lower_explicit_io: fix NON_UNIFORM access for UBO loads",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 780d76748be..447d5f6ca5a 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -896,7 +896,7 @@ build_explicit_io_load(nir_builder *b, nir_intrinsic_instr *intrin,
       load->src[1] = nir_src_for_ssa(addr_to_offset(b, addr, addr_format));
    }
 
-   if (mode != nir_var_mem_ubo && mode != nir_var_shader_in && mode != nir_var_mem_shared)
+   if (mode != nir_var_shader_in && mode != nir_var_mem_shared)
       nir_intrinsic_set_access(load, nir_intrinsic_access(intrin));
 
    unsigned bit_size = intrin->dest.ssa.bit_size;



More information about the mesa-commit mailing list