From a72f84c4a309f2eb6444b1a6939d9f573af7db06 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Wed, 9 Nov 2022 14:05:18 -0800 Subject: [PATCH] venus: update venus-protocol for multiple timelines Signed-off-by: Ryan Neph Part-of: --- src/virtio/venus-protocol/vn_protocol_driver.h | 2 +- .../venus-protocol/vn_protocol_driver_defines.h | 7 ++ .../venus-protocol/vn_protocol_driver_device.h | 90 +++++++++++++++++++++- 3 files changed, 96 insertions(+), 3 deletions(-) diff --git a/src/virtio/venus-protocol/vn_protocol_driver.h b/src/virtio/venus-protocol/vn_protocol_driver.h index 428045b..11fbd97 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver.h +++ b/src/virtio/venus-protocol/vn_protocol_driver.h @@ -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 diff --git a/src/virtio/venus-protocol/vn_protocol_driver_defines.h b/src/virtio/venus-protocol/vn_protocol_driver_defines.h index baa9032..17eeaf5 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver_defines.h +++ b/src/virtio/venus-protocol/vn_protocol_driver_defines.h @@ -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 */ diff --git a/src/virtio/venus-protocol/vn_protocol_driver_device.h b/src/virtio/venus-protocol/vn_protocol_driver_device.h index c66748c..06c9bd0 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver_device.h +++ b/src/virtio/venus-protocol/vn_protocol_driver_device.h @@ -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); } -- 2.7.4