Mesa (master): nouveau: Only call nir_lower_io on shader_in/out

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 6 20:19:16 UTC 2020


Module: Mesa
Branch: master
Commit: 786325fdb02b6561f243c82d359da8e5b3360a73
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=786325fdb02b6561f243c82d359da8e5b3360a73

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Jun 10 17:50:37 2020 -0500

nouveau: Only call nir_lower_io on shader_in/out

Gallium drivers should never see nir_var_uniform because gallium lowers
regular uniforms to a UBO.  No GL driver should ever see either
nir_var_mem_shared because that's lowered in GLSL IR.

Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index c914ae4b8e2..c634978497d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -3129,7 +3129,9 @@ Converter::run()
       .ballot_bit_size = 32,
    };
 
-   NIR_PASS_V(nir, nir_lower_io, nir_var_all, type_size, (nir_lower_io_options)0);
+   NIR_PASS_V(nir, nir_lower_io,
+              (nir_variable_mode)(nir_var_shader_in | nir_var_shader_out),
+              type_size, (nir_lower_io_options)0);
    NIR_PASS_V(nir, nir_lower_subgroups, &subgroup_options);
    NIR_PASS_V(nir, nir_lower_regs_to_ssa);
    NIR_PASS_V(nir, nir_lower_load_const_to_scalar);



More information about the mesa-commit mailing list