summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-07-07 02:30:54 +0200
committerMarek Olšák <[email protected]>2012-07-09 13:57:59 +0200
commitb278aba42310e8fa30f2408b9dcd58dbb4901724 (patch)
tree4a029fed555b5b428cf4c3a0907049f7a81381ed /src/gallium/drivers
parent1f50f463ebcce377fdd6d8ff6a705c36200c6eb3 (diff)
r600g: use u_box_origin_2d helper function
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index f1092893a9f..01ab4589e91 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -50,11 +50,8 @@ static void r600_copy_from_staging_texture(struct pipe_context *ctx, struct r600
struct pipe_resource *texture = transfer->resource;
struct pipe_box sbox;
- sbox.x = sbox.y = sbox.z = 0;
- sbox.width = transfer->box.width;
- sbox.height = transfer->box.height;
- /* XXX that might be wrong */
- sbox.depth = 1;
+ u_box_origin_2d(transfer->box.width, transfer->box.height, &sbox);
+
ctx->resource_copy_region(ctx, texture, transfer->level,
transfer->box.x, transfer->box.y, transfer->box.z,
&rtransfer->staging->b.b,
@@ -908,11 +905,7 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx,
if ((transfer->usage & PIPE_TRANSFER_WRITE) && rtex->flushed_depth_texture) {
struct pipe_box sbox;
- sbox.x = sbox.y = sbox.z = 0;
- sbox.width = texture->width0;
- sbox.height = texture->height0;
- /* XXX that might be wrong */
- sbox.depth = 1;
+ u_box_origin_2d(texture->width0, texture->height0, &sbox);
ctx->resource_copy_region(ctx, texture, 0, 0, 0, 0,
&rtex->flushed_depth_texture->resource.b.b, 0,