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:
Ilia Mirkin
2016-02-06 17:08:29 -05:00
parent ac57577e29
commit 88519c6087

View File

@@ -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;