mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
st/nir: Free the GLSL IR after linking.
i965 does this, and st's tgsi path does this. st/nir did not. Cuts 138MB of memory from a DiRT Rally trace, which is about 44% of the total GLSL IR memory. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
227b191206
commit
1d72de3bcc
1 changed files with 4 additions and 0 deletions
|
|
@ -839,6 +839,10 @@ st_link_nir(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
nir_sweep(shader->Program->nir);
|
||||
|
||||
/* The GLSL IR won't be needed anymore. */
|
||||
ralloc_free(shader->ir);
|
||||
shader->ir = NULL;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue