From: Rajnesh Kanwal Date: Sun, 25 Sep 2022 18:47:43 +0000 (+0100) Subject: pvr: Remove dead code from pvr_perform_start_of_render_clears. X-Git-Tag: upstream/22.3.5~2099 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fbecd485e8918d2e8eb0be739318d737f84d70d;p=platform%2Fupstream%2Fmesa.git pvr: Remove dead code from pvr_perform_start_of_render_clears. Logically the hw_render would never be NULL so the if block is never used and can be removed. Fixes: CID1503270. Signed-off-by: Rajnesh Kanwal Reviewed-by: Frank Binns Reviewed-by: Karmjit Mahil Part-of: --- diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c index 10887b5..ebedde9 100644 --- a/src/imagination/vulkan/pvr_cmd_buffer.c +++ b/src/imagination/vulkan/pvr_cmd_buffer.c @@ -2269,17 +2269,14 @@ static void pvr_perform_start_of_render_attachment_clear( { struct pvr_render_pass_info *info = &cmd_buffer->state.render_pass_info; const struct pvr_render_pass *pass = info->pass; - const struct pvr_renderpass_hwsetup_render *hw_render; - const struct pvr_renderpass_hwsetup *hw_setup; + const struct pvr_renderpass_hwsetup *hw_setup = pass->hw_setup; + const struct pvr_renderpass_hwsetup_render *hw_render = + &hw_setup->renders[hw_setup->subpass_map[info->subpass_idx].render]; struct pvr_image_view *iview; uint32_t view_idx; uint32_t height; uint32_t width; - hw_setup = pass->hw_setup; - hw_render = - &hw_setup->renders[hw_setup->subpass_map[info->subpass_idx].render]; - if (is_depth_stencil) { bool stencil_clear; bool depth_clear; @@ -2335,21 +2332,14 @@ pvr_perform_start_of_render_clears(struct pvr_cmd_buffer *cmd_buffer) const struct pvr_framebuffer *framebuffer = info->framebuffer; const struct pvr_render_pass *pass = info->pass; const struct pvr_renderpass_hwsetup *hw_setup = pass->hw_setup; - const struct pvr_renderpass_hwsetup_render *hw_render; + const struct pvr_renderpass_hwsetup_render *hw_render = + &hw_setup->renders[hw_setup->subpass_map[info->subpass_idx].render]; /* Mask of attachment clears using index lists instead of background object * to clear. */ uint32_t index_list_clear_mask = 0; - hw_render = - &hw_setup->renders[hw_setup->subpass_map[info->subpass_idx].render]; - if (!hw_render) { - info->process_empty_tiles = false; - info->enable_bg_tag = false; - return; - } - for (uint32_t i = 0; i < hw_render->color_init_count; i++) { pvr_perform_start_of_render_attachment_clear(cmd_buffer, framebuffer,