diff options
author | Timothy Arceri <[email protected]> | 2016-06-20 11:09:34 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-02-17 11:18:43 +1100 |
commit | cad1a9bfde61b634d95041d02f527093fd590677 (patch) | |
tree | b08602bd243098fb9ed4ee9af70f392a8752005f /src/mesa/main | |
parent | 01d1e5a7ad4883d3f3aa7675711a5acd38736325 (diff) |
glsl: don't reprocess or clear UBOs on cache fallback
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main')
-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); |