Module: Mesa
Branch: main
Commit: 0b0c0511b8eedf2b4ca7d939a5c47ef0ec98d302
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b0c0511b8eedf2b4ca7d939a5c47ef0ec98d302

Author: Yiwei Zhang <zzyi...@chromium.org>
Date:   Thu Dec 28 19:53:51 2023 -0800

venus: allow to retrieve pipeline cache on TLS ring

Signed-off-by: Yiwei Zhang <zzyi...@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26838>

---

 src/virtio/vulkan/vn_pipeline.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/virtio/vulkan/vn_pipeline.c b/src/virtio/vulkan/vn_pipeline.c
index dd97c49a6cd..63e3ceeac96 100644
--- a/src/virtio/vulkan/vn_pipeline.c
+++ b/src/virtio/vulkan/vn_pipeline.c
@@ -457,13 +457,16 @@ vn_get_target_ring(struct vn_device *dev)
       return NULL;
 
    if (ring != dev->primary_ring) {
-      /* Ensure pipeline create dependencies are ready on the renderer side.
+      /* Ensure pipeline create and pipeline cache retrieval dependencies are
+       * ready on the renderer side.
        *
        * TODO:
        * - For pipeline objects, avoid object id re-use between async pipeline
        *   destroy on the primary ring and sync pipeline create on TLS ring.
        * - For pipeline create, track ring seqnos of layout and renderpass
        *   objects it depends on, and only wait for those seqnos once.
+       * - For pipeline cache retrieval, track ring seqno of pipeline cache
+       *   object it depends on. Treat different sync mode separately.
        */
       vn_ring_wait_all(dev->primary_ring);
    }
@@ -479,7 +482,7 @@ vn_GetPipelineCacheData(VkDevice device,
    VN_TRACE_FUNC();
    struct vn_device *dev = vn_device_from_handle(device);
    struct vn_physical_device *physical_dev = dev->physical_device;
-   struct vn_ring *target_ring = dev->primary_ring;
+   struct vn_ring *target_ring = vn_get_target_ring(dev);
 
    struct vk_pipeline_cache_header *header = pData;
    VkResult result;

Reply via email to