summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/cik_sdma.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/cik_sdma.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/cik_sdma.c')
-rw-r--r--src/gallium/drivers/radeonsi/cik_sdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c
index 374dfcf4c2d..8a18bbf455c 100644
--- a/src/gallium/drivers/radeonsi/cik_sdma.c
+++ b/src/gallium/drivers/radeonsi/cik_sdma.c
@@ -165,8 +165,8 @@ static bool cik_sdma_copy_texture(struct si_context *sctx,
rsrc->surface.tile_swizzle : 0;
unsigned dst_pitch = rdst->surface.u.legacy.level[dst_level].nblk_x;
unsigned src_pitch = rsrc->surface.u.legacy.level[src_level].nblk_x;
- uint64_t dst_slice_pitch = rdst->surface.u.legacy.level[dst_level].slice_size / bpp;
- uint64_t src_slice_pitch = rsrc->surface.u.legacy.level[src_level].slice_size / bpp;
+ uint64_t dst_slice_pitch = ((uint64_t)rdst->surface.u.legacy.level[dst_level].slice_size_dw * 4) / bpp;
+ uint64_t src_slice_pitch = ((uint64_t)rsrc->surface.u.legacy.level[src_level].slice_size_dw * 4) / bpp;
unsigned dst_width = minify_as_blocks(rdst->resource.b.b.width0,
dst_level, rdst->surface.blk_w);
unsigned src_width = minify_as_blocks(rsrc->resource.b.b.width0,