Module: Mesa
Branch: master
Commit: 48e83f76653dadbd332a01ac2ce74f67d90a9bb8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=48e83f76653dadbd332a01ac2ce74f67d90a9bb8

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Oct 22 14:54:03 2020 +0200

radv: do not perform a FMASK expand for non-writeable MSAA images

It should only be required for writeable MSAA images.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7292>

---

 src/amd/vulkan/radv_cmd_buffer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index c3465d6fcad..77447969dab 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -6076,7 +6076,9 @@ static void radv_handle_color_image_transition(struct 
radv_cmd_buffer *cmd_buffe
                        fce_eliminate = true;
                }
 
-               if (radv_image_has_fmask(image)) {
+               if (radv_image_has_fmask(image) &&
+                   (image->usage & (VK_IMAGE_USAGE_STORAGE_BIT |
+                                    VK_IMAGE_USAGE_TRANSFER_DST_BIT))) {
                        if (src_layout != VK_IMAGE_LAYOUT_GENERAL &&
                            dst_layout == VK_IMAGE_LAYOUT_GENERAL) {
                                /* A FMASK decompress is required before doing

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to