freedreno/ir3: Rename ir3_nir_lower_to_explicit_io
authorKristian H. Kristensen <hoegsberg@google.com>
Tue, 28 Apr 2020 19:29:46 +0000 (12:29 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 16:26:31 +0000 (16:26 +0000)
We rename it to ir3_nir_lower_to_explicit_output, since it only
handles output and we'll add a lowering pass for input next.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4562>

src/freedreno/ir3/ir3_nir.c
src/freedreno/ir3/ir3_nir.h
src/freedreno/ir3/ir3_nir_lower_tess.c

index c40fb43f82dd077871414655dac023c3464b57f4..26035501e35d3d2e6c528bd4cf56b867c400afa8 100644 (file)
@@ -222,7 +222,7 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s,
        if (key && (key->has_gs || key->tessellation)) {
                switch (shader->type) {
                case MESA_SHADER_VERTEX:
-                       NIR_PASS_V(s, ir3_nir_lower_to_explicit_io, shader, key->tessellation);
+                       NIR_PASS_V(s, ir3_nir_lower_to_explicit_output, shader, key->tessellation);
                        break;
                case MESA_SHADER_TESS_CTRL:
                        NIR_PASS_V(s, ir3_nir_lower_tess_ctrl, shader, key->tessellation);
@@ -230,7 +230,7 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s,
                case MESA_SHADER_TESS_EVAL:
                        NIR_PASS_V(s, ir3_nir_lower_tess_eval, key->tessellation);
                        if (key->has_gs)
-                               NIR_PASS_V(s, ir3_nir_lower_to_explicit_io, shader, key->tessellation);
+                               NIR_PASS_V(s, ir3_nir_lower_to_explicit_output, shader, key->tessellation);
                        break;
                case MESA_SHADER_GEOMETRY:
                        NIR_PASS_V(s, ir3_nir_lower_gs, shader);
index ee7c01b0dfa3ace7f4b2e579ca81d44683a9593b..6a0445c6cf71aced5a101592c53206e7b7dc9d23 100644 (file)
@@ -44,7 +44,7 @@ int ir3_nir_coord_offset(nir_ssa_def *ssa);
 bool ir3_nir_lower_tex_prefetch(nir_shader *shader);
 
 
-void ir3_nir_lower_to_explicit_io(nir_shader *shader,
+void ir3_nir_lower_to_explicit_output(nir_shader *shader,
                struct ir3_shader *s, unsigned topology);
 void ir3_nir_lower_tess_ctrl(nir_shader *shader, struct ir3_shader *s, unsigned topology);
 void ir3_nir_lower_tess_eval(nir_shader *shader, unsigned topology);
index 249e36dad6a86260042e0ad2aa44536b04d94c7b..c2bb664a8ebf168fed373252462f83dfafef3323 100644 (file)
@@ -179,7 +179,7 @@ build_primitive_map(nir_shader *shader, struct primitive_map *map, struct exec_l
 }
 
 static void
-lower_vs_block(nir_block *block, nir_builder *b, struct state *state)
+lower_block_to_explicit_output(nir_block *block, nir_builder *b, struct state *state)
 {
        nir_foreach_instr_safe (instr, block) {
                if (instr->type != nir_instr_type_intrinsic)
@@ -222,7 +222,7 @@ local_thread_id(nir_builder *b)
 }
 
 void
-ir3_nir_lower_to_explicit_io(nir_shader *shader, struct ir3_shader *s, unsigned topology)
+ir3_nir_lower_to_explicit_output(nir_shader *shader, struct ir3_shader *s, unsigned topology)
 {
        struct state state = { };
 
@@ -242,7 +242,7 @@ ir3_nir_lower_to_explicit_io(nir_shader *shader, struct ir3_shader *s, unsigned
                state.header = nir_load_gs_header_ir3(&b);
 
        nir_foreach_block_safe (block, impl)
-               lower_vs_block(block, &b, &state);
+               lower_block_to_explicit_output(block, &b, &state);
 
        nir_metadata_preserve(impl, nir_metadata_block_index |
                        nir_metadata_dominance);