mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 22:30:24 +01:00
radv: add a small helper that allows to submit internal CS
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
This commit is contained in:
parent
dbbf49c8f3
commit
94099ee642
2 changed files with 22 additions and 0 deletions
|
|
@ -4652,6 +4652,25 @@ static VkResult radv_queue_submit(struct radv_queue *queue,
|
|||
return radv_process_submissions(&processing_list);
|
||||
}
|
||||
|
||||
bool
|
||||
radv_queue_internal_submit(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
||||
{
|
||||
struct radeon_winsys_ctx *ctx = queue->hw_ctx;
|
||||
struct radv_winsys_sem_info sem_info;
|
||||
VkResult result;
|
||||
int ret;
|
||||
|
||||
result = radv_alloc_sem_info(queue->device, &sem_info, 0, NULL, 0, 0,
|
||||
0, NULL, NULL);
|
||||
if (result != VK_SUCCESS)
|
||||
return false;
|
||||
|
||||
ret = queue->device->ws->cs_submit(ctx, queue->queue_idx, &cs, 1, NULL,
|
||||
NULL, &sem_info, NULL, false, NULL);
|
||||
radv_free_sem_info(&sem_info);
|
||||
return !ret;
|
||||
}
|
||||
|
||||
/* Signals fence as soon as all the work currently put on queue is done. */
|
||||
static VkResult radv_signal_fence(struct radv_queue *queue,
|
||||
VkFence fence)
|
||||
|
|
|
|||
|
|
@ -2287,6 +2287,9 @@ struct radv_semaphore {
|
|||
struct radv_semaphore_part temporary;
|
||||
};
|
||||
|
||||
bool radv_queue_internal_submit(struct radv_queue *queue,
|
||||
struct radeon_cmdbuf *cs);
|
||||
|
||||
void radv_set_descriptor_set(struct radv_cmd_buffer *cmd_buffer,
|
||||
VkPipelineBindPoint bind_point,
|
||||
struct radv_descriptor_set *set,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue