summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-10-30 21:02:19 -0600
committerBrian Paul <[email protected]>2014-10-31 15:30:00 -0600
commitafdc4309dc2f68372c39f940e1cc394f1dc25d30 (patch)
treea5966491dfd03099ca6503e8e7c32883f73d2c0b
parente6ee85ec619ded82de89364b73251b6092dd23e1 (diff)
softpipe: use the tgsi_free_tokens() function
Reviewed-by: Charmaine Lee <[email protected]>
-rw-r--r--src/gallium/drivers/softpipe/sp_state_shader.c12
1 files changed, 6 insertions, 6 deletions
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);
}