Mesa (master): program: Don' t reset SamplersValidated when restoring from shader cache
Jordan Justen
jljusten at kemper.freedesktop.org
Wed Dec 13 08:32:42 UTC 2017
Module: Mesa
Branch: master
Commit: dc07bb5fd188a4352ec90edb6c6107ae1ce11b50
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc07bb5fd188a4352ec90edb6c6107ae1ce11b50
Author: Jordan Justen <jordan.l.justen at intel.com>
Date: Tue Dec 12 11:44:01 2017 -0800
program: Don't reset SamplersValidated when restoring from shader cache
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103988
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/mesa/program/ir_to_mesa.cpp | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 5f663b3d09..29198509a6 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3115,15 +3115,17 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
link_shaders(ctx, prog);
}
- if (prog->data->LinkStatus) {
- /* Reset sampler validated to true, validation happens via the
- * LinkShader call below.
- */
+ /* If LinkStatus is linking_success, then reset sampler validated to true.
+ * Validation happens via the LinkShader call below. If LinkStatus is
+ * linking_skipped, then SamplersValidated will have been restored from the
+ * shader cache.
+ */
+ if (prog->data->LinkStatus == linking_success) {
prog->SamplersValidated = GL_TRUE;
+ }
- if (!ctx->Driver.LinkShader(ctx, prog)) {
- prog->data->LinkStatus = linking_failure;
- }
+ if (prog->data->LinkStatus && !ctx->Driver.LinkShader(ctx, prog)) {
+ prog->data->LinkStatus = linking_failure;
}
/* Return early if we are loading the shader from on-disk cache */
More information about the mesa-commit
mailing list