pvr: fix color values and crash for soft bg load ops

Seen in dEQP-VK.renderpass.suballocation.formats.d16_unorm.input.clear.store.clear
and dEQP-VK.renderpass.suballocation.formats.d16_unorm.input.clear.dont_care.clear

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
SoroushIMG 2023-05-15 12:44:48 +01:00 committed by Marge Bot
parent fe283032bf
commit e12826da71

View file

@ -667,11 +667,6 @@ pvr_load_op_constants_create_and_upload(struct pvr_cmd_buffer *cmd_buffer,
const struct pvr_render_pass_info *render_pass_info =
&cmd_buffer->state.render_pass_info;
const struct pvr_render_pass *pass = render_pass_info->pass;
const struct pvr_renderpass_hwsetup_render *hw_render = load_op->hw_render;
const struct pvr_renderpass_colorinit *color_init =
&hw_render->color_init[0];
const VkClearValue *clear_value =
&render_pass_info->clear_values[color_init->index];
struct pvr_suballoc_bo *clear_bo;
uint32_t attachment_count;
bool has_depth_clear;
@ -699,6 +694,7 @@ pvr_load_op_constants_create_and_upload(struct pvr_cmd_buffer *cmd_buffer,
for (uint32_t i = 0; i < attachment_count; i++) {
struct pvr_image_view *image_view;
uint32_t attachment_idx;
const VkClearValue *clear_value;
if (load_op->is_hw_object)
attachment_idx = load_op->hw_render->color_init[i].index;
@ -706,6 +702,7 @@ pvr_load_op_constants_create_and_upload(struct pvr_cmd_buffer *cmd_buffer,
attachment_idx = load_op->subpass->color_attachments[i];
image_view = render_pass_info->attachments[attachment_idx];
clear_value = &render_pass_info->clear_values[attachment_idx];
assert((load_op->clears_loads_state.rt_load_mask &
load_op->clears_loads_state.rt_clear_mask) == 0);