mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 01:30:25 +01:00
v3dv: submit a no-op job if a command buffer doesn't have any jobs.
This is similar to the scenario where we have a submit without any command buffers, even if we don't have any actual GPU work to do we still might need to signal fences/semaphored and possibly wait on previous jobs to finish, so we need to submit something to the kernel to get all that done right. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
53657b0cb1
commit
7ea4601a28
1 changed files with 21 additions and 16 deletions
|
|
@ -302,22 +302,6 @@ queue_submit_job(struct v3dv_queue *queue,
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
queue_submit_cmd_buffer(struct v3dv_queue *queue,
|
||||
struct v3dv_cmd_buffer *cmd_buffer,
|
||||
const VkSubmitInfo *pSubmit)
|
||||
{
|
||||
list_for_each_entry_safe(struct v3dv_job, job,
|
||||
&cmd_buffer->submit_jobs, list_link) {
|
||||
VkResult result = queue_submit_job(queue, job,
|
||||
pSubmit->waitSemaphoreCount > 0);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
emit_noop_bin(struct v3dv_job *job)
|
||||
{
|
||||
|
|
@ -508,6 +492,27 @@ fail_job:
|
|||
return result;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
queue_submit_cmd_buffer(struct v3dv_queue *queue,
|
||||
struct v3dv_cmd_buffer *cmd_buffer,
|
||||
const VkSubmitInfo *pSubmit)
|
||||
{
|
||||
assert(cmd_buffer);
|
||||
|
||||
if (list_is_empty(&cmd_buffer->submit_jobs))
|
||||
return queue_submit_noop_job(queue, pSubmit);
|
||||
|
||||
list_for_each_entry_safe(struct v3dv_job, job,
|
||||
&cmd_buffer->submit_jobs, list_link) {
|
||||
VkResult result = queue_submit_job(queue, job,
|
||||
pSubmit->waitSemaphoreCount > 0);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
queue_submit_cmd_buffer_batch(struct v3dv_queue *queue,
|
||||
const VkSubmitInfo *pSubmit,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue