Module: Mesa
Branch: main
Commit: 59e08ad78ce4176367ae36f2ddd6511df567f8ae
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=59e08ad78ce4176367ae36f2ddd6511df567f8ae

Author: Karmjit Mahil <[email protected]>
Date:   Wed Jul 19 13:13:33 2023 +0100

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 <[email protected]>
Reviewed-by: Luigi Santivetti <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24329>

---

 src/imagination/vulkan/pvr_csb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/imagination/vulkan/pvr_csb.c b/src/imagination/vulkan/pvr_csb.c
index 0d2fa7c7e7f..170227b8810 100644
--- a/src/imagination/vulkan/pvr_csb.c
+++ b/src/imagination/vulkan/pvr_csb.c
@@ -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) {

Reply via email to