pvr: Fix pvr_csb_bake() list return.
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Thu, 20 Apr 2023 08:34:49 +0000 (09:34 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 28 Apr 2023 08:54:19 +0000 (08:54 +0000)
commitc38da3dcd22bbdde7fb8a6ac824d0af4ac85c8e3
treee166da32edb2c657beda871236a48cd01446f17c
parentb22e5fab8c43fb7d207a2a6ecf3cbe5a6c62506d
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>
src/imagination/vulkan/pvr_csb.c