aboutsummaryrefslogtreecommitdiff
path: root/src/venus/venus-protocol/vn_protocol_renderer_transport.h
blob: 8cc01abd3d86b1fce4e3446b81051f3bc4ceeeb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
/* This file is generated by venus-protocol.  See vn_protocol_renderer.h. */

/*
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: MIT
 */

#ifndef VN_PROTOCOL_RENDERER_TRANSPORT_H
#define VN_PROTOCOL_RENDERER_TRANSPORT_H

#include "vn_protocol_renderer_structs.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpointer-arith"
#pragma GCC diagnostic ignored "-Wunused-parameter"

/*
 * These structs/unions/commands are not included
 *
 *   vkGetMemoryFdKHR
 *   vkGetMemoryFdPropertiesKHR
 */

/* struct VkCommandStreamDescriptionMESA */

static inline void
vn_decode_VkCommandStreamDescriptionMESA_temp(struct vn_cs_decoder *dec, VkCommandStreamDescriptionMESA *val)
{
    vn_decode_uint32_t(dec, &val->resourceId);
    vn_decode_size_t(dec, &val->offset);
    vn_decode_size_t(dec, &val->size);
}

static inline void
vn_replace_VkCommandStreamDescriptionMESA_handle(VkCommandStreamDescriptionMESA *val)
{
    /* skip val->resourceId */
    /* skip val->offset */
    /* skip val->size */
}

/* struct VkCommandStreamDependencyMESA */

static inline void
vn_decode_VkCommandStreamDependencyMESA_temp(struct vn_cs_decoder *dec, VkCommandStreamDependencyMESA *val)
{
    vn_decode_uint32_t(dec, &val->srcCommandStream);
    vn_decode_uint32_t(dec, &val->dstCommandStream);
}

static inline void
vn_replace_VkCommandStreamDependencyMESA_handle(VkCommandStreamDependencyMESA *val)
{
    /* skip val->srcCommandStream */
    /* skip val->dstCommandStream */
}

/* struct VkRingCreateInfoMESA chain */

static inline void *
vn_decode_VkRingCreateInfoMESA_pnext_temp(struct vn_cs_decoder *dec)
{
    /* no known/supported struct */
    if (vn_decode_simple_pointer(dec))
        vn_cs_decoder_set_fatal(dec);
    return NULL;
}

static inline void
vn_decode_VkRingCreateInfoMESA_self_temp(struct vn_cs_decoder *dec, VkRingCreateInfoMESA *val)
{
    /* skip val->{sType,pNext} */
    vn_decode_VkFlags(dec, &val->flags);
    vn_decode_uint32_t(dec, &val->resourceId);
    vn_decode_size_t(dec, &val->offset);
    vn_decode_size_t(dec, &val->size);
    vn_decode_uint64_t(dec, &val->idleTimeout);
    vn_decode_size_t(dec, &val->headOffset);
    vn_decode_size_t(dec, &val->tailOffset);
    vn_decode_size_t(dec, &val->statusOffset);
    vn_decode_size_t(dec, &val->bufferOffset);
    vn_decode_size_t(dec, &val->bufferSize);
    vn_decode_size_t(dec, &val->extraOffset);
    vn_decode_size_t(dec, &val->extraSize);
}

static inline void
vn_decode_VkRingCreateInfoMESA_temp(struct vn_cs_decoder *dec, VkRingCreateInfoMESA *val)
{
    VkStructureType stype;
    vn_decode_VkStructureType(dec, &stype);
    if (stype != VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA)
        vn_cs_decoder_set_fatal(dec);

    val->sType = stype;
    val->pNext = vn_decode_VkRingCreateInfoMESA_pnext_temp(dec);
    vn_decode_VkRingCreateInfoMESA_self_temp(dec, val);
}

static inline void
vn_replace_VkRingCreateInfoMESA_handle_self(VkRingCreateInfoMESA *val)
{
    /* skip val->sType */
    /* skip val->pNext */
    /* skip val->flags */
    /* skip val->resourceId */
    /* skip val->offset */
    /* skip val->size */
    /* skip val->idleTimeout */
    /* skip val->headOffset */
    /* skip val->tailOffset */
    /* skip val->statusOffset */
    /* skip val->bufferOffset */
    /* skip val->bufferSize */
    /* skip val->extraOffset */
    /* skip val->extraSize */
}

