diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 7453d87e40a..ea8a5d4ad67 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -6332,8 +6332,8 @@ typedef struct nir_opt_offsets_options { */ uint32_t (*max_offset_cb)(nir_intrinsic_instr *intr, const void *data); - /** Data to pass to max_offset_cb. */ - const void *max_offset_data; + /** Data to pass to callbacks. */ + const void *cb_data; /** * Allow the offset calculation to wrap. If false, constant additions that diff --git a/src/compiler/nir/nir_opt_offsets.c b/src/compiler/nir/nir_opt_offsets.c index 562078491c1..92efeaf4ac2 100644 --- a/src/compiler/nir/nir_opt_offsets.c +++ b/src/compiler/nir/nir_opt_offsets.c @@ -184,7 +184,7 @@ get_max(opt_offsets_state *state, nir_intrinsic_instr *intrin, uint32_t default_ if (default_val) return default_val; if (state->options->max_offset_cb) - return state->options->max_offset_cb(intrin, state->options->max_offset_data); + return state->options->max_offset_cb(intrin, state->options->cb_data); return 0; } diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 2cf18228ca2..812b09856ad 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -386,7 +386,7 @@ ir3_optimize_loop(struct ir3_compiler *compiler, .buffer_max = 0, .max_offset_cb = ir3_nir_max_imm_offset, - .max_offset_data = compiler, + .cb_data = compiler, .allow_offset_wrap = true, }; progress |= OPT(s, nir_opt_offsets, &offset_options);