glsl: use correct shader source in case of cache fallback
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 12 Feb 2017 22:34:54 +0000 (09:34 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 17 Feb 2017 00:18:42 +0000 (11:18 +1100)
commite5bb4a0b0f4743fa0a0567991dca751ef49a7200
tree23ac824bb7ecc033145244df6688adbbc1be3f71
parent877194068208a9fb87f7b5513bca85d09be8a20f
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 <nicolai.haehnle@amd.com>
src/compiler/glsl/glsl_parser_extras.cpp
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.c