Mesa (master): panfrost: 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: b019b22c7aed8141a5f279619c239fd2a4eda843
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b019b22c7aed8141a5f279619c239fd2a4eda843
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Wed Jun 10 17:54:25 2020 -0500
panfrost: 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: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
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/panfrost/bifrost/bifrost_compile.c | 3 ++-
src/panfrost/midgard/midgard_compile.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 31958426331..adaf6fa3ea8 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -1292,7 +1292,8 @@ bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, unsigned
NIR_PASS_V(nir, nir_lower_global_vars_to_local);
NIR_PASS_V(nir, nir_lower_var_copies);
NIR_PASS_V(nir, nir_lower_vars_to_ssa);
- NIR_PASS_V(nir, nir_lower_io, nir_var_all, glsl_type_size, 0);
+ NIR_PASS_V(nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
+ glsl_type_size, 0);
NIR_PASS_V(nir, nir_lower_ssbo);
NIR_PASS_V(nir, nir_lower_mediump_outputs);
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 1460f6c23b2..fe8b5c47a3f 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -2747,7 +2747,8 @@ midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_b
NIR_PASS_V(nir, nir_lower_var_copies);
NIR_PASS_V(nir, nir_lower_vars_to_ssa);
- NIR_PASS_V(nir, nir_lower_io, nir_var_all, glsl_type_size, 0);
+ NIR_PASS_V(nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
+ glsl_type_size, 0);
NIR_PASS_V(nir, nir_lower_ssbo);
NIR_PASS_V(nir, midgard_nir_lower_zs_store);
More information about the mesa-commit
mailing list