mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: stop leaking programs
gfx and compute programs both end up with an extra ref from creation, so they both need to lose a ref during creation after they get their shader refs Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9470>
This commit is contained in:
parent
46b356ca2d
commit
edcad555f8
1 changed files with 1 additions and 1 deletions
|
|
@ -559,6 +559,7 @@ zink_create_gfx_program(struct zink_context *ctx,
|
|||
zink_gfx_program_reference(screen, NULL, prog);
|
||||
}
|
||||
}
|
||||
p_atomic_dec(&prog->base.reference.count);
|
||||
|
||||
if (!zink_descriptor_program_init(ctx, stages, (struct zink_program*)prog))
|
||||
goto fail;
|
||||
|
|
@ -653,7 +654,6 @@ zink_create_compute_program(struct zink_context *ctx, struct zink_shader *shader
|
|||
equals_compute_pipeline_state);
|
||||
|
||||
_mesa_set_add(shader->programs, comp);
|
||||
zink_compute_program_reference(screen, NULL, comp);
|
||||
comp->shader = shader;
|
||||
|
||||
struct zink_shader *stages[ZINK_SHADER_COUNT] = {};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue