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/state_tracker | |
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/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_blend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index d5eadc3541a..f321cd38298 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -156,6 +156,7 @@ static void update_blend( struct st_context *st ) { struct pipe_blend_state blend; + const struct cso_blend *cso; memset(&blend, 0, sizeof(blend)); @@ -211,8 +212,7 @@ update_blend( struct st_context *st ) if (st->ctx->Color.DitherFlag) blend.dither = 1; - const struct cso_blend *cso = - st_cached_blend_state(st, &blend); + cso = st_cached_blend_state(st, &blend); if (st->state.blend != cso) { /* state has changed */ |