summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c3
-rw-r--r--src/amd/vulkan/radv_meta_fast_clear.c6
-rw-r--r--src/amd/vulkan/radv_meta_resolve.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 690c739c2ab..3f1a6f42527 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2163,6 +2163,9 @@ static void radv_handle_cmask_image_transition(struct radv_cmd_buffer *cmd_buffe
radv_initialise_cmask(cmd_buffer, image, 0xffffffffu);
} else if (radv_layout_has_cmask(image, src_layout) &&
!radv_layout_has_cmask(image, dst_layout)) {
+
+ if (!cmd_buffer->device->allow_fast_clears)
+ return;
radv_fast_clear_flush_image_inplace(cmd_buffer, image);
}
}
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index c0fa922c25c..15c9bbcb1e4 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -419,12 +419,6 @@ radv_fast_clear_flush_image_inplace(struct radv_cmd_buffer *cmd_buffer,
VkDevice device_h = radv_device_to_handle(cmd_buffer->device);
VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer);
- if (!image->cmask.size)
- return;
-
- if (!cmd_buffer->device->allow_fast_clears)
- return;
-
radv_meta_save_pass(&saved_pass_state, cmd_buffer);
radv_meta_save_graphics_reset_vport_scissor(&saved_state, cmd_buffer);
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 6b0540fb629..da813eb565a 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -439,6 +439,8 @@ void radv_CmdResolveImage(
use_compute_resolve = true;
if (use_compute_resolve) {
+
+ radv_fast_clear_flush_image_inplace(cmd_buffer, src_image);
radv_meta_resolve_compute_image(cmd_buffer,
src_image,
src_image_layout,