Mesa (main): radv: perform a FCE for MSAA images that might have been fast-cleared
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 10:10:55 UTC 2021
Module: Mesa
Branch: main
Commit: f136838d1ec784382ece8099d195422e28ec5e5c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f136838d1ec784382ece8099d195422e28ec5e5c
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Aug 3 11:36:36 2021 +0200
radv: perform a FCE for MSAA images that might have been fast-cleared
FMASK_DECOMPRESS can't eliminate DCC fast clears. This will allow to
enable DCC MSAA fast clears that require a FCE.
Only supported on GFX10+.
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/12180>
---
src/amd/vulkan/radv_meta_fast_clear.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index 5b7d4e33814..f4d918a5181 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -783,6 +783,13 @@ radv_fast_clear_flush_image_inplace(struct radv_cmd_buffer *cmd_buffer, struct r
const VkImageSubresourceRange *subresourceRange)
{
if (radv_image_has_fmask(image) && !image->tc_compatible_cmask) {
+ if (radv_image_has_dcc(image) && radv_image_has_cmask(image)) {
+ /* MSAA images with DCC and CMASK might have been fast-cleared and might require a FCE but
+ * FMASK_DECOMPRESS can't eliminate DCC fast clears.
+ */
+ radv_fast_clear_eliminate(cmd_buffer, image, subresourceRange);
+ }
+
radv_fmask_decompress(cmd_buffer, image, subresourceRange);
} else {
radv_fast_clear_eliminate(cmd_buffer, image, subresourceRange);
More information about the mesa-commit
mailing list