mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
anv,hasvk: Take trace submission ID out of lock
The Vulkan spec requires that access to the queue parameter be
externally synchronized for vkQueueSubmit(). So, each submit call to a
specific queue will have a unique ID.
Backport-to: 25.2
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37307>
(cherry picked from commit 27167fdcb5)
This commit is contained in:
parent
c98c42af0b
commit
bf21cd87dc
3 changed files with 3 additions and 8 deletions
|
|
@ -3964,7 +3964,7 @@
|
|||
"description": "anv,hasvk: Take trace submission ID out of lock",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1645,10 +1645,9 @@ anv_queue_submit(struct vk_queue *vk_queue,
|
|||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
pthread_mutex_lock(&device->mutex);
|
||||
|
||||
uint64_t start_ts = intel_ds_begin_submit(&queue->ds);
|
||||
|
||||
pthread_mutex_lock(&device->mutex);
|
||||
if (submit->buffer_bind_count ||
|
||||
submit->image_opaque_bind_count ||
|
||||
submit->image_bind_count) {
|
||||
|
|
@ -1657,12 +1656,9 @@ anv_queue_submit(struct vk_queue *vk_queue,
|
|||
result = anv_queue_submit_cmd_buffers_locked(queue, submit,
|
||||
utrace_submit);
|
||||
}
|
||||
|
||||
/* Take submission ID under lock */
|
||||
intel_ds_end_submit(&queue->ds, start_ts);
|
||||
|
||||
pthread_mutex_unlock(&device->mutex);
|
||||
|
||||
intel_ds_end_submit(&queue->ds, start_ts);
|
||||
intel_ds_device_process(&device->ds, false);
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -2398,7 +2398,6 @@ anv_queue_submit(struct vk_queue *vk_queue,
|
|||
|
||||
pthread_mutex_lock(&device->mutex);
|
||||
result = anv_queue_submit_locked(queue, submit);
|
||||
/* Take submission ID under lock */
|
||||
pthread_mutex_unlock(&device->mutex);
|
||||
|
||||
intel_ds_end_submit(&queue->ds, start_ts);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue