[Mesa-dev] [PATCH 3/4] radeonsi: Catch more cases that can't be handled by si_dma_copy_buffer/tile
Grigori Goronzy
greg at chown.ath.cx
Wed Oct 1 07:13:59 PDT 2014
On 30.09.2014 05:58, Michel Dänzer wrote:
> diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c
> index ff64722..643ce3f 100644
> --- a/src/gallium/drivers/radeonsi/si_dma.c
> +++ b/src/gallium/drivers/radeonsi/si_dma.c
> @@ -251,7 +251,9 @@ void si_dma_copy(struct pipe_context *ctx,
> }
>
> if (src->format != dst->format || src_box->depth > 1 ||
> - rdst->dirty_level_mask != 0) {
> + rdst->dirty_level_mask != 0 ||
> + rdst->cmask.size || rdst->fmask.size ||
> + rsrc->cmask.size || rsrc->fmask.size) {
> goto fallback;
> }
Does the existence of the cmask alone really matter? We shouldn't copy
from or to fast cleared surfaces, but this change will disable DMA
copies even if the fast clear has been eliminated. Isn't that handled
elsewhere already?
> }
> /* the x test here are currently useless (because we don't support partial blit)
> * but keep them around so we don't forget about those
> */
> - if ((src_pitch % 8) || (src_box->x % 8) || (dst_x % 8) || (src_box->y % 8) || (dst_y % 8)) {
> + if ((src_pitch % 8) || (src_box->x % 8) || (dst_x % 8) ||
> + (src_box->y % 8) || (dst_y % 8) || (src_box->height % 8)) {
> goto fallback;
> }
That will only allow DMA copies for heights with a multiple of 8. That
isn't requirement of the DMA engines AFAICT, size is always specified in
DWs anyway.
Grigori
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141001/fb9f22f6/attachment.sig>
More information about the mesa-dev
mailing list