[Mesa-dev] [PATCH 21/65] glsl: don't support caching single vs or fs shaders

Timothy Arceri timothy.arceri at collabora.com
Fri Apr 29 13:33:20 UTC 2016


We can add support for this later for now skip these programs.
---
 src/compiler/glsl/shader_cache.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 575c518..8f2e1ef 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -463,6 +463,11 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
    if (!cache)
       return false;
 
+   if (prog->NumShaders == 1) {
+      compile_shaders(ctx, prog);
+      return false;
+   }
+
    for (unsigned i = 0; i < prog->NumShaders; i++) {
       if (prog->Shaders[i]->Stage != MESA_SHADER_VERTEX &&
           prog->Shaders[i]->Stage != MESA_SHADER_FRAGMENT) {
-- 
2.5.5



More information about the mesa-dev mailing list