summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_image.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-04-17 16:05:18 +0200
committerSamuel Pitoiset <[email protected]>2018-04-19 09:10:55 +0200
commit2f63b3dd09cb516b83537504adf36a0227e3f874 (patch)
tree1e346f0526d563c1991a27beac18e9332329d58b /src/amd/vulkan/radv_image.c
parentdc3d39771ff561fe3e71aa0d08623e190ff496f9 (diff)
radv: enable DCC for MSAA 2x textures on VI under an option
This can be enabled with RADV_PERFTEST=dccmsaa. DCC for MSAA textures is actually not as easy to implement. It looks like there is some corner cases. I will improve support incrementally. Vega support, as well as Polaris improvements, will be added later. No CTS changes on Polaris using RADV_DEBUG=zerovram and RADV_PERFTEST=dccmsaa. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r--src/amd/vulkan/radv_image.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index ba8f14d91bd..348f4c7b34c 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -133,8 +133,12 @@ radv_use_dcc_for_image(struct radv_device *device,
if (create_info->scanout)
return false;
+ /* FIXME: DCC for MSAA with 4x and 8x samples doesn't work yet. */
+ if (pCreateInfo->samples > 2)
+ return false;
+
/* TODO: Enable DCC for MSAA textures. */
- if (pCreateInfo->samples >= 2)
+ if (!device->physical_device->dcc_msaa_allowed)
return false;
/* Determine if the formats are DCC compatible. */