From 734a498ed47b35c9e8e7172d19465aca640fa323 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 21 Sep 2009 19:57:57 +0100 Subject: mesa: Ensure TGSI tokens are freed with gallium's free. To avoid breaking the gallium's builtin malloc debugging. --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mesa/state_tracker/st_mesa_to_tgsi.c') diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 04be57f8ff..b0a1b529f1 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -869,3 +869,14 @@ out: return tokens; } + + +/** + * Tokens cannot be free with _mesa_free otherwise the builtin gallium + * malloc debugging will get confused. + */ +void +st_free_tokens(const struct tgsi_token *tokens) +{ + FREE((void *)tokens); +} -- cgit v1.2.3