summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/cik_sdma.c
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-05-13 00:04:04 -0500
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-06-15 09:27:56 +0200
commit44e0c0e6ecbe578281e0aff3fbffb29116b42d1b (patch)
tree3486f5ff18a3f1d48c6dd9c896da87a6a5060ccc /src/gallium/drivers/radeonsi/cik_sdma.c
parent494e4b8976a48e37e3cb51338ad69e085ea5061a (diff)
downloadmesa-44e0c0e6ecbe578281e0aff3fbffb29116b42d1b.tar.gz
mesa-44e0c0e6ecbe578281e0aff3fbffb29116b42d1b.tar.bz2
mesa-44e0c0e6ecbe578281e0aff3fbffb29116b42d1b.zip
radeonsi: fix undefined left-shift into sign bit
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/cik_sdma.c')
-rw-r--r--src/gallium/drivers/radeonsi/cik_sdma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c
index d8ec2a32629..a36bbcee393 100644
--- a/src/gallium/drivers/radeonsi/cik_sdma.c
+++ b/src/gallium/drivers/radeonsi/cik_sdma.c
@@ -370,12 +370,13 @@ static bool cik_sdma_copy_texture(struct si_context *sctx,
copy_height <= (1 << 14) &&
copy_depth <= (1 << 11)) {
struct radeon_winsys_cs *cs = sctx->b.dma.cs;
+ uint32_t direction = linear == rdst ? 1u << 31 : 0;
r600_need_dma_space(&sctx->b, 14, &rdst->resource, &rsrc->resource);
radeon_emit(cs, CIK_SDMA_PACKET(CIK_SDMA_OPCODE_COPY,
CIK_SDMA_COPY_SUB_OPCODE_TILED_SUB_WINDOW, 0) |
- ((linear == rdst) << 31));
+ direction);
radeon_emit(cs, tiled_address);
radeon_emit(cs, tiled_address >> 32);
radeon_emit(cs, tiled_x | (tiled_y << 16));