mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 08:10:14 +01:00
nir/clone: don't call ralloc_strdup with a NULL pointer for intrinsic names
No impact, but it was affecting my ralloc_strdup stats for nir_intrinsic_instr names. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538>
This commit is contained in:
parent
3c4a64e807
commit
dadd4e4555
1 changed files with 2 additions and 1 deletions
|
|
@ -355,7 +355,8 @@ clone_intrinsic(clone_state *state, const nir_intrinsic_instr *itr)
|
|||
|
||||
nitr->num_components = itr->num_components;
|
||||
memcpy(nitr->const_index, itr->const_index, sizeof(nitr->const_index));
|
||||
nitr->name = ralloc_strdup(state->ns, itr->name);
|
||||
if (itr->name)
|
||||
nitr->name = ralloc_strdup(state->ns, itr->name);
|
||||
|
||||
for (unsigned i = 0; i < num_srcs; i++)
|
||||
__clone_src(state, &nitr->instr, &nitr->src[i], &itr->src[i]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue