[Mesa-dev] [PATCH v2 2/7] radeonsi: Disable operations that do not work with DCC.

Marek Olšák maraeo at gmail.com
Sun Oct 11 16:47:18 PDT 2015


On Sun, Oct 11, 2015 at 5:38 PM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> ---
>  src/gallium/drivers/radeon/r600_texture.c | 5 +++++
>  src/gallium/drivers/radeonsi/cik_sdma.c   | 3 ++-
>  src/gallium/drivers/radeonsi/si_blit.c    | 3 ++-
>  src/gallium/drivers/radeonsi/si_dma.c     | 3 ++-
>  4 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
> index fffb9ef..c2a692c 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -1290,6 +1290,11 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
>                         continue;
>                 }
>
> +               /* CMASK clear does not work for DCC compressed textures */
> +               if (tex->surface.dcc_enabled) {
> +                       continue;
> +               }

The reason MSAA performance dropped is that the CMASK is disabled.
With MSAA, CMASK has 2 functions:
- fast clear
- better MSAA compression (very important!)

Useful CMASK clear values for MSAA:
- 0x0: fully compressed and cleared
- 0xC: fully compressed, not cleared

So it's better to clear CMASK to 0xCCCCCCCC with MSAA. This will not
use CMASK fast clear (which is buggy and DCC replaces it anyway), but
it will at least force full MSAA compression, which should restore the
MSAA performance with DCC.

Marek


More information about the mesa-dev mailing list