summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_dma.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-14 19:31:39 +0100
committerMarek Olšák <[email protected]>2017-11-27 14:44:04 +0100
commitec15ff78c3ed4a2b39a45ecf74292090fdc99c6e (patch)
tree402ff736cdafe380b67414ffa659d34e2257ab7b /src/gallium/drivers/radeonsi/si_dma.c
parent474b4a919181a155187446ca0e0c0b3522fbdee2 (diff)
ac: change legacy_surf_level::slice_size to dword units
The next commit will reduce the size even more. v2: typecast to uint64_t manually v3: add more typecasts, add asserts Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_dma.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_dma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c
index d33ec6b11b3..6e229446e22 100644
--- a/src/gallium/drivers/radeonsi/si_dma.c
+++ b/src/gallium/drivers/radeonsi/si_dma.c
@@ -175,7 +175,7 @@ static void si_dma_copy_tile(struct si_context *ctx,
height = rtiled->surface.u.legacy.level[tiled_lvl].nblk_y;
base = rtiled->surface.u.legacy.level[tiled_lvl].offset;
addr = rlinear->surface.u.legacy.level[linear_lvl].offset;
- addr += rlinear->surface.u.legacy.level[linear_lvl].slice_size * linear_z;
+ addr += (uint64_t)rlinear->surface.u.legacy.level[linear_lvl].slice_size_dw * 4 * linear_z;
addr += linear_y * pitch + linear_x * bpp;
bank_h = G_009910_BANK_HEIGHT(tile_mode);
bank_w = G_009910_BANK_WIDTH(tile_mode);
@@ -301,13 +301,13 @@ static void si_dma_copy(struct pipe_context *ctx,
* dst_pitch == src_pitch
*/
src_offset= rsrc->surface.u.legacy.level[src_level].offset;
- src_offset += rsrc->surface.u.legacy.level[src_level].slice_size * src_box->z;
+ src_offset += (uint64_t)rsrc->surface.u.legacy.level[src_level].slice_size_dw * 4 * src_box->z;
src_offset += src_y * src_pitch + src_x * bpp;
dst_offset = rdst->surface.u.legacy.level[dst_level].offset;
- dst_offset += rdst->surface.u.legacy.level[dst_level].slice_size * dst_z;
+ dst_offset += (uint64_t)rdst->surface.u.legacy.level[dst_level].slice_size_dw * 4 * dst_z;
dst_offset += dst_y * dst_pitch + dst_x * bpp;
si_dma_copy_buffer(sctx, dst, src, dst_offset, src_offset,
- rsrc->surface.u.legacy.level[src_level].slice_size);
+ (uint64_t)rsrc->surface.u.legacy.level[src_level].slice_size_dw * 4);
} 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,