From: Juston Li Date: Tue, 12 Sep 2023 20:43:58 +0000 (-0700) Subject: venus: sync protocol for VK_EXT_vertex_input_dynamic_state X-Git-Tag: upstream/23.3.3~2099 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfbe545a2c8529d0ff1927118dd9f117b61222a3;p=platform%2Fupstream%2Fmesa.git venus: sync protocol for VK_EXT_vertex_input_dynamic_state Signed-off-by: Juston Li Part-of: --- diff --git a/src/virtio/venus-protocol/vn_protocol_driver.h b/src/virtio/venus-protocol/vn_protocol_driver.h index 65017dc..3e3b2b1 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-d6bf073e. */ +/* This file is generated by venus-protocol git-bf4748e6. */ /* * Copyright 2020 Google LLC diff --git a/src/virtio/venus-protocol/vn_protocol_driver_command_buffer.h b/src/virtio/venus-protocol/vn_protocol_driver_command_buffer.h index 51f0f94..5df9139 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver_command_buffer.h +++ b/src/virtio/venus-protocol/vn_protocol_driver_command_buffer.h @@ -2108,6 +2108,124 @@ vn_encode_VkResolveImageInfo2(struct vn_cs_encoder *enc, const VkResolveImageInf vn_encode_VkResolveImageInfo2_self(enc, val); } +/* struct VkVertexInputBindingDescription2EXT chain */ + +static inline size_t +vn_sizeof_VkVertexInputBindingDescription2EXT_pnext(const void *val) +{ + /* no known/supported struct */ + return vn_sizeof_simple_pointer(NULL); +} + +static inline size_t +vn_sizeof_VkVertexInputBindingDescription2EXT_self(const VkVertexInputBindingDescription2EXT *val) +{ + size_t size = 0; + /* skip val->{sType,pNext} */ + size += vn_sizeof_uint32_t(&val->binding); + size += vn_sizeof_uint32_t(&val->stride); + size += vn_sizeof_VkVertexInputRate(&val->inputRate); + size += vn_sizeof_uint32_t(&val->divisor); + return size; +} + +static inline size_t +vn_sizeof_VkVertexInputBindingDescription2EXT(const VkVertexInputBindingDescription2EXT *val) +{ + size_t size = 0; + + size += vn_sizeof_VkStructureType(&val->sType); + size += vn_sizeof_VkVertexInputBindingDescription2EXT_pnext(val->pNext); + size += vn_sizeof_VkVertexInputBindingDescription2EXT_self(val); + + return size; +} + +static inline void +vn_encode_VkVertexInputBindingDescription2EXT_pnext(struct vn_cs_encoder *enc, const void *val) +{ + /* no known/supported struct */ + vn_encode_simple_pointer(enc, NULL); +} + +static inline void +vn_encode_VkVertexInputBindingDescription2EXT_self(struct vn_cs_encoder *enc, const VkVertexInputBindingDescription2EXT *val) +{ + /* skip val->{sType,pNext} */ + vn_encode_uint32_t(enc, &val->binding); + vn_encode_uint32_t(enc, &val->stride); + vn_encode_VkVertexInputRate(enc, &val->inputRate); + vn_encode_uint32_t(enc, &val->divisor); +} + +static inline void +vn_encode_VkVertexInputBindingDescription2EXT(struct vn_cs_encoder *enc, const VkVertexInputBindingDescription2EXT *val) +{ + assert(val->sType == VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT); + vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT }); + vn_encode_VkVertexInputBindingDescription2EXT_pnext(enc, val->pNext); + vn_encode_VkVertexInputBindingDescription2EXT_self(enc, val); +} + +/* struct VkVertexInputAttributeDescription2EXT chain */ + +static inline size_t +vn_sizeof_VkVertexInputAttributeDescription2EXT_pnext(const void *val) +{ + /* no known/supported struct */ + return vn_sizeof_simple_pointer(NULL); +} + +static inline size_t +vn_sizeof_VkVertexInputAttributeDescription2EXT_self(const VkVertexInputAttributeDescription2EXT *val) +{ + size_t size = 0; + /* skip val->{sType,pNext} */ + size += vn_sizeof_uint32_t(&val->location); + size += vn_sizeof_uint32_t(&val->binding); + size += vn_sizeof_VkFormat(&val->format); + size += vn_sizeof_uint32_t(&val->offset); + return size; +} + +static inline size_t +vn_sizeof_VkVertexInputAttributeDescription2EXT(const VkVertexInputAttributeDescription2EXT *val) +{ + size_t size = 0; + + size += vn_sizeof_VkStructureType(&val->sType); + size += vn_sizeof_VkVertexInputAttributeDescription2EXT_pnext(val->pNext); + size += vn_sizeof_VkVertexInputAttributeDescription2EXT_self(val); + + return size; +} + +static inline void +vn_encode_VkVertexInputAttributeDescription2EXT_pnext(struct vn_cs_encoder *enc, const void *val) +{ + /* no known/supported struct */ + vn_encode_simple_pointer(enc, NULL); +} + +static inline void +vn_encode_VkVertexInputAttributeDescription2EXT_self(struct vn_cs_encoder *enc, const VkVertexInputAttributeDescription2EXT *val) +{ + /* skip val->{sType,pNext} */ + vn_encode_uint32_t(enc, &val->location); + vn_encode_uint32_t(enc, &val->binding); + vn_encode_VkFormat(enc, &val->format); + vn_encode_uint32_t(enc, &val->offset); +} + +static inline void +vn_encode_VkVertexInputAttributeDescription2EXT(struct vn_cs_encoder *enc, const VkVertexInputAttributeDescription2EXT *val) +{ + assert(val->sType == VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT); + vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT }); + vn_encode_VkVertexInputAttributeDescription2EXT_pnext(enc, val->pNext); + vn_encode_VkVertexInputAttributeDescription2EXT_self(enc, val); +} + /* struct VkBufferMemoryBarrier2 chain */ static inline size_t @@ -7867,6 +7985,86 @@ static inline void vn_decode_vkCmdResolveImage2_reply(struct vn_cs_decoder *dec, /* skip pResolveImageInfo */ } +static inline size_t vn_sizeof_vkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) +{ + const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT; + const VkFlags cmd_flags = 0; + size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); + + cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); + cmd_size += vn_sizeof_uint32_t(&vertexBindingDescriptionCount); + if (pVertexBindingDescriptions) { + cmd_size += vn_sizeof_array_size(vertexBindingDescriptionCount); + for (uint32_t i = 0; i < vertexBindingDescriptionCount; i++) + cmd_size += vn_sizeof_VkVertexInputBindingDescription2EXT(&pVertexBindingDescriptions[i]); + } else { + cmd_size += vn_sizeof_array_size(0); + } + cmd_size += vn_sizeof_uint32_t(&vertexAttributeDescriptionCount); + if (pVertexAttributeDescriptions) { + cmd_size += vn_sizeof_array_size(vertexAttributeDescriptionCount); + for (uint32_t i = 0; i < vertexAttributeDescriptionCount; i++) + cmd_size += vn_sizeof_VkVertexInputAttributeDescription2EXT(&pVertexAttributeDescriptions[i]); + } else { + cmd_size += vn_sizeof_array_size(0); + } + + return cmd_size; +} + +static inline void vn_encode_vkCmdSetVertexInputEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) +{ + const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT; + + vn_encode_VkCommandTypeEXT(enc, &cmd_type); + vn_encode_VkFlags(enc, &cmd_flags); + + vn_encode_VkCommandBuffer(enc, &commandBuffer); + vn_encode_uint32_t(enc, &vertexBindingDescriptionCount); + if (pVertexBindingDescriptions) { + vn_encode_array_size(enc, vertexBindingDescriptionCount); + for (uint32_t i = 0; i < vertexBindingDescriptionCount; i++) + vn_encode_VkVertexInputBindingDescription2EXT(enc, &pVertexBindingDescriptions[i]); + } else { + vn_encode_array_size(enc, 0); + } + vn_encode_uint32_t(enc, &vertexAttributeDescriptionCount); + if (pVertexAttributeDescriptions) { + vn_encode_array_size(enc, vertexAttributeDescriptionCount); + for (uint32_t i = 0; i < vertexAttributeDescriptionCount; i++) + vn_encode_VkVertexInputAttributeDescription2EXT(enc, &pVertexAttributeDescriptions[i]); + } else { + vn_encode_array_size(enc, 0); + } +} + +static inline size_t vn_sizeof_vkCmdSetVertexInputEXT_reply(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) +{ + const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT; + size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); + + /* skip commandBuffer */ + /* skip vertexBindingDescriptionCount */ + /* skip pVertexBindingDescriptions */ + /* skip vertexAttributeDescriptionCount */ + /* skip pVertexAttributeDescriptions */ + + return cmd_size; +} + +static inline void vn_decode_vkCmdSetVertexInputEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) +{ + VkCommandTypeEXT command_type; + vn_decode_VkCommandTypeEXT(dec, &command_type); + assert(command_type == VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT); + + /* skip commandBuffer */ + /* skip vertexBindingDescriptionCount */ + /* skip pVertexBindingDescriptions */ + /* skip vertexAttributeDescriptionCount */ + /* skip pVertexAttributeDescriptions */ +} + static inline size_t vn_sizeof_vkCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables) { const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetColorWriteEnableEXT_EXT; @@ -10197,6 +10395,27 @@ static inline void vn_submit_vkCmdResolveImage2(struct vn_instance *vn_instance, } } +static inline void vn_submit_vkCmdSetVertexInputEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, struct vn_instance_submit_command *submit) +{ + uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; + void *cmd_data = local_cmd_data; + size_t cmd_size = vn_sizeof_vkCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions); + if (cmd_size > sizeof(local_cmd_data)) { + cmd_data = malloc(cmd_size); + if (!cmd_data) + cmd_size = 0; + } + const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetVertexInputEXT_reply(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions) : 0; + + struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); + if (cmd_size) { + vn_encode_vkCmdSetVertexInputEXT(enc, cmd_flags, commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions); + vn_instance_submit_command(vn_instance, submit); + if (cmd_data != local_cmd_data) + free(cmd_data); + } +} + static inline void vn_submit_vkCmdSetColorWriteEnableEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables, struct vn_instance_submit_command *submit) { uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; @@ -12106,6 +12325,25 @@ static inline void vn_async_vkCmdResolveImage2(struct vn_instance *vn_instance, vn_submit_vkCmdResolveImage2(vn_instance, 0, commandBuffer, pResolveImageInfo, &submit); } +static inline void vn_call_vkCmdSetVertexInputEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) +{ + VN_TRACE_FUNC(); + + struct vn_instance_submit_command submit; + vn_submit_vkCmdSetVertexInputEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions, &submit); + struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); + if (dec) { + vn_decode_vkCmdSetVertexInputEXT_reply(dec, commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions); + vn_instance_free_command_reply(vn_instance, &submit); + } +} + +static inline void vn_async_vkCmdSetVertexInputEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) +{ + struct vn_instance_submit_command submit; + vn_submit_vkCmdSetVertexInputEXT(vn_instance, 0, commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions, &submit); +} + static inline void vn_call_vkCmdSetColorWriteEnableEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables) { VN_TRACE_FUNC(); diff --git a/src/virtio/venus-protocol/vn_protocol_driver_defines.h b/src/virtio/venus-protocol/vn_protocol_driver_defines.h index 23ae04a..0a19c3f 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver_defines.h +++ b/src/virtio/venus-protocol/vn_protocol_driver_defines.h @@ -338,6 +338,7 @@ typedef enum VkCommandTypeEXT { VK_COMMAND_TYPE_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT_EXT = 235, VK_COMMAND_TYPE_vkGetCalibratedTimestampsEXT_EXT = 236, VK_COMMAND_TYPE_vkCmdSetLineStippleEXT_EXT = 237, + VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT = 255, VK_COMMAND_TYPE_vkCmdSetPatchControlPointsEXT_EXT = 233, VK_COMMAND_TYPE_vkCmdSetLogicOpEXT_EXT = 234, VK_COMMAND_TYPE_vkCmdSetColorWriteEnableEXT_EXT = 254, diff --git a/src/virtio/venus-protocol/vn_protocol_driver_device.h b/src/virtio/venus-protocol/vn_protocol_driver_device.h index 802ca08..df85969 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver_device.h +++ b/src/virtio/venus-protocol/vn_protocol_driver_device.h @@ -8733,6 +8733,137 @@ vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_partial(struct vn_cs_encod vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_partial(enc, val); } +/* struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT chain */ + +static inline size_t +vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(const void *val) +{ + /* no known/supported struct */ + return vn_sizeof_simple_pointer(NULL); +} + +static inline size_t +vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + size_t size = 0; + /* skip val->{sType,pNext} */ + size += vn_sizeof_VkBool32(&val->vertexInputDynamicState); + return size; +} + +static inline size_t +vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + size_t size = 0; + + size += vn_sizeof_VkStructureType(&val->sType); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(val->pNext); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(val); + + return size; +} + +static inline void +vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) +{ + /* no known/supported struct */ + vn_encode_simple_pointer(enc, NULL); +} + +static inline void +vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + /* skip val->{sType,pNext} */ + vn_encode_VkBool32(enc, &val->vertexInputDynamicState); +} + +static inline void +vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT); + vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT }); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(enc, val->pNext); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(enc, val); +} + +static inline void +vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(struct vn_cs_decoder *dec, const void *val) +{ + /* no known/supported struct */ + if (vn_decode_simple_pointer(dec)) + assert(false); +} + +static inline void +vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + /* skip val->{sType,pNext} */ + vn_decode_VkBool32(dec, &val->vertexInputDynamicState); +} + +static inline void +vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + VkStructureType stype; + vn_decode_VkStructureType(dec, &stype); + assert(stype == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT); + + assert(val->sType == stype); + vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(dec, val->pNext); + vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(dec, val); +} + +static inline size_t +vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_partial(const void *val) +{ + /* no known/supported struct */ + return vn_sizeof_simple_pointer(NULL); +} + +static inline size_t +vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial(const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + size_t size = 0; + /* skip val->{sType,pNext} */ + /* skip val->vertexInputDynamicState */ + return size; +} + +static inline size_t +vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_partial(const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + size_t size = 0; + + size += vn_sizeof_VkStructureType(&val->sType); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_partial(val->pNext); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial(val); + + return size; +} + +static inline void +vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_partial(struct vn_cs_encoder *enc, const void *val) +{ + /* no known/supported struct */ + vn_encode_simple_pointer(enc, NULL); +} + +static inline void +vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + /* skip val->{sType,pNext} */ + /* skip val->vertexInputDynamicState */ +} + +static inline void +vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_partial(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) +{ + assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT); + vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT }); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_partial(enc, val->pNext); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial(enc, val); +} + /* struct VkPhysicalDeviceColorWriteEnableFeaturesEXT chain */ static inline size_t @@ -10583,6 +10714,14 @@ vn_sizeof_VkPhysicalDeviceFeatures2_pnext(const void *val) size += vn_sizeof_VkPhysicalDeviceFeatures2_pnext(pnext->pNext); size += vn_sizeof_VkPhysicalDeviceDepthClipControlFeaturesEXT_self((const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); return size; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + if (!vn_cs_renderer_protocol_has_extension(353 /* VK_EXT_vertex_input_dynamic_state */)) + break; + size += vn_sizeof_simple_pointer(pnext); + size += vn_sizeof_VkStructureType(&pnext->sType); + size += vn_sizeof_VkPhysicalDeviceFeatures2_pnext(pnext->pNext); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self((const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + return size; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: if (!vn_cs_renderer_protocol_has_extension(382 /* VK_EXT_color_write_enable */)) break; @@ -11083,6 +11222,14 @@ vn_encode_VkPhysicalDeviceFeatures2_pnext(struct vn_cs_encoder *enc, const void vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, pnext->pNext); vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self(enc, (const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); return; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + if (!vn_cs_renderer_protocol_has_extension(353 /* VK_EXT_vertex_input_dynamic_state */)) + break; + vn_encode_simple_pointer(enc, pnext); + vn_encode_VkStructureType(enc, &pnext->sType); + vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, pnext->pNext); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(enc, (const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + return; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: if (!vn_cs_renderer_protocol_has_extension(382 /* VK_EXT_color_write_enable */)) break; @@ -11424,6 +11571,10 @@ vn_decode_VkPhysicalDeviceFeatures2_pnext(struct vn_cs_decoder *dec, const void vn_decode_VkPhysicalDeviceFeatures2_pnext(dec, pnext->pNext); vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self(dec, (VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); break; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + vn_decode_VkPhysicalDeviceFeatures2_pnext(dec, pnext->pNext); + vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(dec, (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: vn_decode_VkPhysicalDeviceFeatures2_pnext(dec, pnext->pNext); vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self(dec, (VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); @@ -11875,6 +12026,14 @@ vn_sizeof_VkPhysicalDeviceFeatures2_pnext_partial(const void *val) size += vn_sizeof_VkPhysicalDeviceFeatures2_pnext_partial(pnext->pNext); size += vn_sizeof_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_partial((const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); return size; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + if (!vn_cs_renderer_protocol_has_extension(353 /* VK_EXT_vertex_input_dynamic_state */)) + break; + size += vn_sizeof_simple_pointer(pnext); + size += vn_sizeof_VkStructureType(&pnext->sType); + size += vn_sizeof_VkPhysicalDeviceFeatures2_pnext_partial(pnext->pNext); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial((const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + return size; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: if (!vn_cs_renderer_protocol_has_extension(382 /* VK_EXT_color_write_enable */)) break; @@ -12375,6 +12534,14 @@ vn_encode_VkPhysicalDeviceFeatures2_pnext_partial(struct vn_cs_encoder *enc, con vn_encode_VkPhysicalDeviceFeatures2_pnext_partial(enc, pnext->pNext); vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_partial(enc, (const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); return; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + if (!vn_cs_renderer_protocol_has_extension(353 /* VK_EXT_vertex_input_dynamic_state */)) + break; + vn_encode_simple_pointer(enc, pnext); + vn_encode_VkStructureType(enc, &pnext->sType); + vn_encode_VkPhysicalDeviceFeatures2_pnext_partial(enc, pnext->pNext); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial(enc, (const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + return; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: if (!vn_cs_renderer_protocol_has_extension(382 /* VK_EXT_color_write_enable */)) break; @@ -12960,6 +13127,14 @@ vn_sizeof_VkDeviceCreateInfo_pnext(const void *val) size += vn_sizeof_VkDeviceCreateInfo_pnext(pnext->pNext); size += vn_sizeof_VkPhysicalDeviceDepthClipControlFeaturesEXT_self((const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); return size; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + if (!vn_cs_renderer_protocol_has_extension(353 /* VK_EXT_vertex_input_dynamic_state */)) + break; + size += vn_sizeof_simple_pointer(pnext); + size += vn_sizeof_VkStructureType(&pnext->sType); + size += vn_sizeof_VkDeviceCreateInfo_pnext(pnext->pNext); + size += vn_sizeof_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self((const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + return size; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: if (!vn_cs_renderer_protocol_has_extension(382 /* VK_EXT_color_write_enable */)) break; @@ -13513,6 +13688,14 @@ vn_encode_VkDeviceCreateInfo_pnext(struct vn_cs_encoder *enc, const void *val) vn_encode_VkDeviceCreateInfo_pnext(enc, pnext->pNext); vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self(enc, (const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); return; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + if (!vn_cs_renderer_protocol_has_extension(353 /* VK_EXT_vertex_input_dynamic_state */)) + break; + vn_encode_simple_pointer(enc, pnext); + vn_encode_VkStructureType(enc, &pnext->sType); + vn_encode_VkDeviceCreateInfo_pnext(enc, pnext->pNext); + vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(enc, (const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); + return; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: if (!vn_cs_renderer_protocol_has_extension(382 /* VK_EXT_color_write_enable */)) break; diff --git a/src/virtio/venus-protocol/vn_protocol_driver_info.h b/src/virtio/venus-protocol/vn_protocol_driver_info.h index 62b225c..e97e9fe 100644 --- a/src/virtio/venus-protocol/vn_protocol_driver_info.h +++ b/src/virtio/venus-protocol/vn_protocol_driver_info.h @@ -19,8 +19,8 @@ struct vn_info_extension { }; /* sorted by extension names for bsearch */ -static const uint32_t _vn_info_extension_count = 110; -static const struct vn_info_extension _vn_info_extensions[110] = { +static const uint32_t _vn_info_extension_count = 111; +static const struct vn_info_extension _vn_info_extensions[111] = { { "VK_EXT_4444_formats", 341, 1 }, { "VK_EXT_border_color_swizzle", 412, 1 }, { "VK_EXT_calibrated_timestamps", 185, 2 }, @@ -73,6 +73,7 @@ static const struct vn_info_extension _vn_info_extensions[110] = { { "VK_EXT_tooling_info", 246, 1 }, { "VK_EXT_transform_feedback", 29, 1 }, { "VK_EXT_vertex_attribute_divisor", 191, 3 }, + { "VK_EXT_vertex_input_dynamic_state", 353, 2 }, { "VK_EXT_ycbcr_2plane_444_formats", 331, 1 }, { "VK_KHR_16bit_storage", 84, 1 }, { "VK_KHR_8bit_storage", 178, 1 },