void r300_texture_transfer_destroy(struct pipe_context *ctx, struct pipe_transfer *trans) { struct r300_transfer *r300transfer = r300_transfer(trans); if (r300transfer->linear_texture) { if (trans->usage & PIPE_TRANSFER_WRITE) { r300_copy_into_tiled_texture(ctx, r300transfer); } pipe_resource_reference( (struct pipe_resource**)&r300transfer->linear_texture, NULL); } pipe_resource_reference(&trans->resource, NULL); FREE(trans); }
void r300_texture_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer *transfer) { struct radeon_winsys *rws = r300_context(ctx)->rws; struct r300_transfer *trans = r300_transfer(transfer); struct r300_resource *tex = r300_resource(transfer->resource); if (trans->linear_texture) { if (transfer->usage & PIPE_TRANSFER_WRITE) { r300_copy_into_tiled_texture(ctx, trans); } pipe_resource_reference( (struct pipe_resource**)&trans->linear_texture, NULL); } FREE(transfer); }