[Mesa-dev] [PATCH 2/4] st/mesa: inline st_free_tokens
Marek Olšák
maraeo at gmail.com
Mon Feb 23 12:02:38 PST 2015
From: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/state_tracker/st_mesa_to_tgsi.c | 11 -----------
src/mesa/state_tracker/st_mesa_to_tgsi.h | 3 ---
src/mesa/state_tracker/st_program.c | 6 +++---
3 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 3dd8a14..4684421 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -1254,14 +1254,3 @@ out:
return ret;
}
-
-
-/**
- * Tokens cannot be free with free otherwise the builtin gallium
- * malloc debugging will get confused.
- */
-void
-st_free_tokens(const struct tgsi_token *tokens)
-{
- ureg_free_tokens(tokens);
-}
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h
index 1aa797a..62bb654 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.h
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h
@@ -62,9 +62,6 @@ st_translate_mesa_program(
boolean passthrough_edgeflags,
boolean clamp_color);
-void
-st_free_tokens(const struct tgsi_token *tokens);
-
unsigned
st_translate_texture_target(GLuint textarget, GLboolean shadow);
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index d6e0d1b..ec123fb 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -69,7 +69,7 @@ delete_vp_variant(struct st_context *st, struct st_vp_variant *vpv)
draw_delete_vertex_shader( st->draw, vpv->draw_shader );
if (vpv->tgsi.tokens)
- st_free_tokens(vpv->tgsi.tokens);
+ ureg_free_tokens(vpv->tgsi.tokens);
free( vpv );
}
@@ -108,7 +108,7 @@ delete_fp_variant(struct st_context *st, struct st_fp_variant *fpv)
if (fpv->parameters)
_mesa_free_parameter_list(fpv->parameters);
if (fpv->tgsi.tokens)
- st_free_tokens(fpv->tgsi.tokens);
+ ureg_free_tokens(fpv->tgsi.tokens);
free(fpv);
}
@@ -1183,7 +1183,7 @@ st_translate_geometry_program(struct st_context *st,
gpv->driver_shader = pipe->create_gs_state(pipe, &state);
gpv->key = *key;
- st_free_tokens(state.tokens);
+ ureg_free_tokens(state.tokens);
return gpv;
}
--
2.1.0
More information about the mesa-dev
mailing list