Mesa (main): turnip: Skip telling the kernel the BO list when we don't need any.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 01:26:34 UTC 2022
Module: Mesa
Branch: main
Commit: 58f6331eec66bc3bb2b3573d4b8a4a851a5c4cff
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=58f6331eec66bc3bb2b3573d4b8a4a851a5c4cff
Author: Emma Anholt <emma at anholt.net>
Date: Thu Feb 17 13:24:20 2022 -0800
turnip: Skip telling the kernel the BO list when we don't need any.
In fencing, we sometimes do a dummy submit with no nr_cmds. If we don't
have commands to execute, we don't need to pin or fence any BOs either.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15038>
---
src/freedreno/vulkan/tu_drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c
index 9e46b08a1f0..3be7a5ea240 100644
--- a/src/freedreno/vulkan/tu_drm.c
+++ b/src/freedreno/vulkan/tu_drm.c
@@ -1023,7 +1023,7 @@ tu_queue_submit_locked(struct tu_queue *queue, struct tu_queue_submit *submit)
.flags = flags,
.queueid = queue->msm_queue_id,
.bos = (uint64_t)(uintptr_t) queue->device->bo_list,
- .nr_bos = queue->device->bo_count,
+ .nr_bos = submit->entry_count ? queue->device->bo_count : 0,
.cmds = (uint64_t)(uintptr_t)submit->cmds,
.nr_cmds = submit->entry_count,
.in_syncobjs = (uint64_t)(uintptr_t)submit->in_syncobjs,
More information about the mesa-commit
mailing list