[Mesa-dev] [PATCH 64/77] glsl: enable shader cache for tess stages

Timothy Arceri timothy.arceri at collabora.com
Mon Oct 3 06:05:23 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 fdd1b98..304f80e 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1186,12 +1186,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);
@@ -1254,9 +1250,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