[Mesa-dev] [PATCH 3/5] nir: Rename lower_double_pack to lower_64bit_pack

Jason Ekstrand jason at jlekstrand.net
Wed Feb 15 07:29:49 UTC 2017


There's nothing "double" about it other than, perhaps, the fact that it
packs two 32-bit values.
---
 src/compiler/Makefile.sources                                       | 2 +-
 src/compiler/nir/nir.h                                              | 2 +-
 .../nir/{nir_lower_double_packing.c => nir_lower_64bit_packing.c}   | 6 +++---
 src/mesa/drivers/dri/i965/brw_nir.c                                 | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
 rename src/compiler/nir/{nir_lower_double_packing.c => nir_lower_64bit_packing.c} (95%)

diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
index a8bb4d3..136947b 100644
--- a/src/compiler/Makefile.sources
+++ b/src/compiler/Makefile.sources
@@ -201,6 +201,7 @@ NIR_FILES = \
 	nir/nir_liveness.c \
 	nir/nir_loop_analyze.c \
 	nir/nir_loop_analyze.h \
+	nir/nir_lower_64bit_packing.c \
 	nir/nir_lower_alu_to_scalar.c \
 	nir/nir_lower_atomics.c \
 	nir/nir_lower_bitmap.c \
@@ -209,7 +210,6 @@ NIR_FILES = \
 	nir/nir_lower_clip_cull_distance_arrays.c \
 	nir/nir_lower_constant_initializers.c \
 	nir/nir_lower_double_ops.c \
-	nir/nir_lower_double_packing.c \
 	nir/nir_lower_drawpixels.c \
 	nir/nir_lower_global_vars_to_local.c \
 	nir/nir_lower_gs_intrinsics.c \
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 8bbc41d..9bf2d18 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2543,7 +2543,7 @@ typedef enum {
 } nir_lower_doubles_options;
 
 void nir_lower_doubles(nir_shader *shader, nir_lower_doubles_options options);
-void nir_lower_double_pack(nir_shader *shader);
+void nir_lower_64bit_pack(nir_shader *shader);
 
 bool nir_normalize_cubemap_coords(nir_shader *shader);
 
diff --git a/src/compiler/nir/nir_lower_double_packing.c b/src/compiler/nir/nir_lower_64bit_packing.c
similarity index 95%
rename from src/compiler/nir/nir_lower_double_packing.c
rename to src/compiler/nir/nir_lower_64bit_packing.c
index 61c4ea6..0c94864 100644
--- a/src/compiler/nir/nir_lower_double_packing.c
+++ b/src/compiler/nir/nir_lower_64bit_packing.c
@@ -49,7 +49,7 @@ lower_unpack_64(nir_builder *b, nir_ssa_def *src)
 }
 
 static void
-lower_double_pack_impl(nir_function_impl *impl)
+lower_64bit_pack_impl(nir_function_impl *impl)
 {
    nir_builder b;
    nir_builder_init(&b, impl);
@@ -88,11 +88,11 @@ lower_double_pack_impl(nir_function_impl *impl)
 }
 
 void
-nir_lower_double_pack(nir_shader *shader)
+nir_lower_64bit_pack(nir_shader *shader)
 {
    nir_foreach_function(function, shader) {
       if (function->impl)
-         lower_double_pack_impl(function->impl);
+         lower_64bit_pack_impl(function->impl);
    }
 }
 
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index 0a8d3a8..7470349 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -511,7 +511,7 @@ nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
                                nir_lower_dfract |
                                nir_lower_dround_even |
                                nir_lower_dmod);
-      OPT_V(nir_lower_double_pack);
+      OPT_V(nir_lower_64bit_pack);
    } while (progress);
 
    return nir;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list