summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 59114a7a48b..776636c03c9 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1952,6 +1952,13 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
shader->FallbackSource = NULL;
return;
}
+ } else {
+ /* We should only ever end up here if a re-compile has been forced by a
+ * shader cache miss. In which case we can skip the compile if its
+ * already be done by a previous fallback or the initial compile call.
+ */
+ if (shader->CompileStatus == compile_success)
+ return;
}
if (!state->error) {