mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
anv/xe: allow passing extra syncs to xe_exec_process_syncs()
We're going to use this in two different patches. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25512>
This commit is contained in:
parent
4b435d6983
commit
f2206a0eb1
1 changed files with 8 additions and 1 deletions
|
|
@ -105,12 +105,14 @@ static VkResult
|
|||
xe_exec_process_syncs(struct anv_queue *queue,
|
||||
uint32_t wait_count, const struct vk_sync_wait *waits,
|
||||
uint32_t signal_count, const struct vk_sync_signal *signals,
|
||||
uint32_t extra_sync_count, const struct drm_xe_sync *extra_syncs,
|
||||
struct anv_utrace_submit *utrace_submit,
|
||||
bool is_companion_rcs_queue,
|
||||
struct drm_xe_sync **ret, uint32_t *ret_count)
|
||||
{
|
||||
struct anv_device *device = queue->device;
|
||||
uint32_t num_syncs = wait_count + signal_count + (utrace_submit ? 1 : 0) +
|
||||
uint32_t num_syncs = wait_count + signal_count + extra_sync_count +
|
||||
(utrace_submit ? 1 : 0) +
|
||||
((queue->sync && !is_companion_rcs_queue) ? 1 : 0);
|
||||
if (!num_syncs)
|
||||
return VK_SUCCESS;
|
||||
|
|
@ -150,6 +152,9 @@ xe_exec_process_syncs(struct anv_queue *queue,
|
|||
TYPE_SIGNAL);
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < extra_sync_count; i++)
|
||||
xe_syncs[count++] = extra_syncs[i];
|
||||
|
||||
if (queue->sync && !is_companion_rcs_queue) {
|
||||
struct drm_xe_sync *xe_sync = &xe_syncs[count++];
|
||||
|
||||
|
|
@ -275,6 +280,7 @@ xe_companion_rcs_queue_exec_locked(struct anv_queue *queue,
|
|||
result = xe_exec_process_syncs(queue,
|
||||
wait_count, waits,
|
||||
1, &companion_sync,
|
||||
0, NULL, /* extra_syncs */
|
||||
NULL /* utrace_submit */,
|
||||
true /* is_companion_rcs_queue */,
|
||||
&xe_syncs,
|
||||
|
|
@ -327,6 +333,7 @@ xe_queue_exec_locked(struct anv_queue *queue,
|
|||
uint32_t xe_syncs_count = 0;
|
||||
result = xe_exec_process_syncs(queue, wait_count, waits,
|
||||
signal_count, signals,
|
||||
0, NULL, /* extra_syncs */
|
||||
utrace_submit,
|
||||
false, /* is_companion_rcs_queue */
|
||||
&xe_syncs, &xe_syncs_count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue