diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2016-02-06 17:08:29 -0500 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2016-02-07 17:23:58 -0500 |
commit | 88519c60873e6a5d67fc1fc09b125e4fe2fa3aee (patch) | |
tree | 7e721c898994b07d2d3244c288091c08d7174362 /src/compiler/glsl/ast_function.cpp | |
parent | ac57577e29643a59a33a7c2b01def2e297db3448 (diff) | |
download | external_mesa3d-88519c60873e6a5d67fc1fc09b125e4fe2fa3aee.zip external_mesa3d-88519c60873e6a5d67fc1fc09b125e4fe2fa3aee.tar.gz external_mesa3d-88519c60873e6a5d67fc1fc09b125e4fe2fa3aee.tar.bz2 |
glsl: return cloned signature, not the builtin one
The builtin data can get released with a glReleaseShaderCompiler call.
We're careful everywhere to clone everything that comes out of builtins
except here, where we accidentally return the signature belonging to the
builtin version, rather than the locally-cloned one.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Tested-by: Rob Herring <robh@kernel.org>
Cc: mesa-stable@lists.freedesktop.org
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r-- | src/compiler/glsl/ast_function.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 0eb456a..c7fdcb2 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -560,7 +560,8 @@ done: state->symbols->add_global_function(f); emit_function(state, f); } - f->add_signature(sig->clone_prototype(f, NULL)); + sig = sig->clone_prototype(f, NULL); + f->add_signature(sig); } } return sig; |