summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r--src/mesa/main/shaderobj.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index b9d1079a35a..e2103bcde49 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -327,7 +327,7 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
shProg->data->linked_stages = 0;
- if (shProg->data->UniformStorage && !shProg->data->cache_fallback) {
+ if (shProg->data->UniformStorage) {
for (unsigned i = 0; i < shProg->data->NumUniformStorage; ++i)
_mesa_uniform_detach_all_driver_storage(&shProg->data->
UniformStorage[i]);
@@ -336,7 +336,7 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
shProg->data->UniformStorage = NULL;
}
- if (shProg->UniformRemapTable && !shProg->data->cache_fallback) {
+ if (shProg->UniformRemapTable) {
ralloc_free(shProg->UniformRemapTable);
shProg->NumUniformRemapTable = 0;
shProg->UniformRemapTable = NULL;
@@ -351,17 +351,15 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
ralloc_free(shProg->data->InfoLog);
shProg->data->InfoLog = ralloc_strdup(shProg->data, "");
- if (!shProg->data->cache_fallback) {
- ralloc_free(shProg->data->UniformBlocks);
- shProg->data->UniformBlocks = NULL;
- shProg->data->NumUniformBlocks = 0;
+ 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;
- }
+ ralloc_free(shProg->data->ShaderStorageBlocks);
+ shProg->data->ShaderStorageBlocks = NULL;
+ shProg->data->NumShaderStorageBlocks = 0;
- if (shProg->data->AtomicBuffers && !shProg->data->cache_fallback) {
+ if (shProg->data->AtomicBuffers) {
ralloc_free(shProg->data->AtomicBuffers);
shProg->data->AtomicBuffers = NULL;
shProg->data->NumAtomicBuffers = 0;
@@ -434,8 +432,7 @@ _mesa_delete_shader_program(struct gl_context *ctx,
struct gl_shader_program *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);
}