static inline void
vn_replace_VkRingCreateInfoMESA_handle(VkRingCreateInfoMESA *val)
{
    struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;

    do {
        switch ((int32_t)pnext->sType) {
        case VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA:
            vn_replace_VkRingCreateInfoMESA_handle_self((VkRingCreateInfoMESA *)pnext);
            break;
        default:
            /* ignore unknown/unsupported struct */
            break;
        }
        pnext = pnext->pNext;
    } while (pnext);
}

/* struct VkMemoryResourceAllocationSizeProperties100000MESA chain */

static inline void
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(struct vn_cs_encoder *enc, const void *val)
{
    /* no known/supported struct */
    vn_encode_simple_pointer(enc, NULL);
}

static inline void
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizeProperties100000MESA *val)
{
    /* skip val->{sType,pNext} */
    vn_encode_uint64_t(enc, &val->allocationSize);
}

static inline void
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizeProperties100000MESA *val)
{
    assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA);
    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA });
    vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(enc, val->pNext);
    vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self(enc, val);
}

static inline void *
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial_temp(struct vn_cs_decoder *dec)
{
    /* no known/supported struct */
    if (vn_decode_simple_pointer(dec))
        vn_cs_decoder_set_fatal(dec);
    return NULL;
}

static inline void
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizeProperties100000MESA *val)
{
    /* skip val->{sType,pNext} */
    /* skip val->allocationSize */
}

static inline void
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizeProperties100000MESA *val)
{
    VkStructureType stype;
    vn_decode_VkStructureType(dec, &stype);
    if (stype != VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA)
        vn_cs_decoder_set_fatal(dec);

    val->sType = stype;
    val->pNext = vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial_temp(dec);
    vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial_temp(dec, val);
}

/* struct VkMemoryResourcePropertiesMESA chain */

static inline void
vn_encode_VkMemoryResourcePropertiesMESA_pnext(struct vn_cs_encoder *enc, const void *val)
{
    const VkBaseInStructure *pnext = val;

    while (pnext) {
        switch ((int32_t)pnext->sType) {
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
            vn_encode_simple_pointer(enc, pnext);
            vn_encode_VkStructureType(enc, &pnext->sType);
            vn_encode_VkMemoryResourcePropertiesMESA_pnext(enc, pnext->pNext);
            vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self(enc, (const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
            return;
        default:
            /* ignore unknown/unsupported struct */
            break;
        }
        pnext = pnext->pNext;
    }

    vn_encode_simple_pointer(enc, NULL);
}

static inline void
vn_encode_VkMemoryResourcePropertiesMESA_self(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val)
{
    /* skip val->{sType,pNext} */
    vn_encode_uint32_t(enc, &val->memoryTypeBits);
}

static inline void
vn_encode_VkMemoryResourcePropertiesMESA(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val)
{
    assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA);
    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA });
    vn_encode_VkMemoryResourcePropertiesMESA_pnext(enc, val->pNext);
    vn_encode_VkMemoryResourcePropertiesMESA_self(enc, val);
}

static inline void *
vn_decode_VkMemoryResourcePropertiesMESA_pnext_partial_temp(struct vn_cs_decoder *dec)
{
    VkBaseOutStructure *pnext;
    VkStructureType stype;

    if (!vn_decode_simple_pointer(dec))
        return NULL;

    vn_decode_VkStructureType(dec, &stype);
    switch ((int32_t)stype) {
    case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
        pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryResourceAllocationSizeProperties100000MESA));
        if (pnext) {
            pnext->sType = stype;
            pnext->pNext = vn_decode_VkMemoryResourcePropertiesMESA_pnext_partial_temp(dec);
            vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial_temp(dec, (VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
        }
        break;
    default:
        /* unexpected struct */
        pnext = NULL;
        vn_cs_decoder_set_fatal(dec);
        break;
    }

    return pnext;
}

static inline void
vn_decode_VkMemoryResourcePropertiesMESA_self_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val)
{
    /* skip val->{sType,pNext} */
    /* skip val->memoryTypeBits */
}

static inline void
vn_decode_VkMemoryResourcePropertiesMESA_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val)
{
    VkStructureType stype;
    vn_decode_VkStructureType(dec, &stype);
    if (stype != VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA)
        vn_cs_decoder_set_fatal(dec);

    val->sType = stype;
    val->pNext = vn_decode_VkMemoryResourcePropertiesMESA_pnext_partial_temp(dec);
    vn_decode_VkMemoryResourcePropertiesMESA_self_partial_temp(dec, val);
}

