diff options
author | Samuel Pitoiset <[email protected]> | 2018-05-17 11:36:09 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-05-17 13:48:27 +0200 |
commit | 507402ada6dbe56daca49c1f9bdba3b445132e50 (patch) | |
tree | 83bec65dd5154a4a9bc54da6425344ec1b3b1350 /src/amd | |
parent | 6211799aff761282d07b0ce3efde88e67caeb04a (diff) |
radv: only pass the global BO list at submit time if enabled
That way the winsys might use a faster path when the global
BO list is NULL.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 2ce0c9dbd0f..e24b8c2a766 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -2472,6 +2472,8 @@ VkResult radv_QueueSubmit( for (uint32_t j = 0; j < pSubmits[i].commandBufferCount; j += advance) { struct radeon_winsys_cs *initial_preamble = (do_flush && !j) ? initial_flush_preamble_cs : initial_preamble_cs; + const struct radv_winsys_bo_list *bo_list = NULL; + advance = MIN2(max_cs_submission, pSubmits[i].commandBufferCount - j); @@ -2481,12 +2483,14 @@ VkResult radv_QueueSubmit( sem_info.cs_emit_wait = j == 0; sem_info.cs_emit_signal = j + advance == pSubmits[i].commandBufferCount; - if (unlikely(queue->device->use_global_bo_list)) + if (unlikely(queue->device->use_global_bo_list)) { pthread_mutex_lock(&queue->device->bo_list.mutex); + bo_list = &queue->device->bo_list.list; + } ret = queue->device->ws->cs_submit(ctx, queue->queue_idx, cs_array + j, advance, initial_preamble, continue_preamble_cs, - &sem_info, &queue->device->bo_list.list, + &sem_info, bo_list, can_patch, base_fence); if (unlikely(queue->device->use_global_bo_list)) |