From 4c877ebfe50868d97a74b25576abdba4ae6c7139 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Thu, 31 Aug 2023 14:53:10 +0200 Subject: [PATCH] anv: define clear color localy within can_fast_clear_color_att MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can drop a extra function argument this way. Signed-off-by: Rohan Garg Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_blorp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 17dd5bba7ad..ff140a01112 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -1207,10 +1207,12 @@ static bool can_fast_clear_color_att(struct anv_cmd_buffer *cmd_buffer, struct blorp_batch *batch, const struct anv_attachment *att, - const union isl_color_value clear_color, const VkClearAttachment *attachment, uint32_t rectCount, const VkClearRect *pRects) { + union isl_color_value clear_color = + vk_to_isl_color(attachment->clearValue.color); + if (INTEL_DEBUG(DEBUG_NO_FAST_CLEAR)) return false; @@ -1570,7 +1572,7 @@ clear_color_attachment(struct anv_cmd_buffer *cmd_buffer, const struct anv_image_view *iview = att->iview; if (iview && - can_fast_clear_color_att(cmd_buffer, batch, att, clear_color, + can_fast_clear_color_att(cmd_buffer, batch, att, attachment, rectCount, pRects)) { if (iview->image->vk.samples == 1) { exec_ccs_op(cmd_buffer, batch, iview->image,