From ec15ff78c3ed4a2b39a45ecf74292090fdc99c6e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 14 Nov 2017 19:31:39 +0100 Subject: ac: change legacy_surf_level::slice_size to dword units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/radeonsi/cik_sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/radeonsi/cik_sdma.c') 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, -- cgit v1.2.3