summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2014-09-10 18:43:56 +0900
committerMichel Dänzer <[email protected]>2014-09-30 18:55:48 +0900
commitd17b85524dfd74824a2135d5d4112a1fae86ed17 (patch)
treeb43a3f92f5d071caaad610897417cd1ad8fdfee2 /src
parent761d80ddab9ce854dc964b2023bc4fbc734fafc7 (diff)
radeonsi: Fix si_dma_copy(_tile) for compressed formats
Fixes GPUVM faults when running the piglit test "getteximage-formats init-by-rendering" with R600_DEBUG=forcedma on SI. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c
index cd6ff4a2eb5..ff647228f50 100644
--- a/src/gallium/drivers/radeonsi/si_dma.c
+++ b/src/gallium/drivers/radeonsi/si_dma.c
@@ -172,7 +172,7 @@ static void si_dma_copy_tile(struct si_context *ctx,
* dma packet will be using the copy_height which is always smaller or equal
* to the linear height
*/
- height = rtiled->surface.level[tiled_lvl].npix_y;
+ height = rtiled->surface.level[tiled_lvl].nblk_y;
base = rtiled->surface.level[tiled_lvl].offset;
addr = rlinear->surface.level[linear_lvl].offset;
addr += rlinear->surface.level[linear_lvl].slice_size * linear_z;
@@ -302,7 +302,7 @@ void si_dma_copy(struct pipe_context *ctx,
dst_offset += rdst->surface.level[dst_level].slice_size * dst_z;
dst_offset += dst_y * dst_pitch + dst_x * bpp;
si_dma_copy_buffer(sctx, dst, src, dst_offset, src_offset,
- src_box->height * src_pitch);
+ copy_height * src_pitch);
} else {
si_dma_copy_tile(sctx, dst, dst_level, dst_x, dst_y, dst_z,
src, src_level, src_x, src_y, src_box->z,