From fbd2c806718afc69a00eb0cfe5f52ffb2f1df474 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Thu, 15 Aug 2024 08:46:36 +0200 Subject: [PATCH] ir3: rename @store_uniform_ir3 to @store_const_ir3 Uniforms are a legacy thing and this intrinsic was only used to store to the const file so the new naming is less confusing. Signed-off-by: Job Noorman Part-of: --- src/compiler/nir/nir_intrinsics.py | 2 +- src/freedreno/ir3/ir3_compiler_nir.c | 2 +- src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c | 2 +- src/freedreno/ir3/ir3_nir_opt_preamble.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index b6405020bb0..a757fdeaecd 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -1403,7 +1403,7 @@ barrier("preamble_end_ir3") intrinsic("elect_any_ir3", dest_comp=1, flags=[CAN_ELIMINATE]) # IR3-specific intrinsic for stc. Should be used in the shader preamble. -store("uniform_ir3", [], indices=[BASE]) +store("const_ir3", [], indices=[BASE]) # IR3-specific intrinsic for loading from a const reg. load("const_ir3", [1], indices=[BASE], flags=[CAN_ELIMINATE, CAN_REORDER]) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 4231dd20425..c08f6ecbbbd 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -3176,7 +3176,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) array_insert(b, b->keeps, instr); break; } - case nir_intrinsic_store_uniform_ir3: { + case nir_intrinsic_store_const_ir3: { unsigned components = nir_src_num_components(intr->src[0]); unsigned dst = nir_intrinsic_base(intr); unsigned dst_lo = dst & 0xff; diff --git a/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c b/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c index dcc2de39786..b5b34704cd7 100644 --- a/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c +++ b/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c @@ -437,7 +437,7 @@ copy_global_to_uniform(nir_shader *nir, struct ir3_ubo_analysis_state *state) nir_def *load = nir_load_global_ir3(b, 4, 32, base, nir_imm_int(b, (start + offset) / 4)); - nir_store_uniform_ir3(b, load, .base = const_offset); + nir_store_const_ir3(b, load, .base = const_offset); } } } diff --git a/src/freedreno/ir3/ir3_nir_opt_preamble.c b/src/freedreno/ir3/ir3_nir_opt_preamble.c index e12d1801047..03d66052e6e 100644 --- a/src/freedreno/ir3/ir3_nir_opt_preamble.c +++ b/src/freedreno/ir3/ir3_nir_opt_preamble.c @@ -809,7 +809,7 @@ ir3_nir_lower_preamble(nir_shader *nir, struct ir3_shader_variant *v) } } - nir_store_uniform_ir3(b, src, .base = offset); + nir_store_const_ir3(b, src, .base = offset); nir_instr_remove(instr); nir_instr_free(instr); }