From ce454d02cc4c3d6bd0e69af82933731abaccfebb Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 18 Jul 2018 16:19:07 +0200 Subject: [PATCH] radv: simplify a condition in radv_src_access_flush() Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_cmd_buffer.c | 10 ++++++---- 1 file 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)) { -- 2.30.2