From: Samuel Pitoiset Date: Wed, 18 Jul 2018 14:19:07 +0000 (+0200) Subject: radv: simplify a condition in radv_src_access_flush() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce454d02cc4c3d6bd0e69af82933731abaccfebb;p=mesa.git radv: simplify a condition in radv_src_access_flush() Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- 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)) {