st/mesa: inline st_free_tokens
authorMarek Olšák <marek.olsak@amd.com>
Sat, 21 Feb 2015 21:41:39 +0000 (22:41 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 24 Feb 2015 20:21:04 +0000 (21:21 +0100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_mesa_to_tgsi.c
src/mesa/state_tracker/st_mesa_to_tgsi.h
src/mesa/state_tracker/st_program.c

index 3dd8a14b65711752012f684381683c0bb30661e0..4684421b52514c66c775f2e939288b4e30ff77e3 100644 (file)
@@ -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);
-}
index 1aa797a32176b4c0b34f72a60cbe372a3a0d758b..62bb654e95a5e4964897bb6cf9757e7b94fddd45 100644 (file)
@@ -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);
 
index d6e0d1b3c16e8ab506ad40d42d1338fbe38610d3..ec123fbdb4ceda05e6c728d15d9d4f6233ea1b2b 100644 (file)
@@ -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;
 }