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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user