From d9b9ff76f17ee36b87b2722fa2a19e1d9f036c26 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 17 Sep 2015 07:54:35 -0400 Subject: [PATCH] nir: rename nir_lower_tex_projector Since the following patches will add additional tex-lowering related functionality, which doesn't make sense to split out into a separate pass (as they would require duplication of the projector lowering logic), let's give this pass a more generic name. Signed-off-by: Rob Clark Reviewed-by: Kenneth Graunke --- src/glsl/Makefile.sources | 2 +- src/glsl/nir/nir.h | 2 +- .../nir/{nir_lower_tex_projector.c => nir_lower_tex.c} | 10 +++++----- src/mesa/drivers/dri/i965/brw_nir.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/glsl/nir/{nir_lower_tex_projector.c => nir_lower_tex.c} (94%) diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources index 5134ab73800..b539b45e432 100644 --- a/src/glsl/Makefile.sources +++ b/src/glsl/Makefile.sources @@ -45,7 +45,7 @@ NIR_FILES = \ nir/nir_lower_phis_to_scalar.c \ nir/nir_lower_samplers.cpp \ nir/nir_lower_system_values.c \ - nir/nir_lower_tex_projector.c \ + nir/nir_lower_tex.c \ nir/nir_lower_to_source_mods.c \ nir/nir_lower_vars_to_ssa.c \ nir/nir_lower_var_copies.c \ diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 83e31533e8b..c484d8e81ce 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1836,7 +1836,7 @@ void nir_lower_samplers(nir_shader *shader, const struct gl_shader_program *shader_program); void nir_lower_system_values(nir_shader *shader); -void nir_lower_tex_projector(nir_shader *shader); +void nir_lower_tex(nir_shader *shader); void nir_lower_idiv(nir_shader *shader); void nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables); diff --git a/src/glsl/nir/nir_lower_tex_projector.c b/src/glsl/nir/nir_lower_tex.c similarity index 94% rename from src/glsl/nir/nir_lower_tex_projector.c rename to src/glsl/nir/nir_lower_tex.c index 9afa42f23a9..b5ac1b2647d 100644 --- a/src/glsl/nir/nir_lower_tex_projector.c +++ b/src/glsl/nir/nir_lower_tex.c @@ -31,7 +31,7 @@ #include "nir_builder.h" static bool -nir_lower_tex_projector_block(nir_block *block, void *void_state) +nir_lower_tex_block(nir_block *block, void *void_state) { nir_builder *b = void_state; @@ -116,22 +116,22 @@ nir_lower_tex_projector_block(nir_block *block, void *void_state) } static void -nir_lower_tex_projector_impl(nir_function_impl *impl) +nir_lower_tex_impl(nir_function_impl *impl) { nir_builder b; nir_builder_init(&b, impl); - nir_foreach_block(impl, nir_lower_tex_projector_block, &b); + nir_foreach_block(impl, nir_lower_tex_block, &b); nir_metadata_preserve(impl, nir_metadata_block_index | nir_metadata_dominance); } void -nir_lower_tex_projector(nir_shader *shader) +nir_lower_tex(nir_shader *shader) { nir_foreach_overload(shader, overload) { if (overload->impl) - nir_lower_tex_projector_impl(overload->impl); + nir_lower_tex_impl(overload->impl); } } diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 9a0bbb06847..0d5b6dd7291 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -96,7 +96,7 @@ brw_create_nir(struct brw_context *brw, nir_lower_global_vars_to_local(nir); nir_validate_shader(nir); - nir_lower_tex_projector(nir); + nir_lower_tex(nir); nir_validate_shader(nir); nir_normalize_cubemap_coords(nir); -- 2.30.2