summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-10 01:40:13 +0100
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit9680a7548951296e9657561cb421d8efea66c5db (patch)
tree27a7d000e93f2e7269f2abf8bccb4b905341864c /src/gallium/drivers
parentc9b004af58fd7448c9522eae14b7686152b98487 (diff)
radeonsi/gfx9: enable SDMA buffer copying & clearing
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/cik_sdma.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c
index fdcf22f6d49..500afb07c0b 100644
--- a/src/gallium/drivers/radeonsi/cik_sdma.c
+++ b/src/gallium/drivers/radeonsi/cik_sdma.c
@@ -57,7 +57,7 @@ static void cik_sdma_copy_buffer(struct si_context *ctx,
radeon_emit(cs, CIK_SDMA_PACKET(CIK_SDMA_OPCODE_COPY,
CIK_SDMA_COPY_SUB_OPCODE_LINEAR,
0));
- radeon_emit(cs, csize);
+ radeon_emit(cs, ctx->b.chip_class >= GFX9 ? csize - 1 : csize);
radeon_emit(cs, 0); /* src/dst endian swap */
radeon_emit(cs, src_offset);
radeon_emit(cs, src_offset >> 32);
@@ -103,7 +103,7 @@ static void cik_sdma_clear_buffer(struct pipe_context *ctx,
radeon_emit(cs, offset);
radeon_emit(cs, offset >> 32);
radeon_emit(cs, clear_value);
- radeon_emit(cs, csize);
+ radeon_emit(cs, sctx->b.chip_class >= GFX9 ? csize - 1 : csize);
offset += csize;
size -= csize;
}
@@ -534,7 +534,8 @@ static void cik_sdma_copy(struct pipe_context *ctx,
return;
}
- if (cik_sdma_copy_texture(sctx, dst, dst_level, dstx, dsty, dstz,
+ if ((sctx->b.chip_class == CIK || sctx->b.chip_class == VI) &&
+ cik_sdma_copy_texture(sctx, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box))
return;