mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 07:50:20 +01:00
radeonsi: rename si_nir_scan_shader -> si_nir_gather_info, etc.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
This commit is contained in:
parent
4875e0a993
commit
e76fae1e0c
4 changed files with 12 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue