glsl: delay optimisations on individual shaders when cache is available
[mesa.git] / src / compiler / glsl / shader_cache.cpp
index f5e6a22bb9e996733e1d906af8a64d1a3c637300..e51fecd651851ebea231fbb62d0e4677aa494f82 100644 (file)
@@ -1418,7 +1418,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
     */
    char sha1_buf[41];
    for (unsigned i = 0; i < prog->NumShaders; i++) {
-      if (prog->Shaders[i]->CompileStatus == compile_success) {
+      if (prog->Shaders[i]->CompileStatus == compiled_no_opts) {
          disk_cache_put_key(cache, prog->Shaders[i]->sha1);
          if (ctx->_Shader->Flags & GLSL_CACHE_INFO) {
             _mesa_sha1_format(sha1_buf, prog->Shaders[i]->sha1);