[Mesa-dev] [PATCH 57/68] glsl,i965: disable shader cache for SSO

Timothy Arceri timothy.arceri at collabora.com
Wed Jun 1 06:23:38 UTC 2016


Caching SSO requires us to be a little more careful so disable
it for now.
---
 src/compiler/glsl/linker.cpp                 | 2 +-
 src/mesa/drivers/dri/i965/brw_shader_cache.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 41480a7..f447b3a 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4485,7 +4485,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog,
 #ifdef ENABLE_SHADER_CACHE
    /* If transform feedback used on the program then compile all shaders. */
    bool skip_cache = false;
-   if (prog->TransformFeedback.NumVarying > 0) {
+   if (prog->TransformFeedback.NumVarying > 0 || prog->SeparateShader) {
       for (unsigned i = 0; i < prog->NumShaders; i++) {
          if (prog->Shaders[i]->ir) {
             continue;
diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c
index 07f3a64..08d43e7 100644
--- a/src/mesa/drivers/dri/i965/brw_shader_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c
@@ -103,7 +103,7 @@ upload_cached_program(struct brw_context *brw)
     * enabled. However we should be able to use cached shaders when the xfb_*
     * qualifiers were used to enable transform feedback.
     */
-   if (prog->TransformFeedback.NumVarying > 0)
+   if (prog->TransformFeedback.NumVarying > 0 || prog->SeparateShader)
       return;
 
    gen_binary_sha1(brw, prog, &vs_key, &wm_key);
-- 
2.5.5



More information about the mesa-dev mailing list