mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 20:10:14 +01:00
glsl: don't reference shader prog data during cache fallback
We already have a reference. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
2f19accc5e
commit
0e9991f957
2 changed files with 4 additions and 2 deletions
|
|
@ -2197,6 +2197,7 @@ link_intrastage_shaders(void *mem_ctx,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!prog->data->cache_fallback)
|
||||||
_mesa_reference_shader_program_data(ctx, &gl_prog->sh.data, prog->data);
|
_mesa_reference_shader_program_data(ctx, &gl_prog->sh.data, prog->data);
|
||||||
|
|
||||||
/* Don't use _mesa_reference_program() just take ownership */
|
/* Don't use _mesa_reference_program() just take ownership */
|
||||||
|
|
|
||||||
|
|
@ -430,6 +430,7 @@ _mesa_delete_shader_program(struct gl_context *ctx,
|
||||||
struct gl_shader_program *shProg)
|
struct gl_shader_program *shProg)
|
||||||
{
|
{
|
||||||
_mesa_free_shader_program_data(ctx, shProg);
|
_mesa_free_shader_program_data(ctx, shProg);
|
||||||
|
if (!shProg->data->cache_fallback)
|
||||||
_mesa_reference_shader_program_data(ctx, &shProg->data, NULL);
|
_mesa_reference_shader_program_data(ctx, &shProg->data, NULL);
|
||||||
ralloc_free(shProg);
|
ralloc_free(shProg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue