1 /* This file is generated by venus-protocol. See vn_protocol_driver.h. */
2
3 /*
4 * Copyright 2020 Google LLC
5 * SPDX-License-Identifier: MIT
6 */
7
8 #ifndef VN_PROTOCOL_DRIVER_TRANSPORT_H
9 #define VN_PROTOCOL_DRIVER_TRANSPORT_H
10
11 #include "vn_instance.h"
12 #include "vn_protocol_driver_structs.h"
13
14 /*
15 * These structs/unions/commands are not included
16 *
17 * vkGetMemoryFdKHR
18 * vkGetMemoryFdPropertiesKHR
19 * vkImportFenceFdKHR
20 */
21
22 /* struct VkCommandStreamDescriptionMESA */
23
24 static inline size_t
vn_sizeof_VkCommandStreamDescriptionMESA(const VkCommandStreamDescriptionMESA * val)25 vn_sizeof_VkCommandStreamDescriptionMESA(const VkCommandStreamDescriptionMESA *val)
26 {
27 size_t size = 0;
28 size += vn_sizeof_uint32_t(&val->resourceId);
29 size += vn_sizeof_size_t(&val->offset);
30 size += vn_sizeof_size_t(&val->size);
31 return size;
32 }
33
34 static inline void
vn_encode_VkCommandStreamDescriptionMESA(struct vn_cs_encoder * enc,const VkCommandStreamDescriptionMESA * val)35 vn_encode_VkCommandStreamDescriptionMESA(struct vn_cs_encoder *enc, const VkCommandStreamDescriptionMESA *val)
36 {
37 vn_encode_uint32_t(enc, &val->resourceId);
38 vn_encode_size_t(enc, &val->offset);
39 vn_encode_size_t(enc, &val->size);
40 }
41
42 /* struct VkCommandStreamDependencyMESA */
43
44 static inline size_t
vn_sizeof_VkCommandStreamDependencyMESA(const VkCommandStreamDependencyMESA * val)45 vn_sizeof_VkCommandStreamDependencyMESA(const VkCommandStreamDependencyMESA *val)
46 {
47 size_t size = 0;
48 size += vn_sizeof_uint32_t(&val->srcCommandStream);
49 size += vn_sizeof_uint32_t(&val->dstCommandStream);
50 return size;
51 }
52
53 static inline void
vn_encode_VkCommandStreamDependencyMESA(struct vn_cs_encoder * enc,const VkCommandStreamDependencyMESA * val)54 vn_encode_VkCommandStreamDependencyMESA(struct vn_cs_encoder *enc, const VkCommandStreamDependencyMESA *val)
55 {
56 vn_encode_uint32_t(enc, &val->srcCommandStream);
57 vn_encode_uint32_t(enc, &val->dstCommandStream);
58 }
59
60 /* struct VkRingCreateInfoMESA chain */
61
62 static inline size_t
vn_sizeof_VkRingCreateInfoMESA_pnext(const void * val)63 vn_sizeof_VkRingCreateInfoMESA_pnext(const void *val)
64 {
65 /* no known/supported struct */
66 return vn_sizeof_simple_pointer(NULL);
67 }
68
69 static inline size_t
vn_sizeof_VkRingCreateInfoMESA_self(const VkRingCreateInfoMESA * val)70 vn_sizeof_VkRingCreateInfoMESA_self(const VkRingCreateInfoMESA *val)
71 {
72 size_t size = 0;
73 /* skip val->{sType,pNext} */
74 size += vn_sizeof_VkFlags(&val->flags);
75 size += vn_sizeof_uint32_t(&val->resourceId);
76 size += vn_sizeof_size_t(&val->offset);
77 size += vn_sizeof_size_t(&val->size);
78 size += vn_sizeof_uint64_t(&val->idleTimeout);
79 size += vn_sizeof_size_t(&val->headOffset);
80 size += vn_sizeof_size_t(&val->tailOffset);
81 size += vn_sizeof_size_t(&val->statusOffset);
82 size += vn_sizeof_size_t(&val->bufferOffset);
83 size += vn_sizeof_size_t(&val->bufferSize);
84 size += vn_sizeof_size_t(&val->extraOffset);
85 size += vn_sizeof_size_t(&val->extraSize);
86 return size;
87 }
88
89 static inline size_t
vn_sizeof_VkRingCreateInfoMESA(const VkRingCreateInfoMESA * val)90 vn_sizeof_VkRingCreateInfoMESA(const VkRingCreateInfoMESA *val)
91 {
92 size_t size = 0;
93
94 size += vn_sizeof_VkStructureType(&val->sType);
95 size += vn_sizeof_VkRingCreateInfoMESA_pnext(val->pNext);
96 size += vn_sizeof_VkRingCreateInfoMESA_self(val);
97
98 return size;
99 }
100
101 static inline void
vn_encode_VkRingCreateInfoMESA_pnext(struct vn_cs_encoder * enc,const void * val)102 vn_encode_VkRingCreateInfoMESA_pnext(struct vn_cs_encoder *enc, const void *val)
103 {
104 /* no known/supported struct */
105 vn_encode_simple_pointer(enc, NULL);
106 }
107
108 static inline void
vn_encode_VkRingCreateInfoMESA_self(struct vn_cs_encoder * enc,const VkRingCreateInfoMESA * val)109 vn_encode_VkRingCreateInfoMESA_self(struct vn_cs_encoder *enc, const VkRingCreateInfoMESA *val)
110 {
111 /* skip val->{sType,pNext} */
112 vn_encode_VkFlags(enc, &val->flags);
113 vn_encode_uint32_t(enc, &val->resourceId);
114 vn_encode_size_t(enc, &val->offset);
115 vn_encode_size_t(enc, &val->size);
116 vn_encode_uint64_t(enc, &val->idleTimeout);
117 vn_encode_size_t(enc, &val->headOffset);
118 vn_encode_size_t(enc, &val->tailOffset);
119 vn_encode_size_t(enc, &val->statusOffset);
120 vn_encode_size_t(enc, &val->bufferOffset);
121 vn_encode_size_t(enc, &val->bufferSize);
122 vn_encode_size_t(enc, &val->extraOffset);
123 vn_encode_size_t(enc, &val->extraSize);
124 }
125
126 static inline void
vn_encode_VkRingCreateInfoMESA(struct vn_cs_encoder * enc,const VkRingCreateInfoMESA * val)127 vn_encode_VkRingCreateInfoMESA(struct vn_cs_encoder *enc, const VkRingCreateInfoMESA *val)
128 {
129 assert(val->sType == VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA);
130 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA });
131 vn_encode_VkRingCreateInfoMESA_pnext(enc, val->pNext);
132 vn_encode_VkRingCreateInfoMESA_self(enc, val);
133 }
134
135 /* struct VkMemoryResourceAllocationSizeProperties100000MESA chain */
136
137 static inline size_t
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(const void * val)138 vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(const void *val)
139 {
140 /* no known/supported struct */
141 return vn_sizeof_simple_pointer(NULL);
142 }
143
144 static inline size_t
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self(const VkMemoryResourceAllocationSizeProperties100000MESA * val)145 vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
146 {
147 size_t size = 0;
148 /* skip val->{sType,pNext} */
149 size += vn_sizeof_uint64_t(&val->allocationSize);
150 return size;
151 }
152
153 static inline size_t
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA(const VkMemoryResourceAllocationSizeProperties100000MESA * val)154 vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
155 {
156 size_t size = 0;
157
158 size += vn_sizeof_VkStructureType(&val->sType);
159 size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(val->pNext);
160 size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self(val);
161
162 return size;
163 }
164
165 static inline void
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(struct vn_cs_decoder * dec,const void * val)166 vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(struct vn_cs_decoder *dec, const void *val)
167 {
168 /* no known/supported struct */
169 if (vn_decode_simple_pointer(dec))
170 assert(false);
171 }
172
173 static inline void
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(struct vn_cs_decoder * dec,VkMemoryResourceAllocationSizeProperties100000MESA * val)174 vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizeProperties100000MESA *val)
175 {
176 /* skip val->{sType,pNext} */
177 vn_decode_uint64_t(dec, &val->allocationSize);
178 }
179
180 static inline void
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA(struct vn_cs_decoder * dec,VkMemoryResourceAllocationSizeProperties100000MESA * val)181 vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizeProperties100000MESA *val)
182 {
183 VkStructureType stype;
184 vn_decode_VkStructureType(dec, &stype);
185 assert(stype == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA);
186
187 assert(val->sType == stype);
188 vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(dec, val->pNext);
189 vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(dec, val);
190 }
191
192 static inline size_t
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(const void * val)193 vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(const void *val)
194 {
195 /* no known/supported struct */
196 return vn_sizeof_simple_pointer(NULL);
197 }
198
199 static inline size_t
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(const VkMemoryResourceAllocationSizeProperties100000MESA * val)200 vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
201 {
202 size_t size = 0;
203 /* skip val->{sType,pNext} */
204 /* skip val->allocationSize */
205 return size;
206 }
207
208 static inline size_t
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_partial(const VkMemoryResourceAllocationSizeProperties100000MESA * val)209 vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_partial(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
210 {
211 size_t size = 0;
212
213 size += vn_sizeof_VkStructureType(&val->sType);
214 size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(val->pNext);
215 size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(val);
216
217 return size;
218 }
219
220 static inline void
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(struct vn_cs_encoder * enc,const void * val)221 vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(struct vn_cs_encoder *enc, const void *val)
222 {
223 /* no known/supported struct */
224 vn_encode_simple_pointer(enc, NULL);
225 }
226
227 static inline void
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(struct vn_cs_encoder * enc,const VkMemoryResourceAllocationSizeProperties100000MESA * val)228 vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizeProperties100000MESA *val)
229 {
230 /* skip val->{sType,pNext} */
231 /* skip val->allocationSize */
232 }
233
234 static inline void
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_partial(struct vn_cs_encoder * enc,const VkMemoryResourceAllocationSizeProperties100000MESA * val)235 vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_partial(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizeProperties100000MESA *val)
236 {
237 assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA);
238 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA });
239 vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(enc, val->pNext);
240 vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(enc, val);
241 }
242
243 /* struct VkMemoryResourcePropertiesMESA chain */
244
245 static inline size_t
vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(const void * val)246 vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(const void *val)
247 {
248 const VkBaseInStructure *pnext = val;
249 size_t size = 0;
250
251 while (pnext) {
252 switch ((int32_t)pnext->sType) {
253 case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
254 size += vn_sizeof_simple_pointer(pnext);
255 size += vn_sizeof_VkStructureType(&pnext->sType);
256 size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(pnext->pNext);
257 size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self((const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
258 return size;
259 default:
260 /* ignore unknown/unsupported struct */
261 break;
262 }
263 pnext = pnext->pNext;
264 }
265
266 return vn_sizeof_simple_pointer(NULL);
267 }
268
269 static inline size_t
vn_sizeof_VkMemoryResourcePropertiesMESA_self(const VkMemoryResourcePropertiesMESA * val)270 vn_sizeof_VkMemoryResourcePropertiesMESA_self(const VkMemoryResourcePropertiesMESA *val)
271 {
272 size_t size = 0;
273 /* skip val->{sType,pNext} */
274 size += vn_sizeof_uint32_t(&val->memoryTypeBits);
275 return size;
276 }
277
278 static inline size_t
vn_sizeof_VkMemoryResourcePropertiesMESA(const VkMemoryResourcePropertiesMESA * val)279 vn_sizeof_VkMemoryResourcePropertiesMESA(const VkMemoryResourcePropertiesMESA *val)
280 {
281 size_t size = 0;
282
283 size += vn_sizeof_VkStructureType(&val->sType);
284 size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(val->pNext);
285 size += vn_sizeof_VkMemoryResourcePropertiesMESA_self(val);
286
287 return size;
288 }
289
290 static inline void
vn_decode_VkMemoryResourcePropertiesMESA_pnext(struct vn_cs_decoder * dec,const void * val)291 vn_decode_VkMemoryResourcePropertiesMESA_pnext(struct vn_cs_decoder *dec, const void *val)
292 {
293 VkBaseOutStructure *pnext = (VkBaseOutStructure *)val;
294 VkStructureType stype;
295
296 if (!vn_decode_simple_pointer(dec))
297 return;
298
299 vn_decode_VkStructureType(dec, &stype);
300 while (true) {
301 assert(pnext);
302 if (pnext->sType == stype)
303 break;
304
305 pnext = pnext->pNext;
306 }
307
308 switch ((int32_t)pnext->sType) {
309 case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
310 vn_decode_VkMemoryResourcePropertiesMESA_pnext(dec, pnext->pNext);
311 vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(dec, (VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
312 break;
313 default:
314 assert(false);
315 break;
316 }
317 }
318
319 static inline void
vn_decode_VkMemoryResourcePropertiesMESA_self(struct vn_cs_decoder * dec,VkMemoryResourcePropertiesMESA * val)320 vn_decode_VkMemoryResourcePropertiesMESA_self(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val)
321 {
322 /* skip val->{sType,pNext} */
323 vn_decode_uint32_t(dec, &val->memoryTypeBits);
324 }
325
326 static inline void
vn_decode_VkMemoryResourcePropertiesMESA(struct vn_cs_decoder * dec,VkMemoryResourcePropertiesMESA * val)327 vn_decode_VkMemoryResourcePropertiesMESA(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val)
328 {
329 VkStructureType stype;
330 vn_decode_VkStructureType(dec, &stype);
331 assert(stype == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA);
332
333 assert(val->sType == stype);
334 vn_decode_VkMemoryResourcePropertiesMESA_pnext(dec, val->pNext);
335 vn_decode_VkMemoryResourcePropertiesMESA_self(dec, val);
336 }
337
338 static inline size_t
vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(const void * val)339 vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(const void *val)
340 {
341 const VkBaseInStructure *pnext = val;
342 size_t size = 0;
343
344 while (pnext) {
345 switch ((int32_t)pnext->sType) {
346 case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
347 size += vn_sizeof_simple_pointer(pnext);
348 size += vn_sizeof_VkStructureType(&pnext->sType);
349 size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(pnext->pNext);
350 size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial((const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
351 return size;
352 default:
353 /* ignore unknown/unsupported struct */
354 break;
355 }
356 pnext = pnext->pNext;
357 }
358
359 return vn_sizeof_simple_pointer(NULL);
360 }
361
362 static inline size_t
vn_sizeof_VkMemoryResourcePropertiesMESA_self_partial(const VkMemoryResourcePropertiesMESA * val)363 vn_sizeof_VkMemoryResourcePropertiesMESA_self_partial(const VkMemoryResourcePropertiesMESA *val)
364 {
365 size_t size = 0;
366 /* skip val->{sType,pNext} */
367 /* skip val->memoryTypeBits */
368 return size;
369 }
370
371 static inline size_t
vn_sizeof_VkMemoryResourcePropertiesMESA_partial(const VkMemoryResourcePropertiesMESA * val)372 vn_sizeof_VkMemoryResourcePropertiesMESA_partial(const VkMemoryResourcePropertiesMESA *val)
373 {
374 size_t size = 0;
375
376 size += vn_sizeof_VkStructureType(&val->sType);
377 size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(val->pNext);
378 size += vn_sizeof_VkMemoryResourcePropertiesMESA_self_partial(val);
379
380 return size;
381 }
382
383 static inline void
vn_encode_VkMemoryResourcePropertiesMESA_pnext_partial(struct vn_cs_encoder * enc,const void * val)384 vn_encode_VkMemoryResourcePropertiesMESA_pnext_partial(struct vn_cs_encoder *enc, const void *val)
385 {
386 const VkBaseInStructure *pnext = val;
387
388 while (pnext) {
389 switch ((int32_t)pnext->sType) {
390 case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
391 vn_encode_simple_pointer(enc, pnext);
392 vn_encode_VkStructureType(enc, &pnext->sType);
393 vn_encode_VkMemoryResourcePropertiesMESA_pnext_partial(enc, pnext->pNext);
394 vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(enc, (const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
395 return;
396 default:
397 /* ignore unknown/unsupported struct */
398 break;
399 }
400 pnext = pnext->pNext;
401 }
402
403 vn_encode_simple_pointer(enc, NULL);
404 }
405
406 static inline void
vn_encode_VkMemoryResourcePropertiesMESA_self_partial(struct vn_cs_encoder * enc,const VkMemoryResourcePropertiesMESA * val)407 vn_encode_VkMemoryResourcePropertiesMESA_self_partial(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val)
408 {
409 /* skip val->{sType,pNext} */
410 /* skip val->memoryTypeBits */
411 }
412
413 static inline void
vn_encode_VkMemoryResourcePropertiesMESA_partial(struct vn_cs_encoder * enc,const VkMemoryResourcePropertiesMESA * val)414 vn_encode_VkMemoryResourcePropertiesMESA_partial(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val)
415 {
416 assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA);
417 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA });
418 vn_encode_VkMemoryResourcePropertiesMESA_pnext_partial(enc, val->pNext);
419 vn_encode_VkMemoryResourcePropertiesMESA_self_partial(enc, val);
420 }
421
vn_sizeof_vkSetReplyCommandStreamMESA(const VkCommandStreamDescriptionMESA * pStream)422 static inline size_t vn_sizeof_vkSetReplyCommandStreamMESA(const VkCommandStreamDescriptionMESA* pStream)
423 {
424 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT;
425 const VkFlags cmd_flags = 0;
426 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
427
428 cmd_size += vn_sizeof_simple_pointer(pStream);
429 if (pStream)
430 cmd_size += vn_sizeof_VkCommandStreamDescriptionMESA(pStream);
431
432 return cmd_size;
433 }
434
vn_encode_vkSetReplyCommandStreamMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,const VkCommandStreamDescriptionMESA * pStream)435 static inline void vn_encode_vkSetReplyCommandStreamMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, const VkCommandStreamDescriptionMESA* pStream)
436 {
437 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT;
438
439 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
440 vn_encode_VkFlags(enc, &cmd_flags);
441
442 if (vn_encode_simple_pointer(enc, pStream))
443 vn_encode_VkCommandStreamDescriptionMESA(enc, pStream);
444 }
445
vn_sizeof_vkSetReplyCommandStreamMESA_reply(const VkCommandStreamDescriptionMESA * pStream)446 static inline size_t vn_sizeof_vkSetReplyCommandStreamMESA_reply(const VkCommandStreamDescriptionMESA* pStream)
447 {
448 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT;
449 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
450
451 /* skip pStream */
452
453 return cmd_size;
454 }
455
vn_decode_vkSetReplyCommandStreamMESA_reply(struct vn_cs_decoder * dec,const VkCommandStreamDescriptionMESA * pStream)456 static inline void vn_decode_vkSetReplyCommandStreamMESA_reply(struct vn_cs_decoder *dec, const VkCommandStreamDescriptionMESA* pStream)
457 {
458 VkCommandTypeEXT command_type;
459 vn_decode_VkCommandTypeEXT(dec, &command_type);
460 assert(command_type == VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT);
461
462 /* skip pStream */
463 }
464
vn_sizeof_vkSeekReplyCommandStreamMESA(size_t position)465 static inline size_t vn_sizeof_vkSeekReplyCommandStreamMESA(size_t position)
466 {
467 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT;
468 const VkFlags cmd_flags = 0;
469 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
470
471 cmd_size += vn_sizeof_size_t(&position);
472
473 return cmd_size;
474 }
475
vn_encode_vkSeekReplyCommandStreamMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,size_t position)476 static inline void vn_encode_vkSeekReplyCommandStreamMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, size_t position)
477 {
478 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT;
479
480 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
481 vn_encode_VkFlags(enc, &cmd_flags);
482
483 vn_encode_size_t(enc, &position);
484 }
485
vn_sizeof_vkSeekReplyCommandStreamMESA_reply(size_t position)486 static inline size_t vn_sizeof_vkSeekReplyCommandStreamMESA_reply(size_t position)
487 {
488 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT;
489 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
490
491 /* skip position */
492
493 return cmd_size;
494 }
495
vn_decode_vkSeekReplyCommandStreamMESA_reply(struct vn_cs_decoder * dec,size_t position)496 static inline void vn_decode_vkSeekReplyCommandStreamMESA_reply(struct vn_cs_decoder *dec, size_t position)
497 {
498 VkCommandTypeEXT command_type;
499 vn_decode_VkCommandTypeEXT(dec, &command_type);
500 assert(command_type == VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT);
501
502 /* skip position */
503 }
504
vn_sizeof_vkExecuteCommandStreamsMESA(uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags)505 static inline size_t vn_sizeof_vkExecuteCommandStreamsMESA(uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags)
506 {
507 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT;
508 const VkFlags cmd_flags = 0;
509 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
510
511 cmd_size += vn_sizeof_uint32_t(&streamCount);
512 if (pStreams) {
513 cmd_size += vn_sizeof_array_size(streamCount);
514 for (uint32_t i = 0; i < streamCount; i++)
515 cmd_size += vn_sizeof_VkCommandStreamDescriptionMESA(&pStreams[i]);
516 } else {
517 cmd_size += vn_sizeof_array_size(0);
518 }
519 if (pReplyPositions) {
520 cmd_size += vn_sizeof_array_size(streamCount);
521 cmd_size += vn_sizeof_size_t_array(pReplyPositions, streamCount);
522 } else {
523 cmd_size += vn_sizeof_array_size(0);
524 }
525 cmd_size += vn_sizeof_uint32_t(&dependencyCount);
526 if (pDependencies) {
527 cmd_size += vn_sizeof_array_size(dependencyCount);
528 for (uint32_t i = 0; i < dependencyCount; i++)
529 cmd_size += vn_sizeof_VkCommandStreamDependencyMESA(&pDependencies[i]);
530 } else {
531 cmd_size += vn_sizeof_array_size(0);
532 }
533 cmd_size += vn_sizeof_VkFlags(&flags);
534
535 return cmd_size;
536 }
537
vn_encode_vkExecuteCommandStreamsMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags)538 static inline void vn_encode_vkExecuteCommandStreamsMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags)
539 {
540 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT;
541
542 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
543 vn_encode_VkFlags(enc, &cmd_flags);
544
545 vn_encode_uint32_t(enc, &streamCount);
546 if (pStreams) {
547 vn_encode_array_size(enc, streamCount);
548 for (uint32_t i = 0; i < streamCount; i++)
549 vn_encode_VkCommandStreamDescriptionMESA(enc, &pStreams[i]);
550 } else {
551 vn_encode_array_size(enc, 0);
552 }
553 if (pReplyPositions) {
554 vn_encode_array_size(enc, streamCount);
555 vn_encode_size_t_array(enc, pReplyPositions, streamCount);
556 } else {
557 vn_encode_array_size(enc, 0);
558 }
559 vn_encode_uint32_t(enc, &dependencyCount);
560 if (pDependencies) {
561 vn_encode_array_size(enc, dependencyCount);
562 for (uint32_t i = 0; i < dependencyCount; i++)
563 vn_encode_VkCommandStreamDependencyMESA(enc, &pDependencies[i]);
564 } else {
565 vn_encode_array_size(enc, 0);
566 }
567 vn_encode_VkFlags(enc, &flags);
568 }
569
vn_sizeof_vkExecuteCommandStreamsMESA_reply(uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags)570 static inline size_t vn_sizeof_vkExecuteCommandStreamsMESA_reply(uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags)
571 {
572 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT;
573 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
574
575 /* skip streamCount */
576 /* skip pStreams */
577 /* skip pReplyPositions */
578 /* skip dependencyCount */
579 /* skip pDependencies */
580 /* skip flags */
581
582 return cmd_size;
583 }
584
vn_decode_vkExecuteCommandStreamsMESA_reply(struct vn_cs_decoder * dec,uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags)585 static inline void vn_decode_vkExecuteCommandStreamsMESA_reply(struct vn_cs_decoder *dec, uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags)
586 {
587 VkCommandTypeEXT command_type;
588 vn_decode_VkCommandTypeEXT(dec, &command_type);
589 assert(command_type == VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT);
590
591 /* skip streamCount */
592 /* skip pStreams */
593 /* skip pReplyPositions */
594 /* skip dependencyCount */
595 /* skip pDependencies */
596 /* skip flags */
597 }
598
vn_sizeof_vkCreateRingMESA(uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo)599 static inline size_t vn_sizeof_vkCreateRingMESA(uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo)
600 {
601 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCreateRingMESA_EXT;
602 const VkFlags cmd_flags = 0;
603 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
604
605 cmd_size += vn_sizeof_uint64_t(&ring);
606 cmd_size += vn_sizeof_simple_pointer(pCreateInfo);
607 if (pCreateInfo)
608 cmd_size += vn_sizeof_VkRingCreateInfoMESA(pCreateInfo);
609
610 return cmd_size;
611 }
612
vn_encode_vkCreateRingMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo)613 static inline void vn_encode_vkCreateRingMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo)
614 {
615 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCreateRingMESA_EXT;
616
617 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
618 vn_encode_VkFlags(enc, &cmd_flags);
619
620 vn_encode_uint64_t(enc, &ring);
621 if (vn_encode_simple_pointer(enc, pCreateInfo))
622 vn_encode_VkRingCreateInfoMESA(enc, pCreateInfo);
623 }
624
vn_sizeof_vkCreateRingMESA_reply(uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo)625 static inline size_t vn_sizeof_vkCreateRingMESA_reply(uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo)
626 {
627 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCreateRingMESA_EXT;
628 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
629
630 /* skip ring */
631 /* skip pCreateInfo */
632
633 return cmd_size;
634 }
635
vn_decode_vkCreateRingMESA_reply(struct vn_cs_decoder * dec,uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo)636 static inline void vn_decode_vkCreateRingMESA_reply(struct vn_cs_decoder *dec, uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo)
637 {
638 VkCommandTypeEXT command_type;
639 vn_decode_VkCommandTypeEXT(dec, &command_type);
640 assert(command_type == VK_COMMAND_TYPE_vkCreateRingMESA_EXT);
641
642 /* skip ring */
643 /* skip pCreateInfo */
644 }
645
vn_sizeof_vkDestroyRingMESA(uint64_t ring)646 static inline size_t vn_sizeof_vkDestroyRingMESA(uint64_t ring)
647 {
648 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkDestroyRingMESA_EXT;
649 const VkFlags cmd_flags = 0;
650 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
651
652 cmd_size += vn_sizeof_uint64_t(&ring);
653
654 return cmd_size;
655 }
656
vn_encode_vkDestroyRingMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,uint64_t ring)657 static inline void vn_encode_vkDestroyRingMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, uint64_t ring)
658 {
659 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkDestroyRingMESA_EXT;
660
661 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
662 vn_encode_VkFlags(enc, &cmd_flags);
663
664 vn_encode_uint64_t(enc, &ring);
665 }
666
vn_sizeof_vkDestroyRingMESA_reply(uint64_t ring)667 static inline size_t vn_sizeof_vkDestroyRingMESA_reply(uint64_t ring)
668 {
669 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkDestroyRingMESA_EXT;
670 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
671
672 /* skip ring */
673
674 return cmd_size;
675 }
676
vn_decode_vkDestroyRingMESA_reply(struct vn_cs_decoder * dec,uint64_t ring)677 static inline void vn_decode_vkDestroyRingMESA_reply(struct vn_cs_decoder *dec, uint64_t ring)
678 {
679 VkCommandTypeEXT command_type;
680 vn_decode_VkCommandTypeEXT(dec, &command_type);
681 assert(command_type == VK_COMMAND_TYPE_vkDestroyRingMESA_EXT);
682
683 /* skip ring */
684 }
685
vn_sizeof_vkNotifyRingMESA(uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags)686 static inline size_t vn_sizeof_vkNotifyRingMESA(uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags)
687 {
688 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkNotifyRingMESA_EXT;
689 const VkFlags cmd_flags = 0;
690 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
691
692 cmd_size += vn_sizeof_uint64_t(&ring);
693 cmd_size += vn_sizeof_uint32_t(&seqno);
694 cmd_size += vn_sizeof_VkFlags(&flags);
695
696 return cmd_size;
697 }
698
vn_encode_vkNotifyRingMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags)699 static inline void vn_encode_vkNotifyRingMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags)
700 {
701 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkNotifyRingMESA_EXT;
702
703 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
704 vn_encode_VkFlags(enc, &cmd_flags);
705
706 vn_encode_uint64_t(enc, &ring);
707 vn_encode_uint32_t(enc, &seqno);
708 vn_encode_VkFlags(enc, &flags);
709 }
710
vn_sizeof_vkNotifyRingMESA_reply(uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags)711 static inline size_t vn_sizeof_vkNotifyRingMESA_reply(uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags)
712 {
713 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkNotifyRingMESA_EXT;
714 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
715
716 /* skip ring */
717 /* skip seqno */
718 /* skip flags */
719
720 return cmd_size;
721 }
722
vn_decode_vkNotifyRingMESA_reply(struct vn_cs_decoder * dec,uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags)723 static inline void vn_decode_vkNotifyRingMESA_reply(struct vn_cs_decoder *dec, uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags)
724 {
725 VkCommandTypeEXT command_type;
726 vn_decode_VkCommandTypeEXT(dec, &command_type);
727 assert(command_type == VK_COMMAND_TYPE_vkNotifyRingMESA_EXT);
728
729 /* skip ring */
730 /* skip seqno */
731 /* skip flags */
732 }
733
vn_sizeof_vkWriteRingExtraMESA(uint64_t ring,size_t offset,uint32_t value)734 static inline size_t vn_sizeof_vkWriteRingExtraMESA(uint64_t ring, size_t offset, uint32_t value)
735 {
736 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT;
737 const VkFlags cmd_flags = 0;
738 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
739
740 cmd_size += vn_sizeof_uint64_t(&ring);
741 cmd_size += vn_sizeof_size_t(&offset);
742 cmd_size += vn_sizeof_uint32_t(&value);
743
744 return cmd_size;
745 }
746
vn_encode_vkWriteRingExtraMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,uint64_t ring,size_t offset,uint32_t value)747 static inline void vn_encode_vkWriteRingExtraMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, uint64_t ring, size_t offset, uint32_t value)
748 {
749 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT;
750
751 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
752 vn_encode_VkFlags(enc, &cmd_flags);
753
754 vn_encode_uint64_t(enc, &ring);
755 vn_encode_size_t(enc, &offset);
756 vn_encode_uint32_t(enc, &value);
757 }
758
vn_sizeof_vkWriteRingExtraMESA_reply(uint64_t ring,size_t offset,uint32_t value)759 static inline size_t vn_sizeof_vkWriteRingExtraMESA_reply(uint64_t ring, size_t offset, uint32_t value)
760 {
761 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT;
762 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
763
764 /* skip ring */
765 /* skip offset */
766 /* skip value */
767
768 return cmd_size;
769 }
770
vn_decode_vkWriteRingExtraMESA_reply(struct vn_cs_decoder * dec,uint64_t ring,size_t offset,uint32_t value)771 static inline void vn_decode_vkWriteRingExtraMESA_reply(struct vn_cs_decoder *dec, uint64_t ring, size_t offset, uint32_t value)
772 {
773 VkCommandTypeEXT command_type;
774 vn_decode_VkCommandTypeEXT(dec, &command_type);
775 assert(command_type == VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT);
776
777 /* skip ring */
778 /* skip offset */
779 /* skip value */
780 }
781
vn_sizeof_vkGetMemoryResourcePropertiesMESA(VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties)782 static inline size_t vn_sizeof_vkGetMemoryResourcePropertiesMESA(VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
783 {
784 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT;
785 const VkFlags cmd_flags = 0;
786 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
787
788 cmd_size += vn_sizeof_VkDevice(&device);
789 cmd_size += vn_sizeof_uint32_t(&resourceId);
790 cmd_size += vn_sizeof_simple_pointer(pMemoryResourceProperties);
791 if (pMemoryResourceProperties)
792 cmd_size += vn_sizeof_VkMemoryResourcePropertiesMESA_partial(pMemoryResourceProperties);
793
794 return cmd_size;
795 }
796
vn_encode_vkGetMemoryResourcePropertiesMESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties)797 static inline void vn_encode_vkGetMemoryResourcePropertiesMESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
798 {
799 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT;
800
801 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
802 vn_encode_VkFlags(enc, &cmd_flags);
803
804 vn_encode_VkDevice(enc, &device);
805 vn_encode_uint32_t(enc, &resourceId);
806 if (vn_encode_simple_pointer(enc, pMemoryResourceProperties))
807 vn_encode_VkMemoryResourcePropertiesMESA_partial(enc, pMemoryResourceProperties);
808 }
809
vn_sizeof_vkGetMemoryResourcePropertiesMESA_reply(VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties)810 static inline size_t vn_sizeof_vkGetMemoryResourcePropertiesMESA_reply(VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
811 {
812 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT;
813 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
814
815 VkResult ret;
816 cmd_size += vn_sizeof_VkResult(&ret);
817 /* skip device */
818 /* skip resourceId */
819 cmd_size += vn_sizeof_simple_pointer(pMemoryResourceProperties);
820 if (pMemoryResourceProperties)
821 cmd_size += vn_sizeof_VkMemoryResourcePropertiesMESA(pMemoryResourceProperties);
822
823 return cmd_size;
824 }
825
vn_decode_vkGetMemoryResourcePropertiesMESA_reply(struct vn_cs_decoder * dec,VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties)826 static inline VkResult vn_decode_vkGetMemoryResourcePropertiesMESA_reply(struct vn_cs_decoder *dec, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
827 {
828 VkCommandTypeEXT command_type;
829 vn_decode_VkCommandTypeEXT(dec, &command_type);
830 assert(command_type == VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT);
831
832 VkResult ret;
833 vn_decode_VkResult(dec, &ret);
834 /* skip device */
835 /* skip resourceId */
836 if (vn_decode_simple_pointer(dec)) {
837 vn_decode_VkMemoryResourcePropertiesMESA(dec, pMemoryResourceProperties);
838 } else {
839 pMemoryResourceProperties = NULL;
840 }
841
842 return ret;
843 }
844
vn_sizeof_vkGetVenusExperimentalFeatureData100000MESA(size_t * pDataSize,void * pData)845 static inline size_t vn_sizeof_vkGetVenusExperimentalFeatureData100000MESA(size_t* pDataSize, void* pData)
846 {
847 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetVenusExperimentalFeatureData100000MESA_EXT;
848 const VkFlags cmd_flags = 0;
849 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags);
850
851 cmd_size += vn_sizeof_simple_pointer(pDataSize);
852 if (pDataSize)
853 cmd_size += vn_sizeof_size_t(pDataSize);
854 cmd_size += vn_sizeof_simple_pointer(pData); /* out */
855
856 return cmd_size;
857 }
858
vn_encode_vkGetVenusExperimentalFeatureData100000MESA(struct vn_cs_encoder * enc,VkCommandFlagsEXT cmd_flags,size_t * pDataSize,void * pData)859 static inline void vn_encode_vkGetVenusExperimentalFeatureData100000MESA(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, size_t* pDataSize, void* pData)
860 {
861 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetVenusExperimentalFeatureData100000MESA_EXT;
862
863 vn_encode_VkCommandTypeEXT(enc, &cmd_type);
864 vn_encode_VkFlags(enc, &cmd_flags);
865
866 if (vn_encode_simple_pointer(enc, pDataSize))
867 vn_encode_size_t(enc, pDataSize);
868 vn_encode_array_size(enc, pData ? (pDataSize ? *pDataSize : 0) : 0); /* out */
869 }
870
vn_sizeof_vkGetVenusExperimentalFeatureData100000MESA_reply(size_t * pDataSize,void * pData)871 static inline size_t vn_sizeof_vkGetVenusExperimentalFeatureData100000MESA_reply(size_t* pDataSize, void* pData)
872 {
873 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetVenusExperimentalFeatureData100000MESA_EXT;
874 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type);
875
876 cmd_size += vn_sizeof_simple_pointer(pDataSize);
877 if (pDataSize)
878 cmd_size += vn_sizeof_size_t(pDataSize);
879 if (pData) {
880 cmd_size += vn_sizeof_array_size((pDataSize ? *pDataSize : 0));
881 cmd_size += vn_sizeof_blob_array(pData, (pDataSize ? *pDataSize : 0));
882 } else {
883 cmd_size += vn_sizeof_array_size(0);
884 }
885
886 return cmd_size;
887 }
888
vn_decode_vkGetVenusExperimentalFeatureData100000MESA_reply(struct vn_cs_decoder * dec,size_t * pDataSize,void * pData)889 static inline void vn_decode_vkGetVenusExperimentalFeatureData100000MESA_reply(struct vn_cs_decoder *dec, size_t* pDataSize, void* pData)
890 {
891 VkCommandTypeEXT command_type;
892 vn_decode_VkCommandTypeEXT(dec, &command_type);
893 assert(command_type == VK_COMMAND_TYPE_vkGetVenusExperimentalFeatureData100000MESA_EXT);
894
895 if (vn_decode_simple_pointer(dec)) {
896 vn_decode_size_t(dec, pDataSize);
897 } else {
898 pDataSize = NULL;
899 }
900 if (vn_peek_array_size(dec)) {
901 const size_t array_size = vn_decode_array_size(dec, (pDataSize ? *pDataSize : 0));
902 vn_decode_blob_array(dec, pData, array_size);
903 } else {
904 vn_decode_array_size_unchecked(dec);
905 pData = NULL;
906 }
907 }
908
vn_submit_vkSetReplyCommandStreamMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,const VkCommandStreamDescriptionMESA * pStream,struct vn_instance_submit_command * submit)909 static inline void vn_submit_vkSetReplyCommandStreamMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, const VkCommandStreamDescriptionMESA* pStream, struct vn_instance_submit_command *submit)
910 {
911 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
912 void *cmd_data = local_cmd_data;
913 size_t cmd_size = vn_sizeof_vkSetReplyCommandStreamMESA(pStream);
914 if (cmd_size > sizeof(local_cmd_data)) {
915 cmd_data = malloc(cmd_size);
916 if (!cmd_data)
917 cmd_size = 0;
918 }
919 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkSetReplyCommandStreamMESA_reply(pStream) : 0;
920
921 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
922 if (cmd_size) {
923 vn_encode_vkSetReplyCommandStreamMESA(enc, cmd_flags, pStream);
924 vn_instance_submit_command(vn_instance, submit);
925 if (cmd_data != local_cmd_data)
926 free(cmd_data);
927 }
928 }
929
vn_submit_vkSeekReplyCommandStreamMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,size_t position,struct vn_instance_submit_command * submit)930 static inline void vn_submit_vkSeekReplyCommandStreamMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, size_t position, struct vn_instance_submit_command *submit)
931 {
932 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
933 void *cmd_data = local_cmd_data;
934 size_t cmd_size = vn_sizeof_vkSeekReplyCommandStreamMESA(position);
935 if (cmd_size > sizeof(local_cmd_data)) {
936 cmd_data = malloc(cmd_size);
937 if (!cmd_data)
938 cmd_size = 0;
939 }
940 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkSeekReplyCommandStreamMESA_reply(position) : 0;
941
942 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
943 if (cmd_size) {
944 vn_encode_vkSeekReplyCommandStreamMESA(enc, cmd_flags, position);
945 vn_instance_submit_command(vn_instance, submit);
946 if (cmd_data != local_cmd_data)
947 free(cmd_data);
948 }
949 }
950
vn_submit_vkExecuteCommandStreamsMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags,struct vn_instance_submit_command * submit)951 static inline void vn_submit_vkExecuteCommandStreamsMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags, struct vn_instance_submit_command *submit)
952 {
953 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
954 void *cmd_data = local_cmd_data;
955 size_t cmd_size = vn_sizeof_vkExecuteCommandStreamsMESA(streamCount, pStreams, pReplyPositions, dependencyCount, pDependencies, flags);
956 if (cmd_size > sizeof(local_cmd_data)) {
957 cmd_data = malloc(cmd_size);
958 if (!cmd_data)
959 cmd_size = 0;
960 }
961 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkExecuteCommandStreamsMESA_reply(streamCount, pStreams, pReplyPositions, dependencyCount, pDependencies, flags) : 0;
962
963 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
964 if (cmd_size) {
965 vn_encode_vkExecuteCommandStreamsMESA(enc, cmd_flags, streamCount, pStreams, pReplyPositions, dependencyCount, pDependencies, flags);
966 vn_instance_submit_command(vn_instance, submit);
967 if (cmd_data != local_cmd_data)
968 free(cmd_data);
969 }
970 }
971
vn_submit_vkCreateRingMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo,struct vn_instance_submit_command * submit)972 static inline void vn_submit_vkCreateRingMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo, struct vn_instance_submit_command *submit)
973 {
974 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
975 void *cmd_data = local_cmd_data;
976 size_t cmd_size = vn_sizeof_vkCreateRingMESA(ring, pCreateInfo);
977 if (cmd_size > sizeof(local_cmd_data)) {
978 cmd_data = malloc(cmd_size);
979 if (!cmd_data)
980 cmd_size = 0;
981 }
982 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCreateRingMESA_reply(ring, pCreateInfo) : 0;
983
984 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
985 if (cmd_size) {
986 vn_encode_vkCreateRingMESA(enc, cmd_flags, ring, pCreateInfo);
987 vn_instance_submit_command(vn_instance, submit);
988 if (cmd_data != local_cmd_data)
989 free(cmd_data);
990 }
991 }
992
vn_submit_vkDestroyRingMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,uint64_t ring,struct vn_instance_submit_command * submit)993 static inline void vn_submit_vkDestroyRingMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, uint64_t ring, struct vn_instance_submit_command *submit)
994 {
995 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
996 void *cmd_data = local_cmd_data;
997 size_t cmd_size = vn_sizeof_vkDestroyRingMESA(ring);
998 if (cmd_size > sizeof(local_cmd_data)) {
999 cmd_data = malloc(cmd_size);
1000 if (!cmd_data)
1001 cmd_size = 0;
1002 }
1003 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkDestroyRingMESA_reply(ring) : 0;
1004
1005 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
1006 if (cmd_size) {
1007 vn_encode_vkDestroyRingMESA(enc, cmd_flags, ring);
1008 vn_instance_submit_command(vn_instance, submit);
1009 if (cmd_data != local_cmd_data)
1010 free(cmd_data);
1011 }
1012 }
1013
vn_submit_vkNotifyRingMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags,struct vn_instance_submit_command * submit)1014 static inline void vn_submit_vkNotifyRingMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags, struct vn_instance_submit_command *submit)
1015 {
1016 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
1017 void *cmd_data = local_cmd_data;
1018 size_t cmd_size = vn_sizeof_vkNotifyRingMESA(ring, seqno, flags);
1019 if (cmd_size > sizeof(local_cmd_data)) {
1020 cmd_data = malloc(cmd_size);
1021 if (!cmd_data)
1022 cmd_size = 0;
1023 }
1024 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkNotifyRingMESA_reply(ring, seqno, flags) : 0;
1025
1026 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
1027 if (cmd_size) {
1028 vn_encode_vkNotifyRingMESA(enc, cmd_flags, ring, seqno, flags);
1029 vn_instance_submit_command(vn_instance, submit);
1030 if (cmd_data != local_cmd_data)
1031 free(cmd_data);
1032 }
1033 }
1034
vn_submit_vkWriteRingExtraMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,uint64_t ring,size_t offset,uint32_t value,struct vn_instance_submit_command * submit)1035 static inline void vn_submit_vkWriteRingExtraMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, uint64_t ring, size_t offset, uint32_t value, struct vn_instance_submit_command *submit)
1036 {
1037 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
1038 void *cmd_data = local_cmd_data;
1039 size_t cmd_size = vn_sizeof_vkWriteRingExtraMESA(ring, offset, value);
1040 if (cmd_size > sizeof(local_cmd_data)) {
1041 cmd_data = malloc(cmd_size);
1042 if (!cmd_data)
1043 cmd_size = 0;
1044 }
1045 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkWriteRingExtraMESA_reply(ring, offset, value) : 0;
1046
1047 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
1048 if (cmd_size) {
1049 vn_encode_vkWriteRingExtraMESA(enc, cmd_flags, ring, offset, value);
1050 vn_instance_submit_command(vn_instance, submit);
1051 if (cmd_data != local_cmd_data)
1052 free(cmd_data);
1053 }
1054 }
1055
vn_submit_vkGetMemoryResourcePropertiesMESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties,struct vn_instance_submit_command * submit)1056 static inline void vn_submit_vkGetMemoryResourcePropertiesMESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties, struct vn_instance_submit_command *submit)
1057 {
1058 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
1059 void *cmd_data = local_cmd_data;
1060 size_t cmd_size = vn_sizeof_vkGetMemoryResourcePropertiesMESA(device, resourceId, pMemoryResourceProperties);
1061 if (cmd_size > sizeof(local_cmd_data)) {
1062 cmd_data = malloc(cmd_size);
1063 if (!cmd_data)
1064 cmd_size = 0;
1065 }
1066 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetMemoryResourcePropertiesMESA_reply(device, resourceId, pMemoryResourceProperties) : 0;
1067
1068 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
1069 if (cmd_size) {
1070 vn_encode_vkGetMemoryResourcePropertiesMESA(enc, cmd_flags, device, resourceId, pMemoryResourceProperties);
1071 vn_instance_submit_command(vn_instance, submit);
1072 if (cmd_data != local_cmd_data)
1073 free(cmd_data);
1074 }
1075 }
1076
vn_submit_vkGetVenusExperimentalFeatureData100000MESA(struct vn_instance * vn_instance,VkCommandFlagsEXT cmd_flags,size_t * pDataSize,void * pData,struct vn_instance_submit_command * submit)1077 static inline void vn_submit_vkGetVenusExperimentalFeatureData100000MESA(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, size_t* pDataSize, void* pData, struct vn_instance_submit_command *submit)
1078 {
1079 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE];
1080 void *cmd_data = local_cmd_data;
1081 size_t cmd_size = vn_sizeof_vkGetVenusExperimentalFeatureData100000MESA(pDataSize, pData);
1082 if (cmd_size > sizeof(local_cmd_data)) {
1083 cmd_data = malloc(cmd_size);
1084 if (!cmd_data)
1085 cmd_size = 0;
1086 }
1087 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkGetVenusExperimentalFeatureData100000MESA_reply(pDataSize, pData) : 0;
1088
1089 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size);
1090 if (cmd_size) {
1091 vn_encode_vkGetVenusExperimentalFeatureData100000MESA(enc, cmd_flags, pDataSize, pData);
1092 vn_instance_submit_command(vn_instance, submit);
1093 if (cmd_data != local_cmd_data)
1094 free(cmd_data);
1095 }
1096 }
1097
vn_call_vkSetReplyCommandStreamMESA(struct vn_instance * vn_instance,const VkCommandStreamDescriptionMESA * pStream)1098 static inline void vn_call_vkSetReplyCommandStreamMESA(struct vn_instance *vn_instance, const VkCommandStreamDescriptionMESA* pStream)
1099 {
1100 VN_TRACE_FUNC();
1101
1102 struct vn_instance_submit_command submit;
1103 vn_submit_vkSetReplyCommandStreamMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, pStream, &submit);
1104 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1105 if (dec) {
1106 vn_decode_vkSetReplyCommandStreamMESA_reply(dec, pStream);
1107 vn_instance_free_command_reply(vn_instance, &submit);
1108 }
1109 }
1110
vn_async_vkSetReplyCommandStreamMESA(struct vn_instance * vn_instance,const VkCommandStreamDescriptionMESA * pStream)1111 static inline void vn_async_vkSetReplyCommandStreamMESA(struct vn_instance *vn_instance, const VkCommandStreamDescriptionMESA* pStream)
1112 {
1113 struct vn_instance_submit_command submit;
1114 vn_submit_vkSetReplyCommandStreamMESA(vn_instance, 0, pStream, &submit);
1115 }
1116
vn_call_vkSeekReplyCommandStreamMESA(struct vn_instance * vn_instance,size_t position)1117 static inline void vn_call_vkSeekReplyCommandStreamMESA(struct vn_instance *vn_instance, size_t position)
1118 {
1119 VN_TRACE_FUNC();
1120
1121 struct vn_instance_submit_command submit;
1122 vn_submit_vkSeekReplyCommandStreamMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, position, &submit);
1123 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1124 if (dec) {
1125 vn_decode_vkSeekReplyCommandStreamMESA_reply(dec, position);
1126 vn_instance_free_command_reply(vn_instance, &submit);
1127 }
1128 }
1129
vn_async_vkSeekReplyCommandStreamMESA(struct vn_instance * vn_instance,size_t position)1130 static inline void vn_async_vkSeekReplyCommandStreamMESA(struct vn_instance *vn_instance, size_t position)
1131 {
1132 struct vn_instance_submit_command submit;
1133 vn_submit_vkSeekReplyCommandStreamMESA(vn_instance, 0, position, &submit);
1134 }
1135
vn_call_vkExecuteCommandStreamsMESA(struct vn_instance * vn_instance,uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags)1136 static inline void vn_call_vkExecuteCommandStreamsMESA(struct vn_instance *vn_instance, uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags)
1137 {
1138 VN_TRACE_FUNC();
1139
1140 struct vn_instance_submit_command submit;
1141 vn_submit_vkExecuteCommandStreamsMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, streamCount, pStreams, pReplyPositions, dependencyCount, pDependencies, flags, &submit);
1142 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1143 if (dec) {
1144 vn_decode_vkExecuteCommandStreamsMESA_reply(dec, streamCount, pStreams, pReplyPositions, dependencyCount, pDependencies, flags);
1145 vn_instance_free_command_reply(vn_instance, &submit);
1146 }
1147 }
1148
vn_async_vkExecuteCommandStreamsMESA(struct vn_instance * vn_instance,uint32_t streamCount,const VkCommandStreamDescriptionMESA * pStreams,const size_t * pReplyPositions,uint32_t dependencyCount,const VkCommandStreamDependencyMESA * pDependencies,VkCommandStreamExecutionFlagsMESA flags)1149 static inline void vn_async_vkExecuteCommandStreamsMESA(struct vn_instance *vn_instance, uint32_t streamCount, const VkCommandStreamDescriptionMESA* pStreams, const size_t* pReplyPositions, uint32_t dependencyCount, const VkCommandStreamDependencyMESA* pDependencies, VkCommandStreamExecutionFlagsMESA flags)
1150 {
1151 struct vn_instance_submit_command submit;
1152 vn_submit_vkExecuteCommandStreamsMESA(vn_instance, 0, streamCount, pStreams, pReplyPositions, dependencyCount, pDependencies, flags, &submit);
1153 }
1154
vn_call_vkCreateRingMESA(struct vn_instance * vn_instance,uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo)1155 static inline void vn_call_vkCreateRingMESA(struct vn_instance *vn_instance, uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo)
1156 {
1157 VN_TRACE_FUNC();
1158
1159 struct vn_instance_submit_command submit;
1160 vn_submit_vkCreateRingMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, ring, pCreateInfo, &submit);
1161 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1162 if (dec) {
1163 vn_decode_vkCreateRingMESA_reply(dec, ring, pCreateInfo);
1164 vn_instance_free_command_reply(vn_instance, &submit);
1165 }
1166 }
1167
vn_async_vkCreateRingMESA(struct vn_instance * vn_instance,uint64_t ring,const VkRingCreateInfoMESA * pCreateInfo)1168 static inline void vn_async_vkCreateRingMESA(struct vn_instance *vn_instance, uint64_t ring, const VkRingCreateInfoMESA* pCreateInfo)
1169 {
1170 struct vn_instance_submit_command submit;
1171 vn_submit_vkCreateRingMESA(vn_instance, 0, ring, pCreateInfo, &submit);
1172 }
1173
vn_call_vkDestroyRingMESA(struct vn_instance * vn_instance,uint64_t ring)1174 static inline void vn_call_vkDestroyRingMESA(struct vn_instance *vn_instance, uint64_t ring)
1175 {
1176 VN_TRACE_FUNC();
1177
1178 struct vn_instance_submit_command submit;
1179 vn_submit_vkDestroyRingMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, ring, &submit);
1180 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1181 if (dec) {
1182 vn_decode_vkDestroyRingMESA_reply(dec, ring);
1183 vn_instance_free_command_reply(vn_instance, &submit);
1184 }
1185 }
1186
vn_async_vkDestroyRingMESA(struct vn_instance * vn_instance,uint64_t ring)1187 static inline void vn_async_vkDestroyRingMESA(struct vn_instance *vn_instance, uint64_t ring)
1188 {
1189 struct vn_instance_submit_command submit;
1190 vn_submit_vkDestroyRingMESA(vn_instance, 0, ring, &submit);
1191 }
1192
vn_call_vkNotifyRingMESA(struct vn_instance * vn_instance,uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags)1193 static inline void vn_call_vkNotifyRingMESA(struct vn_instance *vn_instance, uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags)
1194 {
1195 VN_TRACE_FUNC();
1196
1197 struct vn_instance_submit_command submit;
1198 vn_submit_vkNotifyRingMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, ring, seqno, flags, &submit);
1199 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1200 if (dec) {
1201 vn_decode_vkNotifyRingMESA_reply(dec, ring, seqno, flags);
1202 vn_instance_free_command_reply(vn_instance, &submit);
1203 }
1204 }
1205
vn_async_vkNotifyRingMESA(struct vn_instance * vn_instance,uint64_t ring,uint32_t seqno,VkRingNotifyFlagsMESA flags)1206 static inline void vn_async_vkNotifyRingMESA(struct vn_instance *vn_instance, uint64_t ring, uint32_t seqno, VkRingNotifyFlagsMESA flags)
1207 {
1208 struct vn_instance_submit_command submit;
1209 vn_submit_vkNotifyRingMESA(vn_instance, 0, ring, seqno, flags, &submit);
1210 }
1211
vn_call_vkWriteRingExtraMESA(struct vn_instance * vn_instance,uint64_t ring,size_t offset,uint32_t value)1212 static inline void vn_call_vkWriteRingExtraMESA(struct vn_instance *vn_instance, uint64_t ring, size_t offset, uint32_t value)
1213 {
1214 VN_TRACE_FUNC();
1215
1216 struct vn_instance_submit_command submit;
1217 vn_submit_vkWriteRingExtraMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, ring, offset, value, &submit);
1218 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1219 if (dec) {
1220 vn_decode_vkWriteRingExtraMESA_reply(dec, ring, offset, value);
1221 vn_instance_free_command_reply(vn_instance, &submit);
1222 }
1223 }
1224
vn_async_vkWriteRingExtraMESA(struct vn_instance * vn_instance,uint64_t ring,size_t offset,uint32_t value)1225 static inline void vn_async_vkWriteRingExtraMESA(struct vn_instance *vn_instance, uint64_t ring, size_t offset, uint32_t value)
1226 {
1227 struct vn_instance_submit_command submit;
1228 vn_submit_vkWriteRingExtraMESA(vn_instance, 0, ring, offset, value, &submit);
1229 }
1230
vn_call_vkGetMemoryResourcePropertiesMESA(struct vn_instance * vn_instance,VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties)1231 static inline VkResult vn_call_vkGetMemoryResourcePropertiesMESA(struct vn_instance *vn_instance, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
1232 {
1233 VN_TRACE_FUNC();
1234
1235 struct vn_instance_submit_command submit;
1236 vn_submit_vkGetMemoryResourcePropertiesMESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, resourceId, pMemoryResourceProperties, &submit);
1237 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1238 if (dec) {
1239 const VkResult ret = vn_decode_vkGetMemoryResourcePropertiesMESA_reply(dec, device, resourceId, pMemoryResourceProperties);
1240 vn_instance_free_command_reply(vn_instance, &submit);
1241 return ret;
1242 } else {
1243 return VK_ERROR_OUT_OF_HOST_MEMORY;
1244 }
1245 }
1246
vn_async_vkGetMemoryResourcePropertiesMESA(struct vn_instance * vn_instance,VkDevice device,uint32_t resourceId,VkMemoryResourcePropertiesMESA * pMemoryResourceProperties)1247 static inline void vn_async_vkGetMemoryResourcePropertiesMESA(struct vn_instance *vn_instance, VkDevice device, uint32_t resourceId, VkMemoryResourcePropertiesMESA* pMemoryResourceProperties)
1248 {
1249 struct vn_instance_submit_command submit;
1250 vn_submit_vkGetMemoryResourcePropertiesMESA(vn_instance, 0, device, resourceId, pMemoryResourceProperties, &submit);
1251 }
1252
vn_call_vkGetVenusExperimentalFeatureData100000MESA(struct vn_instance * vn_instance,size_t * pDataSize,void * pData)1253 static inline void vn_call_vkGetVenusExperimentalFeatureData100000MESA(struct vn_instance *vn_instance, size_t* pDataSize, void* pData)
1254 {
1255 VN_TRACE_FUNC();
1256
1257 struct vn_instance_submit_command submit;
1258 vn_submit_vkGetVenusExperimentalFeatureData100000MESA(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, pDataSize, pData, &submit);
1259 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit);
1260 if (dec) {
1261 vn_decode_vkGetVenusExperimentalFeatureData100000MESA_reply(dec, pDataSize, pData);
1262 vn_instance_free_command_reply(vn_instance, &submit);
1263 }
1264 }
1265
vn_async_vkGetVenusExperimentalFeatureData100000MESA(struct vn_instance * vn_instance,size_t * pDataSize,void * pData)1266 static inline void vn_async_vkGetVenusExperimentalFeatureData100000MESA(struct vn_instance *vn_instance, size_t* pDataSize, void* pData)
1267 {
1268 struct vn_instance_submit_command submit;
1269 vn_submit_vkGetVenusExperimentalFeatureData100000MESA(vn_instance, 0, pDataSize, pData, &submit);
1270 }
1271
1272 #endif /* VN_PROTOCOL_DRIVER_TRANSPORT_H */
1273