summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-10-26 18:48:36 +0200
committerMarek Olšák <[email protected]>2016-11-01 22:33:13 +0100
commite9c76eeeaa673331fec6056a4baa30095de42f5e (patch)
treedb1b94cd0e0af28090212f33865a2cf6a04eaee0 /src/gallium/drivers/radeonsi
parentc66a550385b4937b2aaba8484aeaa41cf77399b7 (diff)
gallium/radeon: remove radeon_surf_level::pitch_bytes
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/cik_sdma.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_dma.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c
index 338c0cf1fbc..b3eaed58fc0 100644
--- a/src/gallium/drivers/radeonsi/cik_sdma.c
+++ b/src/gallium/drivers/radeonsi/cik_sdma.c
@@ -134,8 +134,8 @@ static bool cik_sdma_copy_texture(struct si_context *sctx,
unsigned src_tile_mode = info->si_tile_mode_array[src_tile_index];
unsigned dst_micro_mode = G_009910_MICRO_TILE_MODE_NEW(dst_tile_mode);
unsigned src_micro_mode = G_009910_MICRO_TILE_MODE_NEW(src_tile_mode);
- unsigned dst_pitch = rdst->surface.level[dst_level].pitch_bytes / bpp;
- unsigned src_pitch = rsrc->surface.level[src_level].pitch_bytes / bpp;
+ unsigned dst_pitch = rdst->surface.level[dst_level].nblk_x;
+ unsigned src_pitch = rsrc->surface.level[src_level].nblk_x;
uint64_t dst_slice_pitch = rdst->surface.level[dst_level].slice_size / bpp;
uint64_t src_slice_pitch = rsrc->surface.level[src_level].slice_size / bpp;
unsigned dst_width = minify_as_blocks(rdst->resource.b.b.width0,
diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c
index 6bbb5d647d9..dee5ec58907 100644
--- a/src/gallium/drivers/radeonsi/si_dma.c
+++ b/src/gallium/drivers/radeonsi/si_dma.c
@@ -232,8 +232,8 @@ static void si_dma_copy(struct pipe_context *ctx,
dst_y = util_format_get_nblocksy(src->format, dst_y);
bpp = rdst->surface.bpe;
- dst_pitch = rdst->surface.level[dst_level].pitch_bytes;
- src_pitch = rsrc->surface.level[src_level].pitch_bytes;
+ dst_pitch = rdst->surface.level[dst_level].nblk_x * rdst->surface.bpe;
+ src_pitch = rsrc->surface.level[src_level].nblk_x * rsrc->surface.bpe;
src_w = u_minify(rsrc->resource.b.b.width0, src_level);
dst_w = u_minify(rdst->resource.b.b.width0, dst_level);