From: Brian Paul Date: Fri, 31 Oct 2014 03:02:19 +0000 (-0600) Subject: softpipe: use the tgsi_free_tokens() function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afdc4309dc2f68372c39f940e1cc394f1dc25d30;p=mesa.git softpipe: use the tgsi_free_tokens() function Reviewed-by: Charmaine Lee --- diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c index 8d18ca98d4d..58a2498c046 100644 --- a/src/gallium/drivers/softpipe/sp_state_shader.c +++ b/src/gallium/drivers/softpipe/sp_state_shader.c @@ -132,7 +132,7 @@ softpipe_create_fs_state(struct pipe_context *pipe, state->draw_shader = draw_create_fragment_shader(softpipe->draw, &state->shader); if (!state->draw_shader) { - FREE((void *) state->shader.tokens); + tgsi_free_tokens(state->shader.tokens); FREE(state); return NULL; } @@ -194,7 +194,7 @@ softpipe_delete_fs_state(struct pipe_context *pipe, void *fs) draw_delete_fragment_shader(softpipe->draw, state->draw_shader); - FREE((void *) state->shader.tokens); + tgsi_free_tokens(state->shader.tokens); FREE(state); } @@ -226,7 +226,7 @@ softpipe_create_vs_state(struct pipe_context *pipe, fail: if (state) { - FREE( (void *)state->shader.tokens ); + tgsi_free_tokens(state->shader.tokens); FREE( state->draw_data ); FREE( state ); } @@ -256,7 +256,7 @@ softpipe_delete_vs_state(struct pipe_context *pipe, void *vs) struct sp_vertex_shader *state = (struct sp_vertex_shader *) vs; draw_delete_vertex_shader(softpipe->draw, state->draw_data); - FREE( (void *)state->shader.tokens ); + tgsi_free_tokens(state->shader.tokens); FREE( state ); } @@ -296,7 +296,7 @@ softpipe_create_gs_state(struct pipe_context *pipe, fail: if (state) { - FREE( (void *)state->shader.tokens ); + tgsi_free_tokens(state->shader.tokens); FREE( state->draw_data ); FREE( state ); } @@ -329,7 +329,7 @@ softpipe_delete_gs_state(struct pipe_context *pipe, void *gs) draw_delete_geometry_shader(softpipe->draw, (state) ? state->draw_data : 0); - FREE((void *) state->shader.tokens); + tgsi_free_tokens(state->shader.tokens); FREE(state); }