static inline void vn_decode_vkSetReplyCommandStreamMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSetReplyCommandStreamMESA *args)
{
    if (vn_decode_simple_pointer(dec)) {
        args->pStream = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pStream));
        if (!args->pStream) return;
        vn_decode_VkCommandStreamDescriptionMESA_temp(dec, (VkCommandStreamDescriptionMESA *)args->pStream);
    } else {
        args->pStream = NULL;
        vn_cs_decoder_set_fatal(dec);
    }
}

static inline void vn_replace_vkSetReplyCommandStreamMESA_args_handle(struct vn_command_vkSetReplyCommandStreamMESA *args)
{
    if (args->pStream)
        vn_replace_VkCommandStreamDescriptionMESA_handle((VkCommandStreamDescriptionMESA *)args->pStream);
}

static inline void vn_encode_vkSetReplyCommandStreamMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSetReplyCommandStreamMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT});

    /* skip args->pStream */
}

static inline void vn_decode_vkSeekReplyCommandStreamMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSeekReplyCommandStreamMESA *args)
{
    vn_decode_size_t(dec, &args->position);
}

static inline void vn_replace_vkSeekReplyCommandStreamMESA_args_handle(struct vn_command_vkSeekReplyCommandStreamMESA *args)
{
    /* skip args->position */
}

static inline void vn_encode_vkSeekReplyCommandStreamMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSeekReplyCommandStreamMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT});

    /* skip args->position */
}

static inline void vn_decode_vkExecuteCommandStreamsMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkExecuteCommandStreamsMESA *args)
{
    vn_decode_uint32_t(dec, &args->streamCount);
    if (vn_peek_array_size(dec)) {
        const uint32_t iter_count = vn_decode_array_size(dec, args->streamCount);
        args->pStreams = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pStreams) * iter_count);
        if (!args->pStreams) return;
        for (uint32_t i = 0; i < iter_count; i++)
            vn_decode_VkCommandStreamDescriptionMESA_temp(dec, &((VkCommandStreamDescriptionMESA *)args->pStreams)[i]);
    } else {
        vn_decode_array_size(dec, args->streamCount);
        args->pStreams = NULL;
    }
    if (vn_peek_array_size(dec)) {
        const size_t array_size = vn_decode_array_size(dec, args->streamCount);
        args->pReplyPositions = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pReplyPositions) * array_size);
        if (!args->pReplyPositions) return;
        vn_decode_size_t_array(dec, (size_t *)args->pReplyPositions, array_size);
    } else {
        vn_decode_array_size_unchecked(dec);
        args->pReplyPositions = NULL;
    }
    vn_decode_uint32_t(dec, &args->dependencyCount);
    if (vn_peek_array_size(dec)) {
        const uint32_t iter_count = vn_decode_array_size(dec, args->dependencyCount);
        args->pDependencies = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDependencies) * iter_count);
        if (!args->pDependencies) return;
        for (uint32_t i = 0; i < iter_count; i++)
            vn_decode_VkCommandStreamDependencyMESA_temp(dec, &((VkCommandStreamDependencyMESA *)args->pDependencies)[i]);
    } else {
        vn_decode_array_size(dec, args->dependencyCount);
        args->pDependencies = NULL;
    }
    vn_decode_VkFlags(dec, &args->flags);
}

static inline void vn_replace_vkExecuteCommandStreamsMESA_args_handle(struct vn_command_vkExecuteCommandStreamsMESA *args)
{
    /* skip args->streamCount */
    if (args->pStreams) {
       for (uint32_t i = 0; i < args->streamCount; i++)
            vn_replace_VkCommandStreamDescriptionMESA_handle(&((VkCommandStreamDescriptionMESA *)args->pStreams)[i]);
    }
    /* skip args->pReplyPositions */
    /* skip args->dependencyCount */
    if (args->pDependencies) {
       for (uint32_t i = 0; i < args->dependencyCount; i++)
            vn_replace_VkCommandStreamDependencyMESA_handle(&((VkCommandStreamDependencyMESA *)args->pDependencies)[i]);
    }
    /* skip args->flags */
}

static inline void vn_encode_vkExecuteCommandStreamsMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkExecuteCommandStreamsMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT});

    /* skip args->streamCount */
    /* skip args->pStreams */
    /* skip args->pReplyPositions */
    /* skip args->dependencyCount */
    /* skip args->pDependencies */
    /* skip args->flags */
}

