diff options
author | Samuel Pitoiset <[email protected]> | 2018-07-18 16:19:07 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-07-20 10:17:17 +0200 |
commit | ce454d02cc4c3d6bd0e69af82933731abaccfebb (patch) | |
tree | e98d9823dcb1855c7f8a4e9dc53ae16dd154b238 | |
parent | 1ff25c4e6b2576ca520eaab75e2a63089078efaa (diff) |
radv: simplify a condition in radv_src_access_flush()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 10 |
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)) { |