mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nir/sweep: Reparent the shader name
Previously the name of the nir shader was being freed prematurely during
nir_sweep. Since 756613ed35 the name was later being used to generate
filenames for the optimiser debug output and these would end up with
garbage from the dangling pointer.
Co-authored-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
c8031a879a
commit
9c528f5dfa
1 changed files with 2 additions and 0 deletions
|
|
@ -154,6 +154,8 @@ nir_sweep(nir_shader *nir)
|
|||
/* First, move ownership of all the memory to a temporary context; assume dead. */
|
||||
ralloc_adopt(rubbish, nir);
|
||||
|
||||
ralloc_steal(nir, (char *)nir->info.name);
|
||||
|
||||
/* Variables and registers are not dead. Steal them back. */
|
||||
steal_list(nir, nir_variable, &nir->uniforms);
|
||||
steal_list(nir, nir_variable, &nir->inputs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue