[Mesa-dev] [PATCH 1/9] glsl: rename lower_int64 to lower_64bit.

Dave Airlie airlied at gmail.com
Thu Feb 1 03:33:50 UTC 2018


From: Elie Tournier <tournier.elie at gmail.com>

This can also be used to lower some double ops.

[airlied:
this is extract from Elie's work into a standalone patch]
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/compiler/Makefile.sources                          | 2 +-
 src/compiler/glsl/ir_optimization.h                    | 4 ++--
 src/compiler/glsl/{lower_int64.cpp => lower_64bit.cpp} | 6 +++---
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp             | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
 rename src/compiler/glsl/{lower_int64.cpp => lower_64bit.cpp} (98%)

diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
index d3f746f5f9..bb93ba68a2 100644
--- a/src/compiler/Makefile.sources
+++ b/src/compiler/Makefile.sources
@@ -81,6 +81,7 @@ LIBGLSL_FILES = \
 	glsl/loop_analysis.cpp \
 	glsl/loop_analysis.h \
 	glsl/loop_unroll.cpp \
+	glsl/lower_64bit.cpp \
 	glsl/lower_blend_equation_advanced.cpp \
 	glsl/lower_buffer_access.cpp \
 	glsl/lower_buffer_access.h \
@@ -91,7 +92,6 @@ LIBGLSL_FILES = \
 	glsl/lower_distance.cpp \
 	glsl/lower_if_to_cond_assign.cpp \
 	glsl/lower_instructions.cpp \
-	glsl/lower_int64.cpp \
 	glsl/lower_jumps.cpp \
 	glsl/lower_mat_op_to_vec.cpp \
 	glsl/lower_noise.cpp \
diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h
index 2b8c195151..5b21319261 100644
--- a/src/compiler/glsl/ir_optimization.h
+++ b/src/compiler/glsl/ir_optimization.h
@@ -177,7 +177,7 @@ ir_variable *compare_index_block(ir_builder::ir_factory &body,
                                  ir_variable *index,
                                  unsigned base, unsigned components);
 
-bool lower_64bit_integer_instructions(exec_list *instructions,
-                                      unsigned what_to_lower);
+bool lower_64bit_instructions(exec_list *instructions,
+                              unsigned what_to_lower);
 
 #endif /* GLSL_IR_OPTIMIZATION_H */
diff --git a/src/compiler/glsl/lower_int64.cpp b/src/compiler/glsl/lower_64bit.cpp
similarity index 98%
rename from src/compiler/glsl/lower_int64.cpp
rename to src/compiler/glsl/lower_64bit.cpp
index 2d4fdbb1a5..ac62d1db1e 100644
--- a/src/compiler/glsl/lower_int64.cpp
+++ b/src/compiler/glsl/lower_64bit.cpp
@@ -22,7 +22,7 @@
  */
 
 /**
- * \file lower_int64.cpp
+ * \file lower_64bit.cpp
  *
  * Lower 64-bit operations to 32-bit operations.  Each 64-bit value is lowered
  * to a uvec2.  For each operation that can be lowered, there is a function
@@ -132,8 +132,8 @@ private:
 #define lowering(x) (this->lower & x)
 
 bool
-lower_64bit_integer_instructions(exec_list *instructions,
-                                 unsigned what_to_lower)
+lower_64bit_instructions(exec_list *instructions,
+                         unsigned what_to_lower)
 {
    if (instructions->is_empty())
       return false;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index c92b1d9077..43dd5fdd40 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -7029,7 +7029,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
       }
 
       if (!pscreen->get_param(pscreen, PIPE_CAP_INT64_DIVMOD))
-         lower_64bit_integer_instructions(ir, DIV64 | MOD64);
+         lower_64bit_instructions(ir, DIV64 | MOD64);
 
       if (ctx->Extensions.ARB_shading_language_packing) {
          unsigned lower_inst = LOWER_PACK_SNORM_2x16 |
-- 
2.14.3



More information about the mesa-dev mailing list