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:

committed by
Timothy Arceri

parent
2f19accc5e
commit
0e9991f957
@@ -2197,7 +2197,8 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_mesa_reference_shader_program_data(ctx, &gl_prog->sh.data, prog->data);
|
||||
if (!prog->data->cache_fallback)
|
||||
_mesa_reference_shader_program_data(ctx, &gl_prog->sh.data, prog->data);
|
||||
|
||||
/* Don't use _mesa_reference_program() just take ownership */
|
||||
linked->Program = gl_prog;
|
||||
|
@@ -430,7 +430,8 @@ _mesa_delete_shader_program(struct gl_context *ctx,
|
||||
struct gl_shader_program *shProg)
|
||||
{
|
||||
_mesa_free_shader_program_data(ctx, shProg);
|
||||
_mesa_reference_shader_program_data(ctx, &shProg->data, NULL);
|
||||
if (!shProg->data->cache_fallback)
|
||||
_mesa_reference_shader_program_data(ctx, &shProg->data, NULL);
|
||||
ralloc_free(shProg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user