r600g: fix uploading non-zero mipmap levels of depth textures
authorMarek Olšák <maraeo@gmail.com>
Sun, 8 Jul 2012 01:18:48 +0000 (03:18 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 12 Jul 2012 00:08:31 +0000 (02:08 +0200)
This fixes piglit/depth-level-clamp.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_texture.c

index a6a83cab41a2a1ef8010ab7d6e9bf49acd4e26d5..d16c25294d79d142f43afba8090a68c260b4aa32 100644 (file)
@@ -926,8 +926,9 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx,
 
                        u_box_origin_2d(texture->width0, texture->height0, &sbox);
 
-                       ctx->resource_copy_region(ctx, texture, 0, 0, 0, 0,
-                                                 &rtransfer->staging->b.b, 0,
+                       ctx->resource_copy_region(ctx, texture, transfer->level,
+                                                 0, 0, transfer->box.z,
+                                                 &rtransfer->staging->b.b, transfer->level,
                                                  &sbox);
                }
        } else if (rtransfer->staging) {