1bf215546Sopenharmony_ci/* This file is generated by venus-protocol.  See vn_protocol_driver.h. */
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ci/*
4bf215546Sopenharmony_ci * Copyright 2020 Google LLC
5bf215546Sopenharmony_ci * SPDX-License-Identifier: MIT
6bf215546Sopenharmony_ci */
7bf215546Sopenharmony_ci
8bf215546Sopenharmony_ci#ifndef VN_PROTOCOL_DRIVER_IMAGE_H
9bf215546Sopenharmony_ci#define VN_PROTOCOL_DRIVER_IMAGE_H
10bf215546Sopenharmony_ci
11bf215546Sopenharmony_ci#include "vn_instance.h"
12bf215546Sopenharmony_ci#include "vn_protocol_driver_structs.h"
13bf215546Sopenharmony_ci
14bf215546Sopenharmony_ci/* struct VkSparseImageMemoryRequirements */
15bf215546Sopenharmony_ci
16bf215546Sopenharmony_cistatic inline size_t
17bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements(const VkSparseImageMemoryRequirements *val)
18bf215546Sopenharmony_ci{
19bf215546Sopenharmony_ci    size_t size = 0;
20bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageFormatProperties(&val->formatProperties);
21bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->imageMipTailFirstLod);
22bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->imageMipTailSize);
23bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->imageMipTailOffset);
24bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->imageMipTailStride);
25bf215546Sopenharmony_ci    return size;
26bf215546Sopenharmony_ci}
27bf215546Sopenharmony_ci
28bf215546Sopenharmony_cistatic inline void
29bf215546Sopenharmony_civn_decode_VkSparseImageMemoryRequirements(struct vn_cs_decoder *dec, VkSparseImageMemoryRequirements *val)
30bf215546Sopenharmony_ci{
31bf215546Sopenharmony_ci    vn_decode_VkSparseImageFormatProperties(dec, &val->formatProperties);
32bf215546Sopenharmony_ci    vn_decode_uint32_t(dec, &val->imageMipTailFirstLod);
33bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->imageMipTailSize);
34bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->imageMipTailOffset);
35bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->imageMipTailStride);
36bf215546Sopenharmony_ci}
37bf215546Sopenharmony_ci
38bf215546Sopenharmony_cistatic inline size_t
39bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements_partial(const VkSparseImageMemoryRequirements *val)
40bf215546Sopenharmony_ci{
41bf215546Sopenharmony_ci    size_t size = 0;
42bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageFormatProperties_partial(&val->formatProperties);
43bf215546Sopenharmony_ci    /* skip val->imageMipTailFirstLod */
44bf215546Sopenharmony_ci    /* skip val->imageMipTailSize */
45bf215546Sopenharmony_ci    /* skip val->imageMipTailOffset */
46bf215546Sopenharmony_ci    /* skip val->imageMipTailStride */
47bf215546Sopenharmony_ci    return size;
48bf215546Sopenharmony_ci}
49bf215546Sopenharmony_ci
50bf215546Sopenharmony_cistatic inline void
51bf215546Sopenharmony_civn_encode_VkSparseImageMemoryRequirements_partial(struct vn_cs_encoder *enc, const VkSparseImageMemoryRequirements *val)
52bf215546Sopenharmony_ci{
53bf215546Sopenharmony_ci    vn_encode_VkSparseImageFormatProperties_partial(enc, &val->formatProperties);
54bf215546Sopenharmony_ci    /* skip val->imageMipTailFirstLod */
55bf215546Sopenharmony_ci    /* skip val->imageMipTailSize */
56bf215546Sopenharmony_ci    /* skip val->imageMipTailOffset */
57bf215546Sopenharmony_ci    /* skip val->imageMipTailStride */
58bf215546Sopenharmony_ci}
59bf215546Sopenharmony_ci
60bf215546Sopenharmony_ci/* struct VkExternalMemoryImageCreateInfo chain */
61bf215546Sopenharmony_ci
62bf215546Sopenharmony_cistatic inline size_t
63bf215546Sopenharmony_civn_sizeof_VkExternalMemoryImageCreateInfo_pnext(const void *val)
64bf215546Sopenharmony_ci{
65bf215546Sopenharmony_ci    /* no known/supported struct */
66bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
67bf215546Sopenharmony_ci}
68bf215546Sopenharmony_ci
69bf215546Sopenharmony_cistatic inline size_t
70bf215546Sopenharmony_civn_sizeof_VkExternalMemoryImageCreateInfo_self(const VkExternalMemoryImageCreateInfo *val)
71bf215546Sopenharmony_ci{
72bf215546Sopenharmony_ci    size_t size = 0;
73bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
74bf215546Sopenharmony_ci    size += vn_sizeof_VkFlags(&val->handleTypes);
75bf215546Sopenharmony_ci    return size;
76bf215546Sopenharmony_ci}
77bf215546Sopenharmony_ci
78bf215546Sopenharmony_cistatic inline size_t
79bf215546Sopenharmony_civn_sizeof_VkExternalMemoryImageCreateInfo(const VkExternalMemoryImageCreateInfo *val)
80bf215546Sopenharmony_ci{
81bf215546Sopenharmony_ci    size_t size = 0;
82bf215546Sopenharmony_ci
83bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
84bf215546Sopenharmony_ci    size += vn_sizeof_VkExternalMemoryImageCreateInfo_pnext(val->pNext);
85bf215546Sopenharmony_ci    size += vn_sizeof_VkExternalMemoryImageCreateInfo_self(val);
86bf215546Sopenharmony_ci
87bf215546Sopenharmony_ci    return size;
88bf215546Sopenharmony_ci}
89bf215546Sopenharmony_ci
90bf215546Sopenharmony_cistatic inline void
91bf215546Sopenharmony_civn_encode_VkExternalMemoryImageCreateInfo_pnext(struct vn_cs_encoder *enc, const void *val)
92bf215546Sopenharmony_ci{
93bf215546Sopenharmony_ci    /* no known/supported struct */
94bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
95bf215546Sopenharmony_ci}
96bf215546Sopenharmony_ci
97bf215546Sopenharmony_cistatic inline void
98bf215546Sopenharmony_civn_encode_VkExternalMemoryImageCreateInfo_self(struct vn_cs_encoder *enc, const VkExternalMemoryImageCreateInfo *val)
99bf215546Sopenharmony_ci{
100bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
101bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &val->handleTypes);
102bf215546Sopenharmony_ci}
103bf215546Sopenharmony_ci
104bf215546Sopenharmony_cistatic inline void
105bf215546Sopenharmony_civn_encode_VkExternalMemoryImageCreateInfo(struct vn_cs_encoder *enc, const VkExternalMemoryImageCreateInfo *val)
106bf215546Sopenharmony_ci{
107bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO);
108bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO });
109bf215546Sopenharmony_ci    vn_encode_VkExternalMemoryImageCreateInfo_pnext(enc, val->pNext);
110bf215546Sopenharmony_ci    vn_encode_VkExternalMemoryImageCreateInfo_self(enc, val);
111bf215546Sopenharmony_ci}
112bf215546Sopenharmony_ci
113bf215546Sopenharmony_ci/* struct VkImageDrmFormatModifierListCreateInfoEXT chain */
114bf215546Sopenharmony_ci
115bf215546Sopenharmony_cistatic inline size_t
116bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierListCreateInfoEXT_pnext(const void *val)
117bf215546Sopenharmony_ci{
118bf215546Sopenharmony_ci    /* no known/supported struct */
119bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
120bf215546Sopenharmony_ci}
121bf215546Sopenharmony_ci
122bf215546Sopenharmony_cistatic inline size_t
123bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierListCreateInfoEXT_self(const VkImageDrmFormatModifierListCreateInfoEXT *val)
124bf215546Sopenharmony_ci{
125bf215546Sopenharmony_ci    size_t size = 0;
126bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
127bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->drmFormatModifierCount);
128bf215546Sopenharmony_ci    if (val->pDrmFormatModifiers) {
129bf215546Sopenharmony_ci        size += vn_sizeof_array_size(val->drmFormatModifierCount);
130bf215546Sopenharmony_ci        size += vn_sizeof_uint64_t_array(val->pDrmFormatModifiers, val->drmFormatModifierCount);
131bf215546Sopenharmony_ci    } else {
132bf215546Sopenharmony_ci        size += vn_sizeof_array_size(0);
133bf215546Sopenharmony_ci    }
134bf215546Sopenharmony_ci    return size;
135bf215546Sopenharmony_ci}
136bf215546Sopenharmony_ci
137bf215546Sopenharmony_cistatic inline size_t
138bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierListCreateInfoEXT(const VkImageDrmFormatModifierListCreateInfoEXT *val)
139bf215546Sopenharmony_ci{
140bf215546Sopenharmony_ci    size_t size = 0;
141bf215546Sopenharmony_ci
142bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
143bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierListCreateInfoEXT_pnext(val->pNext);
144bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierListCreateInfoEXT_self(val);
145bf215546Sopenharmony_ci
146bf215546Sopenharmony_ci    return size;
147bf215546Sopenharmony_ci}
148bf215546Sopenharmony_ci
149bf215546Sopenharmony_cistatic inline void
150bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierListCreateInfoEXT_pnext(struct vn_cs_encoder *enc, const void *val)
151bf215546Sopenharmony_ci{
152bf215546Sopenharmony_ci    /* no known/supported struct */
153bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
154bf215546Sopenharmony_ci}
155bf215546Sopenharmony_ci
156bf215546Sopenharmony_cistatic inline void
157bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierListCreateInfoEXT_self(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierListCreateInfoEXT *val)
158bf215546Sopenharmony_ci{
159bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
160bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->drmFormatModifierCount);
161bf215546Sopenharmony_ci    if (val->pDrmFormatModifiers) {
162bf215546Sopenharmony_ci        vn_encode_array_size(enc, val->drmFormatModifierCount);
163bf215546Sopenharmony_ci        vn_encode_uint64_t_array(enc, val->pDrmFormatModifiers, val->drmFormatModifierCount);
164bf215546Sopenharmony_ci    } else {
165bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
166bf215546Sopenharmony_ci    }
167bf215546Sopenharmony_ci}
168bf215546Sopenharmony_ci
169bf215546Sopenharmony_cistatic inline void
170bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierListCreateInfoEXT(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierListCreateInfoEXT *val)
171bf215546Sopenharmony_ci{
172bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT);
173bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT });
174bf215546Sopenharmony_ci    vn_encode_VkImageDrmFormatModifierListCreateInfoEXT_pnext(enc, val->pNext);
175bf215546Sopenharmony_ci    vn_encode_VkImageDrmFormatModifierListCreateInfoEXT_self(enc, val);
176bf215546Sopenharmony_ci}
177bf215546Sopenharmony_ci
178bf215546Sopenharmony_ci/* struct VkSubresourceLayout */
179bf215546Sopenharmony_ci
180bf215546Sopenharmony_cistatic inline size_t
181bf215546Sopenharmony_civn_sizeof_VkSubresourceLayout(const VkSubresourceLayout *val)
182bf215546Sopenharmony_ci{
183bf215546Sopenharmony_ci    size_t size = 0;
184bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->offset);
185bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->size);
186bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->rowPitch);
187bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->arrayPitch);
188bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->depthPitch);
189bf215546Sopenharmony_ci    return size;
190bf215546Sopenharmony_ci}
191bf215546Sopenharmony_ci
192bf215546Sopenharmony_cistatic inline void
193bf215546Sopenharmony_civn_encode_VkSubresourceLayout(struct vn_cs_encoder *enc, const VkSubresourceLayout *val)
194bf215546Sopenharmony_ci{
195bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &val->offset);
196bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &val->size);
197bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &val->rowPitch);
198bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &val->arrayPitch);
199bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &val->depthPitch);
200bf215546Sopenharmony_ci}
201bf215546Sopenharmony_ci
202bf215546Sopenharmony_cistatic inline void
203bf215546Sopenharmony_civn_decode_VkSubresourceLayout(struct vn_cs_decoder *dec, VkSubresourceLayout *val)
204bf215546Sopenharmony_ci{
205bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->offset);
206bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->size);
207bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->rowPitch);
208bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->arrayPitch);
209bf215546Sopenharmony_ci    vn_decode_VkDeviceSize(dec, &val->depthPitch);
210bf215546Sopenharmony_ci}
211bf215546Sopenharmony_ci
212bf215546Sopenharmony_cistatic inline size_t
213bf215546Sopenharmony_civn_sizeof_VkSubresourceLayout_partial(const VkSubresourceLayout *val)
214bf215546Sopenharmony_ci{
215bf215546Sopenharmony_ci    size_t size = 0;
216bf215546Sopenharmony_ci    /* skip val->offset */
217bf215546Sopenharmony_ci    /* skip val->size */
218bf215546Sopenharmony_ci    /* skip val->rowPitch */
219bf215546Sopenharmony_ci    /* skip val->arrayPitch */
220bf215546Sopenharmony_ci    /* skip val->depthPitch */
221bf215546Sopenharmony_ci    return size;
222bf215546Sopenharmony_ci}
223bf215546Sopenharmony_ci
224bf215546Sopenharmony_cistatic inline void
225bf215546Sopenharmony_civn_encode_VkSubresourceLayout_partial(struct vn_cs_encoder *enc, const VkSubresourceLayout *val)
226bf215546Sopenharmony_ci{
227bf215546Sopenharmony_ci    /* skip val->offset */
228bf215546Sopenharmony_ci    /* skip val->size */
229bf215546Sopenharmony_ci    /* skip val->rowPitch */
230bf215546Sopenharmony_ci    /* skip val->arrayPitch */
231bf215546Sopenharmony_ci    /* skip val->depthPitch */
232bf215546Sopenharmony_ci}
233bf215546Sopenharmony_ci
234bf215546Sopenharmony_ci/* struct VkImageDrmFormatModifierExplicitCreateInfoEXT chain */
235bf215546Sopenharmony_ci
236bf215546Sopenharmony_cistatic inline size_t
237bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierExplicitCreateInfoEXT_pnext(const void *val)
238bf215546Sopenharmony_ci{
239bf215546Sopenharmony_ci    /* no known/supported struct */
240bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
241bf215546Sopenharmony_ci}
242bf215546Sopenharmony_ci
243bf215546Sopenharmony_cistatic inline size_t
244bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierExplicitCreateInfoEXT_self(const VkImageDrmFormatModifierExplicitCreateInfoEXT *val)
245bf215546Sopenharmony_ci{
246bf215546Sopenharmony_ci    size_t size = 0;
247bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
248bf215546Sopenharmony_ci    size += vn_sizeof_uint64_t(&val->drmFormatModifier);
249bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->drmFormatModifierPlaneCount);
250bf215546Sopenharmony_ci    if (val->pPlaneLayouts) {
251bf215546Sopenharmony_ci        size += vn_sizeof_array_size(val->drmFormatModifierPlaneCount);
252bf215546Sopenharmony_ci        for (uint32_t i = 0; i < val->drmFormatModifierPlaneCount; i++)
253bf215546Sopenharmony_ci            size += vn_sizeof_VkSubresourceLayout(&val->pPlaneLayouts[i]);
254bf215546Sopenharmony_ci    } else {
255bf215546Sopenharmony_ci        size += vn_sizeof_array_size(0);
256bf215546Sopenharmony_ci    }
257bf215546Sopenharmony_ci    return size;
258bf215546Sopenharmony_ci}
259bf215546Sopenharmony_ci
260bf215546Sopenharmony_cistatic inline size_t
261bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierExplicitCreateInfoEXT(const VkImageDrmFormatModifierExplicitCreateInfoEXT *val)
262bf215546Sopenharmony_ci{
263bf215546Sopenharmony_ci    size_t size = 0;
264bf215546Sopenharmony_ci
265bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
266bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierExplicitCreateInfoEXT_pnext(val->pNext);
267bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierExplicitCreateInfoEXT_self(val);
268bf215546Sopenharmony_ci
269bf215546Sopenharmony_ci    return size;
270bf215546Sopenharmony_ci}
271bf215546Sopenharmony_ci
272bf215546Sopenharmony_cistatic inline void
273bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierExplicitCreateInfoEXT_pnext(struct vn_cs_encoder *enc, const void *val)
274bf215546Sopenharmony_ci{
275bf215546Sopenharmony_ci    /* no known/supported struct */
276bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
277bf215546Sopenharmony_ci}
278bf215546Sopenharmony_ci
279bf215546Sopenharmony_cistatic inline void
280bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierExplicitCreateInfoEXT_self(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierExplicitCreateInfoEXT *val)
281bf215546Sopenharmony_ci{
282bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
283bf215546Sopenharmony_ci    vn_encode_uint64_t(enc, &val->drmFormatModifier);
284bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->drmFormatModifierPlaneCount);
285bf215546Sopenharmony_ci    if (val->pPlaneLayouts) {
286bf215546Sopenharmony_ci        vn_encode_array_size(enc, val->drmFormatModifierPlaneCount);
287bf215546Sopenharmony_ci        for (uint32_t i = 0; i < val->drmFormatModifierPlaneCount; i++)
288bf215546Sopenharmony_ci            vn_encode_VkSubresourceLayout(enc, &val->pPlaneLayouts[i]);
289bf215546Sopenharmony_ci    } else {
290bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
291bf215546Sopenharmony_ci    }
292bf215546Sopenharmony_ci}
293bf215546Sopenharmony_ci
294bf215546Sopenharmony_cistatic inline void
295bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierExplicitCreateInfoEXT(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierExplicitCreateInfoEXT *val)
296bf215546Sopenharmony_ci{
297bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT);
298bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT });
299bf215546Sopenharmony_ci    vn_encode_VkImageDrmFormatModifierExplicitCreateInfoEXT_pnext(enc, val->pNext);
300bf215546Sopenharmony_ci    vn_encode_VkImageDrmFormatModifierExplicitCreateInfoEXT_self(enc, val);
301bf215546Sopenharmony_ci}
302bf215546Sopenharmony_ci
303bf215546Sopenharmony_ci/* struct VkImageCreateInfo chain */
304bf215546Sopenharmony_ci
305bf215546Sopenharmony_cistatic inline size_t
306bf215546Sopenharmony_civn_sizeof_VkImageCreateInfo_pnext(const void *val)
307bf215546Sopenharmony_ci{
308bf215546Sopenharmony_ci    const VkBaseInStructure *pnext = val;
309bf215546Sopenharmony_ci    size_t size = 0;
310bf215546Sopenharmony_ci
311bf215546Sopenharmony_ci    while (pnext) {
312bf215546Sopenharmony_ci        switch ((int32_t)pnext->sType) {
313bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO:
314bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
315bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
316bf215546Sopenharmony_ci            size += vn_sizeof_VkImageCreateInfo_pnext(pnext->pNext);
317bf215546Sopenharmony_ci            size += vn_sizeof_VkExternalMemoryImageCreateInfo_self((const VkExternalMemoryImageCreateInfo *)pnext);
318bf215546Sopenharmony_ci            return size;
319bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO:
320bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
321bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
322bf215546Sopenharmony_ci            size += vn_sizeof_VkImageCreateInfo_pnext(pnext->pNext);
323bf215546Sopenharmony_ci            size += vn_sizeof_VkImageFormatListCreateInfo_self((const VkImageFormatListCreateInfo *)pnext);
324bf215546Sopenharmony_ci            return size;
325bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT:
326bf215546Sopenharmony_ci            if (!vn_cs_renderer_protocol_has_extension(159 /* VK_EXT_image_drm_format_modifier */))
327bf215546Sopenharmony_ci                break;
328bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
329bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
330bf215546Sopenharmony_ci            size += vn_sizeof_VkImageCreateInfo_pnext(pnext->pNext);
331bf215546Sopenharmony_ci            size += vn_sizeof_VkImageDrmFormatModifierListCreateInfoEXT_self((const VkImageDrmFormatModifierListCreateInfoEXT *)pnext);
332bf215546Sopenharmony_ci            return size;
333bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT:
334bf215546Sopenharmony_ci            if (!vn_cs_renderer_protocol_has_extension(159 /* VK_EXT_image_drm_format_modifier */))
335bf215546Sopenharmony_ci                break;
336bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
337bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
338bf215546Sopenharmony_ci            size += vn_sizeof_VkImageCreateInfo_pnext(pnext->pNext);
339bf215546Sopenharmony_ci            size += vn_sizeof_VkImageDrmFormatModifierExplicitCreateInfoEXT_self((const VkImageDrmFormatModifierExplicitCreateInfoEXT *)pnext);
340bf215546Sopenharmony_ci            return size;
341bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO:
342bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
343bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
344bf215546Sopenharmony_ci            size += vn_sizeof_VkImageCreateInfo_pnext(pnext->pNext);
345bf215546Sopenharmony_ci            size += vn_sizeof_VkImageStencilUsageCreateInfo_self((const VkImageStencilUsageCreateInfo *)pnext);
346bf215546Sopenharmony_ci            return size;
347bf215546Sopenharmony_ci        default:
348bf215546Sopenharmony_ci            /* ignore unknown/unsupported struct */
349bf215546Sopenharmony_ci            break;
350bf215546Sopenharmony_ci        }
351bf215546Sopenharmony_ci        pnext = pnext->pNext;
352bf215546Sopenharmony_ci    }
353bf215546Sopenharmony_ci
354bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
355bf215546Sopenharmony_ci}
356bf215546Sopenharmony_ci
357bf215546Sopenharmony_cistatic inline size_t
358bf215546Sopenharmony_civn_sizeof_VkImageCreateInfo_self(const VkImageCreateInfo *val)
359bf215546Sopenharmony_ci{
360bf215546Sopenharmony_ci    size_t size = 0;
361bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
362bf215546Sopenharmony_ci    size += vn_sizeof_VkFlags(&val->flags);
363bf215546Sopenharmony_ci    size += vn_sizeof_VkImageType(&val->imageType);
364bf215546Sopenharmony_ci    size += vn_sizeof_VkFormat(&val->format);
365bf215546Sopenharmony_ci    size += vn_sizeof_VkExtent3D(&val->extent);
366bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->mipLevels);
367bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->arrayLayers);
368bf215546Sopenharmony_ci    size += vn_sizeof_VkSampleCountFlagBits(&val->samples);
369bf215546Sopenharmony_ci    size += vn_sizeof_VkImageTiling(&val->tiling);
370bf215546Sopenharmony_ci    size += vn_sizeof_VkFlags(&val->usage);
371bf215546Sopenharmony_ci    size += vn_sizeof_VkSharingMode(&val->sharingMode);
372bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->queueFamilyIndexCount);
373bf215546Sopenharmony_ci    if (val->pQueueFamilyIndices) {
374bf215546Sopenharmony_ci        size += vn_sizeof_array_size(val->queueFamilyIndexCount);
375bf215546Sopenharmony_ci        size += vn_sizeof_uint32_t_array(val->pQueueFamilyIndices, val->queueFamilyIndexCount);
376bf215546Sopenharmony_ci    } else {
377bf215546Sopenharmony_ci        size += vn_sizeof_array_size(0);
378bf215546Sopenharmony_ci    }
379bf215546Sopenharmony_ci    size += vn_sizeof_VkImageLayout(&val->initialLayout);
380bf215546Sopenharmony_ci    return size;
381bf215546Sopenharmony_ci}
382bf215546Sopenharmony_ci
383bf215546Sopenharmony_cistatic inline size_t
384bf215546Sopenharmony_civn_sizeof_VkImageCreateInfo(const VkImageCreateInfo *val)
385bf215546Sopenharmony_ci{
386bf215546Sopenharmony_ci    size_t size = 0;
387bf215546Sopenharmony_ci
388bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
389bf215546Sopenharmony_ci    size += vn_sizeof_VkImageCreateInfo_pnext(val->pNext);
390bf215546Sopenharmony_ci    size += vn_sizeof_VkImageCreateInfo_self(val);
391bf215546Sopenharmony_ci
392bf215546Sopenharmony_ci    return size;
393bf215546Sopenharmony_ci}
394bf215546Sopenharmony_ci
395bf215546Sopenharmony_cistatic inline void
396bf215546Sopenharmony_civn_encode_VkImageCreateInfo_pnext(struct vn_cs_encoder *enc, const void *val)
397bf215546Sopenharmony_ci{
398bf215546Sopenharmony_ci    const VkBaseInStructure *pnext = val;
399bf215546Sopenharmony_ci
400bf215546Sopenharmony_ci    while (pnext) {
401bf215546Sopenharmony_ci        switch ((int32_t)pnext->sType) {
402bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO:
403bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
404bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
405bf215546Sopenharmony_ci            vn_encode_VkImageCreateInfo_pnext(enc, pnext->pNext);
406bf215546Sopenharmony_ci            vn_encode_VkExternalMemoryImageCreateInfo_self(enc, (const VkExternalMemoryImageCreateInfo *)pnext);
407bf215546Sopenharmony_ci            return;
408bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO:
409bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
410bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
411bf215546Sopenharmony_ci            vn_encode_VkImageCreateInfo_pnext(enc, pnext->pNext);
412bf215546Sopenharmony_ci            vn_encode_VkImageFormatListCreateInfo_self(enc, (const VkImageFormatListCreateInfo *)pnext);
413bf215546Sopenharmony_ci            return;
414bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT:
415bf215546Sopenharmony_ci            if (!vn_cs_renderer_protocol_has_extension(159 /* VK_EXT_image_drm_format_modifier */))
416bf215546Sopenharmony_ci                break;
417bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
418bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
419bf215546Sopenharmony_ci            vn_encode_VkImageCreateInfo_pnext(enc, pnext->pNext);
420bf215546Sopenharmony_ci            vn_encode_VkImageDrmFormatModifierListCreateInfoEXT_self(enc, (const VkImageDrmFormatModifierListCreateInfoEXT *)pnext);
421bf215546Sopenharmony_ci            return;
422bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT:
423bf215546Sopenharmony_ci            if (!vn_cs_renderer_protocol_has_extension(159 /* VK_EXT_image_drm_format_modifier */))
424bf215546Sopenharmony_ci                break;
425bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
426bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
427bf215546Sopenharmony_ci            vn_encode_VkImageCreateInfo_pnext(enc, pnext->pNext);
428bf215546Sopenharmony_ci            vn_encode_VkImageDrmFormatModifierExplicitCreateInfoEXT_self(enc, (const VkImageDrmFormatModifierExplicitCreateInfoEXT *)pnext);
429bf215546Sopenharmony_ci            return;
430bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO:
431bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
432bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
433bf215546Sopenharmony_ci            vn_encode_VkImageCreateInfo_pnext(enc, pnext->pNext);
434bf215546Sopenharmony_ci            vn_encode_VkImageStencilUsageCreateInfo_self(enc, (const VkImageStencilUsageCreateInfo *)pnext);
435bf215546Sopenharmony_ci            return;
436bf215546Sopenharmony_ci        default:
437bf215546Sopenharmony_ci            /* ignore unknown/unsupported struct */
438bf215546Sopenharmony_ci            break;
439bf215546Sopenharmony_ci        }
440bf215546Sopenharmony_ci        pnext = pnext->pNext;
441bf215546Sopenharmony_ci    }
442bf215546Sopenharmony_ci
443bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
444bf215546Sopenharmony_ci}
445bf215546Sopenharmony_ci
446bf215546Sopenharmony_cistatic inline void
447bf215546Sopenharmony_civn_encode_VkImageCreateInfo_self(struct vn_cs_encoder *enc, const VkImageCreateInfo *val)
448bf215546Sopenharmony_ci{
449bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
450bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &val->flags);
451bf215546Sopenharmony_ci    vn_encode_VkImageType(enc, &val->imageType);
452bf215546Sopenharmony_ci    vn_encode_VkFormat(enc, &val->format);
453bf215546Sopenharmony_ci    vn_encode_VkExtent3D(enc, &val->extent);
454bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->mipLevels);
455bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->arrayLayers);
456bf215546Sopenharmony_ci    vn_encode_VkSampleCountFlagBits(enc, &val->samples);
457bf215546Sopenharmony_ci    vn_encode_VkImageTiling(enc, &val->tiling);
458bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &val->usage);
459bf215546Sopenharmony_ci    vn_encode_VkSharingMode(enc, &val->sharingMode);
460bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->queueFamilyIndexCount);
461bf215546Sopenharmony_ci    if (val->pQueueFamilyIndices) {
462bf215546Sopenharmony_ci        vn_encode_array_size(enc, val->queueFamilyIndexCount);
463bf215546Sopenharmony_ci        vn_encode_uint32_t_array(enc, val->pQueueFamilyIndices, val->queueFamilyIndexCount);
464bf215546Sopenharmony_ci    } else {
465bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
466bf215546Sopenharmony_ci    }
467bf215546Sopenharmony_ci    vn_encode_VkImageLayout(enc, &val->initialLayout);
468bf215546Sopenharmony_ci}
469bf215546Sopenharmony_ci
470bf215546Sopenharmony_cistatic inline void
471bf215546Sopenharmony_civn_encode_VkImageCreateInfo(struct vn_cs_encoder *enc, const VkImageCreateInfo *val)
472bf215546Sopenharmony_ci{
473bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO);
474bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO });
475bf215546Sopenharmony_ci    vn_encode_VkImageCreateInfo_pnext(enc, val->pNext);
476bf215546Sopenharmony_ci    vn_encode_VkImageCreateInfo_self(enc, val);
477bf215546Sopenharmony_ci}
478bf215546Sopenharmony_ci
479bf215546Sopenharmony_ci/* struct VkBindImageMemoryDeviceGroupInfo chain */
480bf215546Sopenharmony_ci
481bf215546Sopenharmony_cistatic inline size_t
482bf215546Sopenharmony_civn_sizeof_VkBindImageMemoryDeviceGroupInfo_pnext(const void *val)
483bf215546Sopenharmony_ci{
484bf215546Sopenharmony_ci    /* no known/supported struct */
485bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
486bf215546Sopenharmony_ci}
487bf215546Sopenharmony_ci
488bf215546Sopenharmony_cistatic inline size_t
489bf215546Sopenharmony_civn_sizeof_VkBindImageMemoryDeviceGroupInfo_self(const VkBindImageMemoryDeviceGroupInfo *val)
490bf215546Sopenharmony_ci{
491bf215546Sopenharmony_ci    size_t size = 0;
492bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
493bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->deviceIndexCount);
494bf215546Sopenharmony_ci    if (val->pDeviceIndices) {
495bf215546Sopenharmony_ci        size += vn_sizeof_array_size(val->deviceIndexCount);
496bf215546Sopenharmony_ci        size += vn_sizeof_uint32_t_array(val->pDeviceIndices, val->deviceIndexCount);
497bf215546Sopenharmony_ci    } else {
498bf215546Sopenharmony_ci        size += vn_sizeof_array_size(0);
499bf215546Sopenharmony_ci    }
500bf215546Sopenharmony_ci    size += vn_sizeof_uint32_t(&val->splitInstanceBindRegionCount);
501bf215546Sopenharmony_ci    if (val->pSplitInstanceBindRegions) {
502bf215546Sopenharmony_ci        size += vn_sizeof_array_size(val->splitInstanceBindRegionCount);
503bf215546Sopenharmony_ci        for (uint32_t i = 0; i < val->splitInstanceBindRegionCount; i++)
504bf215546Sopenharmony_ci            size += vn_sizeof_VkRect2D(&val->pSplitInstanceBindRegions[i]);
505bf215546Sopenharmony_ci    } else {
506bf215546Sopenharmony_ci        size += vn_sizeof_array_size(0);
507bf215546Sopenharmony_ci    }
508bf215546Sopenharmony_ci    return size;
509bf215546Sopenharmony_ci}
510bf215546Sopenharmony_ci
511bf215546Sopenharmony_cistatic inline size_t
512bf215546Sopenharmony_civn_sizeof_VkBindImageMemoryDeviceGroupInfo(const VkBindImageMemoryDeviceGroupInfo *val)
513bf215546Sopenharmony_ci{
514bf215546Sopenharmony_ci    size_t size = 0;
515bf215546Sopenharmony_ci
516bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
517bf215546Sopenharmony_ci    size += vn_sizeof_VkBindImageMemoryDeviceGroupInfo_pnext(val->pNext);
518bf215546Sopenharmony_ci    size += vn_sizeof_VkBindImageMemoryDeviceGroupInfo_self(val);
519bf215546Sopenharmony_ci
520bf215546Sopenharmony_ci    return size;
521bf215546Sopenharmony_ci}
522bf215546Sopenharmony_ci
523bf215546Sopenharmony_cistatic inline void
524bf215546Sopenharmony_civn_encode_VkBindImageMemoryDeviceGroupInfo_pnext(struct vn_cs_encoder *enc, const void *val)
525bf215546Sopenharmony_ci{
526bf215546Sopenharmony_ci    /* no known/supported struct */
527bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
528bf215546Sopenharmony_ci}
529bf215546Sopenharmony_ci
530bf215546Sopenharmony_cistatic inline void
531bf215546Sopenharmony_civn_encode_VkBindImageMemoryDeviceGroupInfo_self(struct vn_cs_encoder *enc, const VkBindImageMemoryDeviceGroupInfo *val)
532bf215546Sopenharmony_ci{
533bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
534bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->deviceIndexCount);
535bf215546Sopenharmony_ci    if (val->pDeviceIndices) {
536bf215546Sopenharmony_ci        vn_encode_array_size(enc, val->deviceIndexCount);
537bf215546Sopenharmony_ci        vn_encode_uint32_t_array(enc, val->pDeviceIndices, val->deviceIndexCount);
538bf215546Sopenharmony_ci    } else {
539bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
540bf215546Sopenharmony_ci    }
541bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &val->splitInstanceBindRegionCount);
542bf215546Sopenharmony_ci    if (val->pSplitInstanceBindRegions) {
543bf215546Sopenharmony_ci        vn_encode_array_size(enc, val->splitInstanceBindRegionCount);
544bf215546Sopenharmony_ci        for (uint32_t i = 0; i < val->splitInstanceBindRegionCount; i++)
545bf215546Sopenharmony_ci            vn_encode_VkRect2D(enc, &val->pSplitInstanceBindRegions[i]);
546bf215546Sopenharmony_ci    } else {
547bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
548bf215546Sopenharmony_ci    }
549bf215546Sopenharmony_ci}
550bf215546Sopenharmony_ci
551bf215546Sopenharmony_cistatic inline void
552bf215546Sopenharmony_civn_encode_VkBindImageMemoryDeviceGroupInfo(struct vn_cs_encoder *enc, const VkBindImageMemoryDeviceGroupInfo *val)
553bf215546Sopenharmony_ci{
554bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO);
555bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO });
556bf215546Sopenharmony_ci    vn_encode_VkBindImageMemoryDeviceGroupInfo_pnext(enc, val->pNext);
557bf215546Sopenharmony_ci    vn_encode_VkBindImageMemoryDeviceGroupInfo_self(enc, val);
558bf215546Sopenharmony_ci}
559bf215546Sopenharmony_ci
560bf215546Sopenharmony_ci/* struct VkBindImagePlaneMemoryInfo chain */
561bf215546Sopenharmony_ci
562bf215546Sopenharmony_cistatic inline size_t
563bf215546Sopenharmony_civn_sizeof_VkBindImagePlaneMemoryInfo_pnext(const void *val)
564bf215546Sopenharmony_ci{
565bf215546Sopenharmony_ci    /* no known/supported struct */
566bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
567bf215546Sopenharmony_ci}
568bf215546Sopenharmony_ci
569bf215546Sopenharmony_cistatic inline size_t
570bf215546Sopenharmony_civn_sizeof_VkBindImagePlaneMemoryInfo_self(const VkBindImagePlaneMemoryInfo *val)
571bf215546Sopenharmony_ci{
572bf215546Sopenharmony_ci    size_t size = 0;
573bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
574bf215546Sopenharmony_ci    size += vn_sizeof_VkImageAspectFlagBits(&val->planeAspect);
575bf215546Sopenharmony_ci    return size;
576bf215546Sopenharmony_ci}
577bf215546Sopenharmony_ci
578bf215546Sopenharmony_cistatic inline size_t
579bf215546Sopenharmony_civn_sizeof_VkBindImagePlaneMemoryInfo(const VkBindImagePlaneMemoryInfo *val)
580bf215546Sopenharmony_ci{
581bf215546Sopenharmony_ci    size_t size = 0;
582bf215546Sopenharmony_ci
583bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
584bf215546Sopenharmony_ci    size += vn_sizeof_VkBindImagePlaneMemoryInfo_pnext(val->pNext);
585bf215546Sopenharmony_ci    size += vn_sizeof_VkBindImagePlaneMemoryInfo_self(val);
586bf215546Sopenharmony_ci
587bf215546Sopenharmony_ci    return size;
588bf215546Sopenharmony_ci}
589bf215546Sopenharmony_ci
590bf215546Sopenharmony_cistatic inline void
591bf215546Sopenharmony_civn_encode_VkBindImagePlaneMemoryInfo_pnext(struct vn_cs_encoder *enc, const void *val)
592bf215546Sopenharmony_ci{
593bf215546Sopenharmony_ci    /* no known/supported struct */
594bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
595bf215546Sopenharmony_ci}
596bf215546Sopenharmony_ci
597bf215546Sopenharmony_cistatic inline void
598bf215546Sopenharmony_civn_encode_VkBindImagePlaneMemoryInfo_self(struct vn_cs_encoder *enc, const VkBindImagePlaneMemoryInfo *val)
599bf215546Sopenharmony_ci{
600bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
601bf215546Sopenharmony_ci    vn_encode_VkImageAspectFlagBits(enc, &val->planeAspect);
602bf215546Sopenharmony_ci}
603bf215546Sopenharmony_ci
604bf215546Sopenharmony_cistatic inline void
605bf215546Sopenharmony_civn_encode_VkBindImagePlaneMemoryInfo(struct vn_cs_encoder *enc, const VkBindImagePlaneMemoryInfo *val)
606bf215546Sopenharmony_ci{
607bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO);
608bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO });
609bf215546Sopenharmony_ci    vn_encode_VkBindImagePlaneMemoryInfo_pnext(enc, val->pNext);
610bf215546Sopenharmony_ci    vn_encode_VkBindImagePlaneMemoryInfo_self(enc, val);
611bf215546Sopenharmony_ci}
612bf215546Sopenharmony_ci
613bf215546Sopenharmony_ci/* struct VkBindImageMemoryInfo chain */
614bf215546Sopenharmony_ci
615bf215546Sopenharmony_cistatic inline size_t
616bf215546Sopenharmony_civn_sizeof_VkBindImageMemoryInfo_pnext(const void *val)
617bf215546Sopenharmony_ci{
618bf215546Sopenharmony_ci    const VkBaseInStructure *pnext = val;
619bf215546Sopenharmony_ci    size_t size = 0;
620bf215546Sopenharmony_ci
621bf215546Sopenharmony_ci    while (pnext) {
622bf215546Sopenharmony_ci        switch ((int32_t)pnext->sType) {
623bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
624bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
625bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
626bf215546Sopenharmony_ci            size += vn_sizeof_VkBindImageMemoryInfo_pnext(pnext->pNext);
627bf215546Sopenharmony_ci            size += vn_sizeof_VkBindImageMemoryDeviceGroupInfo_self((const VkBindImageMemoryDeviceGroupInfo *)pnext);
628bf215546Sopenharmony_ci            return size;
629bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
630bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
631bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
632bf215546Sopenharmony_ci            size += vn_sizeof_VkBindImageMemoryInfo_pnext(pnext->pNext);
633bf215546Sopenharmony_ci            size += vn_sizeof_VkBindImagePlaneMemoryInfo_self((const VkBindImagePlaneMemoryInfo *)pnext);
634bf215546Sopenharmony_ci            return size;
635bf215546Sopenharmony_ci        default:
636bf215546Sopenharmony_ci            /* ignore unknown/unsupported struct */
637bf215546Sopenharmony_ci            break;
638bf215546Sopenharmony_ci        }
639bf215546Sopenharmony_ci        pnext = pnext->pNext;
640bf215546Sopenharmony_ci    }
641bf215546Sopenharmony_ci
642bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
643bf215546Sopenharmony_ci}
644bf215546Sopenharmony_ci
645bf215546Sopenharmony_cistatic inline size_t
646bf215546Sopenharmony_civn_sizeof_VkBindImageMemoryInfo_self(const VkBindImageMemoryInfo *val)
647bf215546Sopenharmony_ci{
648bf215546Sopenharmony_ci    size_t size = 0;
649bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
650bf215546Sopenharmony_ci    size += vn_sizeof_VkImage(&val->image);
651bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceMemory(&val->memory);
652bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceSize(&val->memoryOffset);
653bf215546Sopenharmony_ci    return size;
654bf215546Sopenharmony_ci}
655bf215546Sopenharmony_ci
656bf215546Sopenharmony_cistatic inline size_t
657bf215546Sopenharmony_civn_sizeof_VkBindImageMemoryInfo(const VkBindImageMemoryInfo *val)
658bf215546Sopenharmony_ci{
659bf215546Sopenharmony_ci    size_t size = 0;
660bf215546Sopenharmony_ci
661bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
662bf215546Sopenharmony_ci    size += vn_sizeof_VkBindImageMemoryInfo_pnext(val->pNext);
663bf215546Sopenharmony_ci    size += vn_sizeof_VkBindImageMemoryInfo_self(val);
664bf215546Sopenharmony_ci
665bf215546Sopenharmony_ci    return size;
666bf215546Sopenharmony_ci}
667bf215546Sopenharmony_ci
668bf215546Sopenharmony_cistatic inline void
669bf215546Sopenharmony_civn_encode_VkBindImageMemoryInfo_pnext(struct vn_cs_encoder *enc, const void *val)
670bf215546Sopenharmony_ci{
671bf215546Sopenharmony_ci    const VkBaseInStructure *pnext = val;
672bf215546Sopenharmony_ci
673bf215546Sopenharmony_ci    while (pnext) {
674bf215546Sopenharmony_ci        switch ((int32_t)pnext->sType) {
675bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
676bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
677bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
678bf215546Sopenharmony_ci            vn_encode_VkBindImageMemoryInfo_pnext(enc, pnext->pNext);
679bf215546Sopenharmony_ci            vn_encode_VkBindImageMemoryDeviceGroupInfo_self(enc, (const VkBindImageMemoryDeviceGroupInfo *)pnext);
680bf215546Sopenharmony_ci            return;
681bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
682bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
683bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
684bf215546Sopenharmony_ci            vn_encode_VkBindImageMemoryInfo_pnext(enc, pnext->pNext);
685bf215546Sopenharmony_ci            vn_encode_VkBindImagePlaneMemoryInfo_self(enc, (const VkBindImagePlaneMemoryInfo *)pnext);
686bf215546Sopenharmony_ci            return;
687bf215546Sopenharmony_ci        default:
688bf215546Sopenharmony_ci            /* ignore unknown/unsupported struct */
689bf215546Sopenharmony_ci            break;
690bf215546Sopenharmony_ci        }
691bf215546Sopenharmony_ci        pnext = pnext->pNext;
692bf215546Sopenharmony_ci    }
693bf215546Sopenharmony_ci
694bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
695bf215546Sopenharmony_ci}
696bf215546Sopenharmony_ci
697bf215546Sopenharmony_cistatic inline void
698bf215546Sopenharmony_civn_encode_VkBindImageMemoryInfo_self(struct vn_cs_encoder *enc, const VkBindImageMemoryInfo *val)
699bf215546Sopenharmony_ci{
700bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
701bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &val->image);
702bf215546Sopenharmony_ci    vn_encode_VkDeviceMemory(enc, &val->memory);
703bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &val->memoryOffset);
704bf215546Sopenharmony_ci}
705bf215546Sopenharmony_ci
706bf215546Sopenharmony_cistatic inline void
707bf215546Sopenharmony_civn_encode_VkBindImageMemoryInfo(struct vn_cs_encoder *enc, const VkBindImageMemoryInfo *val)
708bf215546Sopenharmony_ci{
709bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO);
710bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO });
711bf215546Sopenharmony_ci    vn_encode_VkBindImageMemoryInfo_pnext(enc, val->pNext);
712bf215546Sopenharmony_ci    vn_encode_VkBindImageMemoryInfo_self(enc, val);
713bf215546Sopenharmony_ci}
714bf215546Sopenharmony_ci
715bf215546Sopenharmony_ci/* struct VkImagePlaneMemoryRequirementsInfo chain */
716bf215546Sopenharmony_ci
717bf215546Sopenharmony_cistatic inline size_t
718bf215546Sopenharmony_civn_sizeof_VkImagePlaneMemoryRequirementsInfo_pnext(const void *val)
719bf215546Sopenharmony_ci{
720bf215546Sopenharmony_ci    /* no known/supported struct */
721bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
722bf215546Sopenharmony_ci}
723bf215546Sopenharmony_ci
724bf215546Sopenharmony_cistatic inline size_t
725bf215546Sopenharmony_civn_sizeof_VkImagePlaneMemoryRequirementsInfo_self(const VkImagePlaneMemoryRequirementsInfo *val)
726bf215546Sopenharmony_ci{
727bf215546Sopenharmony_ci    size_t size = 0;
728bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
729bf215546Sopenharmony_ci    size += vn_sizeof_VkImageAspectFlagBits(&val->planeAspect);
730bf215546Sopenharmony_ci    return size;
731bf215546Sopenharmony_ci}
732bf215546Sopenharmony_ci
733bf215546Sopenharmony_cistatic inline size_t
734bf215546Sopenharmony_civn_sizeof_VkImagePlaneMemoryRequirementsInfo(const VkImagePlaneMemoryRequirementsInfo *val)
735bf215546Sopenharmony_ci{
736bf215546Sopenharmony_ci    size_t size = 0;
737bf215546Sopenharmony_ci
738bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
739bf215546Sopenharmony_ci    size += vn_sizeof_VkImagePlaneMemoryRequirementsInfo_pnext(val->pNext);
740bf215546Sopenharmony_ci    size += vn_sizeof_VkImagePlaneMemoryRequirementsInfo_self(val);
741bf215546Sopenharmony_ci
742bf215546Sopenharmony_ci    return size;
743bf215546Sopenharmony_ci}
744bf215546Sopenharmony_ci
745bf215546Sopenharmony_cistatic inline void
746bf215546Sopenharmony_civn_encode_VkImagePlaneMemoryRequirementsInfo_pnext(struct vn_cs_encoder *enc, const void *val)
747bf215546Sopenharmony_ci{
748bf215546Sopenharmony_ci    /* no known/supported struct */
749bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
750bf215546Sopenharmony_ci}
751bf215546Sopenharmony_ci
752bf215546Sopenharmony_cistatic inline void
753bf215546Sopenharmony_civn_encode_VkImagePlaneMemoryRequirementsInfo_self(struct vn_cs_encoder *enc, const VkImagePlaneMemoryRequirementsInfo *val)
754bf215546Sopenharmony_ci{
755bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
756bf215546Sopenharmony_ci    vn_encode_VkImageAspectFlagBits(enc, &val->planeAspect);
757bf215546Sopenharmony_ci}
758bf215546Sopenharmony_ci
759bf215546Sopenharmony_cistatic inline void
760bf215546Sopenharmony_civn_encode_VkImagePlaneMemoryRequirementsInfo(struct vn_cs_encoder *enc, const VkImagePlaneMemoryRequirementsInfo *val)
761bf215546Sopenharmony_ci{
762bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO);
763bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO });
764bf215546Sopenharmony_ci    vn_encode_VkImagePlaneMemoryRequirementsInfo_pnext(enc, val->pNext);
765bf215546Sopenharmony_ci    vn_encode_VkImagePlaneMemoryRequirementsInfo_self(enc, val);
766bf215546Sopenharmony_ci}
767bf215546Sopenharmony_ci
768bf215546Sopenharmony_ci/* struct VkImageMemoryRequirementsInfo2 chain */
769bf215546Sopenharmony_ci
770bf215546Sopenharmony_cistatic inline size_t
771bf215546Sopenharmony_civn_sizeof_VkImageMemoryRequirementsInfo2_pnext(const void *val)
772bf215546Sopenharmony_ci{
773bf215546Sopenharmony_ci    const VkBaseInStructure *pnext = val;
774bf215546Sopenharmony_ci    size_t size = 0;
775bf215546Sopenharmony_ci
776bf215546Sopenharmony_ci    while (pnext) {
777bf215546Sopenharmony_ci        switch ((int32_t)pnext->sType) {
778bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
779bf215546Sopenharmony_ci            size += vn_sizeof_simple_pointer(pnext);
780bf215546Sopenharmony_ci            size += vn_sizeof_VkStructureType(&pnext->sType);
781bf215546Sopenharmony_ci            size += vn_sizeof_VkImageMemoryRequirementsInfo2_pnext(pnext->pNext);
782bf215546Sopenharmony_ci            size += vn_sizeof_VkImagePlaneMemoryRequirementsInfo_self((const VkImagePlaneMemoryRequirementsInfo *)pnext);
783bf215546Sopenharmony_ci            return size;
784bf215546Sopenharmony_ci        default:
785bf215546Sopenharmony_ci            /* ignore unknown/unsupported struct */
786bf215546Sopenharmony_ci            break;
787bf215546Sopenharmony_ci        }
788bf215546Sopenharmony_ci        pnext = pnext->pNext;
789bf215546Sopenharmony_ci    }
790bf215546Sopenharmony_ci
791bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
792bf215546Sopenharmony_ci}
793bf215546Sopenharmony_ci
794bf215546Sopenharmony_cistatic inline size_t
795bf215546Sopenharmony_civn_sizeof_VkImageMemoryRequirementsInfo2_self(const VkImageMemoryRequirementsInfo2 *val)
796bf215546Sopenharmony_ci{
797bf215546Sopenharmony_ci    size_t size = 0;
798bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
799bf215546Sopenharmony_ci    size += vn_sizeof_VkImage(&val->image);
800bf215546Sopenharmony_ci    return size;
801bf215546Sopenharmony_ci}
802bf215546Sopenharmony_ci
803bf215546Sopenharmony_cistatic inline size_t
804bf215546Sopenharmony_civn_sizeof_VkImageMemoryRequirementsInfo2(const VkImageMemoryRequirementsInfo2 *val)
805bf215546Sopenharmony_ci{
806bf215546Sopenharmony_ci    size_t size = 0;
807bf215546Sopenharmony_ci
808bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
809bf215546Sopenharmony_ci    size += vn_sizeof_VkImageMemoryRequirementsInfo2_pnext(val->pNext);
810bf215546Sopenharmony_ci    size += vn_sizeof_VkImageMemoryRequirementsInfo2_self(val);
811bf215546Sopenharmony_ci
812bf215546Sopenharmony_ci    return size;
813bf215546Sopenharmony_ci}
814bf215546Sopenharmony_ci
815bf215546Sopenharmony_cistatic inline void
816bf215546Sopenharmony_civn_encode_VkImageMemoryRequirementsInfo2_pnext(struct vn_cs_encoder *enc, const void *val)
817bf215546Sopenharmony_ci{
818bf215546Sopenharmony_ci    const VkBaseInStructure *pnext = val;
819bf215546Sopenharmony_ci
820bf215546Sopenharmony_ci    while (pnext) {
821bf215546Sopenharmony_ci        switch ((int32_t)pnext->sType) {
822bf215546Sopenharmony_ci        case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
823bf215546Sopenharmony_ci            vn_encode_simple_pointer(enc, pnext);
824bf215546Sopenharmony_ci            vn_encode_VkStructureType(enc, &pnext->sType);
825bf215546Sopenharmony_ci            vn_encode_VkImageMemoryRequirementsInfo2_pnext(enc, pnext->pNext);
826bf215546Sopenharmony_ci            vn_encode_VkImagePlaneMemoryRequirementsInfo_self(enc, (const VkImagePlaneMemoryRequirementsInfo *)pnext);
827bf215546Sopenharmony_ci            return;
828bf215546Sopenharmony_ci        default:
829bf215546Sopenharmony_ci            /* ignore unknown/unsupported struct */
830bf215546Sopenharmony_ci            break;
831bf215546Sopenharmony_ci        }
832bf215546Sopenharmony_ci        pnext = pnext->pNext;
833bf215546Sopenharmony_ci    }
834bf215546Sopenharmony_ci
835bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
836bf215546Sopenharmony_ci}
837bf215546Sopenharmony_ci
838bf215546Sopenharmony_cistatic inline void
839bf215546Sopenharmony_civn_encode_VkImageMemoryRequirementsInfo2_self(struct vn_cs_encoder *enc, const VkImageMemoryRequirementsInfo2 *val)
840bf215546Sopenharmony_ci{
841bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
842bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &val->image);
843bf215546Sopenharmony_ci}
844bf215546Sopenharmony_ci
845bf215546Sopenharmony_cistatic inline void
846bf215546Sopenharmony_civn_encode_VkImageMemoryRequirementsInfo2(struct vn_cs_encoder *enc, const VkImageMemoryRequirementsInfo2 *val)
847bf215546Sopenharmony_ci{
848bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2);
849bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 });
850bf215546Sopenharmony_ci    vn_encode_VkImageMemoryRequirementsInfo2_pnext(enc, val->pNext);
851bf215546Sopenharmony_ci    vn_encode_VkImageMemoryRequirementsInfo2_self(enc, val);
852bf215546Sopenharmony_ci}
853bf215546Sopenharmony_ci
854bf215546Sopenharmony_ci/* struct VkImageSparseMemoryRequirementsInfo2 chain */
855bf215546Sopenharmony_ci
856bf215546Sopenharmony_cistatic inline size_t
857bf215546Sopenharmony_civn_sizeof_VkImageSparseMemoryRequirementsInfo2_pnext(const void *val)
858bf215546Sopenharmony_ci{
859bf215546Sopenharmony_ci    /* no known/supported struct */
860bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
861bf215546Sopenharmony_ci}
862bf215546Sopenharmony_ci
863bf215546Sopenharmony_cistatic inline size_t
864bf215546Sopenharmony_civn_sizeof_VkImageSparseMemoryRequirementsInfo2_self(const VkImageSparseMemoryRequirementsInfo2 *val)
865bf215546Sopenharmony_ci{
866bf215546Sopenharmony_ci    size_t size = 0;
867bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
868bf215546Sopenharmony_ci    size += vn_sizeof_VkImage(&val->image);
869bf215546Sopenharmony_ci    return size;
870bf215546Sopenharmony_ci}
871bf215546Sopenharmony_ci
872bf215546Sopenharmony_cistatic inline size_t
873bf215546Sopenharmony_civn_sizeof_VkImageSparseMemoryRequirementsInfo2(const VkImageSparseMemoryRequirementsInfo2 *val)
874bf215546Sopenharmony_ci{
875bf215546Sopenharmony_ci    size_t size = 0;
876bf215546Sopenharmony_ci
877bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
878bf215546Sopenharmony_ci    size += vn_sizeof_VkImageSparseMemoryRequirementsInfo2_pnext(val->pNext);
879bf215546Sopenharmony_ci    size += vn_sizeof_VkImageSparseMemoryRequirementsInfo2_self(val);
880bf215546Sopenharmony_ci
881bf215546Sopenharmony_ci    return size;
882bf215546Sopenharmony_ci}
883bf215546Sopenharmony_ci
884bf215546Sopenharmony_cistatic inline void
885bf215546Sopenharmony_civn_encode_VkImageSparseMemoryRequirementsInfo2_pnext(struct vn_cs_encoder *enc, const void *val)
886bf215546Sopenharmony_ci{
887bf215546Sopenharmony_ci    /* no known/supported struct */
888bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
889bf215546Sopenharmony_ci}
890bf215546Sopenharmony_ci
891bf215546Sopenharmony_cistatic inline void
892bf215546Sopenharmony_civn_encode_VkImageSparseMemoryRequirementsInfo2_self(struct vn_cs_encoder *enc, const VkImageSparseMemoryRequirementsInfo2 *val)
893bf215546Sopenharmony_ci{
894bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
895bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &val->image);
896bf215546Sopenharmony_ci}
897bf215546Sopenharmony_ci
898bf215546Sopenharmony_cistatic inline void
899bf215546Sopenharmony_civn_encode_VkImageSparseMemoryRequirementsInfo2(struct vn_cs_encoder *enc, const VkImageSparseMemoryRequirementsInfo2 *val)
900bf215546Sopenharmony_ci{
901bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2);
902bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 });
903bf215546Sopenharmony_ci    vn_encode_VkImageSparseMemoryRequirementsInfo2_pnext(enc, val->pNext);
904bf215546Sopenharmony_ci    vn_encode_VkImageSparseMemoryRequirementsInfo2_self(enc, val);
905bf215546Sopenharmony_ci}
906bf215546Sopenharmony_ci
907bf215546Sopenharmony_ci/* struct VkSparseImageMemoryRequirements2 chain */
908bf215546Sopenharmony_ci
909bf215546Sopenharmony_cistatic inline size_t
910bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements2_pnext(const void *val)
911bf215546Sopenharmony_ci{
912bf215546Sopenharmony_ci    /* no known/supported struct */
913bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
914bf215546Sopenharmony_ci}
915bf215546Sopenharmony_ci
916bf215546Sopenharmony_cistatic inline size_t
917bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements2_self(const VkSparseImageMemoryRequirements2 *val)
918bf215546Sopenharmony_ci{
919bf215546Sopenharmony_ci    size_t size = 0;
920bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
921bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageMemoryRequirements(&val->memoryRequirements);
922bf215546Sopenharmony_ci    return size;
923bf215546Sopenharmony_ci}
924bf215546Sopenharmony_ci
925bf215546Sopenharmony_cistatic inline size_t
926bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements2(const VkSparseImageMemoryRequirements2 *val)
927bf215546Sopenharmony_ci{
928bf215546Sopenharmony_ci    size_t size = 0;
929bf215546Sopenharmony_ci
930bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
931bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageMemoryRequirements2_pnext(val->pNext);
932bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageMemoryRequirements2_self(val);
933bf215546Sopenharmony_ci
934bf215546Sopenharmony_ci    return size;
935bf215546Sopenharmony_ci}
936bf215546Sopenharmony_ci
937bf215546Sopenharmony_cistatic inline void
938bf215546Sopenharmony_civn_decode_VkSparseImageMemoryRequirements2_pnext(struct vn_cs_decoder *dec, const void *val)
939bf215546Sopenharmony_ci{
940bf215546Sopenharmony_ci    /* no known/supported struct */
941bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec))
942bf215546Sopenharmony_ci        assert(false);
943bf215546Sopenharmony_ci}
944bf215546Sopenharmony_ci
945bf215546Sopenharmony_cistatic inline void
946bf215546Sopenharmony_civn_decode_VkSparseImageMemoryRequirements2_self(struct vn_cs_decoder *dec, VkSparseImageMemoryRequirements2 *val)
947bf215546Sopenharmony_ci{
948bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
949bf215546Sopenharmony_ci    vn_decode_VkSparseImageMemoryRequirements(dec, &val->memoryRequirements);
950bf215546Sopenharmony_ci}
951bf215546Sopenharmony_ci
952bf215546Sopenharmony_cistatic inline void
953bf215546Sopenharmony_civn_decode_VkSparseImageMemoryRequirements2(struct vn_cs_decoder *dec, VkSparseImageMemoryRequirements2 *val)
954bf215546Sopenharmony_ci{
955bf215546Sopenharmony_ci    VkStructureType stype;
956bf215546Sopenharmony_ci    vn_decode_VkStructureType(dec, &stype);
957bf215546Sopenharmony_ci    assert(stype == VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2);
958bf215546Sopenharmony_ci
959bf215546Sopenharmony_ci    assert(val->sType == stype);
960bf215546Sopenharmony_ci    vn_decode_VkSparseImageMemoryRequirements2_pnext(dec, val->pNext);
961bf215546Sopenharmony_ci    vn_decode_VkSparseImageMemoryRequirements2_self(dec, val);
962bf215546Sopenharmony_ci}
963bf215546Sopenharmony_ci
964bf215546Sopenharmony_cistatic inline size_t
965bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements2_pnext_partial(const void *val)
966bf215546Sopenharmony_ci{
967bf215546Sopenharmony_ci    /* no known/supported struct */
968bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
969bf215546Sopenharmony_ci}
970bf215546Sopenharmony_ci
971bf215546Sopenharmony_cistatic inline size_t
972bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements2_self_partial(const VkSparseImageMemoryRequirements2 *val)
973bf215546Sopenharmony_ci{
974bf215546Sopenharmony_ci    size_t size = 0;
975bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
976bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageMemoryRequirements_partial(&val->memoryRequirements);
977bf215546Sopenharmony_ci    return size;
978bf215546Sopenharmony_ci}
979bf215546Sopenharmony_ci
980bf215546Sopenharmony_cistatic inline size_t
981bf215546Sopenharmony_civn_sizeof_VkSparseImageMemoryRequirements2_partial(const VkSparseImageMemoryRequirements2 *val)
982bf215546Sopenharmony_ci{
983bf215546Sopenharmony_ci    size_t size = 0;
984bf215546Sopenharmony_ci
985bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
986bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageMemoryRequirements2_pnext_partial(val->pNext);
987bf215546Sopenharmony_ci    size += vn_sizeof_VkSparseImageMemoryRequirements2_self_partial(val);
988bf215546Sopenharmony_ci
989bf215546Sopenharmony_ci    return size;
990bf215546Sopenharmony_ci}
991bf215546Sopenharmony_ci
992bf215546Sopenharmony_cistatic inline void
993bf215546Sopenharmony_civn_encode_VkSparseImageMemoryRequirements2_pnext_partial(struct vn_cs_encoder *enc, const void *val)
994bf215546Sopenharmony_ci{
995bf215546Sopenharmony_ci    /* no known/supported struct */
996bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
997bf215546Sopenharmony_ci}
998bf215546Sopenharmony_ci
999bf215546Sopenharmony_cistatic inline void
1000bf215546Sopenharmony_civn_encode_VkSparseImageMemoryRequirements2_self_partial(struct vn_cs_encoder *enc, const VkSparseImageMemoryRequirements2 *val)
1001bf215546Sopenharmony_ci{
1002bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1003bf215546Sopenharmony_ci    vn_encode_VkSparseImageMemoryRequirements_partial(enc, &val->memoryRequirements);
1004bf215546Sopenharmony_ci}
1005bf215546Sopenharmony_ci
1006bf215546Sopenharmony_cistatic inline void
1007bf215546Sopenharmony_civn_encode_VkSparseImageMemoryRequirements2_partial(struct vn_cs_encoder *enc, const VkSparseImageMemoryRequirements2 *val)
1008bf215546Sopenharmony_ci{
1009bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2);
1010bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 });
1011bf215546Sopenharmony_ci    vn_encode_VkSparseImageMemoryRequirements2_pnext_partial(enc, val->pNext);
1012bf215546Sopenharmony_ci    vn_encode_VkSparseImageMemoryRequirements2_self_partial(enc, val);
1013bf215546Sopenharmony_ci}
1014bf215546Sopenharmony_ci
1015bf215546Sopenharmony_ci/* struct VkDeviceImageMemoryRequirements chain */
1016bf215546Sopenharmony_ci
1017bf215546Sopenharmony_cistatic inline size_t
1018bf215546Sopenharmony_civn_sizeof_VkDeviceImageMemoryRequirements_pnext(const void *val)
1019bf215546Sopenharmony_ci{
1020bf215546Sopenharmony_ci    /* no known/supported struct */
1021bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
1022bf215546Sopenharmony_ci}
1023bf215546Sopenharmony_ci
1024bf215546Sopenharmony_cistatic inline size_t
1025bf215546Sopenharmony_civn_sizeof_VkDeviceImageMemoryRequirements_self(const VkDeviceImageMemoryRequirements *val)
1026bf215546Sopenharmony_ci{
1027bf215546Sopenharmony_ci    size_t size = 0;
1028bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1029bf215546Sopenharmony_ci    size += vn_sizeof_simple_pointer(val->pCreateInfo);
1030bf215546Sopenharmony_ci    if (val->pCreateInfo)
1031bf215546Sopenharmony_ci        size += vn_sizeof_VkImageCreateInfo(val->pCreateInfo);
1032bf215546Sopenharmony_ci    size += vn_sizeof_VkImageAspectFlagBits(&val->planeAspect);
1033bf215546Sopenharmony_ci    return size;
1034bf215546Sopenharmony_ci}
1035bf215546Sopenharmony_ci
1036bf215546Sopenharmony_cistatic inline size_t
1037bf215546Sopenharmony_civn_sizeof_VkDeviceImageMemoryRequirements(const VkDeviceImageMemoryRequirements *val)
1038bf215546Sopenharmony_ci{
1039bf215546Sopenharmony_ci    size_t size = 0;
1040bf215546Sopenharmony_ci
1041bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
1042bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceImageMemoryRequirements_pnext(val->pNext);
1043bf215546Sopenharmony_ci    size += vn_sizeof_VkDeviceImageMemoryRequirements_self(val);
1044bf215546Sopenharmony_ci
1045bf215546Sopenharmony_ci    return size;
1046bf215546Sopenharmony_ci}
1047bf215546Sopenharmony_ci
1048bf215546Sopenharmony_cistatic inline void
1049bf215546Sopenharmony_civn_encode_VkDeviceImageMemoryRequirements_pnext(struct vn_cs_encoder *enc, const void *val)
1050bf215546Sopenharmony_ci{
1051bf215546Sopenharmony_ci    /* no known/supported struct */
1052bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
1053bf215546Sopenharmony_ci}
1054bf215546Sopenharmony_ci
1055bf215546Sopenharmony_cistatic inline void
1056bf215546Sopenharmony_civn_encode_VkDeviceImageMemoryRequirements_self(struct vn_cs_encoder *enc, const VkDeviceImageMemoryRequirements *val)
1057bf215546Sopenharmony_ci{
1058bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1059bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, val->pCreateInfo))
1060bf215546Sopenharmony_ci        vn_encode_VkImageCreateInfo(enc, val->pCreateInfo);
1061bf215546Sopenharmony_ci    vn_encode_VkImageAspectFlagBits(enc, &val->planeAspect);
1062bf215546Sopenharmony_ci}
1063bf215546Sopenharmony_ci
1064bf215546Sopenharmony_cistatic inline void
1065bf215546Sopenharmony_civn_encode_VkDeviceImageMemoryRequirements(struct vn_cs_encoder *enc, const VkDeviceImageMemoryRequirements *val)
1066bf215546Sopenharmony_ci{
1067bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS);
1068bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS });
1069bf215546Sopenharmony_ci    vn_encode_VkDeviceImageMemoryRequirements_pnext(enc, val->pNext);
1070bf215546Sopenharmony_ci    vn_encode_VkDeviceImageMemoryRequirements_self(enc, val);
1071bf215546Sopenharmony_ci}
1072bf215546Sopenharmony_ci
1073bf215546Sopenharmony_ci/* struct VkImageDrmFormatModifierPropertiesEXT chain */
1074bf215546Sopenharmony_ci
1075bf215546Sopenharmony_cistatic inline size_t
1076bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierPropertiesEXT_pnext(const void *val)
1077bf215546Sopenharmony_ci{
1078bf215546Sopenharmony_ci    /* no known/supported struct */
1079bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
1080bf215546Sopenharmony_ci}
1081bf215546Sopenharmony_ci
1082bf215546Sopenharmony_cistatic inline size_t
1083bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierPropertiesEXT_self(const VkImageDrmFormatModifierPropertiesEXT *val)
1084bf215546Sopenharmony_ci{
1085bf215546Sopenharmony_ci    size_t size = 0;
1086bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1087bf215546Sopenharmony_ci    size += vn_sizeof_uint64_t(&val->drmFormatModifier);
1088bf215546Sopenharmony_ci    return size;
1089bf215546Sopenharmony_ci}
1090bf215546Sopenharmony_ci
1091bf215546Sopenharmony_cistatic inline size_t
1092bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierPropertiesEXT(const VkImageDrmFormatModifierPropertiesEXT *val)
1093bf215546Sopenharmony_ci{
1094bf215546Sopenharmony_ci    size_t size = 0;
1095bf215546Sopenharmony_ci
1096bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
1097bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierPropertiesEXT_pnext(val->pNext);
1098bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierPropertiesEXT_self(val);
1099bf215546Sopenharmony_ci
1100bf215546Sopenharmony_ci    return size;
1101bf215546Sopenharmony_ci}
1102bf215546Sopenharmony_ci
1103bf215546Sopenharmony_cistatic inline void
1104bf215546Sopenharmony_civn_decode_VkImageDrmFormatModifierPropertiesEXT_pnext(struct vn_cs_decoder *dec, const void *val)
1105bf215546Sopenharmony_ci{
1106bf215546Sopenharmony_ci    /* no known/supported struct */
1107bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec))
1108bf215546Sopenharmony_ci        assert(false);
1109bf215546Sopenharmony_ci}
1110bf215546Sopenharmony_ci
1111bf215546Sopenharmony_cistatic inline void
1112bf215546Sopenharmony_civn_decode_VkImageDrmFormatModifierPropertiesEXT_self(struct vn_cs_decoder *dec, VkImageDrmFormatModifierPropertiesEXT *val)
1113bf215546Sopenharmony_ci{
1114bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1115bf215546Sopenharmony_ci    vn_decode_uint64_t(dec, &val->drmFormatModifier);
1116bf215546Sopenharmony_ci}
1117bf215546Sopenharmony_ci
1118bf215546Sopenharmony_cistatic inline void
1119bf215546Sopenharmony_civn_decode_VkImageDrmFormatModifierPropertiesEXT(struct vn_cs_decoder *dec, VkImageDrmFormatModifierPropertiesEXT *val)
1120bf215546Sopenharmony_ci{
1121bf215546Sopenharmony_ci    VkStructureType stype;
1122bf215546Sopenharmony_ci    vn_decode_VkStructureType(dec, &stype);
1123bf215546Sopenharmony_ci    assert(stype == VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT);
1124bf215546Sopenharmony_ci
1125bf215546Sopenharmony_ci    assert(val->sType == stype);
1126bf215546Sopenharmony_ci    vn_decode_VkImageDrmFormatModifierPropertiesEXT_pnext(dec, val->pNext);
1127bf215546Sopenharmony_ci    vn_decode_VkImageDrmFormatModifierPropertiesEXT_self(dec, val);
1128bf215546Sopenharmony_ci}
1129bf215546Sopenharmony_ci
1130bf215546Sopenharmony_cistatic inline size_t
1131bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierPropertiesEXT_pnext_partial(const void *val)
1132bf215546Sopenharmony_ci{
1133bf215546Sopenharmony_ci    /* no known/supported struct */
1134bf215546Sopenharmony_ci    return vn_sizeof_simple_pointer(NULL);
1135bf215546Sopenharmony_ci}
1136bf215546Sopenharmony_ci
1137bf215546Sopenharmony_cistatic inline size_t
1138bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierPropertiesEXT_self_partial(const VkImageDrmFormatModifierPropertiesEXT *val)
1139bf215546Sopenharmony_ci{
1140bf215546Sopenharmony_ci    size_t size = 0;
1141bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1142bf215546Sopenharmony_ci    /* skip val->drmFormatModifier */
1143bf215546Sopenharmony_ci    return size;
1144bf215546Sopenharmony_ci}
1145bf215546Sopenharmony_ci
1146bf215546Sopenharmony_cistatic inline size_t
1147bf215546Sopenharmony_civn_sizeof_VkImageDrmFormatModifierPropertiesEXT_partial(const VkImageDrmFormatModifierPropertiesEXT *val)
1148bf215546Sopenharmony_ci{
1149bf215546Sopenharmony_ci    size_t size = 0;
1150bf215546Sopenharmony_ci
1151bf215546Sopenharmony_ci    size += vn_sizeof_VkStructureType(&val->sType);
1152bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierPropertiesEXT_pnext_partial(val->pNext);
1153bf215546Sopenharmony_ci    size += vn_sizeof_VkImageDrmFormatModifierPropertiesEXT_self_partial(val);
1154bf215546Sopenharmony_ci
1155bf215546Sopenharmony_ci    return size;
1156bf215546Sopenharmony_ci}
1157bf215546Sopenharmony_ci
1158bf215546Sopenharmony_cistatic inline void
1159bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierPropertiesEXT_pnext_partial(struct vn_cs_encoder *enc, const void *val)
1160bf215546Sopenharmony_ci{
1161bf215546Sopenharmony_ci    /* no known/supported struct */
1162bf215546Sopenharmony_ci    vn_encode_simple_pointer(enc, NULL);
1163bf215546Sopenharmony_ci}
1164bf215546Sopenharmony_ci
1165bf215546Sopenharmony_cistatic inline void
1166bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierPropertiesEXT_self_partial(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierPropertiesEXT *val)
1167bf215546Sopenharmony_ci{
1168bf215546Sopenharmony_ci    /* skip val->{sType,pNext} */
1169bf215546Sopenharmony_ci    /* skip val->drmFormatModifier */
1170bf215546Sopenharmony_ci}
1171bf215546Sopenharmony_ci
1172bf215546Sopenharmony_cistatic inline void
1173bf215546Sopenharmony_civn_encode_VkImageDrmFormatModifierPropertiesEXT_partial(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierPropertiesEXT *val)
1174bf215546Sopenharmony_ci{
1175bf215546Sopenharmony_ci    assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT);
1176bf215546Sopenharmony_ci    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT });
1177bf215546Sopenharmony_ci    vn_encode_VkImageDrmFormatModifierPropertiesEXT_pnext_partial(enc, val->pNext);
1178bf215546Sopenharmony_ci    vn_encode_VkImageDrmFormatModifierPropertiesEXT_self_partial(enc, val);
1179bf215546Sopenharmony_ci}
1180bf215546Sopenharmony_ci
1181bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
1182bf215546Sopenharmony_ci{
1183bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT;
1184bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1185bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1186bf215546Sopenharmony_ci
1187bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1188bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkImage(&image);
1189bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pMemoryRequirements);
1190bf215546Sopenharmony_ci    if (pMemoryRequirements)
1191bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkMemoryRequirements_partial(pMemoryRequirements);
1192bf215546Sopenharmony_ci
1193bf215546Sopenharmony_ci    return cmd_size;
1194bf215546Sopenharmony_ci}
1195bf215546Sopenharmony_ci
1196bf215546Sopenharmony_cistatic inline void vn_encode_vkGetImageMemoryRequirements(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
1197bf215546Sopenharmony_ci{
1198bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT;
1199bf215546Sopenharmony_ci
1200bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1201bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1202bf215546Sopenharmony_ci
1203bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1204bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &image);
1205bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pMemoryRequirements))
1206bf215546Sopenharmony_ci        vn_encode_VkMemoryRequirements_partial(enc, pMemoryRequirements);
1207bf215546Sopenharmony_ci}
1208bf215546Sopenharmony_ci
1209bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageMemoryRequirements_reply(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
1210bf215546Sopenharmony_ci{
1211bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT;
1212bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1213bf215546Sopenharmony_ci
1214bf215546Sopenharmony_ci    /* skip device */
1215bf215546Sopenharmony_ci    /* skip image */
1216bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pMemoryRequirements);
1217bf215546Sopenharmony_ci    if (pMemoryRequirements)
1218bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkMemoryRequirements(pMemoryRequirements);
1219bf215546Sopenharmony_ci
1220bf215546Sopenharmony_ci    return cmd_size;
1221bf215546Sopenharmony_ci}
1222bf215546Sopenharmony_ci
1223bf215546Sopenharmony_cistatic inline void vn_decode_vkGetImageMemoryRequirements_reply(struct vn_cs_decoder *dec, VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
1224bf215546Sopenharmony_ci{
1225bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1226bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1227bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT);
1228bf215546Sopenharmony_ci
1229bf215546Sopenharmony_ci    /* skip device */
1230bf215546Sopenharmony_ci    /* skip image */
1231bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1232bf215546Sopenharmony_ci        vn_decode_VkMemoryRequirements(dec, pMemoryRequirements);
1233bf215546Sopenharmony_ci    } else {
1234bf215546Sopenharmony_ci        pMemoryRequirements = NULL;
1235bf215546Sopenharmony_ci    }
1236bf215546Sopenharmony_ci}
1237bf215546Sopenharmony_ci
1238bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
1239bf215546Sopenharmony_ci{
1240bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBindImageMemory_EXT;
1241bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1242bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1243bf215546Sopenharmony_ci
1244bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1245bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkImage(&image);
1246bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDeviceMemory(&memory);
1247bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDeviceSize(&memoryOffset);
1248bf215546Sopenharmony_ci
1249bf215546Sopenharmony_ci    return cmd_size;
1250bf215546Sopenharmony_ci}
1251bf215546Sopenharmony_ci
1252bf215546Sopenharmony_cistatic inline void vn_encode_vkBindImageMemory(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
1253bf215546Sopenharmony_ci{
1254bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBindImageMemory_EXT;
1255bf215546Sopenharmony_ci
1256bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1257bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1258bf215546Sopenharmony_ci
1259bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1260bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &image);
1261bf215546Sopenharmony_ci    vn_encode_VkDeviceMemory(enc, &memory);
1262bf215546Sopenharmony_ci    vn_encode_VkDeviceSize(enc, &memoryOffset);
1263bf215546Sopenharmony_ci}
1264bf215546Sopenharmony_ci
1265bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkBindImageMemory_reply(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
1266bf215546Sopenharmony_ci{
1267bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBindImageMemory_EXT;
1268bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1269bf215546Sopenharmony_ci
1270bf215546Sopenharmony_ci    VkResult ret;
1271bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkResult(&ret);
1272bf215546Sopenharmony_ci    /* skip device */
1273bf215546Sopenharmony_ci    /* skip image */
1274bf215546Sopenharmony_ci    /* skip memory */
1275bf215546Sopenharmony_ci    /* skip memoryOffset */
1276bf215546Sopenharmony_ci
1277bf215546Sopenharmony_ci    return cmd_size;
1278bf215546Sopenharmony_ci}
1279bf215546Sopenharmony_ci
1280bf215546Sopenharmony_cistatic inline VkResult vn_decode_vkBindImageMemory_reply(struct vn_cs_decoder *dec, VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
1281bf215546Sopenharmony_ci{
1282bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1283bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1284bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkBindImageMemory_EXT);
1285bf215546Sopenharmony_ci
1286bf215546Sopenharmony_ci    VkResult ret;
1287bf215546Sopenharmony_ci    vn_decode_VkResult(dec, &ret);
1288bf215546Sopenharmony_ci    /* skip device */
1289bf215546Sopenharmony_ci    /* skip image */
1290bf215546Sopenharmony_ci    /* skip memory */
1291bf215546Sopenharmony_ci    /* skip memoryOffset */
1292bf215546Sopenharmony_ci
1293bf215546Sopenharmony_ci    return ret;
1294bf215546Sopenharmony_ci}
1295bf215546Sopenharmony_ci
1296bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
1297bf215546Sopenharmony_ci{
1298bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT;
1299bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1300bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1301bf215546Sopenharmony_ci
1302bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1303bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkImage(&image);
1304bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSparseMemoryRequirementCount);
1305bf215546Sopenharmony_ci    if (pSparseMemoryRequirementCount)
1306bf215546Sopenharmony_ci        cmd_size += vn_sizeof_uint32_t(pSparseMemoryRequirementCount);
1307bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1308bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size((pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1309bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1310bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkSparseImageMemoryRequirements_partial(&pSparseMemoryRequirements[i]);
1311bf215546Sopenharmony_ci    } else {
1312bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1313bf215546Sopenharmony_ci    }
1314bf215546Sopenharmony_ci
1315bf215546Sopenharmony_ci    return cmd_size;
1316bf215546Sopenharmony_ci}
1317bf215546Sopenharmony_ci
1318bf215546Sopenharmony_cistatic inline void vn_encode_vkGetImageSparseMemoryRequirements(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
1319bf215546Sopenharmony_ci{
1320bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT;
1321bf215546Sopenharmony_ci
1322bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1323bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1324bf215546Sopenharmony_ci
1325bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1326bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &image);
1327bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pSparseMemoryRequirementCount))
1328bf215546Sopenharmony_ci        vn_encode_uint32_t(enc, pSparseMemoryRequirementCount);
1329bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1330bf215546Sopenharmony_ci        vn_encode_array_size(enc, (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1331bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1332bf215546Sopenharmony_ci            vn_encode_VkSparseImageMemoryRequirements_partial(enc, &pSparseMemoryRequirements[i]);
1333bf215546Sopenharmony_ci    } else {
1334bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
1335bf215546Sopenharmony_ci    }
1336bf215546Sopenharmony_ci}
1337bf215546Sopenharmony_ci
1338bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageSparseMemoryRequirements_reply(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
1339bf215546Sopenharmony_ci{
1340bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT;
1341bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1342bf215546Sopenharmony_ci
1343bf215546Sopenharmony_ci    /* skip device */
1344bf215546Sopenharmony_ci    /* skip image */
1345bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSparseMemoryRequirementCount);
1346bf215546Sopenharmony_ci    if (pSparseMemoryRequirementCount)
1347bf215546Sopenharmony_ci        cmd_size += vn_sizeof_uint32_t(pSparseMemoryRequirementCount);
1348bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1349bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size((pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1350bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1351bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkSparseImageMemoryRequirements(&pSparseMemoryRequirements[i]);
1352bf215546Sopenharmony_ci    } else {
1353bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1354bf215546Sopenharmony_ci    }
1355bf215546Sopenharmony_ci
1356bf215546Sopenharmony_ci    return cmd_size;
1357bf215546Sopenharmony_ci}
1358bf215546Sopenharmony_ci
1359bf215546Sopenharmony_cistatic inline void vn_decode_vkGetImageSparseMemoryRequirements_reply(struct vn_cs_decoder *dec, VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
1360bf215546Sopenharmony_ci{
1361bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1362bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1363bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT);
1364bf215546Sopenharmony_ci
1365bf215546Sopenharmony_ci    /* skip device */
1366bf215546Sopenharmony_ci    /* skip image */
1367bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1368bf215546Sopenharmony_ci        vn_decode_uint32_t(dec, pSparseMemoryRequirementCount);
1369bf215546Sopenharmony_ci    } else {
1370bf215546Sopenharmony_ci        pSparseMemoryRequirementCount = NULL;
1371bf215546Sopenharmony_ci    }
1372bf215546Sopenharmony_ci    if (vn_peek_array_size(dec)) {
1373bf215546Sopenharmony_ci        const uint32_t iter_count = vn_decode_array_size(dec, (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1374bf215546Sopenharmony_ci        for (uint32_t i = 0; i < iter_count; i++)
1375bf215546Sopenharmony_ci            vn_decode_VkSparseImageMemoryRequirements(dec, &pSparseMemoryRequirements[i]);
1376bf215546Sopenharmony_ci    } else {
1377bf215546Sopenharmony_ci        vn_decode_array_size_unchecked(dec);
1378bf215546Sopenharmony_ci        pSparseMemoryRequirements = NULL;
1379bf215546Sopenharmony_ci    }
1380bf215546Sopenharmony_ci}
1381bf215546Sopenharmony_ci
1382bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
1383bf215546Sopenharmony_ci{
1384bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCreateImage_EXT;
1385bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1386bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1387bf215546Sopenharmony_ci
1388bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1389bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pCreateInfo);
1390bf215546Sopenharmony_ci    if (pCreateInfo)
1391bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImageCreateInfo(pCreateInfo);
1392bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pAllocator);
1393bf215546Sopenharmony_ci    if (pAllocator)
1394bf215546Sopenharmony_ci        assert(false);
1395bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pImage);
1396bf215546Sopenharmony_ci    if (pImage)
1397bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImage(pImage);
1398bf215546Sopenharmony_ci
1399bf215546Sopenharmony_ci    return cmd_size;
1400bf215546Sopenharmony_ci}
1401bf215546Sopenharmony_ci
1402bf215546Sopenharmony_cistatic inline void vn_encode_vkCreateImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
1403bf215546Sopenharmony_ci{
1404bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCreateImage_EXT;
1405bf215546Sopenharmony_ci
1406bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1407bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1408bf215546Sopenharmony_ci
1409bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1410bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pCreateInfo))
1411bf215546Sopenharmony_ci        vn_encode_VkImageCreateInfo(enc, pCreateInfo);
1412bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pAllocator))
1413bf215546Sopenharmony_ci        assert(false);
1414bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pImage))
1415bf215546Sopenharmony_ci        vn_encode_VkImage(enc, pImage);
1416bf215546Sopenharmony_ci}
1417bf215546Sopenharmony_ci
1418bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkCreateImage_reply(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
1419bf215546Sopenharmony_ci{
1420bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCreateImage_EXT;
1421bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1422bf215546Sopenharmony_ci
1423bf215546Sopenharmony_ci    VkResult ret;
1424bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkResult(&ret);
1425bf215546Sopenharmony_ci    /* skip device */
1426bf215546Sopenharmony_ci    /* skip pCreateInfo */
1427bf215546Sopenharmony_ci    /* skip pAllocator */
1428bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pImage);
1429bf215546Sopenharmony_ci    if (pImage)
1430bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImage(pImage);
1431bf215546Sopenharmony_ci
1432bf215546Sopenharmony_ci    return cmd_size;
1433bf215546Sopenharmony_ci}
1434bf215546Sopenharmony_ci
1435bf215546Sopenharmony_cistatic inline VkResult vn_decode_vkCreateImage_reply(struct vn_cs_decoder *dec, VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
1436bf215546Sopenharmony_ci{
1437bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1438bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1439bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkCreateImage_EXT);
1440bf215546Sopenharmony_ci
1441bf215546Sopenharmony_ci    VkResult ret;
1442bf215546Sopenharmony_ci    vn_decode_VkResult(dec, &ret);
1443bf215546Sopenharmony_ci    /* skip device */
1444bf215546Sopenharmony_ci    /* skip pCreateInfo */
1445bf215546Sopenharmony_ci    /* skip pAllocator */
1446bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1447bf215546Sopenharmony_ci        vn_decode_VkImage(dec, pImage);
1448bf215546Sopenharmony_ci    } else {
1449bf215546Sopenharmony_ci        pImage = NULL;
1450bf215546Sopenharmony_ci    }
1451bf215546Sopenharmony_ci
1452bf215546Sopenharmony_ci    return ret;
1453bf215546Sopenharmony_ci}
1454bf215546Sopenharmony_ci
1455bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
1456bf215546Sopenharmony_ci{
1457bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkDestroyImage_EXT;
1458bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1459bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1460bf215546Sopenharmony_ci
1461bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1462bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkImage(&image);
1463bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pAllocator);
1464bf215546Sopenharmony_ci    if (pAllocator)
1465bf215546Sopenharmony_ci        assert(false);
1466bf215546Sopenharmony_ci
1467bf215546Sopenharmony_ci    return cmd_size;
1468bf215546Sopenharmony_ci}
1469bf215546Sopenharmony_ci
1470bf215546Sopenharmony_cistatic inline void vn_encode_vkDestroyImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
1471bf215546Sopenharmony_ci{
1472bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkDestroyImage_EXT;
1473bf215546Sopenharmony_ci
1474bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1475bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1476bf215546Sopenharmony_ci
1477bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1478bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &image);
1479bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pAllocator))
1480bf215546Sopenharmony_ci        assert(false);
1481bf215546Sopenharmony_ci}
1482bf215546Sopenharmony_ci
1483bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkDestroyImage_reply(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
1484bf215546Sopenharmony_ci{
1485bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkDestroyImage_EXT;
1486bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1487bf215546Sopenharmony_ci
1488bf215546Sopenharmony_ci    /* skip device */
1489bf215546Sopenharmony_ci    /* skip image */
1490bf215546Sopenharmony_ci    /* skip pAllocator */
1491bf215546Sopenharmony_ci
1492bf215546Sopenharmony_ci    return cmd_size;
1493bf215546Sopenharmony_ci}
1494bf215546Sopenharmony_ci
1495bf215546Sopenharmony_cistatic inline void vn_decode_vkDestroyImage_reply(struct vn_cs_decoder *dec, VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
1496bf215546Sopenharmony_ci{
1497bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1498bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1499bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkDestroyImage_EXT);
1500bf215546Sopenharmony_ci
1501bf215546Sopenharmony_ci    /* skip device */
1502bf215546Sopenharmony_ci    /* skip image */
1503bf215546Sopenharmony_ci    /* skip pAllocator */
1504bf215546Sopenharmony_ci}
1505bf215546Sopenharmony_ci
1506bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
1507bf215546Sopenharmony_ci{
1508bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT;
1509bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1510bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1511bf215546Sopenharmony_ci
1512bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1513bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkImage(&image);
1514bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSubresource);
1515bf215546Sopenharmony_ci    if (pSubresource)
1516bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImageSubresource(pSubresource);
1517bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pLayout);
1518bf215546Sopenharmony_ci    if (pLayout)
1519bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkSubresourceLayout_partial(pLayout);
1520bf215546Sopenharmony_ci
1521bf215546Sopenharmony_ci    return cmd_size;
1522bf215546Sopenharmony_ci}
1523bf215546Sopenharmony_ci
1524bf215546Sopenharmony_cistatic inline void vn_encode_vkGetImageSubresourceLayout(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
1525bf215546Sopenharmony_ci{
1526bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT;
1527bf215546Sopenharmony_ci
1528bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1529bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1530bf215546Sopenharmony_ci
1531bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1532bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &image);
1533bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pSubresource))
1534bf215546Sopenharmony_ci        vn_encode_VkImageSubresource(enc, pSubresource);
1535bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pLayout))
1536bf215546Sopenharmony_ci        vn_encode_VkSubresourceLayout_partial(enc, pLayout);
1537bf215546Sopenharmony_ci}
1538bf215546Sopenharmony_ci
1539bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageSubresourceLayout_reply(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
1540bf215546Sopenharmony_ci{
1541bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT;
1542bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1543bf215546Sopenharmony_ci
1544bf215546Sopenharmony_ci    /* skip device */
1545bf215546Sopenharmony_ci    /* skip image */
1546bf215546Sopenharmony_ci    /* skip pSubresource */
1547bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pLayout);
1548bf215546Sopenharmony_ci    if (pLayout)
1549bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkSubresourceLayout(pLayout);
1550bf215546Sopenharmony_ci
1551bf215546Sopenharmony_ci    return cmd_size;
1552bf215546Sopenharmony_ci}
1553bf215546Sopenharmony_ci
1554bf215546Sopenharmony_cistatic inline void vn_decode_vkGetImageSubresourceLayout_reply(struct vn_cs_decoder *dec, VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
1555bf215546Sopenharmony_ci{
1556bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1557bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1558bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT);
1559bf215546Sopenharmony_ci
1560bf215546Sopenharmony_ci    /* skip device */
1561bf215546Sopenharmony_ci    /* skip image */
1562bf215546Sopenharmony_ci    /* skip pSubresource */
1563bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1564bf215546Sopenharmony_ci        vn_decode_VkSubresourceLayout(dec, pLayout);
1565bf215546Sopenharmony_ci    } else {
1566bf215546Sopenharmony_ci        pLayout = NULL;
1567bf215546Sopenharmony_ci    }
1568bf215546Sopenharmony_ci}
1569bf215546Sopenharmony_ci
1570bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
1571bf215546Sopenharmony_ci{
1572bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBindImageMemory2_EXT;
1573bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1574bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1575bf215546Sopenharmony_ci
1576bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1577bf215546Sopenharmony_ci    cmd_size += vn_sizeof_uint32_t(&bindInfoCount);
1578bf215546Sopenharmony_ci    if (pBindInfos) {
1579bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(bindInfoCount);
1580bf215546Sopenharmony_ci        for (uint32_t i = 0; i < bindInfoCount; i++)
1581bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkBindImageMemoryInfo(&pBindInfos[i]);
1582bf215546Sopenharmony_ci    } else {
1583bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1584bf215546Sopenharmony_ci    }
1585bf215546Sopenharmony_ci
1586bf215546Sopenharmony_ci    return cmd_size;
1587bf215546Sopenharmony_ci}
1588bf215546Sopenharmony_ci
1589bf215546Sopenharmony_cistatic inline void vn_encode_vkBindImageMemory2(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
1590bf215546Sopenharmony_ci{
1591bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBindImageMemory2_EXT;
1592bf215546Sopenharmony_ci
1593bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1594bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1595bf215546Sopenharmony_ci
1596bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1597bf215546Sopenharmony_ci    vn_encode_uint32_t(enc, &bindInfoCount);
1598bf215546Sopenharmony_ci    if (pBindInfos) {
1599bf215546Sopenharmony_ci        vn_encode_array_size(enc, bindInfoCount);
1600bf215546Sopenharmony_ci        for (uint32_t i = 0; i < bindInfoCount; i++)
1601bf215546Sopenharmony_ci            vn_encode_VkBindImageMemoryInfo(enc, &pBindInfos[i]);
1602bf215546Sopenharmony_ci    } else {
1603bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
1604bf215546Sopenharmony_ci    }
1605bf215546Sopenharmony_ci}
1606bf215546Sopenharmony_ci
1607bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkBindImageMemory2_reply(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
1608bf215546Sopenharmony_ci{
1609bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBindImageMemory2_EXT;
1610bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1611bf215546Sopenharmony_ci
1612bf215546Sopenharmony_ci    VkResult ret;
1613bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkResult(&ret);
1614bf215546Sopenharmony_ci    /* skip device */
1615bf215546Sopenharmony_ci    /* skip bindInfoCount */
1616bf215546Sopenharmony_ci    /* skip pBindInfos */
1617bf215546Sopenharmony_ci
1618bf215546Sopenharmony_ci    return cmd_size;
1619bf215546Sopenharmony_ci}
1620bf215546Sopenharmony_ci
1621bf215546Sopenharmony_cistatic inline VkResult vn_decode_vkBindImageMemory2_reply(struct vn_cs_decoder *dec, VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
1622bf215546Sopenharmony_ci{
1623bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1624bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1625bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkBindImageMemory2_EXT);
1626bf215546Sopenharmony_ci
1627bf215546Sopenharmony_ci    VkResult ret;
1628bf215546Sopenharmony_ci    vn_decode_VkResult(dec, &ret);
1629bf215546Sopenharmony_ci    /* skip device */
1630bf215546Sopenharmony_ci    /* skip bindInfoCount */
1631bf215546Sopenharmony_ci    /* skip pBindInfos */
1632bf215546Sopenharmony_ci
1633bf215546Sopenharmony_ci    return ret;
1634bf215546Sopenharmony_ci}
1635bf215546Sopenharmony_ci
1636bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1637bf215546Sopenharmony_ci{
1638bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT;
1639bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1640bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1641bf215546Sopenharmony_ci
1642bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1643bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pInfo);
1644bf215546Sopenharmony_ci    if (pInfo)
1645bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImageMemoryRequirementsInfo2(pInfo);
1646bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pMemoryRequirements);
1647bf215546Sopenharmony_ci    if (pMemoryRequirements)
1648bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkMemoryRequirements2_partial(pMemoryRequirements);
1649bf215546Sopenharmony_ci
1650bf215546Sopenharmony_ci    return cmd_size;
1651bf215546Sopenharmony_ci}
1652bf215546Sopenharmony_ci
1653bf215546Sopenharmony_cistatic inline void vn_encode_vkGetImageMemoryRequirements2(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1654bf215546Sopenharmony_ci{
1655bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT;
1656bf215546Sopenharmony_ci
1657bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1658bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1659bf215546Sopenharmony_ci
1660bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1661bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pInfo))
1662bf215546Sopenharmony_ci        vn_encode_VkImageMemoryRequirementsInfo2(enc, pInfo);
1663bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pMemoryRequirements))
1664bf215546Sopenharmony_ci        vn_encode_VkMemoryRequirements2_partial(enc, pMemoryRequirements);
1665bf215546Sopenharmony_ci}
1666bf215546Sopenharmony_ci
1667bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageMemoryRequirements2_reply(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1668bf215546Sopenharmony_ci{
1669bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT;
1670bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1671bf215546Sopenharmony_ci
1672bf215546Sopenharmony_ci    /* skip device */
1673bf215546Sopenharmony_ci    /* skip pInfo */
1674bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pMemoryRequirements);
1675bf215546Sopenharmony_ci    if (pMemoryRequirements)
1676bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkMemoryRequirements2(pMemoryRequirements);
1677bf215546Sopenharmony_ci
1678bf215546Sopenharmony_ci    return cmd_size;
1679bf215546Sopenharmony_ci}
1680bf215546Sopenharmony_ci
1681bf215546Sopenharmony_cistatic inline void vn_decode_vkGetImageMemoryRequirements2_reply(struct vn_cs_decoder *dec, VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1682bf215546Sopenharmony_ci{
1683bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1684bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1685bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT);
1686bf215546Sopenharmony_ci
1687bf215546Sopenharmony_ci    /* skip device */
1688bf215546Sopenharmony_ci    /* skip pInfo */
1689bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1690bf215546Sopenharmony_ci        vn_decode_VkMemoryRequirements2(dec, pMemoryRequirements);
1691bf215546Sopenharmony_ci    } else {
1692bf215546Sopenharmony_ci        pMemoryRequirements = NULL;
1693bf215546Sopenharmony_ci    }
1694bf215546Sopenharmony_ci}
1695bf215546Sopenharmony_ci
1696bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1697bf215546Sopenharmony_ci{
1698bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT;
1699bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1700bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1701bf215546Sopenharmony_ci
1702bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1703bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pInfo);
1704bf215546Sopenharmony_ci    if (pInfo)
1705bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImageSparseMemoryRequirementsInfo2(pInfo);
1706bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSparseMemoryRequirementCount);
1707bf215546Sopenharmony_ci    if (pSparseMemoryRequirementCount)
1708bf215546Sopenharmony_ci        cmd_size += vn_sizeof_uint32_t(pSparseMemoryRequirementCount);
1709bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1710bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size((pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1711bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1712bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkSparseImageMemoryRequirements2_partial(&pSparseMemoryRequirements[i]);
1713bf215546Sopenharmony_ci    } else {
1714bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1715bf215546Sopenharmony_ci    }
1716bf215546Sopenharmony_ci
1717bf215546Sopenharmony_ci    return cmd_size;
1718bf215546Sopenharmony_ci}
1719bf215546Sopenharmony_ci
1720bf215546Sopenharmony_cistatic inline void vn_encode_vkGetImageSparseMemoryRequirements2(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1721bf215546Sopenharmony_ci{
1722bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT;
1723bf215546Sopenharmony_ci
1724bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1725bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1726bf215546Sopenharmony_ci
1727bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1728bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pInfo))
1729bf215546Sopenharmony_ci        vn_encode_VkImageSparseMemoryRequirementsInfo2(enc, pInfo);
1730bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pSparseMemoryRequirementCount))
1731bf215546Sopenharmony_ci        vn_encode_uint32_t(enc, pSparseMemoryRequirementCount);
1732bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1733bf215546Sopenharmony_ci        vn_encode_array_size(enc, (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1734bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1735bf215546Sopenharmony_ci            vn_encode_VkSparseImageMemoryRequirements2_partial(enc, &pSparseMemoryRequirements[i]);
1736bf215546Sopenharmony_ci    } else {
1737bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
1738bf215546Sopenharmony_ci    }
1739bf215546Sopenharmony_ci}
1740bf215546Sopenharmony_ci
1741bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageSparseMemoryRequirements2_reply(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1742bf215546Sopenharmony_ci{
1743bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT;
1744bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1745bf215546Sopenharmony_ci
1746bf215546Sopenharmony_ci    /* skip device */
1747bf215546Sopenharmony_ci    /* skip pInfo */
1748bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSparseMemoryRequirementCount);
1749bf215546Sopenharmony_ci    if (pSparseMemoryRequirementCount)
1750bf215546Sopenharmony_ci        cmd_size += vn_sizeof_uint32_t(pSparseMemoryRequirementCount);
1751bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1752bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size((pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1753bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1754bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkSparseImageMemoryRequirements2(&pSparseMemoryRequirements[i]);
1755bf215546Sopenharmony_ci    } else {
1756bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1757bf215546Sopenharmony_ci    }
1758bf215546Sopenharmony_ci
1759bf215546Sopenharmony_ci    return cmd_size;
1760bf215546Sopenharmony_ci}
1761bf215546Sopenharmony_ci
1762bf215546Sopenharmony_cistatic inline void vn_decode_vkGetImageSparseMemoryRequirements2_reply(struct vn_cs_decoder *dec, VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1763bf215546Sopenharmony_ci{
1764bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1765bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1766bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT);
1767bf215546Sopenharmony_ci
1768bf215546Sopenharmony_ci    /* skip device */
1769bf215546Sopenharmony_ci    /* skip pInfo */
1770bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1771bf215546Sopenharmony_ci        vn_decode_uint32_t(dec, pSparseMemoryRequirementCount);
1772bf215546Sopenharmony_ci    } else {
1773bf215546Sopenharmony_ci        pSparseMemoryRequirementCount = NULL;
1774bf215546Sopenharmony_ci    }
1775bf215546Sopenharmony_ci    if (vn_peek_array_size(dec)) {
1776bf215546Sopenharmony_ci        const uint32_t iter_count = vn_decode_array_size(dec, (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1777bf215546Sopenharmony_ci        for (uint32_t i = 0; i < iter_count; i++)
1778bf215546Sopenharmony_ci            vn_decode_VkSparseImageMemoryRequirements2(dec, &pSparseMemoryRequirements[i]);
1779bf215546Sopenharmony_ci    } else {
1780bf215546Sopenharmony_ci        vn_decode_array_size_unchecked(dec);
1781bf215546Sopenharmony_ci        pSparseMemoryRequirements = NULL;
1782bf215546Sopenharmony_ci    }
1783bf215546Sopenharmony_ci}
1784bf215546Sopenharmony_ci
1785bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1786bf215546Sopenharmony_ci{
1787bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT;
1788bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1789bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1790bf215546Sopenharmony_ci
1791bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1792bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pInfo);
1793bf215546Sopenharmony_ci    if (pInfo)
1794bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkDeviceImageMemoryRequirements(pInfo);
1795bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pMemoryRequirements);
1796bf215546Sopenharmony_ci    if (pMemoryRequirements)
1797bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkMemoryRequirements2_partial(pMemoryRequirements);
1798bf215546Sopenharmony_ci
1799bf215546Sopenharmony_ci    return cmd_size;
1800bf215546Sopenharmony_ci}
1801bf215546Sopenharmony_ci
1802bf215546Sopenharmony_cistatic inline void vn_encode_vkGetDeviceImageMemoryRequirements(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1803bf215546Sopenharmony_ci{
1804bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT;
1805bf215546Sopenharmony_ci
1806bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1807bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1808bf215546Sopenharmony_ci
1809bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1810bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pInfo))
1811bf215546Sopenharmony_ci        vn_encode_VkDeviceImageMemoryRequirements(enc, pInfo);
1812bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pMemoryRequirements))
1813bf215546Sopenharmony_ci        vn_encode_VkMemoryRequirements2_partial(enc, pMemoryRequirements);
1814bf215546Sopenharmony_ci}
1815bf215546Sopenharmony_ci
1816bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetDeviceImageMemoryRequirements_reply(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1817bf215546Sopenharmony_ci{
1818bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT;
1819bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1820bf215546Sopenharmony_ci
1821bf215546Sopenharmony_ci    /* skip device */
1822bf215546Sopenharmony_ci    /* skip pInfo */
1823bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pMemoryRequirements);
1824bf215546Sopenharmony_ci    if (pMemoryRequirements)
1825bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkMemoryRequirements2(pMemoryRequirements);
1826bf215546Sopenharmony_ci
1827bf215546Sopenharmony_ci    return cmd_size;
1828bf215546Sopenharmony_ci}
1829bf215546Sopenharmony_ci
1830bf215546Sopenharmony_cistatic inline void vn_decode_vkGetDeviceImageMemoryRequirements_reply(struct vn_cs_decoder *dec, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1831bf215546Sopenharmony_ci{
1832bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1833bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1834bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT);
1835bf215546Sopenharmony_ci
1836bf215546Sopenharmony_ci    /* skip device */
1837bf215546Sopenharmony_ci    /* skip pInfo */
1838bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1839bf215546Sopenharmony_ci        vn_decode_VkMemoryRequirements2(dec, pMemoryRequirements);
1840bf215546Sopenharmony_ci    } else {
1841bf215546Sopenharmony_ci        pMemoryRequirements = NULL;
1842bf215546Sopenharmony_ci    }
1843bf215546Sopenharmony_ci}
1844bf215546Sopenharmony_ci
1845bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1846bf215546Sopenharmony_ci{
1847bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT;
1848bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1849bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1850bf215546Sopenharmony_ci
1851bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1852bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pInfo);
1853bf215546Sopenharmony_ci    if (pInfo)
1854bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkDeviceImageMemoryRequirements(pInfo);
1855bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSparseMemoryRequirementCount);
1856bf215546Sopenharmony_ci    if (pSparseMemoryRequirementCount)
1857bf215546Sopenharmony_ci        cmd_size += vn_sizeof_uint32_t(pSparseMemoryRequirementCount);
1858bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1859bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size((pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1860bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1861bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkSparseImageMemoryRequirements2_partial(&pSparseMemoryRequirements[i]);
1862bf215546Sopenharmony_ci    } else {
1863bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1864bf215546Sopenharmony_ci    }
1865bf215546Sopenharmony_ci
1866bf215546Sopenharmony_ci    return cmd_size;
1867bf215546Sopenharmony_ci}
1868bf215546Sopenharmony_ci
1869bf215546Sopenharmony_cistatic inline void vn_encode_vkGetDeviceImageSparseMemoryRequirements(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1870bf215546Sopenharmony_ci{
1871bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT;
1872bf215546Sopenharmony_ci
1873bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1874bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1875bf215546Sopenharmony_ci
1876bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1877bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pInfo))
1878bf215546Sopenharmony_ci        vn_encode_VkDeviceImageMemoryRequirements(enc, pInfo);
1879bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pSparseMemoryRequirementCount))
1880bf215546Sopenharmony_ci        vn_encode_uint32_t(enc, pSparseMemoryRequirementCount);
1881bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1882bf215546Sopenharmony_ci        vn_encode_array_size(enc, (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1883bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1884bf215546Sopenharmony_ci            vn_encode_VkSparseImageMemoryRequirements2_partial(enc, &pSparseMemoryRequirements[i]);
1885bf215546Sopenharmony_ci    } else {
1886bf215546Sopenharmony_ci        vn_encode_array_size(enc, 0);
1887bf215546Sopenharmony_ci    }
1888bf215546Sopenharmony_ci}
1889bf215546Sopenharmony_ci
1890bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetDeviceImageSparseMemoryRequirements_reply(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1891bf215546Sopenharmony_ci{
1892bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT;
1893bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1894bf215546Sopenharmony_ci
1895bf215546Sopenharmony_ci    /* skip device */
1896bf215546Sopenharmony_ci    /* skip pInfo */
1897bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pSparseMemoryRequirementCount);
1898bf215546Sopenharmony_ci    if (pSparseMemoryRequirementCount)
1899bf215546Sopenharmony_ci        cmd_size += vn_sizeof_uint32_t(pSparseMemoryRequirementCount);
1900bf215546Sopenharmony_ci    if (pSparseMemoryRequirements) {
1901bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size((pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1902bf215546Sopenharmony_ci        for (uint32_t i = 0; i < (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0); i++)
1903bf215546Sopenharmony_ci            cmd_size += vn_sizeof_VkSparseImageMemoryRequirements2(&pSparseMemoryRequirements[i]);
1904bf215546Sopenharmony_ci    } else {
1905bf215546Sopenharmony_ci        cmd_size += vn_sizeof_array_size(0);
1906bf215546Sopenharmony_ci    }
1907bf215546Sopenharmony_ci
1908bf215546Sopenharmony_ci    return cmd_size;
1909bf215546Sopenharmony_ci}
1910bf215546Sopenharmony_ci
1911bf215546Sopenharmony_cistatic inline void vn_decode_vkGetDeviceImageSparseMemoryRequirements_reply(struct vn_cs_decoder *dec, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1912bf215546Sopenharmony_ci{
1913bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1914bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1915bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT);
1916bf215546Sopenharmony_ci
1917bf215546Sopenharmony_ci    /* skip device */
1918bf215546Sopenharmony_ci    /* skip pInfo */
1919bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1920bf215546Sopenharmony_ci        vn_decode_uint32_t(dec, pSparseMemoryRequirementCount);
1921bf215546Sopenharmony_ci    } else {
1922bf215546Sopenharmony_ci        pSparseMemoryRequirementCount = NULL;
1923bf215546Sopenharmony_ci    }
1924bf215546Sopenharmony_ci    if (vn_peek_array_size(dec)) {
1925bf215546Sopenharmony_ci        const uint32_t iter_count = vn_decode_array_size(dec, (pSparseMemoryRequirementCount ? *pSparseMemoryRequirementCount : 0));
1926bf215546Sopenharmony_ci        for (uint32_t i = 0; i < iter_count; i++)
1927bf215546Sopenharmony_ci            vn_decode_VkSparseImageMemoryRequirements2(dec, &pSparseMemoryRequirements[i]);
1928bf215546Sopenharmony_ci    } else {
1929bf215546Sopenharmony_ci        vn_decode_array_size_unchecked(dec);
1930bf215546Sopenharmony_ci        pSparseMemoryRequirements = NULL;
1931bf215546Sopenharmony_ci    }
1932bf215546Sopenharmony_ci}
1933bf215546Sopenharmony_ci
1934bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties)
1935bf215546Sopenharmony_ci{
1936bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT;
1937bf215546Sopenharmony_ci    const VkFlags cmd_flags = 0;
1938bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
1939bf215546Sopenharmony_ci
1940bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkDevice(&device);
1941bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkImage(&image);
1942bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pProperties);
1943bf215546Sopenharmony_ci    if (pProperties)
1944bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImageDrmFormatModifierPropertiesEXT_partial(pProperties);
1945bf215546Sopenharmony_ci
1946bf215546Sopenharmony_ci    return cmd_size;
1947bf215546Sopenharmony_ci}
1948bf215546Sopenharmony_ci
1949bf215546Sopenharmony_cistatic inline void vn_encode_vkGetImageDrmFormatModifierPropertiesEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties)
1950bf215546Sopenharmony_ci{
1951bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT;
1952bf215546Sopenharmony_ci
1953bf215546Sopenharmony_ci    vn_encode_VkCommandTypeEXT(enc, &cmd_type);
1954bf215546Sopenharmony_ci    vn_encode_VkFlags(enc, &cmd_flags);
1955bf215546Sopenharmony_ci
1956bf215546Sopenharmony_ci    vn_encode_VkDevice(enc, &device);
1957bf215546Sopenharmony_ci    vn_encode_VkImage(enc, &image);
1958bf215546Sopenharmony_ci    if (vn_encode_simple_pointer(enc, pProperties))
1959bf215546Sopenharmony_ci        vn_encode_VkImageDrmFormatModifierPropertiesEXT_partial(enc, pProperties);
1960bf215546Sopenharmony_ci}
1961bf215546Sopenharmony_ci
1962bf215546Sopenharmony_cistatic inline size_t vn_sizeof_vkGetImageDrmFormatModifierPropertiesEXT_reply(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties)
1963bf215546Sopenharmony_ci{
1964bf215546Sopenharmony_ci    const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT;
1965bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
1966bf215546Sopenharmony_ci
1967bf215546Sopenharmony_ci    VkResult ret;
1968bf215546Sopenharmony_ci    cmd_size += vn_sizeof_VkResult(&ret);
1969bf215546Sopenharmony_ci    /* skip device */
1970bf215546Sopenharmony_ci    /* skip image */
1971bf215546Sopenharmony_ci    cmd_size += vn_sizeof_simple_pointer(pProperties);
1972bf215546Sopenharmony_ci    if (pProperties)
1973bf215546Sopenharmony_ci        cmd_size += vn_sizeof_VkImageDrmFormatModifierPropertiesEXT(pProperties);
1974bf215546Sopenharmony_ci
1975bf215546Sopenharmony_ci    return cmd_size;
1976bf215546Sopenharmony_ci}
1977bf215546Sopenharmony_ci
1978bf215546Sopenharmony_cistatic inline VkResult vn_decode_vkGetImageDrmFormatModifierPropertiesEXT_reply(struct vn_cs_decoder *dec, VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties)
1979bf215546Sopenharmony_ci{
1980bf215546Sopenharmony_ci    VkCommandTypeEXT command_type;
1981bf215546Sopenharmony_ci    vn_decode_VkCommandTypeEXT(dec, &command_type);
1982bf215546Sopenharmony_ci    assert(command_type == VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT);
1983bf215546Sopenharmony_ci
1984bf215546Sopenharmony_ci    VkResult ret;
1985bf215546Sopenharmony_ci    vn_decode_VkResult(dec, &ret);
1986bf215546Sopenharmony_ci    /* skip device */
1987bf215546Sopenharmony_ci    /* skip image */
1988bf215546Sopenharmony_ci    if (vn_decode_simple_pointer(dec)) {
1989bf215546Sopenharmony_ci        vn_decode_VkImageDrmFormatModifierPropertiesEXT(dec, pProperties);
1990bf215546Sopenharmony_ci    } else {
1991bf215546Sopenharmony_ci        pProperties = NULL;
1992bf215546Sopenharmony_ci    }
1993bf215546Sopenharmony_ci
1994bf215546Sopenharmony_ci    return ret;
1995bf215546Sopenharmony_ci}
1996bf215546Sopenharmony_ci
1997bf215546Sopenharmony_cistatic inline void vn_submit_vkGetImageMemoryRequirements(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, struct vn_instance_submit_command *submit)
1998bf215546Sopenharmony_ci{
1999bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2000bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2001bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetImageMemoryRequirements(device, image, pMemoryRequirements);
2002bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2003bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2004bf215546Sopenharmony_ci        if (!cmd_data)
2005bf215546Sopenharmony_ci            cmd_size = 0;
2006bf215546Sopenharmony_ci    }
2007bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetImageMemoryRequirements_reply(device, image, pMemoryRequirements) : 0;
2008bf215546Sopenharmony_ci
2009bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2010bf215546Sopenharmony_ci    if (cmd_size) {
2011bf215546Sopenharmony_ci        vn_encode_vkGetImageMemoryRequirements(enc, cmd_flags, device, image, pMemoryRequirements);
2012bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2013bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2014bf215546Sopenharmony_ci            free(cmd_data);
2015bf215546Sopenharmony_ci    }
2016bf215546Sopenharmony_ci}
2017bf215546Sopenharmony_ci
2018bf215546Sopenharmony_cistatic inline void vn_submit_vkBindImageMemory(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, struct vn_instance_submit_command *submit)
2019bf215546Sopenharmony_ci{
2020bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2021bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2022bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkBindImageMemory(device, image, memory, memoryOffset);
2023bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2024bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2025bf215546Sopenharmony_ci        if (!cmd_data)
2026bf215546Sopenharmony_ci            cmd_size = 0;
2027bf215546Sopenharmony_ci    }
2028bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkBindImageMemory_reply(device, image, memory, memoryOffset) : 0;
2029bf215546Sopenharmony_ci
2030bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2031bf215546Sopenharmony_ci    if (cmd_size) {
2032bf215546Sopenharmony_ci        vn_encode_vkBindImageMemory(enc, cmd_flags, device, image, memory, memoryOffset);
2033bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2034bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2035bf215546Sopenharmony_ci            free(cmd_data);
2036bf215546Sopenharmony_ci    }
2037bf215546Sopenharmony_ci}
2038bf215546Sopenharmony_ci
2039bf215546Sopenharmony_cistatic inline void vn_submit_vkGetImageSparseMemoryRequirements(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements, struct vn_instance_submit_command *submit)
2040bf215546Sopenharmony_ci{
2041bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2042bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2043bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2044bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2045bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2046bf215546Sopenharmony_ci        if (!cmd_data)
2047bf215546Sopenharmony_ci            cmd_size = 0;
2048bf215546Sopenharmony_ci    }
2049bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetImageSparseMemoryRequirements_reply(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements) : 0;
2050bf215546Sopenharmony_ci
2051bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2052bf215546Sopenharmony_ci    if (cmd_size) {
2053bf215546Sopenharmony_ci        vn_encode_vkGetImageSparseMemoryRequirements(enc, cmd_flags, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2054bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2055bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2056bf215546Sopenharmony_ci            free(cmd_data);
2057bf215546Sopenharmony_ci    }
2058bf215546Sopenharmony_ci}
2059bf215546Sopenharmony_ci
2060bf215546Sopenharmony_cistatic inline void vn_submit_vkCreateImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage, struct vn_instance_submit_command *submit)
2061bf215546Sopenharmony_ci{
2062bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2063bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2064bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkCreateImage(device, pCreateInfo, pAllocator, pImage);
2065bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2066bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2067bf215546Sopenharmony_ci        if (!cmd_data)
2068bf215546Sopenharmony_ci            cmd_size = 0;
2069bf215546Sopenharmony_ci    }
2070bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCreateImage_reply(device, pCreateInfo, pAllocator, pImage) : 0;
2071bf215546Sopenharmony_ci
2072bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2073bf215546Sopenharmony_ci    if (cmd_size) {
2074bf215546Sopenharmony_ci        vn_encode_vkCreateImage(enc, cmd_flags, device, pCreateInfo, pAllocator, pImage);
2075bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2076bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2077bf215546Sopenharmony_ci            free(cmd_data);
2078bf215546Sopenharmony_ci    }
2079bf215546Sopenharmony_ci}
2080bf215546Sopenharmony_ci
2081bf215546Sopenharmony_cistatic inline void vn_submit_vkDestroyImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, struct vn_instance_submit_command *submit)
2082bf215546Sopenharmony_ci{
2083bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2084bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2085bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkDestroyImage(device, image, pAllocator);
2086bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2087bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2088bf215546Sopenharmony_ci        if (!cmd_data)
2089bf215546Sopenharmony_ci            cmd_size = 0;
2090bf215546Sopenharmony_ci    }
2091bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkDestroyImage_reply(device, image, pAllocator) : 0;
2092bf215546Sopenharmony_ci
2093bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2094bf215546Sopenharmony_ci    if (cmd_size) {
2095bf215546Sopenharmony_ci        vn_encode_vkDestroyImage(enc, cmd_flags, device, image, pAllocator);
2096bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2097bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2098bf215546Sopenharmony_ci            free(cmd_data);
2099bf215546Sopenharmony_ci    }
2100bf215546Sopenharmony_ci}
2101bf215546Sopenharmony_ci
2102bf215546Sopenharmony_cistatic inline void vn_submit_vkGetImageSubresourceLayout(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout, struct vn_instance_submit_command *submit)
2103bf215546Sopenharmony_ci{
2104bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2105bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2106bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetImageSubresourceLayout(device, image, pSubresource, pLayout);
2107bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2108bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2109bf215546Sopenharmony_ci        if (!cmd_data)
2110bf215546Sopenharmony_ci            cmd_size = 0;
2111bf215546Sopenharmony_ci    }
2112bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetImageSubresourceLayout_reply(device, image, pSubresource, pLayout) : 0;
2113bf215546Sopenharmony_ci
2114bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2115bf215546Sopenharmony_ci    if (cmd_size) {
2116bf215546Sopenharmony_ci        vn_encode_vkGetImageSubresourceLayout(enc, cmd_flags, device, image, pSubresource, pLayout);
2117bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2118bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2119bf215546Sopenharmony_ci            free(cmd_data);
2120bf215546Sopenharmony_ci    }
2121bf215546Sopenharmony_ci}
2122bf215546Sopenharmony_ci
2123bf215546Sopenharmony_cistatic inline void vn_submit_vkBindImageMemory2(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, struct vn_instance_submit_command *submit)
2124bf215546Sopenharmony_ci{
2125bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2126bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2127bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkBindImageMemory2(device, bindInfoCount, pBindInfos);
2128bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2129bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2130bf215546Sopenharmony_ci        if (!cmd_data)
2131bf215546Sopenharmony_ci            cmd_size = 0;
2132bf215546Sopenharmony_ci    }
2133bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkBindImageMemory2_reply(device, bindInfoCount, pBindInfos) : 0;
2134bf215546Sopenharmony_ci
2135bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2136bf215546Sopenharmony_ci    if (cmd_size) {
2137bf215546Sopenharmony_ci        vn_encode_vkBindImageMemory2(enc, cmd_flags, device, bindInfoCount, pBindInfos);
2138bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2139bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2140bf215546Sopenharmony_ci            free(cmd_data);
2141bf215546Sopenharmony_ci    }
2142bf215546Sopenharmony_ci}
2143bf215546Sopenharmony_ci
2144bf215546Sopenharmony_cistatic inline void vn_submit_vkGetImageMemoryRequirements2(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, struct vn_instance_submit_command *submit)
2145bf215546Sopenharmony_ci{
2146bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2147bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2148bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements);
2149bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2150bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2151bf215546Sopenharmony_ci        if (!cmd_data)
2152bf215546Sopenharmony_ci            cmd_size = 0;
2153bf215546Sopenharmony_ci    }
2154bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetImageMemoryRequirements2_reply(device, pInfo, pMemoryRequirements) : 0;
2155bf215546Sopenharmony_ci
2156bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2157bf215546Sopenharmony_ci    if (cmd_size) {
2158bf215546Sopenharmony_ci        vn_encode_vkGetImageMemoryRequirements2(enc, cmd_flags, device, pInfo, pMemoryRequirements);
2159bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2160bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2161bf215546Sopenharmony_ci            free(cmd_data);
2162bf215546Sopenharmony_ci    }
2163bf215546Sopenharmony_ci}
2164bf215546Sopenharmony_ci
2165bf215546Sopenharmony_cistatic inline void vn_submit_vkGetImageSparseMemoryRequirements2(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, struct vn_instance_submit_command *submit)
2166bf215546Sopenharmony_ci{
2167bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2168bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2169bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2170bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2171bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2172bf215546Sopenharmony_ci        if (!cmd_data)
2173bf215546Sopenharmony_ci            cmd_size = 0;
2174bf215546Sopenharmony_ci    }
2175bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetImageSparseMemoryRequirements2_reply(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements) : 0;
2176bf215546Sopenharmony_ci
2177bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2178bf215546Sopenharmony_ci    if (cmd_size) {
2179bf215546Sopenharmony_ci        vn_encode_vkGetImageSparseMemoryRequirements2(enc, cmd_flags, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2180bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2181bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2182bf215546Sopenharmony_ci            free(cmd_data);
2183bf215546Sopenharmony_ci    }
2184bf215546Sopenharmony_ci}
2185bf215546Sopenharmony_ci
2186bf215546Sopenharmony_cistatic inline void vn_submit_vkGetDeviceImageMemoryRequirements(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, struct vn_instance_submit_command *submit)
2187bf215546Sopenharmony_ci{
2188bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2189bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2190bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements);
2191bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2192bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2193bf215546Sopenharmony_ci        if (!cmd_data)
2194bf215546Sopenharmony_ci            cmd_size = 0;
2195bf215546Sopenharmony_ci    }
2196bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetDeviceImageMemoryRequirements_reply(device, pInfo, pMemoryRequirements) : 0;
2197bf215546Sopenharmony_ci
2198bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2199bf215546Sopenharmony_ci    if (cmd_size) {
2200bf215546Sopenharmony_ci        vn_encode_vkGetDeviceImageMemoryRequirements(enc, cmd_flags, device, pInfo, pMemoryRequirements);
2201bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2202bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2203bf215546Sopenharmony_ci            free(cmd_data);
2204bf215546Sopenharmony_ci    }
2205bf215546Sopenharmony_ci}
2206bf215546Sopenharmony_ci
2207bf215546Sopenharmony_cistatic inline void vn_submit_vkGetDeviceImageSparseMemoryRequirements(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, struct vn_instance_submit_command *submit)
2208bf215546Sopenharmony_ci{
2209bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2210bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2211bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2212bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2213bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2214bf215546Sopenharmony_ci        if (!cmd_data)
2215bf215546Sopenharmony_ci            cmd_size = 0;
2216bf215546Sopenharmony_ci    }
2217bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetDeviceImageSparseMemoryRequirements_reply(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements) : 0;
2218bf215546Sopenharmony_ci
2219bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2220bf215546Sopenharmony_ci    if (cmd_size) {
2221bf215546Sopenharmony_ci        vn_encode_vkGetDeviceImageSparseMemoryRequirements(enc, cmd_flags, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2222bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2223bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2224bf215546Sopenharmony_ci            free(cmd_data);
2225bf215546Sopenharmony_ci    }
2226bf215546Sopenharmony_ci}
2227bf215546Sopenharmony_ci
2228bf215546Sopenharmony_cistatic inline void vn_submit_vkGetImageDrmFormatModifierPropertiesEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties, struct vn_instance_submit_command *submit)
2229bf215546Sopenharmony_ci{
2230bf215546Sopenharmony_ci    uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
2231bf215546Sopenharmony_ci    void *cmd_data = local_cmd_data;
2232bf215546Sopenharmony_ci    size_t cmd_size = vn_sizeof_vkGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties);
2233bf215546Sopenharmony_ci    if (cmd_size > sizeof(local_cmd_data)) {
2234bf215546Sopenharmony_ci        cmd_data = malloc(cmd_size);
2235bf215546Sopenharmony_ci        if (!cmd_data)
2236bf215546Sopenharmony_ci            cmd_size = 0;
2237bf215546Sopenharmony_ci    }
2238bf215546Sopenharmony_ci    const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetImageDrmFormatModifierPropertiesEXT_reply(device, image, pProperties) : 0;
2239bf215546Sopenharmony_ci
2240bf215546Sopenharmony_ci    struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
2241bf215546Sopenharmony_ci    if (cmd_size) {
2242bf215546Sopenharmony_ci        vn_encode_vkGetImageDrmFormatModifierPropertiesEXT(enc, cmd_flags, device, image, pProperties);
2243bf215546Sopenharmony_ci        vn_instance_submit_command(vn_instance, submit);
2244bf215546Sopenharmony_ci        if (cmd_data != local_cmd_data)
2245bf215546Sopenharmony_ci            free(cmd_data);
2246bf215546Sopenharmony_ci    }
2247bf215546Sopenharmony_ci}
2248bf215546Sopenharmony_ci
2249bf215546Sopenharmony_cistatic inline void vn_call_vkGetImageMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
2250bf215546Sopenharmony_ci{
2251bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2252bf215546Sopenharmony_ci
2253bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2254bf215546Sopenharmony_ci    vn_submit_vkGetImageMemoryRequirements(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, image, pMemoryRequirements, &submit);
2255bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2256bf215546Sopenharmony_ci    if (dec) {
2257bf215546Sopenharmony_ci        vn_decode_vkGetImageMemoryRequirements_reply(dec, device, image, pMemoryRequirements);
2258bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2259bf215546Sopenharmony_ci    }
2260bf215546Sopenharmony_ci}
2261bf215546Sopenharmony_ci
2262bf215546Sopenharmony_cistatic inline void vn_async_vkGetImageMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
2263bf215546Sopenharmony_ci{
2264bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2265bf215546Sopenharmony_ci    vn_submit_vkGetImageMemoryRequirements(vn_instance, 0, device, image, pMemoryRequirements, &submit);
2266bf215546Sopenharmony_ci}
2267bf215546Sopenharmony_ci
2268bf215546Sopenharmony_cistatic inline VkResult vn_call_vkBindImageMemory(struct vn_instance *vn_instance, VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
2269bf215546Sopenharmony_ci{
2270bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2271bf215546Sopenharmony_ci
2272bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2273bf215546Sopenharmony_ci    vn_submit_vkBindImageMemory(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, image, memory, memoryOffset, &submit);
2274bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2275bf215546Sopenharmony_ci    if (dec) {
2276bf215546Sopenharmony_ci        const VkResult ret = vn_decode_vkBindImageMemory_reply(dec, device, image, memory, memoryOffset);
2277bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2278bf215546Sopenharmony_ci        return ret;
2279bf215546Sopenharmony_ci    } else {
2280bf215546Sopenharmony_ci        return VK_ERROR_OUT_OF_HOST_MEMORY;
2281bf215546Sopenharmony_ci    }
2282bf215546Sopenharmony_ci}
2283bf215546Sopenharmony_ci
2284bf215546Sopenharmony_cistatic inline void vn_async_vkBindImageMemory(struct vn_instance *vn_instance, VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
2285bf215546Sopenharmony_ci{
2286bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2287bf215546Sopenharmony_ci    vn_submit_vkBindImageMemory(vn_instance, 0, device, image, memory, memoryOffset, &submit);
2288bf215546Sopenharmony_ci}
2289bf215546Sopenharmony_ci
2290bf215546Sopenharmony_cistatic inline void vn_call_vkGetImageSparseMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
2291bf215546Sopenharmony_ci{
2292bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2293bf215546Sopenharmony_ci
2294bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2295bf215546Sopenharmony_ci    vn_submit_vkGetImageSparseMemoryRequirements(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &submit);
2296bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2297bf215546Sopenharmony_ci    if (dec) {
2298bf215546Sopenharmony_ci        vn_decode_vkGetImageSparseMemoryRequirements_reply(dec, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2299bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2300bf215546Sopenharmony_ci    }
2301bf215546Sopenharmony_ci}
2302bf215546Sopenharmony_ci
2303bf215546Sopenharmony_cistatic inline void vn_async_vkGetImageSparseMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
2304bf215546Sopenharmony_ci{
2305bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2306bf215546Sopenharmony_ci    vn_submit_vkGetImageSparseMemoryRequirements(vn_instance, 0, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &submit);
2307bf215546Sopenharmony_ci}
2308bf215546Sopenharmony_ci
2309bf215546Sopenharmony_cistatic inline VkResult vn_call_vkCreateImage(struct vn_instance *vn_instance, VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
2310bf215546Sopenharmony_ci{
2311bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2312bf215546Sopenharmony_ci
2313bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2314bf215546Sopenharmony_ci    vn_submit_vkCreateImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, pCreateInfo, pAllocator, pImage, &submit);
2315bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2316bf215546Sopenharmony_ci    if (dec) {
2317bf215546Sopenharmony_ci        const VkResult ret = vn_decode_vkCreateImage_reply(dec, device, pCreateInfo, pAllocator, pImage);
2318bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2319bf215546Sopenharmony_ci        return ret;
2320bf215546Sopenharmony_ci    } else {
2321bf215546Sopenharmony_ci        return VK_ERROR_OUT_OF_HOST_MEMORY;
2322bf215546Sopenharmony_ci    }
2323bf215546Sopenharmony_ci}
2324bf215546Sopenharmony_ci
2325bf215546Sopenharmony_cistatic inline void vn_async_vkCreateImage(struct vn_instance *vn_instance, VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
2326bf215546Sopenharmony_ci{
2327bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2328bf215546Sopenharmony_ci    vn_submit_vkCreateImage(vn_instance, 0, device, pCreateInfo, pAllocator, pImage, &submit);
2329bf215546Sopenharmony_ci}
2330bf215546Sopenharmony_ci
2331bf215546Sopenharmony_cistatic inline void vn_call_vkDestroyImage(struct vn_instance *vn_instance, VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
2332bf215546Sopenharmony_ci{
2333bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2334bf215546Sopenharmony_ci
2335bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2336bf215546Sopenharmony_ci    vn_submit_vkDestroyImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, image, pAllocator, &submit);
2337bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2338bf215546Sopenharmony_ci    if (dec) {
2339bf215546Sopenharmony_ci        vn_decode_vkDestroyImage_reply(dec, device, image, pAllocator);
2340bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2341bf215546Sopenharmony_ci    }
2342bf215546Sopenharmony_ci}
2343bf215546Sopenharmony_ci
2344bf215546Sopenharmony_cistatic inline void vn_async_vkDestroyImage(struct vn_instance *vn_instance, VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
2345bf215546Sopenharmony_ci{
2346bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2347bf215546Sopenharmony_ci    vn_submit_vkDestroyImage(vn_instance, 0, device, image, pAllocator, &submit);
2348bf215546Sopenharmony_ci}
2349bf215546Sopenharmony_ci
2350bf215546Sopenharmony_cistatic inline void vn_call_vkGetImageSubresourceLayout(struct vn_instance *vn_instance, VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
2351bf215546Sopenharmony_ci{
2352bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2353bf215546Sopenharmony_ci
2354bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2355bf215546Sopenharmony_ci    vn_submit_vkGetImageSubresourceLayout(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, image, pSubresource, pLayout, &submit);
2356bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2357bf215546Sopenharmony_ci    if (dec) {
2358bf215546Sopenharmony_ci        vn_decode_vkGetImageSubresourceLayout_reply(dec, device, image, pSubresource, pLayout);
2359bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2360bf215546Sopenharmony_ci    }
2361bf215546Sopenharmony_ci}
2362bf215546Sopenharmony_ci
2363bf215546Sopenharmony_cistatic inline void vn_async_vkGetImageSubresourceLayout(struct vn_instance *vn_instance, VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
2364bf215546Sopenharmony_ci{
2365bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2366bf215546Sopenharmony_ci    vn_submit_vkGetImageSubresourceLayout(vn_instance, 0, device, image, pSubresource, pLayout, &submit);
2367bf215546Sopenharmony_ci}
2368bf215546Sopenharmony_ci
2369bf215546Sopenharmony_cistatic inline VkResult vn_call_vkBindImageMemory2(struct vn_instance *vn_instance, VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
2370bf215546Sopenharmony_ci{
2371bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2372bf215546Sopenharmony_ci
2373bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2374bf215546Sopenharmony_ci    vn_submit_vkBindImageMemory2(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, bindInfoCount, pBindInfos, &submit);
2375bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2376bf215546Sopenharmony_ci    if (dec) {
2377bf215546Sopenharmony_ci        const VkResult ret = vn_decode_vkBindImageMemory2_reply(dec, device, bindInfoCount, pBindInfos);
2378bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2379bf215546Sopenharmony_ci        return ret;
2380bf215546Sopenharmony_ci    } else {
2381bf215546Sopenharmony_ci        return VK_ERROR_OUT_OF_HOST_MEMORY;
2382bf215546Sopenharmony_ci    }
2383bf215546Sopenharmony_ci}
2384bf215546Sopenharmony_ci
2385bf215546Sopenharmony_cistatic inline void vn_async_vkBindImageMemory2(struct vn_instance *vn_instance, VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
2386bf215546Sopenharmony_ci{
2387bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2388bf215546Sopenharmony_ci    vn_submit_vkBindImageMemory2(vn_instance, 0, device, bindInfoCount, pBindInfos, &submit);
2389bf215546Sopenharmony_ci}
2390bf215546Sopenharmony_ci
2391bf215546Sopenharmony_cistatic inline void vn_call_vkGetImageMemoryRequirements2(struct vn_instance *vn_instance, VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
2392bf215546Sopenharmony_ci{
2393bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2394bf215546Sopenharmony_ci
2395bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2396bf215546Sopenharmony_ci    vn_submit_vkGetImageMemoryRequirements2(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, pInfo, pMemoryRequirements, &submit);
2397bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2398bf215546Sopenharmony_ci    if (dec) {
2399bf215546Sopenharmony_ci        vn_decode_vkGetImageMemoryRequirements2_reply(dec, device, pInfo, pMemoryRequirements);
2400bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2401bf215546Sopenharmony_ci    }
2402bf215546Sopenharmony_ci}
2403bf215546Sopenharmony_ci
2404bf215546Sopenharmony_cistatic inline void vn_async_vkGetImageMemoryRequirements2(struct vn_instance *vn_instance, VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
2405bf215546Sopenharmony_ci{
2406bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2407bf215546Sopenharmony_ci    vn_submit_vkGetImageMemoryRequirements2(vn_instance, 0, device, pInfo, pMemoryRequirements, &submit);
2408bf215546Sopenharmony_ci}
2409bf215546Sopenharmony_ci
2410bf215546Sopenharmony_cistatic inline void vn_call_vkGetImageSparseMemoryRequirements2(struct vn_instance *vn_instance, VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
2411bf215546Sopenharmony_ci{
2412bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2413bf215546Sopenharmony_ci
2414bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2415bf215546Sopenharmony_ci    vn_submit_vkGetImageSparseMemoryRequirements2(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &submit);
2416bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2417bf215546Sopenharmony_ci    if (dec) {
2418bf215546Sopenharmony_ci        vn_decode_vkGetImageSparseMemoryRequirements2_reply(dec, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2419bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2420bf215546Sopenharmony_ci    }
2421bf215546Sopenharmony_ci}
2422bf215546Sopenharmony_ci
2423bf215546Sopenharmony_cistatic inline void vn_async_vkGetImageSparseMemoryRequirements2(struct vn_instance *vn_instance, VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
2424bf215546Sopenharmony_ci{
2425bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2426bf215546Sopenharmony_ci    vn_submit_vkGetImageSparseMemoryRequirements2(vn_instance, 0, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &submit);
2427bf215546Sopenharmony_ci}
2428bf215546Sopenharmony_ci
2429bf215546Sopenharmony_cistatic inline void vn_call_vkGetDeviceImageMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements)
2430bf215546Sopenharmony_ci{
2431bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2432bf215546Sopenharmony_ci
2433bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2434bf215546Sopenharmony_ci    vn_submit_vkGetDeviceImageMemoryRequirements(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, pInfo, pMemoryRequirements, &submit);
2435bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2436bf215546Sopenharmony_ci    if (dec) {
2437bf215546Sopenharmony_ci        vn_decode_vkGetDeviceImageMemoryRequirements_reply(dec, device, pInfo, pMemoryRequirements);
2438bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2439bf215546Sopenharmony_ci    }
2440bf215546Sopenharmony_ci}
2441bf215546Sopenharmony_ci
2442bf215546Sopenharmony_cistatic inline void vn_async_vkGetDeviceImageMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements)
2443bf215546Sopenharmony_ci{
2444bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2445bf215546Sopenharmony_ci    vn_submit_vkGetDeviceImageMemoryRequirements(vn_instance, 0, device, pInfo, pMemoryRequirements, &submit);
2446bf215546Sopenharmony_ci}
2447bf215546Sopenharmony_ci
2448bf215546Sopenharmony_cistatic inline void vn_call_vkGetDeviceImageSparseMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
2449bf215546Sopenharmony_ci{
2450bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2451bf215546Sopenharmony_ci
2452bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2453bf215546Sopenharmony_ci    vn_submit_vkGetDeviceImageSparseMemoryRequirements(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &submit);
2454bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2455bf215546Sopenharmony_ci    if (dec) {
2456bf215546Sopenharmony_ci        vn_decode_vkGetDeviceImageSparseMemoryRequirements_reply(dec, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
2457bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2458bf215546Sopenharmony_ci    }
2459bf215546Sopenharmony_ci}
2460bf215546Sopenharmony_ci
2461bf215546Sopenharmony_cistatic inline void vn_async_vkGetDeviceImageSparseMemoryRequirements(struct vn_instance *vn_instance, VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
2462bf215546Sopenharmony_ci{
2463bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2464bf215546Sopenharmony_ci    vn_submit_vkGetDeviceImageSparseMemoryRequirements(vn_instance, 0, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &submit);
2465bf215546Sopenharmony_ci}
2466bf215546Sopenharmony_ci
2467bf215546Sopenharmony_cistatic inline VkResult vn_call_vkGetImageDrmFormatModifierPropertiesEXT(struct vn_instance *vn_instance, VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties)
2468bf215546Sopenharmony_ci{
2469bf215546Sopenharmony_ci    VN_TRACE_FUNC();
2470bf215546Sopenharmony_ci
2471bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2472bf215546Sopenharmony_ci    vn_submit_vkGetImageDrmFormatModifierPropertiesEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, image, pProperties, &submit);
2473bf215546Sopenharmony_ci    struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
2474bf215546Sopenharmony_ci    if (dec) {
2475bf215546Sopenharmony_ci        const VkResult ret = vn_decode_vkGetImageDrmFormatModifierPropertiesEXT_reply(dec, device, image, pProperties);
2476bf215546Sopenharmony_ci        vn_instance_free_command_reply(vn_instance, &submit);
2477bf215546Sopenharmony_ci        return ret;
2478bf215546Sopenharmony_ci    } else {
2479bf215546Sopenharmony_ci        return VK_ERROR_OUT_OF_HOST_MEMORY;
2480bf215546Sopenharmony_ci    }
2481bf215546Sopenharmony_ci}
2482bf215546Sopenharmony_ci
2483bf215546Sopenharmony_cistatic inline void vn_async_vkGetImageDrmFormatModifierPropertiesEXT(struct vn_instance *vn_instance, VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties)
2484bf215546Sopenharmony_ci{
2485bf215546Sopenharmony_ci    struct vn_instance_submit_command submit;
2486bf215546Sopenharmony_ci    vn_submit_vkGetImageDrmFormatModifierPropertiesEXT(vn_instance, 0, device, image, pProperties, &submit);
2487bf215546Sopenharmony_ci}
2488bf215546Sopenharmony_ci
2489bf215546Sopenharmony_ci#endif /* VN_PROTOCOL_DRIVER_IMAGE_H */
2490