radv: allow concurrent MSAA images to be FMASK compressed

DCC decompress/FMASK expand are supported on compute queues. Since
the driver doesn't perform fast clears with concurrent images, we
don't need to perform a FCE on compute (we can't anyways).

This fixes a performance regression with Control and
VKD3D_CONFIG=multi_queue.

One more optimization (as discussed with Bas) is to implement FCE
on compute to allow fast clears.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10323>
This commit is contained in:
Samuel Pitoiset
2021-04-19 16:39:51 +02:00
committed by Marge Bot
parent ccfe3e4af5
commit 1cf39001cd
+11 -2
View File
@@ -1997,8 +1997,17 @@ bool
radv_layout_fmask_compressed(const struct radv_device *device, const struct radv_image *image,
VkImageLayout layout, unsigned queue_mask)
{
return radv_image_has_fmask(image) && layout != VK_IMAGE_LAYOUT_GENERAL &&
queue_mask == (1u << RADV_QUEUE_GENERAL);
if (!radv_image_has_fmask(image))
return false;
/* Don't compress compute transfer dst because image stores ignore FMASK and it needs to be
* expanded before.
*/
if ((layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL || layout == VK_IMAGE_LAYOUT_GENERAL) &&
(queue_mask & (1u << RADV_QUEUE_COMPUTE)))
return false;
return layout != VK_IMAGE_LAYOUT_GENERAL;
}
unsigned