diff options
author | Dave Airlie <[email protected]> | 2010-09-03 12:01:59 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-09-03 12:01:59 +1000 |
commit | ce7077423fc9ea003606dd28ca87311644b7e5c2 (patch) | |
tree | 9fc3b7e88c5605c919c7690c634e6facfe3480d5 /src/gallium/drivers | |
parent | 4ca207b174c3500c13e8a994f2ff2bc5c94fb18f (diff) |
r600g: deref old driver states for set entry points.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 9d7d7b6c40a..190d1c807d7 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -380,6 +380,8 @@ static void r600_set_clip_state(struct pipe_context *ctx, struct r600_context *rctx = r600_context(ctx); struct r600_context_state *rstate; + r600_context_state_decref(rctx->clip); + rstate = r600_new_context_state(pipe_clip_type); rstate->state.clip = *state; r600_ucp(rctx, &rstate->rstate[0], &rstate->state.clip); @@ -439,6 +441,8 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx, struct r600_context_state *rstate; int i; + r600_context_state_decref(rctx->framebuffer); + rstate = r600_new_context_state(pipe_framebuffer_type); rstate->state.framebuffer = *state; for (i = 0; i < rstate->state.framebuffer.nr_cbufs; i++) { @@ -472,6 +476,8 @@ static void r600_set_scissor_state(struct pipe_context *ctx, struct r600_context *rctx = r600_context(ctx); struct r600_context_state *rstate; + r600_context_state_decref(rctx->scissor); + rstate = r600_new_context_state(pipe_scissor_type); rstate->state.scissor = *state; rctx->scissor = rstate; @@ -483,6 +489,8 @@ static void r600_set_stencil_ref(struct pipe_context *ctx, struct r600_context *rctx = r600_context(ctx); struct r600_context_state *rstate; + r600_context_state_decref(rctx->stencil_ref); + rstate = r600_new_context_state(pipe_stencil_ref_type); rstate->state.stencil_ref = *state; rctx->stencil_ref = rstate; @@ -528,6 +536,8 @@ static void r600_set_viewport_state(struct pipe_context *ctx, struct r600_context *rctx = r600_context(ctx); struct r600_context_state *rstate; + r600_context_state_decref(rctx->viewport); + rstate = r600_new_context_state(pipe_viewport_type); rstate->state.viewport = *state; r600_viewport(rctx, &rstate->rstate[0], &rstate->state.viewport); |