diff options
author | Zack Rusin <[email protected]> | 2007-09-19 14:06:19 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2007-09-19 14:06:19 -0400 |
commit | c8650b087440c7ba5ad0d8652dc916852e55bc1d (patch) | |
tree | 1bca7e2e2ad7f3372478f389991dfbb68e62cf11 /src/mesa/pipe/softpipe | |
parent | fe555c39bb7fd530298b5be4a8f06bff41726c86 (diff) |
Avoid redundant reallocation of the template.
cso already allocated the template for us. Returning 0 means
we have no driver specific representation and just want
the template on the bind.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_state_blend.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_blend.c b/src/mesa/pipe/softpipe/sp_state_blend.c index 7a94e82d6f8..7fb47e7aaba 100644 --- a/src/mesa/pipe/softpipe/sp_state_blend.c +++ b/src/mesa/pipe/softpipe/sp_state_blend.c @@ -34,10 +34,9 @@ void * softpipe_create_blend_state(struct pipe_context *pipe, const struct pipe_blend_state *blend) { - struct pipe_blend_state *new_blend = malloc(sizeof(struct pipe_blend_state)); - memcpy(new_blend, blend, sizeof(struct pipe_blend_state)); - - return new_blend; + /* means that we just want pipe_blend_state and don't have + * anything specific */ + return 0; } void softpipe_bind_blend_state( struct pipe_context *pipe, @@ -53,7 +52,7 @@ void softpipe_bind_blend_state( struct pipe_context *pipe, void softpipe_delete_blend_state(struct pipe_context *pipe, void *blend ) { - free(blend); + /* do nothing */ } |