return true;
}
+static inline bool
+radv_use_fmask_for_image(const struct radv_image *image)
+{
+ return image->info.samples > 1 &&
+ image->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
+}
+
static bool
radv_use_tc_compat_cmask_for_image(struct radv_device *device,
struct radv_image *image)
if (!radv_use_dcc_for_image(device, image, pCreateInfo, image_format))
surface->flags |= RADEON_SURF_DISABLE_DCC;
+ if (!radv_use_fmask_for_image(image))
+ surface->flags |= RADEON_SURF_NO_FMASK;
+
return 0;
}
!image->planes[0].surface.is_linear;
}
-static inline bool
-radv_image_can_enable_fmask(struct radv_image *image)
-{
- return image->info.samples > 1 &&
- image->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
-}
-
static inline bool
radv_image_can_enable_htile(struct radv_image *image)
{
}
/* Try to enable FMASK for multisampled images. */
- if (radv_image_can_enable_fmask(image)) {
+ if (image->planes[0].surface.fmask_size) {
radv_image_alloc_fmask(device, image);
if (radv_use_tc_compat_cmask_for_image(device, image))