diff options
author | marha <marha@users.sourceforge.net> | 2012-10-15 16:56:14 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-10-15 16:56:14 +0200 |
commit | f15a40afaf6d1b3a4841d25631f947da1b289f89 (patch) | |
tree | f2066dc8caaf2fddd3b88251d18839d5878bfd9b /mesalib/src/gallium/auxiliary/util/u_surface.c | |
parent | f2a3390c8b2052e8f65d3502dd703b5c5b23a28e (diff) | |
parent | 54db46582aba2252d544fa3956522f9ef06b49cb (diff) | |
download | vcxsrv-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_surface.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_surface.c | 74 |
1 files changed, 30 insertions, 44 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_surface.c b/mesalib/src/gallium/auxiliary/util/u_surface.c index 7fd6b3675..304da9070 100644 --- a/mesalib/src/gallium/auxiliary/util/u_surface.c +++ b/mesalib/src/gallium/auxiliary/util/u_surface.c @@ -145,27 +145,23 @@ util_resource_copy_region(struct pipe_context *pipe, src_format = src->format; dst_format = dst->format; - src_trans = pipe_get_transfer(pipe, - src, - src_level, - src_box->z, - PIPE_TRANSFER_READ, - src_box->x, src_box->y, w, h); - - dst_trans = pipe_get_transfer(pipe, - dst, - dst_level, - dst_z, - PIPE_TRANSFER_WRITE, - dst_x, dst_y, w, h); + src_map = pipe_transfer_map(pipe, + src, + src_level, + src_box->z, + PIPE_TRANSFER_READ, + src_box->x, src_box->y, w, h, &src_trans); + + dst_map = pipe_transfer_map(pipe, + dst, + dst_level, + dst_z, + PIPE_TRANSFER_WRITE, + dst_x, dst_y, w, h, &dst_trans); assert(util_format_get_blocksize(dst_format) == util_format_get_blocksize(src_format)); assert(util_format_get_blockwidth(dst_format) == util_format_get_blockwidth(src_format)); assert(util_format_get_blockheight(dst_format) == util_format_get_blockheight(src_format)); - - src_map = pipe->transfer_map(pipe, src_trans); - dst_map = pipe->transfer_map(pipe, dst_trans); - assert(src_map); assert(dst_map); @@ -187,9 +183,6 @@ util_resource_copy_region(struct pipe_context *pipe, pipe->transfer_unmap(pipe, src_trans); pipe->transfer_unmap(pipe, dst_trans); - - pipe->transfer_destroy(pipe, src_trans); - pipe->transfer_destroy(pipe, dst_trans); } @@ -219,14 +212,12 @@ util_clear_render_target(struct pipe_context *pipe, if (!dst->texture) return; /* XXX: should handle multiple layers */ - dst_trans = pipe_get_transfer(pipe, - dst->texture, - dst->u.tex.level, - dst->u.tex.first_layer, - PIPE_TRANSFER_WRITE, - dstx, dsty, width, height); - - dst_map = pipe->transfer_map(pipe, dst_trans); + dst_map = pipe_transfer_map(pipe, + dst->texture, + dst->u.tex.level, + dst->u.tex.first_layer, + PIPE_TRANSFER_WRITE, + dstx, dsty, width, height, &dst_trans); assert(dst_map); @@ -237,10 +228,9 @@ util_clear_render_target(struct pipe_context *pipe, util_fill_rect(dst_map, dst->texture->format, dst_trans->stride, 0, 0, width, height, &uc); - } - pipe->transfer_unmap(pipe, dst_trans); - pipe->transfer_destroy(pipe, dst_trans); + pipe->transfer_unmap(pipe, dst_trans); + } } /** @@ -270,16 +260,13 @@ util_clear_depth_stencil(struct pipe_context *pipe, assert(dst->texture); if (!dst->texture) return; - dst_trans = pipe_get_transfer(pipe, - dst->texture, - dst->u.tex.level, - dst->u.tex.first_layer, - (need_rmw ? PIPE_TRANSFER_READ_WRITE : - PIPE_TRANSFER_WRITE), - dstx, dsty, width, height); - - dst_map = pipe->transfer_map(pipe, dst_trans); - + dst_map = pipe_transfer_map(pipe, + dst->texture, + dst->u.tex.level, + dst->u.tex.first_layer, + (need_rmw ? PIPE_TRANSFER_READ_WRITE : + PIPE_TRANSFER_WRITE), + dstx, dsty, width, height, &dst_trans); assert(dst_map); if (dst_map) { @@ -376,8 +363,7 @@ util_clear_depth_stencil(struct pipe_context *pipe, assert(0); break; } - } - pipe->transfer_unmap(pipe, dst_trans); - pipe->transfer_destroy(pipe, dst_trans); + pipe->transfer_unmap(pipe, dst_trans); + } } |