static inline void vn_decode_vkCreateRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateRingMESA *args)
{
    vn_decode_uint64_t(dec, &args->ring);
    if (vn_decode_simple_pointer(dec)) {
        args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo));
        if (!args->pCreateInfo) return;
        vn_decode_VkRingCreateInfoMESA_temp(dec, (VkRingCreateInfoMESA *)args->pCreateInfo);
    } else {
        args->pCreateInfo = NULL;
        vn_cs_decoder_set_fatal(dec);
    }
}

static inline void vn_replace_vkCreateRingMESA_args_handle(struct vn_command_vkCreateRingMESA *args)
{
    /* skip args->ring */
    if (args->pCreateInfo)
        vn_replace_VkRingCreateInfoMESA_handle((VkRingCreateInfoMESA *)args->pCreateInfo);
}

static inline void vn_encode_vkCreateRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateRingMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateRingMESA_EXT});

    /* skip args->ring */
    /* skip args->pCreateInfo */
}

static inline void vn_decode_vkDestroyRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyRingMESA *args)
{
    vn_decode_uint64_t(dec, &args->ring);
}

static inline void vn_replace_vkDestroyRingMESA_args_handle(struct vn_command_vkDestroyRingMESA *args)
{
    /* skip args->ring */
}

static inline void vn_encode_vkDestroyRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyRingMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyRingMESA_EXT});

    /* skip args->ring */
}

static inline void vn_decode_vkNotifyRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkNotifyRingMESA *args)
{
    vn_decode_uint64_t(dec, &args->ring);
    vn_decode_uint32_t(dec, &args->seqno);
    vn_decode_VkFlags(dec, &args->flags);
}

static inline void vn_replace_vkNotifyRingMESA_args_handle(struct vn_command_vkNotifyRingMESA *args)
{
    /* skip args->ring */
    /* skip args->seqno */
    /* skip args->flags */
}

static inline void vn_encode_vkNotifyRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkNotifyRingMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkNotifyRingMESA_EXT});

    /* skip args->ring */
    /* skip args->seqno */
    /* skip args->flags */
}

static inline void vn_decode_vkWriteRingExtraMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWriteRingExtraMESA *args)
{
    vn_decode_uint64_t(dec, &args->ring);
    vn_decode_size_t(dec, &args->offset);
    vn_decode_uint32_t(dec, &args->value);
}

static inline void vn_replace_vkWriteRingExtraMESA_args_handle(struct vn_command_vkWriteRingExtraMESA *args)
{
    /* skip args->ring */
    /* skip args->offset */
    /* skip args->value */
}

static inline void vn_encode_vkWriteRingExtraMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWriteRingExtraMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT});

    /* skip args->ring */
    /* skip args->offset */
    /* skip args->value */
}

static inline void vn_decode_vkGetMemoryResourcePropertiesMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetMemoryResourcePropertiesMESA *args)
{
    vn_decode_VkDevice_lookup(dec, &args->device);
    vn_decode_uint32_t(dec, &args->resourceId);
    if (vn_decode_simple_pointer(dec)) {
        args->pMemoryResourceProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryResourceProperties));
        if (!args->pMemoryResourceProperties) return;
        vn_decode_VkMemoryResourcePropertiesMESA_partial_temp(dec, args->pMemoryResourceProperties);
    } else {
        args->pMemoryResourceProperties = NULL;
        vn_cs_decoder_set_fatal(dec);
    }
}

static inline void vn_replace_vkGetMemoryResourcePropertiesMESA_args_handle(struct vn_command_vkGetMemoryResourcePropertiesMESA *args)
{
    vn_replace_VkDevice_handle(&args->device);
    /* skip args->resourceId */
    /* skip args->pMemoryResourceProperties */
}

static inline void vn_encode_vkGetMemoryResourcePropertiesMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetMemoryResourcePropertiesMESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT});

    vn_encode_VkResult(enc, &args->ret);
    /* skip args->device */
    /* skip args->resourceId */
    if (vn_encode_simple_pointer(enc, args->pMemoryResourceProperties))
        vn_encode_VkMemoryResourcePropertiesMESA(enc, args->pMemoryResourceProperties);
}

