mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 12:00:41 +02:00
nir: make nir_instr_clone usable with load_const and undef
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
This commit is contained in:
parent
a9f8089240
commit
40fc85c15b
1 changed files with 4 additions and 2 deletions
|
|
@ -325,7 +325,8 @@ clone_load_const(clone_state *state, const nir_load_const_instr *lc)
|
|||
|
||||
memcpy(&nlc->value, &lc->value, sizeof(*nlc->value) * lc->def.num_components);
|
||||
|
||||
add_remap(state, &nlc->def, &lc->def);
|
||||
if (likely(state->remap_table))
|
||||
add_remap(state, &nlc->def, &lc->def);
|
||||
|
||||
return nlc;
|
||||
}
|
||||
|
|
@ -337,7 +338,8 @@ clone_ssa_undef(clone_state *state, const nir_undef_instr *sa)
|
|||
nir_undef_instr_create(state->ns, sa->def.num_components,
|
||||
sa->def.bit_size);
|
||||
|
||||
add_remap(state, &nsa->def, &sa->def);
|
||||
if (likely(state->remap_table))
|
||||
add_remap(state, &nsa->def, &sa->def);
|
||||
|
||||
return nsa;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue