summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_cmd_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan/radv_cmd_buffer.c')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 032b701561f..f9f57a10656 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1975,10 +1975,12 @@ radv_src_access_flush(struct radv_cmd_buffer *cmd_buffer,
enum radv_cmd_flush_bits flush_bits = 0;
uint32_t b;
- if (image && !radv_image_has_CB_metadata(image))
- flush_CB_meta = false;
- if (image && !radv_image_has_htile(image))
- flush_DB_meta = false;
+ if (image) {
+ if (!radv_image_has_CB_metadata(image))
+ flush_CB_meta = false;
+ if (!radv_image_has_htile(image))
+ flush_DB_meta = false;
+ }
for_each_bit(b, src_flags) {
switch ((VkAccessFlagBits)(1 << b)) {