[Mesa-dev] [PATCH 53/87] i965: don't precompile or rebuild resource list on cache fallback

Timothy Arceri timothy.arceri at collabora.com
Wed Jul 13 02:47:48 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_link.cpp | 8 +++++---
 src/mesa/main/shaderobj.c              | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 651105c..aa1a1f2 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -280,9 +280,11 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg,
       }
    }
 
-   if (brw->precompile && !brw_shader_precompile(ctx, shProg))
-      return false;
+   if (!is_cache_fallback) {
+      if (brw->precompile && !brw_shader_precompile(ctx, shProg))
+         return false;
 
-   build_program_resource_list(ctx, shProg);
+      build_program_resource_list(ctx, shProg);
+   }
    return true;
 }
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 73fbb15..4dcd7a9 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -331,7 +331,7 @@ _mesa_clear_shader_program_data(struct gl_shader_program *shProg,
       shProg->NumAtomicBuffers = 0;
    }
 
-   if (shProg->ProgramResourceList) {
+   if (shProg->ProgramResourceList && !is_cache_fallback) {
       ralloc_free(shProg->ProgramResourceList);
       shProg->ProgramResourceList = NULL;
       shProg->NumProgramResourceList = 0;
-- 
2.7.4



More information about the mesa-dev mailing list