summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-02-13 09:34:54 +1100
committerTimothy Arceri <[email protected]>2017-02-17 11:18:42 +1100
commite5bb4a0b0f4743fa0a0567991dca751ef49a7200 (patch)
tree23ac824bb7ecc033145244df6688adbbc1be3f71 /src/mesa/main/shaderobj.c
parent877194068208a9fb87f7b5513bca85d09be8a20f (diff)
glsl: use correct shader source in case of cache fallback
The scenario is: glShaderSource glCompileShader <-- deferred due to cache hit of shader glShaderSource <-- with new source code glAttachShader glLinkProgram <-- no cache hit for program At this point we need to compile the original source when we fallback. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r--src/mesa/main/shaderobj.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index b41137fbce3..222efc12c4e 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -122,6 +122,7 @@ void
_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
{
free((void *)sh->Source);
+ free((void *)sh->FallbackSource);
free(sh->Label);
ralloc_free(sh);
}