diff options
author | Jakob Bornecrantz <[email protected]> | 2009-03-11 17:37:38 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-03-11 22:47:14 +0100 |
commit | 5d418f7155cfb7bf9a14e6b322831a6e6b6ad710 (patch) | |
tree | 156b2e0454300319a4d8c6b64bc836118164a4d8 /src/gallium/drivers/trace/tr_texture.c | |
parent | 81569c2f697586daab01486ec1da28f0a03b5c6a (diff) |
trace: Fixup trace a bit
Diffstat (limited to 'src/gallium/drivers/trace/tr_texture.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_texture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/trace/tr_texture.c b/src/gallium/drivers/trace/tr_texture.c index 9187de7a18c..6d3de8ad807 100644 --- a/src/gallium/drivers/trace/tr_texture.c +++ b/src/gallium/drivers/trace/tr_texture.c @@ -125,10 +125,11 @@ trace_transfer_create(struct trace_texture *tr_tex, goto error; memcpy(&tr_trans->base, transfer, sizeof(struct pipe_transfer)); - + tr_trans->base.texture = NULL; pipe_texture_reference(&tr_trans->base.texture, &tr_tex->base); tr_trans->transfer = transfer; + assert(tr_trans->base.texture == &tr_tex->base); return &tr_trans->base; @@ -143,8 +144,9 @@ trace_transfer_destroy(struct trace_texture *tr_tex, struct pipe_transfer *transfer) { struct trace_transfer *tr_trans = trace_transfer(tr_tex, transfer); + struct pipe_screen *screen = tr_trans->transfer->texture->screen; pipe_texture_reference(&tr_trans->base.texture, NULL); - transfer->texture->screen->tex_transfer_destroy(tr_trans->transfer); + screen->tex_transfer_destroy(tr_trans->transfer); FREE(tr_trans); } |