From: Jason Ekstrand Date: Wed, 10 Jun 2020 22:49:13 +0000 (-0500) Subject: lima: Only call nir_lower_io on shader_in/out X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f521e596a3b0acb71617ddff1ad5333b57f80f3;p=mesa.git lima: 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 Reviewed-by: Connor Abbott Part-of: --- diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 0d942d47126..1bb1bd88622 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -101,7 +101,8 @@ lima_program_optimize_vs_nir(struct nir_shader *s) NIR_PASS_V(s, nir_lower_viewport_transform); NIR_PASS_V(s, nir_lower_point_size, 1.0f, 100.0f); - NIR_PASS_V(s, nir_lower_io, nir_var_all, type_size, 0); + NIR_PASS_V(s, nir_lower_io, + nir_var_shader_in | nir_var_shader_out, type_size, 0); NIR_PASS_V(s, nir_lower_load_const_to_scalar); NIR_PASS_V(s, lima_nir_lower_uniform_to_scalar); NIR_PASS_V(s, nir_lower_io_to_scalar, @@ -193,7 +194,8 @@ lima_program_optimize_fs_nir(struct nir_shader *s, bool progress; NIR_PASS_V(s, nir_lower_fragcoord_wtrans); - NIR_PASS_V(s, nir_lower_io, nir_var_all, type_size, 0); + NIR_PASS_V(s, nir_lower_io, + nir_var_shader_in | nir_var_shader_out, type_size, 0); NIR_PASS_V(s, nir_lower_regs_to_ssa); NIR_PASS_V(s, nir_lower_tex, tex_options);