summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_image.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-06-20 09:17:37 +0200
committerSamuel Pitoiset <[email protected]>2019-06-20 11:04:02 +0200
commitf179febde0c6e85911365e845a737be3f346da4a (patch)
treee34f6a4e94c95e9d4a4cde2e2edc7da3f491fe9f /src/amd/vulkan/radv_image.c
parent17f94e19841c9f31d571269cd622fd12de58e30d (diff)
radv: enable DCC for mipmapped color textures on GFX8
It's tricky on GFX9, so only GFX8 for now. 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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 4bea09a8a2b..cf3f0eb1d55 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -170,8 +170,13 @@ radv_use_dcc_for_image(struct radv_device *device,
vk_format_get_plane_count(pCreateInfo->format) > 1)
return false;
- /* TODO: Enable DCC for mipmaps and array layers. */
- if (pCreateInfo->mipLevels > 1 || pCreateInfo->arrayLayers > 1)
+ /* TODO: Enable DCC for mipmaps on GFX9+. */
+ if (pCreateInfo->mipLevels > 1 &&
+ device->physical_device->rad_info.chip_class >= GFX9)
+ return false;
+
+ /* TODO: Enable DCC for array layers. */
+ if (pCreateInfo->arrayLayers > 1)
return false;
if (radv_surface_has_scanout(device, create_info))