radv: Support DCC modifiers fully.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998>
This commit is contained in:
parent
6ff88a823b
commit
8b9033ad0a
|
@ -1156,10 +1156,7 @@ radv_get_modifier_flags(struct radv_physical_device *dev,
|
|||
return 0;
|
||||
|
||||
if (ac_modifier_has_dcc(modifier)) {
|
||||
features &= ~(VK_FORMAT_FEATURE_TRANSFER_DST_BIT |
|
||||
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
|
||||
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT |
|
||||
VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT);
|
||||
features &= ~VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
|
||||
|
||||
if (dev->instance->debug_flags & (RADV_DEBUG_NO_DCC | RADV_DEBUG_NO_DISPLAY_DCC))
|
||||
return 0;
|
||||
|
|
|
@ -1360,6 +1360,10 @@ radv_image_alloc_single_sample_cmask(const struct radv_device *device,
|
|||
static void
|
||||
radv_image_alloc_values(const struct radv_device *device, struct radv_image *image)
|
||||
{
|
||||
/* images with modifiers can be potentially imported */
|
||||
if (image->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
|
||||
return;
|
||||
|
||||
if (radv_image_has_cmask(image) || radv_image_has_dcc(image)) {
|
||||
image->fce_pred_offset = image->size;
|
||||
image->size += 8 * image->info.levels;
|
||||
|
|
Loading…
Reference in New Issue