summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-10-17 16:15:54 +0200
committerPierre-Eric Pelloux-Prayer <[email protected]>2019-10-30 18:03:14 +0100
commit2fb4b3c47616083e8d2664e54a1bd9a2dee6be92 (patch)
treedaf1816ede0663c9b0004ec4bb41ea19f276f9de /src/gallium
parent21b9a6b59019fe232beb8e82fc0eb231e56df268 (diff)
radeonsi: sdma misc fixes
SDMA IB doesn't need to be padded for SDMA. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_dma_cs.c3
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_dma_cs.c b/src/gallium/drivers/radeonsi/si_dma_cs.c
index c5d6a6e39cd..c550a62ee0b 100644
--- a/src/gallium/drivers/radeonsi/si_dma_cs.c
+++ b/src/gallium/drivers/radeonsi/si_dma_cs.c
@@ -117,7 +117,8 @@ void si_sdma_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
radeon_emit(cs, offset);
radeon_emit(cs, offset >> 32);
radeon_emit(cs, clear_value);
- radeon_emit(cs, sctx->chip_class >= GFX9 ? csize - 1 : csize);
+ /* dw count */
+ radeon_emit(cs, (sctx->chip_class >= GFX9 ? csize - 1 : csize) & 0xfffffffc);
offset += csize;
size -= csize;
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index c6d45b381fc..a577067edc0 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -1680,9 +1680,6 @@ static int amdgpu_cs_flush(struct radeon_cmdbuf *rcs,
if (ws->info.chip_class <= GFX6) {
while (rcs->current.cdw & 7)
radeon_emit(rcs, 0xf0000000); /* NOP packet */
- } else {
- while (rcs->current.cdw & 7)
- radeon_emit(rcs, 0x00000000); /* NOP packet */
}
break;
case RING_GFX: