[Mesa-dev] [PATCH 50/56] glsl: enable shader cache support for geometry shaders

Timothy Arceri timothy.arceri at collabora.com
Tue Nov 29 03:58:49 UTC 2016


---
 src/compiler/glsl/shader_cache.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 4d84842..c244c53 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1212,8 +1212,7 @@ shader_cache_write_program_metadata(struct gl_context *ctx,
    /* 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_GEOMETRY] ||
-       prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ||
+   if (prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ||
        prog->_LinkedShaders[MESA_SHADER_TESS_CTRL] ||
        prog->_LinkedShaders[MESA_SHADER_COMPUTE])
       return;
@@ -1320,6 +1319,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
 
    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) {
          compile_shaders(ctx, prog);
          return false;
-- 
2.7.4



More information about the mesa-dev mailing list