mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
venus: add VN_PERF option no_async_queue_submit
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16110>
This commit is contained in:
parent
0fc36b11ab
commit
42a8383170
4 changed files with 7 additions and 3 deletions
|
|
@ -787,11 +787,13 @@ vn_QueueSignalReleaseImageANDROID(VkQueue queue,
|
|||
return vn_error(dev->instance, result);
|
||||
|
||||
if (dev->instance->experimental.globalFencing == VK_TRUE) {
|
||||
/* XXX With globalFencing, the external queue fence was not passed in the
|
||||
/* With globalFencing, the external queue fence was not passed in the
|
||||
* above vn_QueueSubmit to hint it to be synchronous. So we need to wait
|
||||
* for the ring here before vn_GetFenceFdKHR which is pure kernel ops.
|
||||
* Skip ring wait if async queue submit is disabled.
|
||||
*/
|
||||
vn_instance_ring_wait(dev->instance);
|
||||
if (!VN_PERF(NO_ASYNC_QUEUE_SUBMIT))
|
||||
vn_instance_ring_wait(dev->instance);
|
||||
|
||||
const VkFenceGetFdInfoKHR fd_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR,
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ static const struct debug_control vn_debug_options[] = {
|
|||
static const struct debug_control vn_perf_options[] = {
|
||||
{ "no_async_set_alloc", VN_PERF_NO_ASYNC_SET_ALLOC },
|
||||
{ "no_async_buffer_create", VN_PERF_NO_ASYNC_BUFFER_CREATE },
|
||||
{ "no_async_queue_submit", VN_PERF_NO_ASYNC_QUEUE_SUBMIT },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ enum vn_debug {
|
|||
enum vn_perf {
|
||||
VN_PERF_NO_ASYNC_SET_ALLOC = 1ull << 0,
|
||||
VN_PERF_NO_ASYNC_BUFFER_CREATE = 1ull << 1,
|
||||
VN_PERF_NO_ASYNC_QUEUE_SUBMIT = 1ull << 2,
|
||||
};
|
||||
|
||||
typedef uint64_t vn_object_id;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ vn_QueueSubmit(VkQueue _queue,
|
|||
}
|
||||
|
||||
/* TODO defer roundtrip for external fence until the next sync operation */
|
||||
if (!wsi_mem && !is_fence_external) {
|
||||
if (!wsi_mem && !is_fence_external && !VN_PERF(NO_ASYNC_QUEUE_SUBMIT)) {
|
||||
vn_async_vkQueueSubmit(dev->instance, submit.queue, submit.batch_count,
|
||||
submit.submit_batches, submit.fence);
|
||||
vn_queue_submission_cleanup(&submit);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue