venus: update venus-protocol for multiple timelines
authorRyan Neph <ryanneph@google.com>
Wed, 9 Nov 2022 22:05:18 +0000 (14:05 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 21:12:38 +0000 (21:12 +0000)
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19691>

src/virtio/venus-protocol/vn_protocol_driver.h
src/virtio/venus-protocol/vn_protocol_driver_defines.h
src/virtio/venus-protocol/vn_protocol_driver_device.h

index 428045b..11fbd97 100644 (file)
@@ -1,4 +1,4 @@
-/* This file is generated by venus-protocol git-ed9bd971. */
+/* This file is generated by venus-protocol git-358504e3. */
 
 /*
  * Copyright 2020 Google LLC
index baa9032..17eeaf5 100644 (file)
@@ -20,6 +20,7 @@
 #define VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA ((VkStructureType)1000384002)
 #define VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA ((VkStructureType)1000384003)
 #define VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_RESOURCE_INFO_100000_MESA ((VkStructureType)1000384004)
+#define VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA ((VkStructureType)1000384005)
 
 typedef enum VkCommandTypeEXT {
     VK_COMMAND_TYPE_vkCreateInstance_EXT = 0,
@@ -426,4 +427,10 @@ typedef struct VkImportSemaphoreResourceInfo100000MESA {
     uint32_t resourceId;
 } VkImportSemaphoreResourceInfo100000MESA;
 
+typedef struct VkDeviceQueueTimelineInfoMESA {
+    VkStructureType sType;
+    const void* pNext;
+    uint32_t ringIdx;
+} VkDeviceQueueTimelineInfoMESA;
+
 #endif /* VN_PROTOCOL_DRIVER_DEFINES_H */
index c66748c..06c9bd0 100644 (file)
@@ -19608,12 +19608,82 @@ vn_encode_VkPhysicalDeviceGroupProperties_partial(struct vn_cs_encoder *enc, con
     vn_encode_VkPhysicalDeviceGroupProperties_self_partial(enc, val);
 }
 
+/* struct VkDeviceQueueTimelineInfoMESA chain */
+
+static inline size_t
+vn_sizeof_VkDeviceQueueTimelineInfoMESA_pnext(const void *val)
+{
+    /* no known/supported struct */
+    return vn_sizeof_simple_pointer(NULL);
+}
+
+static inline size_t
+vn_sizeof_VkDeviceQueueTimelineInfoMESA_self(const VkDeviceQueueTimelineInfoMESA *val)
+{
+    size_t size = 0;
+    /* skip val->{sType,pNext} */
+    size += vn_sizeof_uint32_t(&val->ringIdx);
+    return size;
+}
+
+static inline size_t
+vn_sizeof_VkDeviceQueueTimelineInfoMESA(const VkDeviceQueueTimelineInfoMESA *val)
+{
+    size_t size = 0;
+
+    size += vn_sizeof_VkStructureType(&val->sType);
+    size += vn_sizeof_VkDeviceQueueTimelineInfoMESA_pnext(val->pNext);
+    size += vn_sizeof_VkDeviceQueueTimelineInfoMESA_self(val);
+
+    return size;
+}
+
+static inline void
+vn_encode_VkDeviceQueueTimelineInfoMESA_pnext(struct vn_cs_encoder *enc, const void *val)
+{
+    /* no known/supported struct */
+    vn_encode_simple_pointer(enc, NULL);
+}
+
+static inline void
+vn_encode_VkDeviceQueueTimelineInfoMESA_self(struct vn_cs_encoder *enc, const VkDeviceQueueTimelineInfoMESA *val)
+{
+    /* skip val->{sType,pNext} */
+    vn_encode_uint32_t(enc, &val->ringIdx);
+}
+
+static inline void
+vn_encode_VkDeviceQueueTimelineInfoMESA(struct vn_cs_encoder *enc, const VkDeviceQueueTimelineInfoMESA *val)
+{
+    assert(val->sType == VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA);
+    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA });
+    vn_encode_VkDeviceQueueTimelineInfoMESA_pnext(enc, val->pNext);
+    vn_encode_VkDeviceQueueTimelineInfoMESA_self(enc, val);
+}
+
 /* struct VkDeviceQueueInfo2 chain */
 
 static inline size_t
 vn_sizeof_VkDeviceQueueInfo2_pnext(const void *val)
 {
-    /* no known/supported struct */
+    const VkBaseInStructure *pnext = val;
+    size_t size = 0;
+
+    while (pnext) {
+        switch ((int32_t)pnext->sType) {
+        case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA:
+            size += vn_sizeof_simple_pointer(pnext);
+            size += vn_sizeof_VkStructureType(&pnext->sType);
+            size += vn_sizeof_VkDeviceQueueInfo2_pnext(pnext->pNext);
+            size += vn_sizeof_VkDeviceQueueTimelineInfoMESA_self((const VkDeviceQueueTimelineInfoMESA *)pnext);
+            return size;
+        default:
+            /* ignore unknown/unsupported struct */
+            break;
+        }
+        pnext = pnext->pNext;
+    }
+
     return vn_sizeof_simple_pointer(NULL);
 }
 
@@ -19643,7 +19713,23 @@ vn_sizeof_VkDeviceQueueInfo2(const VkDeviceQueueInfo2 *val)
 static inline void
 vn_encode_VkDeviceQueueInfo2_pnext(struct vn_cs_encoder *enc, const void *val)
 {
-    /* no known/supported struct */
+    const VkBaseInStructure *pnext = val;
+
+    while (pnext) {
+        switch ((int32_t)pnext->sType) {
+        case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA:
+            vn_encode_simple_pointer(enc, pnext);
+            vn_encode_VkStructureType(enc, &pnext->sType);
+            vn_encode_VkDeviceQueueInfo2_pnext(enc, pnext->pNext);
+            vn_encode_VkDeviceQueueTimelineInfoMESA_self(enc, (const VkDeviceQueueTimelineInfoMESA *)pnext);
+            return;
+        default:
+            /* ignore unknown/unsupported struct */
+            break;
+        }
+        pnext = pnext->pNext;
+    }
+
     vn_encode_simple_pointer(enc, NULL);
 }