glsl: drop cache_fallback
[mesa.git] / src / mesa / main / shaderobj.c
index b9d1079a35abab68fbb776627dcbe057d46249c9..e2103bcde4974e953f7ea3da0b8700c1c44a1a83 100644 (file)
@@ -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);
 }