aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-15 16:56:14 +0200
committermarha <marha@users.sourceforge.net>2012-10-15 16:56:14 +0200
commitf15a40afaf6d1b3a4841d25631f947da1b289f89 (patch)
treef2066dc8caaf2fddd3b88251d18839d5878bfd9b /mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
parentf2a3390c8b2052e8f65d3502dd703b5c5b23a28e (diff)
parent54db46582aba2252d544fa3956522f9ef06b49cb (diff)
downloadvcxsrv-f15a40afaf6d1b3a4841d25631f947da1b289f89.tar.gz
vcxsrv-f15a40afaf6d1b3a4841d25631f947da1b289f89.tar.bz2
vcxsrv-f15a40afaf6d1b3a4841d25631f947da1b289f89.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver mesa pixman git update 15 oct 2012 Conflicts: xorg-server/hw/xwin/InitOutput.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c62
1 files changed, 22 insertions, 40 deletions
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);
}
}