Reviewed-by: Marek Olšák <marek.olsak@amd.com>
offset + size);
/* Fallback for unaligned clears. */
- if (offset % 4 != 0 || size % 4 != 0) {
+ if (size % 4 != 0) {
uint8_t *map = r600_buffer_map_sync_with_rings(&sctx->b, rdst,
PIPE_TRANSFER_WRITE);
map += offset;
/* dma_clear_buffer can use clear_buffer on failure. Make sure that
* doesn't happen. We don't want an infinite recursion: */
if (sctx->b.dma.cs &&
+ (offset % 4 == 0) &&
/* CP DMA is very slow. Always use SDMA for big clears. This
* alone improves DeusEx:MD performance by 70%. */
(size > 128 * 1024 ||