pvr: Fix csb relocation status assert on pvr_csb_finish()

The app might not have emitted any cs words before freeing
resources so it is valid for the csb relocation mark to be
uninitialised on `pvr_csb_finish()`.

Fixes the assert being hit for:
  dEQP-VK.api.pipeline.pipeline_layout.lifetime.graphics

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24329>
This commit is contained in:
Karmjit Mahil 2023-07-19 13:13:33 +01:00 committed by Marge Bot
parent 2c6cadb5ea
commit 59e08ad78c

View file

@ -105,7 +105,9 @@ void pvr_csb_init(struct pvr_device *device,
void pvr_csb_finish(struct pvr_csb *csb)
{
#if defined(DEBUG)
assert(csb->relocation_mark_status == PVR_CSB_RELOCATION_MARK_CLEARED);
assert(csb->relocation_mark_status ==
PVR_CSB_RELOCATION_MARK_UNINITIALIZED ||
csb->relocation_mark_status == PVR_CSB_RELOCATION_MARK_CLEARED);
#endif
if (csb->stream_type == PVR_CMD_STREAM_TYPE_GRAPHICS_DEFERRED) {