radv: fix DCC enablement since partial MSAA implementation

dcc_msaa_allowed is always false on GFX9+ and only true on VI
if RADV_PERFTEST=dccmsaa is set. This means DCC was disabled
in some situations where it should not.

This is likely going to fix a performance regression.

Fixes: 2f63b3dd09 ("radv: enable DCC for MSAA 2x textures on VI under an option")
Cc: 18.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset 2018-04-25 10:56:15 +02:00
parent 227b1af866
commit a6fbefa67b

View file

@ -133,12 +133,12 @@ radv_use_dcc_for_image(struct radv_device *device,
if (create_info->scanout) if (create_info->scanout)
return false; return false;
/* FIXME: DCC for MSAA with 4x and 8x samples doesn't work yet. */ /* FIXME: DCC for MSAA with 4x and 8x samples doesn't work yet, while
if (pCreateInfo->samples > 2) * 2x can be enabled with an option.
return false; */
if (pCreateInfo->samples > 2 ||
/* TODO: Enable DCC for MSAA textures. */ (pCreateInfo->samples == 2 &&
if (!device->physical_device->dcc_msaa_allowed) !device->physical_device->dcc_msaa_allowed))
return false; return false;
/* Determine if the formats are DCC compatible. */ /* Determine if the formats are DCC compatible. */