mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 08:20:12 +01:00
radv: fix memleak with link time optimizations and GPL
Do not clone the NIR when the driver retains NIR shaders because it exits early, otherwise stage->nir will never be freed. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7768 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19973>
This commit is contained in:
parent
16fd8b8324
commit
edc830be34
1 changed files with 1 additions and 1 deletions
|
|
@ -3761,7 +3761,7 @@ radv_pipeline_stage_retain_shader(struct radv_pipeline *pipeline, struct radv_pi
|
|||
{
|
||||
gl_shader_stage s = stage->stage;
|
||||
|
||||
pipeline->retained_shaders[s].nir = nir_shader_clone(NULL, stage->nir);
|
||||
pipeline->retained_shaders[s].nir = stage->nir;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue