diff options
author | Timothy Arceri <[email protected]> | 2016-04-23 22:34:38 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-02-17 11:18:43 +1100 |
commit | 01d1e5a7ad4883d3f3aa7675711a5acd38736325 (patch) | |
tree | 3e7444593d122651937add7dd927eb6a78d523b6 /src/mesa | |
parent | 794f7326bcc3ffb7ab473d2c10a8c81ff4958167 (diff) |
glsl: skip more uniform initialisation when doing fallback linking
We already pull these values from the metadata cache so no need to
recreate them.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/shaderobj.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 8cc90736801..1ed19a683a3 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -359,9 +359,11 @@ _mesa_clear_shader_program_data(struct gl_context *ctx, shProg->data->ShaderStorageBlocks = NULL; shProg->data->NumShaderStorageBlocks = 0; - ralloc_free(shProg->data->AtomicBuffers); - shProg->data->AtomicBuffers = NULL; - shProg->data->NumAtomicBuffers = 0; + if (shProg->data->AtomicBuffers && !shProg->data->cache_fallback) { + ralloc_free(shProg->data->AtomicBuffers); + shProg->data->AtomicBuffers = NULL; + shProg->data->NumAtomicBuffers = 0; + } if (shProg->data->ProgramResourceList) { ralloc_free(shProg->data->ProgramResourceList); |