-/* This file is generated by venus-protocol git-2564dba1. */
+/* This file is generated by venus-protocol git-e05ae158. */
/*
* Copyright 2020 Google LLC
vn_encode_VkRingCreateInfoMESA_self(enc, val);
}
+/* struct VkMemoryResourcePropertiesMESA chain */
+
+static inline size_t
+vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(const void *val)
+{
+ /* no known/supported struct */
+ return vn_sizeof_simple_pointer(NULL);
+}
+
+static inline size_t
+vn_sizeof_VkMemoryResourcePropertiesMESA_self(const VkMemoryResourcePropertiesMESA *val)
+{
+ size_t size = 0;
+ /* skip val->{sType,pNext} */
+ size += vn_sizeof_uint32_t(&val->memoryTypeBits);
+ return size;
+}
+
+static inline size_t
+vn_sizeof_VkMemoryResourcePropertiesMESA(const VkMemoryResourcePropertiesMESA *val)
+{
+ size_t size = 0;
+
+ size += vn_sizeof_VkStructureType(&val->sType);
+ size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(val->pNext);
+ size += vn_sizeof_VkMemoryResourcePropertiesMESA_self(val);
+
+ return size;
+}
+
+static inline void
+vn_decode_VkMemoryResourcePropertiesMESA_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_VkMemoryResourcePropertiesMESA_self(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val)
+{
+ /* skip val->{sType,pNext} */
+ vn_decode_uint32_t(dec, &val->memoryTypeBits);
+}
+
+static inline void
+vn_decode_VkMemoryResourcePropertiesMESA(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val)
+{
+ VkStructureType stype;
+ vn_decode_VkStructureType(dec, &stype);
+ assert(stype == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA);
+
+ assert(val->sType == stype);
+ vn_decode_VkMemoryResourcePropertiesMESA_pnext(dec, val->pNext);
+ vn_decode_VkMemoryResourcePropertiesMESA_self(dec, val);
+}
+
+static inline size_t
+vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(const void *val)
+{
+ /* no known/supported struct */
+ return vn_sizeof_simple_pointer(NULL);
+}
+
+static inline size_t
+vn_sizeof_VkMemoryResourcePropertiesMESA_self_partial(const VkMemoryResourcePropertiesMESA *val)
+{
+ size_t size = 0;
+ /* skip val->{sType,pNext} */
+ /* skip val->memoryTypeBits */
+ return size;
+}
+
+static inline size_t
+vn_sizeof_VkMemoryResourcePropertiesMESA_partial(const VkMemoryResourcePropertiesMESA *val)
+{
+ size_t size = 0;
+
+ size += vn_sizeof_VkStructureType(&val->sType);
+ size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(val->pNext);
+ size += vn_sizeof_VkMemoryResourcePropertiesMESA_self_partial(val);
+
+ return size;
+}
+
+static inline void
+vn_encode_VkMemoryResourcePropertiesMESA_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_VkMemoryResourcePropertiesMESA_self_partial(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val)
+{
+ /* skip val->{sType,pNext} */
+ /* skip val->memoryTypeBits */
+}
+
+static inline void
+vn_encode_VkMemoryResourcePropertiesMESA_partial(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val)
+{
+ assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA);
+ vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA });
+ vn_encode_VkMemoryResourcePropertiesMESA_pnext_partial(enc, val->pNext);
+ vn_encode_VkMemoryResourcePropertiesMESA_self_partial(enc, val);
+}
+
static inline size_t vn_sizeof_vkSetReplyCommandStreamMESA(const VkCommandStreamDescriptionMESA* pStream)
{
const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT;
/* skip value */
}
+static inline size_t vn_sizeof_vkGetMemoryResourcePropertiesMESA(VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
+{
+ const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT;
+ const VkFlags cmd_flags = 0;
+ size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
+
+ cmd_size += vn_sizeof_VkDevice(&device);
+ cmd_size += vn_sizeof_uint32_t(&resourceId);
+ cmd_size += vn_sizeof_simple_pointer(pMemoryResourceProperties);
+ if (pMemoryResourceProperties)
+ cmd_size += vn_sizeof_VkMemoryResourcePropertiesMESA_partial(pMemoryResourceProperties);
+
+ return cmd_size;
+}
+
+static inline void vn_encode_vkGetMemoryResourcePropertiesMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
+{
+ const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT;
+
+ vn_encode_VkCommandTypeEXT(enc, &cmd_type);
+ vn_encode_VkFlags(enc, &cmd_flags);
+
+ vn_encode_VkDevice(enc, &device);
+ vn_encode_uint32_t(enc, &resourceId);
+ if (vn_encode_simple_pointer(enc, pMemoryResourceProperties))
+ vn_encode_VkMemoryResourcePropertiesMESA_partial(enc, pMemoryResourceProperties);
+}
+
+static inline size_t vn_sizeof_vkGetMemoryResourcePropertiesMESA_reply(VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
+{
+ const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT;
+ size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
+
+ VkResult ret;
+ cmd_size += vn_sizeof_VkResult(&ret);
+ /* skip device */
+ /* skip resourceId */
+ cmd_size += vn_sizeof_simple_pointer(pMemoryResourceProperties);
+ if (pMemoryResourceProperties)
+ cmd_size += vn_sizeof_VkMemoryResourcePropertiesMESA(pMemoryResourceProperties);
+
+ return cmd_size;
+}
+
+static inline VkResult vn_decode_vkGetMemoryResourcePropertiesMESA_reply(struct vn_cs_decoder *dec, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
+{
+ VkCommandTypeEXT command_type;
+ vn_decode_VkCommandTypeEXT(dec, &command_type);
+ assert(command_type == VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT);
+
+ VkResult ret;
+ vn_decode_VkResult(dec, &ret);
+ /* skip device */
+ /* skip resourceId */
+ if (vn_decode_simple_pointer(dec)) {
+ vn_decode_VkMemoryResourcePropertiesMESA(dec, pMemoryResourceProperties);
+ } else {
+ pMemoryResourceProperties = NULL;
+ }
+
+ return ret;
+}
+
static inline void vn_submit_vkSetReplyCommandStreamMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, const VkCommandStreamDescriptionMESA* pStream, struct vn_instance_submit_command *submit)
{
uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
free(cmd_data);
}
+static inline void vn_submit_vkGetMemoryResourcePropertiesMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties, 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_vkGetMemoryResourcePropertiesMESA(device, resourceId, pMemoryResourceProperties);
+ if (cmd_size > sizeof(local_cmd_data)) {
+ cmd_data = malloc(cmd_size);
+ if (!cmd_data)
+ cmd_size = 0;
+ }
+
+ submit->command = VN_CS_ENCODER_INITIALIZER(cmd_data, cmd_size);
+ if (cmd_size)
+ vn_encode_vkGetMemoryResourcePropertiesMESA(&submit->command, cmd_flags, device, resourceId, pMemoryResourceProperties);
+ submit->reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetMemoryResourcePropertiesMESA_reply(device, resourceId, pMemoryResourceProperties) : 0;
+ vn_instance_submit_command(vn_instance, submit);
+
+ if (cmd_data != local_cmd_data)
+ free(cmd_data);
+}
+
static inline void vn_call_vkSetReplyCommandStreamMESA(struct vn_instance *vn_instance, const VkCommandStreamDescriptionMESA* pStream)
{
struct vn_instance_submit_command submit;
vn_submit_vkWriteRingExtraMESA(vn_instance, 0, ring, offset, value, &submit);
}
+static inline VkResult vn_call_vkGetMemoryResourcePropertiesMESA(struct vn_instance *vn_instance, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
+{
+ struct vn_instance_submit_command submit;
+ vn_submit_vkGetMemoryResourcePropertiesMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, resourceId, pMemoryResourceProperties, &submit);
+ if (submit.reply_bo) {
+ const VkResult ret = vn_decode_vkGetMemoryResourcePropertiesMESA_reply(&submit.reply, device, resourceId, pMemoryResourceProperties);
+ vn_renderer_bo_unref(submit.reply_bo);
+ return ret;
+ } else {
+ return VK_ERROR_OUT_OF_HOST_MEMORY;
+ }
+}
+
+static inline void vn_async_vkGetMemoryResourcePropertiesMESA(struct vn_instance *vn_instance, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
+{
+ struct vn_instance_submit_command submit;
+ vn_submit_vkGetMemoryResourcePropertiesMESA(vn_instance, 0, device, resourceId, pMemoryResourceProperties, &submit);
+}
+
#endif /* VN_PROTOCOL_DRIVER_TRANSPORT_H */