diff options
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r-- | src/mesa/main/shaderobj.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 1ed19a683a3..8a5fa5e2dfc 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -351,13 +351,15 @@ _mesa_clear_shader_program_data(struct gl_context *ctx, ralloc_free(shProg->data->InfoLog); shProg->data->InfoLog = ralloc_strdup(shProg->data, ""); - ralloc_free(shProg->data->UniformBlocks); - shProg->data->UniformBlocks = NULL; - shProg->data->NumUniformBlocks = 0; - - ralloc_free(shProg->data->ShaderStorageBlocks); - shProg->data->ShaderStorageBlocks = NULL; - shProg->data->NumShaderStorageBlocks = 0; + if (!shProg->data->cache_fallback) { + ralloc_free(shProg->data->UniformBlocks); + shProg->data->UniformBlocks = NULL; + shProg->data->NumUniformBlocks = 0; + + ralloc_free(shProg->data->ShaderStorageBlocks); + shProg->data->ShaderStorageBlocks = NULL; + shProg->data->NumShaderStorageBlocks = 0; + } if (shProg->data->AtomicBuffers && !shProg->data->cache_fallback) { ralloc_free(shProg->data->AtomicBuffers); |