diff options
author | Samuel Pitoiset <[email protected]> | 2020-02-21 09:35:46 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2020-02-28 08:10:53 +0100 |
commit | 94099ee64296c60fdd5c3b237eedea0ff6651ea4 (patch) | |
tree | a2aaf10bfab034deac0beb3fab0d939b83e9f1a8 | |
parent | dbbf49c8f38e0873584424e3a63a2089bb71f37d (diff) |
radv: add a small helper that allows to submit internal CS
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
-rw-r--r-- | src/amd/vulkan/radv_device.c | 19 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index d86f2c7d690..04fdb462a92 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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) diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 7f4b571beb2..8d461178770 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -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, |