[Mesa-dev] [PATCH 1/3] radeonsi: use u_box_origin_2d helper function

Michel Dänzer michel at daenzer.net
Tue Feb 19 09:15:19 PST 2013


From: Marek Olšák <maraeo at gmail.com>

[ Cherry-picked from r600g commit b278aba42310e8fa30f2408b9dcd58dbb4901724 ]

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 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 e8d9932..d546554 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,
-- 
1.8.1.3



More information about the mesa-dev mailing list