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

Timothy Arceri timothy.arceri at collabora.com
Fri Apr 29 13:33:59 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 97bee3b..240e2db 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -262,9 +262,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 5bf155e..b05cc82 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -307,7 +307,7 @@ _mesa_clear_shader_program_data(struct gl_shader_program *shProg,
       shProg->NumAtomicBuffers = 0;
    }
 
-   if (shProg->ProgramResourceList) {
+   if (shProg->ProgramResourceList && !skip_cache) {
       ralloc_free(shProg->ProgramResourceList);
       shProg->ProgramResourceList = NULL;
       shProg->NumProgramResourceList = 0;
-- 
2.5.5



More information about the mesa-dev mailing list