diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 426ac1c2102..1d4ab80efe6 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -36,7 +36,7 @@ static void si_create_compute_state_async(void *job, void *gdata, int thread_ind assert(thread_index < ARRAY_SIZE(sscreen->compiler)); compiler = &sscreen->compiler[thread_index]; - si_nir_scan_shader(sscreen, sel->nir, &sel->info, false); + si_nir_gather_info(sscreen, sel->nir, &sel->info, false); if (!sel->nir->info.use_aco_amd && !*compiler) *compiler = si_create_llvm_compiler(sscreen); diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index dca75a5f5fc..55685705bab 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -915,7 +915,7 @@ unsigned si_shader_encode_vgprs(struct si_shader *shader); unsigned si_shader_encode_sgprs(struct si_shader *shader); /* si_shader_info.c */ -void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, +void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir, struct si_shader_info *info, bool colors_lowered); /* si_shader_nir.c */ diff --git a/src/gallium/drivers/radeonsi/si_shader_info.c b/src/gallium/drivers/radeonsi/si_shader_info.c index 0a94051df5f..4b0dd7293b3 100644 --- a/src/gallium/drivers/radeonsi/si_shader_info.c +++ b/src/gallium/drivers/radeonsi/si_shader_info.c @@ -60,8 +60,8 @@ static const nir_src *get_texture_src(nir_tex_instr *instr, nir_tex_src_type typ return NULL; } -static void scan_io_usage(const nir_shader *nir, struct si_shader_info *info, - nir_intrinsic_instr *intr, bool is_input, bool colors_lowered) +static void gather_io_instrinsic(const nir_shader *nir, struct si_shader_info *info, + nir_intrinsic_instr *intr, bool is_input, bool colors_lowered) { unsigned mask, bit_size; bool is_output_load; @@ -274,8 +274,8 @@ static void scan_io_usage(const nir_shader *nir, struct si_shader_info *info, } /* TODO: convert to nir_shader_instructions_pass */ -static void scan_instruction(const struct nir_shader *nir, struct si_shader_info *info, - nir_instr *instr, bool colors_lowered) +static void gather_instruction(const struct nir_shader *nir, struct si_shader_info *info, + nir_instr *instr, bool colors_lowered) { if (instr->type == nir_instr_type_tex) { nir_tex_instr *tex = nir_instr_as_tex(instr); @@ -366,14 +366,14 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info case nir_intrinsic_load_per_vertex_input: case nir_intrinsic_load_input_vertex: case nir_intrinsic_load_interpolated_input: - scan_io_usage(nir, info, intr, true, colors_lowered); + gather_io_instrinsic(nir, info, intr, true, colors_lowered); break; case nir_intrinsic_load_output: case nir_intrinsic_load_per_vertex_output: case nir_intrinsic_store_output: case nir_intrinsic_store_per_vertex_output: case nir_intrinsic_store_per_primitive_output: - scan_io_usage(nir, info, intr, false, colors_lowered); + gather_io_instrinsic(nir, info, intr, false, colors_lowered); break; case nir_intrinsic_load_deref: case nir_intrinsic_store_deref: @@ -393,7 +393,7 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info } } -void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, +void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir, struct si_shader_info *info, bool colors_lowered) { nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); @@ -609,7 +609,7 @@ void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, nir_function_impl *impl = nir_shader_get_entrypoint(nir); nir_foreach_block (block, impl) { nir_foreach_instr (instr, block) - scan_instruction(nir, info, instr, colors_lowered); + gather_instruction(nir, info, instr, colors_lowered); } if (nir->info.stage == MESA_SHADER_VERTEX || nir->info.stage == MESA_SHADER_TESS_EVAL) { @@ -687,7 +687,7 @@ void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, } /* clipdist_mask cannot be determined here from nir->info.clip_distance_array_size because - * nir_opt_clip_cull_const can reduce their number. It has to be determined by scanning + * nir_opt_clip_cull_const can reduce their number. It has to be determined by looking at * the shader instructions. */ if (nir->info.outputs_written & VARYING_BIT_CLIP_VERTEX) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 7bc03653f40..8eebd094cc6 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -3597,7 +3597,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx, sel->nir = state->ir.nir; } - si_nir_scan_shader(sscreen, sel->nir, &sel->info, false); + si_nir_gather_info(sscreen, sel->nir, &sel->info, false); sel->stage = sel->nir->info.stage; sel->const_and_shader_buf_descriptors_index =