pvr: Stop creating waits when there are no waits

This prevents the creation of unused syncobjs in the kernel by not processing
waits when there aren't any waits given in the submit info.

Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
This commit is contained in:
Donald Robson 2023-09-22 13:51:50 +01:00 committed by Marge Bot
parent 019281fb0d
commit f29ddf4817

View file

@ -901,6 +901,9 @@ static VkResult pvr_process_queue_waits(struct pvr_queue *queue,
};
}
if (!stage_wait_count)
continue;
result = vk_sync_create(&device->vk,
&device->pdevice->ws->syncobj_type,
0U,
@ -944,10 +947,13 @@ static VkResult pvr_driver_queue_submit(struct vk_queue *queue,
if (result != VK_SUCCESS)
return result;
result =
pvr_process_queue_waits(driver_queue, submit->waits, submit->wait_count);
if (result != VK_SUCCESS)
return result;
if (submit->wait_count) {
result = pvr_process_queue_waits(driver_queue,
submit->waits,
submit->wait_count);
if (result != VK_SUCCESS)
return result;
}
for (uint32_t i = 0U; i < submit->command_buffer_count; i++) {
result = pvr_process_cmd_buffer(