From 54db46582aba2252d544fa3956522f9ef06b49cb Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 15 Oct 2012 16:50:35 +0200 Subject: xserver mesa pixman git update 15 oct 2012 xserver: a69429a17bf4630f6e26f61630a1c2b287202627 pixman: d5f2f39319fc358cccda60abe0bc927bd27131c1 mesa: 4004620d34a580c8fdb965d9b640e97453fc8b28 --- mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c | 62 ++++++++--------------- 1 file changed, 22 insertions(+), 40 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c') diff --git a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c index c82c52c84..4d8adb9f3 100644 --- a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1111,17 +1111,14 @@ make_1d_mipmap(struct gen_mipmap_state *ctx, struct pipe_transfer *srcTrans, *dstTrans; void *srcMap, *dstMap; - srcTrans = pipe_get_transfer(pipe, pt, srcLevel, layer, - PIPE_TRANSFER_READ, 0, 0, - u_minify(pt->width0, srcLevel), - u_minify(pt->height0, srcLevel)); - dstTrans = pipe_get_transfer(pipe, pt, dstLevel, layer, - PIPE_TRANSFER_WRITE, 0, 0, - u_minify(pt->width0, dstLevel), - u_minify(pt->height0, dstLevel)); - - srcMap = (ubyte *) pipe->transfer_map(pipe, srcTrans); - dstMap = (ubyte *) pipe->transfer_map(pipe, dstTrans); + srcMap = pipe_transfer_map(pipe, pt, srcLevel, layer, + PIPE_TRANSFER_READ, 0, 0, + u_minify(pt->width0, srcLevel), + u_minify(pt->height0, srcLevel), &srcTrans); + dstMap = pipe_transfer_map(pipe, pt, dstLevel, layer, + PIPE_TRANSFER_WRITE, 0, 0, + u_minify(pt->width0, dstLevel), + u_minify(pt->height0, dstLevel), &dstTrans); reduce_1d(pt->format, srcTrans->box.width, srcMap, @@ -1129,9 +1126,6 @@ make_1d_mipmap(struct gen_mipmap_state *ctx, pipe->transfer_unmap(pipe, srcTrans); pipe->transfer_unmap(pipe, dstTrans); - - pipe->transfer_destroy(pipe, srcTrans); - pipe->transfer_destroy(pipe, dstTrans); } } @@ -1152,17 +1146,14 @@ make_2d_mipmap(struct gen_mipmap_state *ctx, struct pipe_transfer *srcTrans, *dstTrans; ubyte *srcMap, *dstMap; - srcTrans = pipe_get_transfer(pipe, pt, srcLevel, layer, - PIPE_TRANSFER_READ, 0, 0, - u_minify(pt->width0, srcLevel), - u_minify(pt->height0, srcLevel)); - dstTrans = pipe_get_transfer(pipe, pt, dstLevel, layer, - PIPE_TRANSFER_WRITE, 0, 0, - u_minify(pt->width0, dstLevel), - u_minify(pt->height0, dstLevel)); - - srcMap = (ubyte *) pipe->transfer_map(pipe, srcTrans); - dstMap = (ubyte *) pipe->transfer_map(pipe, dstTrans); + srcMap = pipe_transfer_map(pipe, pt, srcLevel, layer, + PIPE_TRANSFER_READ, 0, 0, + u_minify(pt->width0, srcLevel), + u_minify(pt->height0, srcLevel), &srcTrans); + dstMap = pipe_transfer_map(pipe, pt, dstLevel, layer, + PIPE_TRANSFER_WRITE, 0, 0, + u_minify(pt->width0, dstLevel), + u_minify(pt->height0, dstLevel), &dstTrans); reduce_2d(pt->format, srcTrans->box.width, srcTrans->box.height, @@ -1172,9 +1163,6 @@ make_2d_mipmap(struct gen_mipmap_state *ctx, pipe->transfer_unmap(pipe, srcTrans); pipe->transfer_unmap(pipe, dstTrans); - - pipe->transfer_destroy(pipe, srcTrans); - pipe->transfer_destroy(pipe, dstTrans); } } @@ -1207,15 +1195,12 @@ make_3d_mipmap(struct gen_mipmap_state *ctx, dst_box.height = u_minify(pt->height0, dstLevel); dst_box.depth = u_minify(pt->depth0, dstLevel); - srcTrans = pipe->get_transfer(pipe, pt, srcLevel, - PIPE_TRANSFER_READ, - &src_box); - dstTrans = pipe->get_transfer(pipe, pt, dstLevel, - PIPE_TRANSFER_WRITE, - &dst_box); - - srcMap = (ubyte *) pipe->transfer_map(pipe, srcTrans); - dstMap = (ubyte *) pipe->transfer_map(pipe, dstTrans); + srcMap = pipe->transfer_map(pipe, pt, srcLevel, + PIPE_TRANSFER_READ, + &src_box, &srcTrans); + dstMap = pipe->transfer_map(pipe, pt, dstLevel, + PIPE_TRANSFER_WRITE, + &dst_box, &dstTrans); reduce_3d(pt->format, srcTrans->box.width, srcTrans->box.height, srcTrans->box.depth, @@ -1225,9 +1210,6 @@ make_3d_mipmap(struct gen_mipmap_state *ctx, pipe->transfer_unmap(pipe, srcTrans); pipe->transfer_unmap(pipe, dstTrans); - - pipe->transfer_destroy(pipe, srcTrans); - pipe->transfer_destroy(pipe, dstTrans); } } -- cgit v1.2.3