OSDN Git Service

radv: add a workaround for fast clears with DCC and MSAA textures
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 17 Apr 2018 14:05:16 +0000 (16:05 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 19 Apr 2018 07:10:50 +0000 (09:10 +0200)
This should be fixed at some point in order to improve
performance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_clear.c

index 86e0bc1..858e336 100644 (file)
@@ -1062,6 +1062,15 @@ emit_fast_color_clear(struct radv_cmd_buffer *cmd_buffer,
 
                if (iview->image->info.samples > 1) {
                        /* DCC fast clear with MSAA should clear CMASK. */
+                       /* FIXME: This doesn't work for now. There is a
+                        * hardware bug with fast clears and DCC for MSAA
+                        * textures. AMDVLK has a workaround but it doesn't
+                        * seem to work here. Note that we might emit useless
+                        * CB flushes but that shouldn't matter.
+                        */
+                       if (!can_avoid_fast_clear_elim)
+                               goto fail;
+
                        assert(radv_image_has_cmask(iview->image));
 
                        flush_bits = radv_clear_cmask(cmd_buffer, iview->image,