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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user