Mesa (master): radv: allow concurrent MSAA images to be FMASK compressed
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 21 08:28:50 UTC 2021
Module: Mesa
Branch: master
Commit: 1cf39001cd0393b7ebdd8c39d99bf170fb9c6a7a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cf39001cd0393b7ebdd8c39d99bf170fb9c6a7a
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Mon Apr 19 16:39:51 2021 +0200
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 at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10323>
---
src/amd/vulkan/radv_image.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index b530721f271..5c5ff73095a 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -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
More information about the mesa-commit
mailing list