mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
nir/opt_offsets: rename max_offset_data to cb_data
We want to add more callbacks and pass the same data. Signed-off-by: Job Noorman <jnoorman@igalia.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37114>
This commit is contained in:
parent
e394244a89
commit
bc03086320
3 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue