[Mesa-dev] [PATCH 74/88] glsl: enable shader cache for tess stages

Timothy Arceri timothy.arceri at collabora.com
Sat Sep 24 05:25:55 UTC 2016


---
 src/compiler/glsl/shader_cache.cpp | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index f974311..746817e 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1167,12 +1167,8 @@ shader_cache_write_program_metadata(struct gl_context *ctx,
    if (!cache)
       return;
 
-   /* We should be able to serialize any valid combinations of shaders, but
-    * for now we only support vs and fs.
-    */
-   if (prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ||
-       prog->_LinkedShaders[MESA_SHADER_TESS_CTRL] ||
-       prog->_LinkedShaders[MESA_SHADER_COMPUTE])
+   /* Currently we don't support caching compute shaders. */
+   if (prog->_LinkedShaders[MESA_SHADER_COMPUTE])
       return;
 
    metadata = blob_create(NULL);
@@ -1235,9 +1231,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
       return false;
 
    for (unsigned i = 0; i < prog->NumShaders; i++) {
-      if (prog->Shaders[i]->Stage != MESA_SHADER_VERTEX &&
-          prog->Shaders[i]->Stage != MESA_SHADER_GEOMETRY &&
-          prog->Shaders[i]->Stage != MESA_SHADER_FRAGMENT) {
+      if (prog->Shaders[i]->Stage == MESA_SHADER_COMPUTE) {
          compile_shaders(ctx, prog);
          return false;
       }
-- 
2.7.4



More information about the mesa-dev mailing list