pvr: Fix pvr_csb_bake() list return.

The list logic checks for list->next->next (+ some other checks)
to point to the list itself to determine that there is just one
single element.

 ┌───────────────────────┐
 └< { HEAD } >─< { E0 } >┘

When the list_head is copied as was being done previously, the
list element's next pointer still points at the old head so
the `list_is_singular()` check fails.

Fixes pvr_cmd_buffer.c:605:`list_is_singular(&bo_list)` assertion
dEQP-VK.api.image_g.core.clear_color_attachment.cube_layers.b8g8r8a8_unorm

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22730>
This commit is contained in:
Karmjit Mahil 2023-04-20 09:34:49 +01:00 committed by Marge Bot
parent b22e5fab8c
commit c38da3dcd2

View file

@ -136,7 +136,7 @@ VkResult pvr_csb_bake(struct pvr_csb *const csb,
if (csb->status != VK_SUCCESS)
return csb->status;
*bo_list_out = csb->pvr_bo_list;
list_replace(&csb->pvr_bo_list, bo_list_out);
/* Same as pvr_csb_finish(). */
pvr_csb_init(NULL, PVR_CMD_STREAM_TYPE_INVALID, csb);