static inline void vn_decode_vkGetVenusExperimentalFeatureData100000MESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetVenusExperimentalFeatureData100000MESA *args)
{
    if (vn_decode_simple_pointer(dec)) {
        args->pDataSize = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDataSize));
        if (!args->pDataSize) return;
        vn_decode_size_t(dec, args->pDataSize);
    } else {
        args->pDataSize = NULL;
        vn_cs_decoder_set_fatal(dec);
    }
    if (vn_peek_array_size(dec)) {
        const size_t array_size = vn_decode_array_size(dec, (args->pDataSize ? *args->pDataSize : 0));
        args->pData = vn_cs_decoder_alloc_temp(dec, array_size);
        if (!args->pData) return;
    } else {
        vn_decode_array_size_unchecked(dec);
        args->pData = NULL;
    }
}

static inline void vn_replace_vkGetVenusExperimentalFeatureData100000MESA_args_handle(struct vn_command_vkGetVenusExperimentalFeatureData100000MESA *args)
{
    /* skip args->pDataSize */
    /* skip args->pData */
}

static inline void vn_encode_vkGetVenusExperimentalFeatureData100000MESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetVenusExperimentalFeatureData100000MESA *args)
{
    vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetVenusExperimentalFeatureData100000MESA_EXT});

    if (vn_encode_simple_pointer(enc, args->pDataSize))
        vn_encode_size_t(enc, args->pDataSize);
    if (args->pData) {
        vn_encode_array_size(enc, (args->pDataSize ? *args->pDataSize : 0));
        vn_encode_blob_array(enc, args->pData, (args->pDataSize ? *args->pDataSize : 0));
    } else {
        vn_encode_array_size(enc, 0);
    }
}

static inline void vn_dispatch_vkSetReplyCommandStreamMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkSetReplyCommandStreamMESA args;

    if (!ctx->dispatch_vkSetReplyCommandStreamMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkSetReplyCommandStreamMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkSetReplyCommandStreamMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkSetReplyCommandStreamMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkSeekReplyCommandStreamMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkSeekReplyCommandStreamMESA args;

    if (!ctx->dispatch_vkSeekReplyCommandStreamMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkSeekReplyCommandStreamMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkSeekReplyCommandStreamMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkSeekReplyCommandStreamMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkExecuteCommandStreamsMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkExecuteCommandStreamsMESA args;

    if (!ctx->dispatch_vkExecuteCommandStreamsMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkExecuteCommandStreamsMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkExecuteCommandStreamsMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkExecuteCommandStreamsMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkCreateRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkCreateRingMESA args;

    if (!ctx->dispatch_vkCreateRingMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkCreateRingMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkCreateRingMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkCreateRingMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkDestroyRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkDestroyRingMESA args;

    if (!ctx->dispatch_vkDestroyRingMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkDestroyRingMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkDestroyRingMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkDestroyRingMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkNotifyRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkNotifyRingMESA args;

    if (!ctx->dispatch_vkNotifyRingMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkNotifyRingMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkNotifyRingMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkNotifyRingMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkWriteRingExtraMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkWriteRingExtraMESA args;

    if (!ctx->dispatch_vkWriteRingExtraMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkWriteRingExtraMESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkWriteRingExtraMESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkWriteRingExtraMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkGetMemoryResourcePropertiesMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkGetMemoryResourcePropertiesMESA args;

    if (!ctx->dispatch_vkGetMemoryResourcePropertiesMESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkGetMemoryResourcePropertiesMESA_args_temp(ctx->decoder, &args);
    if (!args.device) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkGetMemoryResourcePropertiesMESA(ctx, &args);

#ifdef DEBUG
    if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret))
        vn_dispatch_debug_log(ctx, "vkGetMemoryResourcePropertiesMESA returned %d", args.ret);
#endif

    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkGetMemoryResourcePropertiesMESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

static inline void vn_dispatch_vkGetVenusExperimentalFeatureData100000MESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
{
    struct vn_command_vkGetVenusExperimentalFeatureData100000MESA args;

    if (!ctx->dispatch_vkGetVenusExperimentalFeatureData100000MESA) {
        vn_cs_decoder_set_fatal(ctx->decoder);
        return;
    }

    vn_decode_vkGetVenusExperimentalFeatureData100000MESA_args_temp(ctx->decoder, &args);

    if (!vn_cs_decoder_get_fatal(ctx->decoder))
        ctx->dispatch_vkGetVenusExperimentalFeatureData100000MESA(ctx, &args);


    if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
       vn_encode_vkGetVenusExperimentalFeatureData100000MESA_reply(ctx->encoder, &args);

    vn_cs_decoder_reset_temp_pool(ctx->decoder);
}

#pragma GCC diagnostic pop

#endif /* VN_PROTOCOL_RENDERER_TRANSPORT_H */