[Mesa-dev] [PATCH 01/16] fixup! nir: Remove old-school deref chain support

Rob Clark robdclark at gmail.com
Sat Apr 7 16:13:33 UTC 2018


---
 src/amd/vulkan/radv_shader.c                    | 2 --
 src/compiler/nir/nir.h                          | 3 ---
 src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 3 ---
 src/mesa/state_tracker/st_glsl_to_nir.cpp       | 2 --
 4 files changed, 10 deletions(-)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 94f4b9cd0ee..2ba52c7e39b 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -247,8 +247,6 @@ radv_shader_compile_to_nir(struct radv_device *device,
 		assert(exec_list_length(&nir->functions) == 1);
 		entry_point->name = ralloc_strdup(entry_point, "main");
 
-		NIR_PASS_V(nir, nir_lower_deref_instrs, ~0);
-
 		/* Make sure we lower constant initializers on output variables so that
 		 * nir_remove_dead_variables below sees the corresponding stores
 		 */
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 85583b3bc9f..3309a1af4fc 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2535,9 +2535,6 @@ enum nir_lower_deref_flags {
    nir_lower_image_derefs =            (1 << 5),
 };
 
-bool nir_lower_deref_instrs(nir_shader *shader,
-                            enum nir_lower_deref_flags flags);
-
 void nir_lower_var_copy_instr(nir_intrinsic_instr *copy, nir_shader *shader);
 void nir_lower_deref_copy_instr(struct nir_builder *b,
                                 nir_intrinsic_instr *copy);
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
index b699432243d..24162d7cf52 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
@@ -112,7 +112,6 @@ load_glsl(unsigned num_files, char* const* files, gl_shader_stage stage)
 		errx(1, "couldn't parse `%s'", files[0]);
 
 	nir_shader *nir = glsl_to_nir(prog, stage, ir3_get_compiler_options(compiler));
-	nir_lower_deref_instrs(nir, ~0);
 
 	/* required NIR passes: */
 	/* TODO cmdline args for some of the conditional lowering passes? */
@@ -231,8 +230,6 @@ load_spirv(const char *filename, const char *entry, gl_shader_stage stage)
 			&spirv_options,
 			ir3_get_compiler_options(compiler));
 
-	NIR_PASS_V(entry_point->shader, nir_lower_deref_instrs, ~0);
-
 	nir_print_shader(entry_point->shader, stdout);
 
 	return entry_point->shader;
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 026c6fb3fce..f2d4b184d67 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -574,8 +574,6 @@ st_nir_get_mesa_program(struct gl_context *ctx,
 
    nir_shader *nir = st_glsl_to_nir(st, prog, shader_program, shader->Stage);
 
-   nir_lower_deref_instrs(nir, (nir_lower_deref_flags)~0);
-
    set_st_program(prog, shader_program, nir);
    prog->nir = nir;
 }
-- 
2.14.3



More information about the mesa-dev mailing list