summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-06 09:14:08 +1000
committerDave Airlie <[email protected]>2010-09-06 09:15:42 +1000
commit5b82777311965d26e534bd522afb0f679622d504 (patch)
tree58e1bbf2aed34c62eff2ae355e9d10f490a9d83b /src
parent3a672785df247e6f8ce95616166b74d4fd10ede0 (diff)
r600g: fix up surface references
We end up referencing the new surf and derefing the old surface which is a copy of the pointer to the new surf. So just bump the ref count directly.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_state.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index e630e1af407..a7a795f9ab7 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -443,11 +443,9 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
rstate = r600_new_context_state(pipe_framebuffer_type);
rstate->state.framebuffer = *state;
for (i = 0; i < rstate->state.framebuffer.nr_cbufs; i++) {
- pipe_surface_reference(&rstate->state.framebuffer.cbufs[i],
- state->cbufs[i]);
+ pipe_reference(NULL, &state->cbufs[i]->reference);
}
- pipe_surface_reference(&rstate->state.framebuffer.zsbuf,
- state->zsbuf);
+ pipe_reference(NULL, &state->zsbuf->reference);
rctx->framebuffer = rstate;
for (i = 0; i < state->nr_cbufs; i++) {
r600_cb(rctx, &rstate->rstate[i+1], state, i);