xref: /aosp_15_r20/external/virglrenderer/src/venus/venus-protocol/vn_protocol_renderer_transport.h (revision bbecb9d118dfdb95f99bd754f8fa9be01f189df3)
1 /* This file is generated by venus-protocol.  See vn_protocol_renderer.h. */
2 
3 /*
4  * Copyright 2020 Google LLC
5  * SPDX-License-Identifier: MIT
6  */
7 
8 #ifndef VN_PROTOCOL_RENDERER_TRANSPORT_H
9 #define VN_PROTOCOL_RENDERER_TRANSPORT_H
10 
11 #include "vn_protocol_renderer_structs.h"
12 
13 #pragma GCC diagnostic push
14 #pragma GCC diagnostic ignored "-Wpointer-arith"
15 #pragma GCC diagnostic ignored "-Wunused-parameter"
16 
17 /* struct VkCommandStreamDescriptionMESA */
18 
19 static inline void
vn_decode_VkCommandStreamDescriptionMESA_temp(struct vn_cs_decoder * dec,VkCommandStreamDescriptionMESA * val)20 vn_decode_VkCommandStreamDescriptionMESA_temp(struct vn_cs_decoder *dec, VkCommandStreamDescriptionMESA *val)
21 {
22     vn_decode_uint32_t(dec, &val->resourceId);
23     vn_decode_size_t(dec, &val->offset);
24     vn_decode_size_t(dec, &val->size);
25 }
26 
27 static inline void
vn_replace_VkCommandStreamDescriptionMESA_handle(VkCommandStreamDescriptionMESA * val)28 vn_replace_VkCommandStreamDescriptionMESA_handle(VkCommandStreamDescriptionMESA *val)
29 {
30     /* skip val->resourceId */
31     /* skip val->offset */
32     /* skip val->size */
33 }
34 
35 /* struct VkCommandStreamDependencyMESA */
36 
37 static inline void
vn_decode_VkCommandStreamDependencyMESA_temp(struct vn_cs_decoder * dec,VkCommandStreamDependencyMESA * val)38 vn_decode_VkCommandStreamDependencyMESA_temp(struct vn_cs_decoder *dec, VkCommandStreamDependencyMESA *val)
39 {
40     vn_decode_uint32_t(dec, &val->srcCommandStream);
41     vn_decode_uint32_t(dec, &val->dstCommandStream);
42 }
43 
44 static inline void
vn_replace_VkCommandStreamDependencyMESA_handle(VkCommandStreamDependencyMESA * val)45 vn_replace_VkCommandStreamDependencyMESA_handle(VkCommandStreamDependencyMESA *val)
46 {
47     /* skip val->srcCommandStream */
48     /* skip val->dstCommandStream */
49 }
50 
51 /* struct VkRingCreateInfoMESA chain */
52 
53 static inline void *
vn_decode_VkRingCreateInfoMESA_pnext_temp(struct vn_cs_decoder * dec)54 vn_decode_VkRingCreateInfoMESA_pnext_temp(struct vn_cs_decoder *dec)
55 {
56     /* no known/supported struct */
57     if (vn_decode_simple_pointer(dec))
58         vn_cs_decoder_set_fatal(dec);
59     return NULL;
60 }
61 
62 static inline void
vn_decode_VkRingCreateInfoMESA_self_temp(struct vn_cs_decoder * dec,VkRingCreateInfoMESA * val)63 vn_decode_VkRingCreateInfoMESA_self_temp(struct vn_cs_decoder *dec, VkRingCreateInfoMESA *val)
64 {
65     /* skip val->{sType,pNext} */
66     vn_decode_VkFlags(dec, &val->flags);
67     vn_decode_uint32_t(dec, &val->resourceId);
68     vn_decode_size_t(dec, &val->offset);
69     vn_decode_size_t(dec, &val->size);
70     vn_decode_uint64_t(dec, &val->idleTimeout);
71     vn_decode_size_t(dec, &val->headOffset);
72     vn_decode_size_t(dec, &val->tailOffset);
73     vn_decode_size_t(dec, &val->statusOffset);
74     vn_decode_size_t(dec, &val->bufferOffset);
75     vn_decode_size_t(dec, &val->bufferSize);
76     vn_decode_size_t(dec, &val->extraOffset);
77     vn_decode_size_t(dec, &val->extraSize);
78 }
79 
80 static inline void
vn_decode_VkRingCreateInfoMESA_temp(struct vn_cs_decoder * dec,VkRingCreateInfoMESA * val)81 vn_decode_VkRingCreateInfoMESA_temp(struct vn_cs_decoder *dec, VkRingCreateInfoMESA *val)
82 {
83     VkStructureType stype;
84     vn_decode_VkStructureType(dec, &stype);
85     if (stype != VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA)
86         vn_cs_decoder_set_fatal(dec);
87 
88     val->sType = stype;
89     val->pNext = vn_decode_VkRingCreateInfoMESA_pnext_temp(dec);
90     vn_decode_VkRingCreateInfoMESA_self_temp(dec, val);
91 }
92 
93 static inline void
vn_replace_VkRingCreateInfoMESA_handle_self(VkRingCreateInfoMESA * val)94 vn_replace_VkRingCreateInfoMESA_handle_self(VkRingCreateInfoMESA *val)
95 {
96     /* skip val->sType */
97     /* skip val->pNext */
98     /* skip val->flags */
99     /* skip val->resourceId */
100     /* skip val->offset */
101     /* skip val->size */
102     /* skip val->idleTimeout */
103     /* skip val->headOffset */
104     /* skip val->tailOffset */
105     /* skip val->statusOffset */
106     /* skip val->bufferOffset */
107     /* skip val->bufferSize */
108     /* skip val->extraOffset */
109     /* skip val->extraSize */
110 }
111 
112 static inline void
vn_replace_VkRingCreateInfoMESA_handle(VkRingCreateInfoMESA * val)113 vn_replace_VkRingCreateInfoMESA_handle(VkRingCreateInfoMESA *val)
114 {
115     struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;
116 
117     do {
118         switch ((int32_t)pnext->sType) {
119         case VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA:
120             vn_replace_VkRingCreateInfoMESA_handle_self((VkRingCreateInfoMESA *)pnext);
121             break;
122         default:
123             /* ignore unknown/unsupported struct */
124             break;
125         }
126         pnext = pnext->pNext;
127     } while (pnext);
128 }
129 
vn_decode_vkSetReplyCommandStreamMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkSetReplyCommandStreamMESA * args)130 static inline void vn_decode_vkSetReplyCommandStreamMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSetReplyCommandStreamMESA *args)
131 {
132     if (vn_decode_simple_pointer(dec)) {
133         args->pStream = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pStream));
134         if (!args->pStream) return;
135         vn_decode_VkCommandStreamDescriptionMESA_temp(dec, (VkCommandStreamDescriptionMESA *)args->pStream);
136     } else {
137         args->pStream = NULL;
138         vn_cs_decoder_set_fatal(dec);
139     }
140 }
141 
vn_replace_vkSetReplyCommandStreamMESA_args_handle(struct vn_command_vkSetReplyCommandStreamMESA * args)142 static inline void vn_replace_vkSetReplyCommandStreamMESA_args_handle(struct vn_command_vkSetReplyCommandStreamMESA *args)
143 {
144     if (args->pStream)
145         vn_replace_VkCommandStreamDescriptionMESA_handle((VkCommandStreamDescriptionMESA *)args->pStream);
146 }
147 
vn_encode_vkSetReplyCommandStreamMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkSetReplyCommandStreamMESA * args)148 static inline void vn_encode_vkSetReplyCommandStreamMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSetReplyCommandStreamMESA *args)
149 {
150     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT});
151 
152     /* skip args->pStream */
153 }
154 
vn_decode_vkSeekReplyCommandStreamMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkSeekReplyCommandStreamMESA * args)155 static inline void vn_decode_vkSeekReplyCommandStreamMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSeekReplyCommandStreamMESA *args)
156 {
157     vn_decode_size_t(dec, &args->position);
158 }
159 
vn_replace_vkSeekReplyCommandStreamMESA_args_handle(struct vn_command_vkSeekReplyCommandStreamMESA * args)160 static inline void vn_replace_vkSeekReplyCommandStreamMESA_args_handle(struct vn_command_vkSeekReplyCommandStreamMESA *args)
161 {
162     /* skip args->position */
163 }
164 
vn_encode_vkSeekReplyCommandStreamMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkSeekReplyCommandStreamMESA * args)165 static inline void vn_encode_vkSeekReplyCommandStreamMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSeekReplyCommandStreamMESA *args)
166 {
167     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT});
168 
169     /* skip args->position */
170 }
171 
vn_decode_vkExecuteCommandStreamsMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkExecuteCommandStreamsMESA * args)172 static inline void vn_decode_vkExecuteCommandStreamsMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkExecuteCommandStreamsMESA *args)
173 {
174     vn_decode_uint32_t(dec, &args->streamCount);
175     if (vn_peek_array_size(dec)) {
176         const uint32_t iter_count = vn_decode_array_size(dec, args->streamCount);
177         args->pStreams = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pStreams) * iter_count);
178         if (!args->pStreams) return;
179         for (uint32_t i = 0; i < iter_count; i++)
180             vn_decode_VkCommandStreamDescriptionMESA_temp(dec, &((VkCommandStreamDescriptionMESA *)args->pStreams)[i]);
181     } else {
182         vn_decode_array_size(dec, args->streamCount);
183         args->pStreams = NULL;
184     }
185     if (vn_peek_array_size(dec)) {
186         const size_t array_size = vn_decode_array_size(dec, args->streamCount);
187         args->pReplyPositions = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pReplyPositions) * array_size);
188         if (!args->pReplyPositions) return;
189         vn_decode_size_t_array(dec, (size_t *)args->pReplyPositions, array_size);
190     } else {
191         vn_decode_array_size_unchecked(dec);
192         args->pReplyPositions = NULL;
193     }
194     vn_decode_uint32_t(dec, &args->dependencyCount);
195     if (vn_peek_array_size(dec)) {
196         const uint32_t iter_count = vn_decode_array_size(dec, args->dependencyCount);
197         args->pDependencies = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDependencies) * iter_count);
198         if (!args->pDependencies) return;
199         for (uint32_t i = 0; i < iter_count; i++)
200             vn_decode_VkCommandStreamDependencyMESA_temp(dec, &((VkCommandStreamDependencyMESA *)args->pDependencies)[i]);
201     } else {
202         vn_decode_array_size(dec, args->dependencyCount);
203         args->pDependencies = NULL;
204     }
205     vn_decode_VkFlags(dec, &args->flags);
206 }
207 
vn_replace_vkExecuteCommandStreamsMESA_args_handle(struct vn_command_vkExecuteCommandStreamsMESA * args)208 static inline void vn_replace_vkExecuteCommandStreamsMESA_args_handle(struct vn_command_vkExecuteCommandStreamsMESA *args)
209 {
210     /* skip args->streamCount */
211     if (args->pStreams) {
212        for (uint32_t i = 0; i < args->streamCount; i++)
213             vn_replace_VkCommandStreamDescriptionMESA_handle(&((VkCommandStreamDescriptionMESA *)args->pStreams)[i]);
214     }
215     /* skip args->pReplyPositions */
216     /* skip args->dependencyCount */
217     if (args->pDependencies) {
218        for (uint32_t i = 0; i < args->dependencyCount; i++)
219             vn_replace_VkCommandStreamDependencyMESA_handle(&((VkCommandStreamDependencyMESA *)args->pDependencies)[i]);
220     }
221     /* skip args->flags */
222 }
223 
vn_encode_vkExecuteCommandStreamsMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkExecuteCommandStreamsMESA * args)224 static inline void vn_encode_vkExecuteCommandStreamsMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkExecuteCommandStreamsMESA *args)
225 {
226     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT});
227 
228     /* skip args->streamCount */
229     /* skip args->pStreams */
230     /* skip args->pReplyPositions */
231     /* skip args->dependencyCount */
232     /* skip args->pDependencies */
233     /* skip args->flags */
234 }
235 
vn_decode_vkCreateRingMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkCreateRingMESA * args)236 static inline void vn_decode_vkCreateRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateRingMESA *args)
237 {
238     vn_decode_uint64_t(dec, &args->ring);
239     if (vn_decode_simple_pointer(dec)) {
240         args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo));
241         if (!args->pCreateInfo) return;
242         vn_decode_VkRingCreateInfoMESA_temp(dec, (VkRingCreateInfoMESA *)args->pCreateInfo);
243     } else {
244         args->pCreateInfo = NULL;
245         vn_cs_decoder_set_fatal(dec);
246     }
247 }
248 
vn_replace_vkCreateRingMESA_args_handle(struct vn_command_vkCreateRingMESA * args)249 static inline void vn_replace_vkCreateRingMESA_args_handle(struct vn_command_vkCreateRingMESA *args)
250 {
251     /* skip args->ring */
252     if (args->pCreateInfo)
253         vn_replace_VkRingCreateInfoMESA_handle((VkRingCreateInfoMESA *)args->pCreateInfo);
254 }
255 
vn_encode_vkCreateRingMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkCreateRingMESA * args)256 static inline void vn_encode_vkCreateRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateRingMESA *args)
257 {
258     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateRingMESA_EXT});
259 
260     /* skip args->ring */
261     /* skip args->pCreateInfo */
262 }
263 
vn_decode_vkDestroyRingMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkDestroyRingMESA * args)264 static inline void vn_decode_vkDestroyRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyRingMESA *args)
265 {
266     vn_decode_uint64_t(dec, &args->ring);
267 }
268 
vn_replace_vkDestroyRingMESA_args_handle(struct vn_command_vkDestroyRingMESA * args)269 static inline void vn_replace_vkDestroyRingMESA_args_handle(struct vn_command_vkDestroyRingMESA *args)
270 {
271     /* skip args->ring */
272 }
273 
vn_encode_vkDestroyRingMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkDestroyRingMESA * args)274 static inline void vn_encode_vkDestroyRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyRingMESA *args)
275 {
276     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyRingMESA_EXT});
277 
278     /* skip args->ring */
279 }
280 
vn_decode_vkNotifyRingMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkNotifyRingMESA * args)281 static inline void vn_decode_vkNotifyRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkNotifyRingMESA *args)
282 {
283     vn_decode_uint64_t(dec, &args->ring);
284     vn_decode_uint32_t(dec, &args->seqno);
285     vn_decode_VkFlags(dec, &args->flags);
286 }
287 
vn_replace_vkNotifyRingMESA_args_handle(struct vn_command_vkNotifyRingMESA * args)288 static inline void vn_replace_vkNotifyRingMESA_args_handle(struct vn_command_vkNotifyRingMESA *args)
289 {
290     /* skip args->ring */
291     /* skip args->seqno */
292     /* skip args->flags */
293 }
294 
vn_encode_vkNotifyRingMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkNotifyRingMESA * args)295 static inline void vn_encode_vkNotifyRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkNotifyRingMESA *args)
296 {
297     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkNotifyRingMESA_EXT});
298 
299     /* skip args->ring */
300     /* skip args->seqno */
301     /* skip args->flags */
302 }
303 
vn_decode_vkWriteRingExtraMESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkWriteRingExtraMESA * args)304 static inline void vn_decode_vkWriteRingExtraMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWriteRingExtraMESA *args)
305 {
306     vn_decode_uint64_t(dec, &args->ring);
307     vn_decode_size_t(dec, &args->offset);
308     vn_decode_uint32_t(dec, &args->value);
309 }
310 
vn_replace_vkWriteRingExtraMESA_args_handle(struct vn_command_vkWriteRingExtraMESA * args)311 static inline void vn_replace_vkWriteRingExtraMESA_args_handle(struct vn_command_vkWriteRingExtraMESA *args)
312 {
313     /* skip args->ring */
314     /* skip args->offset */
315     /* skip args->value */
316 }
317 
vn_encode_vkWriteRingExtraMESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkWriteRingExtraMESA * args)318 static inline void vn_encode_vkWriteRingExtraMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWriteRingExtraMESA *args)
319 {
320     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT});
321 
322     /* skip args->ring */
323     /* skip args->offset */
324     /* skip args->value */
325 }
326 
vn_decode_vkGetVenusExperimentalFeatureData100000MESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkGetVenusExperimentalFeatureData100000MESA * args)327 static inline void vn_decode_vkGetVenusExperimentalFeatureData100000MESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetVenusExperimentalFeatureData100000MESA *args)
328 {
329     if (vn_decode_simple_pointer(dec)) {
330         args->pDataSize = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDataSize));
331         if (!args->pDataSize) return;
332         vn_decode_size_t(dec, args->pDataSize);
333     } else {
334         args->pDataSize = NULL;
335         vn_cs_decoder_set_fatal(dec);
336     }
337     if (vn_peek_array_size(dec)) {
338         const size_t array_size = vn_decode_array_size(dec, (args->pDataSize ? *args->pDataSize : 0));
339         args->pData = vn_cs_decoder_alloc_temp(dec, array_size);
340         if (!args->pData) return;
341     } else {
342         vn_decode_array_size_unchecked(dec);
343         args->pData = NULL;
344     }
345 }
346 
vn_replace_vkGetVenusExperimentalFeatureData100000MESA_args_handle(struct vn_command_vkGetVenusExperimentalFeatureData100000MESA * args)347 static inline void vn_replace_vkGetVenusExperimentalFeatureData100000MESA_args_handle(struct vn_command_vkGetVenusExperimentalFeatureData100000MESA *args)
348 {
349     /* skip args->pDataSize */
350     /* skip args->pData */
351 }
352 
vn_encode_vkGetVenusExperimentalFeatureData100000MESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkGetVenusExperimentalFeatureData100000MESA * args)353 static inline void vn_encode_vkGetVenusExperimentalFeatureData100000MESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetVenusExperimentalFeatureData100000MESA *args)
354 {
355     vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetVenusExperimentalFeatureData100000MESA_EXT});
356 
357     if (vn_encode_simple_pointer(enc, args->pDataSize))
358         vn_encode_size_t(enc, args->pDataSize);
359     if (args->pData) {
360         vn_encode_array_size(enc, (args->pDataSize ? *args->pDataSize : 0));
361         vn_encode_blob_array(enc, args->pData, (args->pDataSize ? *args->pDataSize : 0));
362     } else {
363         vn_encode_array_size(enc, 0);
364     }
365 }
366 
vn_dispatch_vkSetReplyCommandStreamMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)367 static inline void vn_dispatch_vkSetReplyCommandStreamMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
368 {
369     struct vn_command_vkSetReplyCommandStreamMESA args;
370 
371     if (!ctx->dispatch_vkSetReplyCommandStreamMESA) {
372         vn_cs_decoder_set_fatal(ctx->decoder);
373         return;
374     }
375 
376     vn_decode_vkSetReplyCommandStreamMESA_args_temp(ctx->decoder, &args);
377 
378     if (!vn_cs_decoder_get_fatal(ctx->decoder))
379         ctx->dispatch_vkSetReplyCommandStreamMESA(ctx, &args);
380 
381 
382     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
383        vn_encode_vkSetReplyCommandStreamMESA_reply(ctx->encoder, &args);
384 
385     vn_cs_decoder_reset_temp_pool(ctx->decoder);
386 }
387 
vn_dispatch_vkSeekReplyCommandStreamMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)388 static inline void vn_dispatch_vkSeekReplyCommandStreamMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
389 {
390     struct vn_command_vkSeekReplyCommandStreamMESA args;
391 
392     if (!ctx->dispatch_vkSeekReplyCommandStreamMESA) {
393         vn_cs_decoder_set_fatal(ctx->decoder);
394         return;
395     }
396 
397     vn_decode_vkSeekReplyCommandStreamMESA_args_temp(ctx->decoder, &args);
398 
399     if (!vn_cs_decoder_get_fatal(ctx->decoder))
400         ctx->dispatch_vkSeekReplyCommandStreamMESA(ctx, &args);
401 
402 
403     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
404        vn_encode_vkSeekReplyCommandStreamMESA_reply(ctx->encoder, &args);
405 
406     vn_cs_decoder_reset_temp_pool(ctx->decoder);
407 }
408 
vn_dispatch_vkExecuteCommandStreamsMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)409 static inline void vn_dispatch_vkExecuteCommandStreamsMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
410 {
411     struct vn_command_vkExecuteCommandStreamsMESA args;
412 
413     if (!ctx->dispatch_vkExecuteCommandStreamsMESA) {
414         vn_cs_decoder_set_fatal(ctx->decoder);
415         return;
416     }
417 
418     vn_decode_vkExecuteCommandStreamsMESA_args_temp(ctx->decoder, &args);
419 
420     if (!vn_cs_decoder_get_fatal(ctx->decoder))
421         ctx->dispatch_vkExecuteCommandStreamsMESA(ctx, &args);
422 
423 
424     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
425        vn_encode_vkExecuteCommandStreamsMESA_reply(ctx->encoder, &args);
426 
427     vn_cs_decoder_reset_temp_pool(ctx->decoder);
428 }
429 
vn_dispatch_vkCreateRingMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)430 static inline void vn_dispatch_vkCreateRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
431 {
432     struct vn_command_vkCreateRingMESA args;
433 
434     if (!ctx->dispatch_vkCreateRingMESA) {
435         vn_cs_decoder_set_fatal(ctx->decoder);
436         return;
437     }
438 
439     vn_decode_vkCreateRingMESA_args_temp(ctx->decoder, &args);
440 
441     if (!vn_cs_decoder_get_fatal(ctx->decoder))
442         ctx->dispatch_vkCreateRingMESA(ctx, &args);
443 
444 
445     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
446        vn_encode_vkCreateRingMESA_reply(ctx->encoder, &args);
447 
448     vn_cs_decoder_reset_temp_pool(ctx->decoder);
449 }
450 
vn_dispatch_vkDestroyRingMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)451 static inline void vn_dispatch_vkDestroyRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
452 {
453     struct vn_command_vkDestroyRingMESA args;
454 
455     if (!ctx->dispatch_vkDestroyRingMESA) {
456         vn_cs_decoder_set_fatal(ctx->decoder);
457         return;
458     }
459 
460     vn_decode_vkDestroyRingMESA_args_temp(ctx->decoder, &args);
461 
462     if (!vn_cs_decoder_get_fatal(ctx->decoder))
463         ctx->dispatch_vkDestroyRingMESA(ctx, &args);
464 
465 
466     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
467        vn_encode_vkDestroyRingMESA_reply(ctx->encoder, &args);
468 
469     vn_cs_decoder_reset_temp_pool(ctx->decoder);
470 }
471 
vn_dispatch_vkNotifyRingMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)472 static inline void vn_dispatch_vkNotifyRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
473 {
474     struct vn_command_vkNotifyRingMESA args;
475 
476     if (!ctx->dispatch_vkNotifyRingMESA) {
477         vn_cs_decoder_set_fatal(ctx->decoder);
478         return;
479     }
480 
481     vn_decode_vkNotifyRingMESA_args_temp(ctx->decoder, &args);
482 
483     if (!vn_cs_decoder_get_fatal(ctx->decoder))
484         ctx->dispatch_vkNotifyRingMESA(ctx, &args);
485 
486 
487     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
488        vn_encode_vkNotifyRingMESA_reply(ctx->encoder, &args);
489 
490     vn_cs_decoder_reset_temp_pool(ctx->decoder);
491 }
492 
vn_dispatch_vkWriteRingExtraMESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)493 static inline void vn_dispatch_vkWriteRingExtraMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
494 {
495     struct vn_command_vkWriteRingExtraMESA args;
496 
497     if (!ctx->dispatch_vkWriteRingExtraMESA) {
498         vn_cs_decoder_set_fatal(ctx->decoder);
499         return;
500     }
501 
502     vn_decode_vkWriteRingExtraMESA_args_temp(ctx->decoder, &args);
503 
504     if (!vn_cs_decoder_get_fatal(ctx->decoder))
505         ctx->dispatch_vkWriteRingExtraMESA(ctx, &args);
506 
507 
508     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
509        vn_encode_vkWriteRingExtraMESA_reply(ctx->encoder, &args);
510 
511     vn_cs_decoder_reset_temp_pool(ctx->decoder);
512 }
513 
vn_dispatch_vkGetVenusExperimentalFeatureData100000MESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)514 static inline void vn_dispatch_vkGetVenusExperimentalFeatureData100000MESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
515 {
516     struct vn_command_vkGetVenusExperimentalFeatureData100000MESA args;
517 
518     if (!ctx->dispatch_vkGetVenusExperimentalFeatureData100000MESA) {
519         vn_cs_decoder_set_fatal(ctx->decoder);
520         return;
521     }
522 
523     vn_decode_vkGetVenusExperimentalFeatureData100000MESA_args_temp(ctx->decoder, &args);
524 
525     if (!vn_cs_decoder_get_fatal(ctx->decoder))
526         ctx->dispatch_vkGetVenusExperimentalFeatureData100000MESA(ctx, &args);
527 
528 
529     if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
530        vn_encode_vkGetVenusExperimentalFeatureData100000MESA_reply(ctx->encoder, &args);
531 
532     vn_cs_decoder_reset_temp_pool(ctx->decoder);
533 }
534 
535 #pragma GCC diagnostic pop
536 
537 #endif /* VN_PROTOCOL_RENDERER_TRANSPORT_H */
538