diff options
author | Marek Olšák <[email protected]> | 2013-02-19 17:22:17 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-02-20 12:15:22 +0100 |
commit | c4faab63c45aad579ef324fcc076c88a7cebbef6 (patch) | |
tree | 996be82e694eb2cb75d24f6aadb64d006b71af06 /src/gallium/drivers/radeonsi | |
parent | c403a5266663691b96f9cfe9513c787851d54331 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_texture.c | 7 |
1 files 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, |