summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-02-06 17:08:29 -0500
committerIlia Mirkin <[email protected]>2016-02-07 17:23:58 -0500
commit88519c60873e6a5d67fc1fc09b125e4fe2fa3aee (patch)
tree7e721c898994b07d2d3244c288091c08d7174362 /src
parentac57577e29643a59a33a7c2b01def2e297db3448 (diff)
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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Rob Herring <[email protected]> Cc: [email protected]
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ast_function.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index 0eb456a2b1f..c7fdcb24379 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;