[Mesa-dev] [PATCH 02/10] gallium/radeon: strenghten some checking for DMA preparation

Marek Olšák maraeo at gmail.com
Tue May 31 15:19:45 UTC 2016


Ping for the rest of the series.

Marek

On Thu, May 19, 2016 at 12:59 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Just for consistency. This doesn't fix anything, because DCC is not
> supported with non-mipmapped textures.
> ---
>  src/gallium/drivers/radeon/r600_texture.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
> index db63beb..23c483b 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -74,8 +74,11 @@ bool r600_prepare_for_dma_blit(struct r600_common_context *rctx,
>                 return false;
>
>         if (rdst->dcc_offset) {
> -               /* We can't discard DCC if the texture has been exported. */
> +               /* We can't discard DCC if the texture has been exported.
> +                * Also, we can't discard DCC for one level only.
> +                */
>                 if (rdst->resource.is_shared ||
> +                   rdst->resource.b.b.last_level > 0 ||
>                     !util_texrange_covers_whole_level(&rdst->resource.b.b, dst_level,
>                                                       dstx, dsty, dstz, src_box->width,
>                                                       src_box->height, src_box->depth))
> @@ -90,6 +93,8 @@ bool r600_prepare_for_dma_blit(struct r600_common_context *rctx,
>          *        SDMA. Otherwise, use the 3D path.
>          */
>         if (rdst->cmask.size && rdst->dirty_level_mask & (1 << dst_level)) {
> +               /* The CMASK clear is only enabled for the first level. */
> +               assert(dst_level == 0);
>                 if (!util_texrange_covers_whole_level(&rdst->resource.b.b, dst_level,
>                                                       dstx, dsty, dstz, src_box->width,
>                                                       src_box->height, src_box->depth))
> --
> 2.7.4
>


More information about the mesa-dev mailing list