radv: move disabling DCC for VRS rate images in radv_get_surface_flags()

On GFX11, the VRS rate image needs a specific swizzle mode and a new
flag will be added here.

gned-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
This commit is contained in:
Samuel Pitoiset 2023-02-16 10:39:12 +01:00 committed by Marge Bot
parent e8793f2a86
commit ce4a1b1c3c

View File

@ -255,10 +255,6 @@ radv_use_dcc_for_image_early(struct radv_device *device, struct radv_image *imag
radv_formats_is_atomic_allowed(device, pCreateInfo->pNext, format, pCreateInfo->flags)))
return false;
/* Do not enable DCC for fragment shading rate attachments. */
if (pCreateInfo->usage & VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR)
return false;
if (pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR)
return false;
@ -657,6 +653,10 @@ radv_get_surface_flags(struct radv_device *device, struct radv_image *image, uns
RADEON_SURF_PRT | RADEON_SURF_NO_FMASK | RADEON_SURF_NO_HTILE | RADEON_SURF_DISABLE_DCC;
}
/* Disable DCC for VRS rate images because the hw can't handle compression. */
if (pCreateInfo->usage & VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR)
flags |= RADEON_SURF_DISABLE_DCC;
return flags;
}