From c4faab63c45aad579ef324fcc076c88a7cebbef6 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 19 Feb 2013 17:22:17 +0100 Subject: radeonsi: use u_box_origin_2d helper function [ Cherry-picked from r600g commit b278aba42310e8fa30f2408b9dcd58dbb4901724 ] NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher --- src/gallium/drivers/radeonsi/r600_texture.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c index e8d9932e08e..d54655441a0 100644 --- a/src/gallium/drivers/radeonsi/r600_texture.c +++ b/src/gallium/drivers/radeonsi/r600_texture.c @@ -55,11 +55,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, -- cgit v1.2.3