summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-04-17 16:05:16 +0200
committerSamuel Pitoiset <[email protected]>2018-04-19 09:10:50 +0200
commit1aefb62f1e85de379d6045f234f32bf6cb924a09 (patch)
treed4353728b1d4db4de34c88e895dd812497253ca8 /src/amd
parent373fa0b599ca3b2904433e413fd6e24fc37292b7 (diff)
radv: add a workaround for fast clears with DCC and MSAA textures
This should be fixed at some point in order to improve performance. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_meta_clear.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index 86e0bc17ed8..858e3368b65 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -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,