Module: Mesa
Branch: master
Commit: ac57577e29643a59a33a7c2b01def2e297db3448
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac57577e29643a59a33a7c2b01def2e297db3448

Author: Ilia Mirkin <[email protected]>
Date:   Sat Feb  6 17:07:59 2016 -0500

glsl: make sure builtins are initialized before getting the shader

The builtin function shader is part of the builtin state, released
when glReleaseShaderCompiler is called. We must ensure that the
builtins have been (re)initialized before attempting to link with the
builtin shader.

Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Tested-by: Rob Herring <[email protected]>
Cc: [email protected]

---

 src/compiler/glsl/linker.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 4776ffa..f1ac53a 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2125,6 +2125,7 @@ link_intrastage_shaders(void *mem_ctx,
 
       if (ok) {
          memcpy(linking_shaders, shader_list, num_shaders * sizeof(gl_shader 
*));
+         _mesa_glsl_initialize_builtin_functions();
          linking_shaders[num_shaders] = 
_mesa_glsl_get_builtin_function_shader();
 
          ok = link_function_calls(prog, linked, linking_shaders, num_shaders + 
1);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to