mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
nir/opt_offsets: add support for @load/store_global_ir3
Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41342>
This commit is contained in:
parent
c784af5ca0
commit
0703f27d6a
2 changed files with 7 additions and 0 deletions
|
|
@ -6810,6 +6810,9 @@ typedef struct nir_opt_offsets_options {
|
|||
/** nir_load/store_buffer_amd max base offset */
|
||||
uint32_t buffer_max;
|
||||
|
||||
/** nir_load/store_global_offset max base offset */
|
||||
uint32_t global_max;
|
||||
|
||||
/**
|
||||
* Callback to get the max base offset for instructions for which the
|
||||
* corresponding value above is zero.
|
||||
|
|
|
|||
|
|
@ -387,6 +387,10 @@ process_instr(nir_builder *b, nir_instr *instr, void *s)
|
|||
return try_fold_load_store(b, intrin, state, 0, 0, get_max(state, intrin, 0), false);
|
||||
case nir_intrinsic_isbewr_nv:
|
||||
return try_fold_load_store(b, intrin, state, 1, 0, get_max(state, intrin, 0), false);
|
||||
case nir_intrinsic_load_global_ir3:
|
||||
return try_fold_load_store(b, intrin, state, 1, 0, get_max(state, intrin, state->options->global_max), need_nuw);
|
||||
case nir_intrinsic_store_global_ir3:
|
||||
return try_fold_load_store(b, intrin, state, 2, 0, get_max(state, intrin, state->options->global_max), need_nuw);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue