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_FENCE_H
9 #define VN_PROTOCOL_RENDERER_FENCE_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 /*
18 * These structs/unions/commands are not included
19 *
20 * vkGetFenceFdKHR
21 * vkImportFenceFdKHR
22 */
23
24 /* struct VkExportFenceCreateInfo chain */
25
26 static inline void *
vn_decode_VkExportFenceCreateInfo_pnext_temp(struct vn_cs_decoder * dec)27 vn_decode_VkExportFenceCreateInfo_pnext_temp(struct vn_cs_decoder *dec)
28 {
29 /* no known/supported struct */
30 if (vn_decode_simple_pointer(dec))
31 vn_cs_decoder_set_fatal(dec);
32 return NULL;
33 }
34
35 static inline void
vn_decode_VkExportFenceCreateInfo_self_temp(struct vn_cs_decoder * dec,VkExportFenceCreateInfo * val)36 vn_decode_VkExportFenceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkExportFenceCreateInfo *val)
37 {
38 /* skip val->{sType,pNext} */
39 vn_decode_VkFlags(dec, &val->handleTypes);
40 }
41
42 static inline void
vn_decode_VkExportFenceCreateInfo_temp(struct vn_cs_decoder * dec,VkExportFenceCreateInfo * val)43 vn_decode_VkExportFenceCreateInfo_temp(struct vn_cs_decoder *dec, VkExportFenceCreateInfo *val)
44 {
45 VkStructureType stype;
46 vn_decode_VkStructureType(dec, &stype);
47 if (stype != VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO)
48 vn_cs_decoder_set_fatal(dec);
49
50 val->sType = stype;
51 val->pNext = vn_decode_VkExportFenceCreateInfo_pnext_temp(dec);
52 vn_decode_VkExportFenceCreateInfo_self_temp(dec, val);
53 }
54
55 static inline void
vn_replace_VkExportFenceCreateInfo_handle_self(VkExportFenceCreateInfo * val)56 vn_replace_VkExportFenceCreateInfo_handle_self(VkExportFenceCreateInfo *val)
57 {
58 /* skip val->sType */
59 /* skip val->pNext */
60 /* skip val->handleTypes */
61 }
62
63 static inline void
vn_replace_VkExportFenceCreateInfo_handle(VkExportFenceCreateInfo * val)64 vn_replace_VkExportFenceCreateInfo_handle(VkExportFenceCreateInfo *val)
65 {
66 struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;
67
68 do {
69 switch ((int32_t)pnext->sType) {
70 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
71 vn_replace_VkExportFenceCreateInfo_handle_self((VkExportFenceCreateInfo *)pnext);
72 break;
73 default:
74 /* ignore unknown/unsupported struct */
75 break;
76 }
77 pnext = pnext->pNext;
78 } while (pnext);
79 }
80
81 /* struct VkFenceCreateInfo chain */
82
83 static inline void *
vn_decode_VkFenceCreateInfo_pnext_temp(struct vn_cs_decoder * dec)84 vn_decode_VkFenceCreateInfo_pnext_temp(struct vn_cs_decoder *dec)
85 {
86 VkBaseOutStructure *pnext;
87 VkStructureType stype;
88
89 if (!vn_decode_simple_pointer(dec))
90 return NULL;
91
92 vn_decode_VkStructureType(dec, &stype);
93 switch ((int32_t)stype) {
94 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
95 pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExportFenceCreateInfo));
96 if (pnext) {
97 pnext->sType = stype;
98 pnext->pNext = vn_decode_VkFenceCreateInfo_pnext_temp(dec);
99 vn_decode_VkExportFenceCreateInfo_self_temp(dec, (VkExportFenceCreateInfo *)pnext);
100 }
101 break;
102 default:
103 /* unexpected struct */
104 pnext = NULL;
105 vn_cs_decoder_set_fatal(dec);
106 break;
107 }
108
109 return pnext;
110 }
111
112 static inline void
vn_decode_VkFenceCreateInfo_self_temp(struct vn_cs_decoder * dec,VkFenceCreateInfo * val)113 vn_decode_VkFenceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkFenceCreateInfo *val)
114 {
115 /* skip val->{sType,pNext} */
116 vn_decode_VkFlags(dec, &val->flags);
117 }
118
119 static inline void
vn_decode_VkFenceCreateInfo_temp(struct vn_cs_decoder * dec,VkFenceCreateInfo * val)120 vn_decode_VkFenceCreateInfo_temp(struct vn_cs_decoder *dec, VkFenceCreateInfo *val)
121 {
122 VkStructureType stype;
123 vn_decode_VkStructureType(dec, &stype);
124 if (stype != VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
125 vn_cs_decoder_set_fatal(dec);
126
127 val->sType = stype;
128 val->pNext = vn_decode_VkFenceCreateInfo_pnext_temp(dec);
129 vn_decode_VkFenceCreateInfo_self_temp(dec, val);
130 }
131
132 static inline void
vn_replace_VkFenceCreateInfo_handle_self(VkFenceCreateInfo * val)133 vn_replace_VkFenceCreateInfo_handle_self(VkFenceCreateInfo *val)
134 {
135 /* skip val->sType */
136 /* skip val->pNext */
137 /* skip val->flags */
138 }
139
140 static inline void
vn_replace_VkFenceCreateInfo_handle(VkFenceCreateInfo * val)141 vn_replace_VkFenceCreateInfo_handle(VkFenceCreateInfo *val)
142 {
143 struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;
144
145 do {
146 switch ((int32_t)pnext->sType) {
147 case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO:
148 vn_replace_VkFenceCreateInfo_handle_self((VkFenceCreateInfo *)pnext);
149 break;
150 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
151 vn_replace_VkExportFenceCreateInfo_handle_self((VkExportFenceCreateInfo *)pnext);
152 break;
153 default:
154 /* ignore unknown/unsupported struct */
155 break;
156 }
157 pnext = pnext->pNext;
158 } while (pnext);
159 }
160
vn_decode_vkCreateFence_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkCreateFence * args)161 static inline void vn_decode_vkCreateFence_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateFence *args)
162 {
163 vn_decode_VkDevice_lookup(dec, &args->device);
164 if (vn_decode_simple_pointer(dec)) {
165 args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo));
166 if (!args->pCreateInfo) return;
167 vn_decode_VkFenceCreateInfo_temp(dec, (VkFenceCreateInfo *)args->pCreateInfo);
168 } else {
169 args->pCreateInfo = NULL;
170 vn_cs_decoder_set_fatal(dec);
171 }
172 if (vn_decode_simple_pointer(dec)) {
173 vn_cs_decoder_set_fatal(dec);
174 } else {
175 args->pAllocator = NULL;
176 }
177 if (vn_decode_simple_pointer(dec)) {
178 args->pFence = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFence));
179 if (!args->pFence) return;
180 vn_decode_VkFence(dec, args->pFence);
181 } else {
182 args->pFence = NULL;
183 vn_cs_decoder_set_fatal(dec);
184 }
185 }
186
vn_replace_vkCreateFence_args_handle(struct vn_command_vkCreateFence * args)187 static inline void vn_replace_vkCreateFence_args_handle(struct vn_command_vkCreateFence *args)
188 {
189 vn_replace_VkDevice_handle(&args->device);
190 if (args->pCreateInfo)
191 vn_replace_VkFenceCreateInfo_handle((VkFenceCreateInfo *)args->pCreateInfo);
192 /* skip args->pAllocator */
193 /* skip args->pFence */
194 }
195
vn_encode_vkCreateFence_reply(struct vn_cs_encoder * enc,const struct vn_command_vkCreateFence * args)196 static inline void vn_encode_vkCreateFence_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateFence *args)
197 {
198 vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateFence_EXT});
199
200 vn_encode_VkResult(enc, &args->ret);
201 /* skip args->device */
202 /* skip args->pCreateInfo */
203 /* skip args->pAllocator */
204 if (vn_encode_simple_pointer(enc, args->pFence))
205 vn_encode_VkFence(enc, args->pFence);
206 }
207
vn_decode_vkDestroyFence_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkDestroyFence * args)208 static inline void vn_decode_vkDestroyFence_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyFence *args)
209 {
210 vn_decode_VkDevice_lookup(dec, &args->device);
211 vn_decode_VkFence_lookup(dec, &args->fence);
212 if (vn_decode_simple_pointer(dec)) {
213 vn_cs_decoder_set_fatal(dec);
214 } else {
215 args->pAllocator = NULL;
216 }
217 }
218
vn_replace_vkDestroyFence_args_handle(struct vn_command_vkDestroyFence * args)219 static inline void vn_replace_vkDestroyFence_args_handle(struct vn_command_vkDestroyFence *args)
220 {
221 vn_replace_VkDevice_handle(&args->device);
222 vn_replace_VkFence_handle(&args->fence);
223 /* skip args->pAllocator */
224 }
225
vn_encode_vkDestroyFence_reply(struct vn_cs_encoder * enc,const struct vn_command_vkDestroyFence * args)226 static inline void vn_encode_vkDestroyFence_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyFence *args)
227 {
228 vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyFence_EXT});
229
230 /* skip args->device */
231 /* skip args->fence */
232 /* skip args->pAllocator */
233 }
234
vn_decode_vkResetFences_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkResetFences * args)235 static inline void vn_decode_vkResetFences_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetFences *args)
236 {
237 vn_decode_VkDevice_lookup(dec, &args->device);
238 vn_decode_uint32_t(dec, &args->fenceCount);
239 if (vn_peek_array_size(dec)) {
240 const uint32_t iter_count = vn_decode_array_size(dec, args->fenceCount);
241 args->pFences = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFences) * iter_count);
242 if (!args->pFences) return;
243 for (uint32_t i = 0; i < iter_count; i++)
244 vn_decode_VkFence_lookup(dec, &((VkFence *)args->pFences)[i]);
245 } else {
246 vn_decode_array_size(dec, args->fenceCount);
247 args->pFences = NULL;
248 }
249 }
250
vn_replace_vkResetFences_args_handle(struct vn_command_vkResetFences * args)251 static inline void vn_replace_vkResetFences_args_handle(struct vn_command_vkResetFences *args)
252 {
253 vn_replace_VkDevice_handle(&args->device);
254 /* skip args->fenceCount */
255 if (args->pFences) {
256 for (uint32_t i = 0; i < args->fenceCount; i++)
257 vn_replace_VkFence_handle(&((VkFence *)args->pFences)[i]);
258 }
259 }
260
vn_encode_vkResetFences_reply(struct vn_cs_encoder * enc,const struct vn_command_vkResetFences * args)261 static inline void vn_encode_vkResetFences_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetFences *args)
262 {
263 vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetFences_EXT});
264
265 vn_encode_VkResult(enc, &args->ret);
266 /* skip args->device */
267 /* skip args->fenceCount */
268 /* skip args->pFences */
269 }
270
vn_decode_vkGetFenceStatus_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkGetFenceStatus * args)271 static inline void vn_decode_vkGetFenceStatus_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetFenceStatus *args)
272 {
273 vn_decode_VkDevice_lookup(dec, &args->device);
274 vn_decode_VkFence_lookup(dec, &args->fence);
275 }
276
vn_replace_vkGetFenceStatus_args_handle(struct vn_command_vkGetFenceStatus * args)277 static inline void vn_replace_vkGetFenceStatus_args_handle(struct vn_command_vkGetFenceStatus *args)
278 {
279 vn_replace_VkDevice_handle(&args->device);
280 vn_replace_VkFence_handle(&args->fence);
281 }
282
vn_encode_vkGetFenceStatus_reply(struct vn_cs_encoder * enc,const struct vn_command_vkGetFenceStatus * args)283 static inline void vn_encode_vkGetFenceStatus_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetFenceStatus *args)
284 {
285 vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetFenceStatus_EXT});
286
287 vn_encode_VkResult(enc, &args->ret);
288 /* skip args->device */
289 /* skip args->fence */
290 }
291
vn_decode_vkWaitForFences_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkWaitForFences * args)292 static inline void vn_decode_vkWaitForFences_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWaitForFences *args)
293 {
294 vn_decode_VkDevice_lookup(dec, &args->device);
295 vn_decode_uint32_t(dec, &args->fenceCount);
296 if (vn_peek_array_size(dec)) {
297 const uint32_t iter_count = vn_decode_array_size(dec, args->fenceCount);
298 args->pFences = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFences) * iter_count);
299 if (!args->pFences) return;
300 for (uint32_t i = 0; i < iter_count; i++)
301 vn_decode_VkFence_lookup(dec, &((VkFence *)args->pFences)[i]);
302 } else {
303 vn_decode_array_size(dec, args->fenceCount);
304 args->pFences = NULL;
305 }
306 vn_decode_VkBool32(dec, &args->waitAll);
307 vn_decode_uint64_t(dec, &args->timeout);
308 }
309
vn_replace_vkWaitForFences_args_handle(struct vn_command_vkWaitForFences * args)310 static inline void vn_replace_vkWaitForFences_args_handle(struct vn_command_vkWaitForFences *args)
311 {
312 vn_replace_VkDevice_handle(&args->device);
313 /* skip args->fenceCount */
314 if (args->pFences) {
315 for (uint32_t i = 0; i < args->fenceCount; i++)
316 vn_replace_VkFence_handle(&((VkFence *)args->pFences)[i]);
317 }
318 /* skip args->waitAll */
319 /* skip args->timeout */
320 }
321
vn_encode_vkWaitForFences_reply(struct vn_cs_encoder * enc,const struct vn_command_vkWaitForFences * args)322 static inline void vn_encode_vkWaitForFences_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWaitForFences *args)
323 {
324 vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWaitForFences_EXT});
325
326 vn_encode_VkResult(enc, &args->ret);
327 /* skip args->device */
328 /* skip args->fenceCount */
329 /* skip args->pFences */
330 /* skip args->waitAll */
331 /* skip args->timeout */
332 }
333
vn_decode_vkResetFenceResource100000MESA_args_temp(struct vn_cs_decoder * dec,struct vn_command_vkResetFenceResource100000MESA * args)334 static inline void vn_decode_vkResetFenceResource100000MESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetFenceResource100000MESA *args)
335 {
336 vn_decode_VkDevice_lookup(dec, &args->device);
337 vn_decode_VkFence_lookup(dec, &args->fence);
338 }
339
vn_replace_vkResetFenceResource100000MESA_args_handle(struct vn_command_vkResetFenceResource100000MESA * args)340 static inline void vn_replace_vkResetFenceResource100000MESA_args_handle(struct vn_command_vkResetFenceResource100000MESA *args)
341 {
342 vn_replace_VkDevice_handle(&args->device);
343 vn_replace_VkFence_handle(&args->fence);
344 }
345
vn_encode_vkResetFenceResource100000MESA_reply(struct vn_cs_encoder * enc,const struct vn_command_vkResetFenceResource100000MESA * args)346 static inline void vn_encode_vkResetFenceResource100000MESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetFenceResource100000MESA *args)
347 {
348 vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetFenceResource100000MESA_EXT});
349
350 /* skip args->device */
351 /* skip args->fence */
352 }
353
vn_dispatch_vkCreateFence(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)354 static inline void vn_dispatch_vkCreateFence(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
355 {
356 struct vn_command_vkCreateFence args;
357
358 if (!ctx->dispatch_vkCreateFence) {
359 vn_cs_decoder_set_fatal(ctx->decoder);
360 return;
361 }
362
363 vn_decode_vkCreateFence_args_temp(ctx->decoder, &args);
364 if (!args.device) {
365 vn_cs_decoder_set_fatal(ctx->decoder);
366 return;
367 }
368
369 if (!vn_cs_decoder_get_fatal(ctx->decoder))
370 ctx->dispatch_vkCreateFence(ctx, &args);
371
372 #ifdef DEBUG
373 if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret))
374 vn_dispatch_debug_log(ctx, "vkCreateFence returned %d", args.ret);
375 #endif
376
377 if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
378 vn_encode_vkCreateFence_reply(ctx->encoder, &args);
379
380 vn_cs_decoder_reset_temp_pool(ctx->decoder);
381 }
382
vn_dispatch_vkDestroyFence(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)383 static inline void vn_dispatch_vkDestroyFence(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
384 {
385 struct vn_command_vkDestroyFence args;
386
387 if (!ctx->dispatch_vkDestroyFence) {
388 vn_cs_decoder_set_fatal(ctx->decoder);
389 return;
390 }
391
392 vn_decode_vkDestroyFence_args_temp(ctx->decoder, &args);
393 if (!args.device) {
394 vn_cs_decoder_set_fatal(ctx->decoder);
395 return;
396 }
397
398 if (!vn_cs_decoder_get_fatal(ctx->decoder))
399 ctx->dispatch_vkDestroyFence(ctx, &args);
400
401
402 if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
403 vn_encode_vkDestroyFence_reply(ctx->encoder, &args);
404
405 vn_cs_decoder_reset_temp_pool(ctx->decoder);
406 }
407
vn_dispatch_vkResetFences(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)408 static inline void vn_dispatch_vkResetFences(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
409 {
410 struct vn_command_vkResetFences args;
411
412 if (!ctx->dispatch_vkResetFences) {
413 vn_cs_decoder_set_fatal(ctx->decoder);
414 return;
415 }
416
417 vn_decode_vkResetFences_args_temp(ctx->decoder, &args);
418 if (!args.device) {
419 vn_cs_decoder_set_fatal(ctx->decoder);
420 return;
421 }
422
423 if (!vn_cs_decoder_get_fatal(ctx->decoder))
424 ctx->dispatch_vkResetFences(ctx, &args);
425
426 #ifdef DEBUG
427 if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret))
428 vn_dispatch_debug_log(ctx, "vkResetFences returned %d", args.ret);
429 #endif
430
431 if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
432 vn_encode_vkResetFences_reply(ctx->encoder, &args);
433
434 vn_cs_decoder_reset_temp_pool(ctx->decoder);
435 }
436
vn_dispatch_vkGetFenceStatus(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)437 static inline void vn_dispatch_vkGetFenceStatus(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
438 {
439 struct vn_command_vkGetFenceStatus args;
440
441 if (!ctx->dispatch_vkGetFenceStatus) {
442 vn_cs_decoder_set_fatal(ctx->decoder);
443 return;
444 }
445
446 vn_decode_vkGetFenceStatus_args_temp(ctx->decoder, &args);
447 if (!args.device) {
448 vn_cs_decoder_set_fatal(ctx->decoder);
449 return;
450 }
451
452 if (!vn_cs_decoder_get_fatal(ctx->decoder))
453 ctx->dispatch_vkGetFenceStatus(ctx, &args);
454
455 #ifdef DEBUG
456 if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret))
457 vn_dispatch_debug_log(ctx, "vkGetFenceStatus returned %d", args.ret);
458 #endif
459
460 if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
461 vn_encode_vkGetFenceStatus_reply(ctx->encoder, &args);
462
463 vn_cs_decoder_reset_temp_pool(ctx->decoder);
464 }
465
vn_dispatch_vkWaitForFences(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)466 static inline void vn_dispatch_vkWaitForFences(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
467 {
468 struct vn_command_vkWaitForFences args;
469
470 if (!ctx->dispatch_vkWaitForFences) {
471 vn_cs_decoder_set_fatal(ctx->decoder);
472 return;
473 }
474
475 vn_decode_vkWaitForFences_args_temp(ctx->decoder, &args);
476 if (!args.device) {
477 vn_cs_decoder_set_fatal(ctx->decoder);
478 return;
479 }
480
481 if (!vn_cs_decoder_get_fatal(ctx->decoder))
482 ctx->dispatch_vkWaitForFences(ctx, &args);
483
484 #ifdef DEBUG
485 if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret))
486 vn_dispatch_debug_log(ctx, "vkWaitForFences returned %d", args.ret);
487 #endif
488
489 if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
490 vn_encode_vkWaitForFences_reply(ctx->encoder, &args);
491
492 vn_cs_decoder_reset_temp_pool(ctx->decoder);
493 }
494
vn_dispatch_vkResetFenceResource100000MESA(struct vn_dispatch_context * ctx,VkCommandFlagsEXT flags)495 static inline void vn_dispatch_vkResetFenceResource100000MESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags)
496 {
497 struct vn_command_vkResetFenceResource100000MESA args;
498
499 if (!ctx->dispatch_vkResetFenceResource100000MESA) {
500 vn_cs_decoder_set_fatal(ctx->decoder);
501 return;
502 }
503
504 vn_decode_vkResetFenceResource100000MESA_args_temp(ctx->decoder, &args);
505 if (!args.device) {
506 vn_cs_decoder_set_fatal(ctx->decoder);
507 return;
508 }
509
510 if (!vn_cs_decoder_get_fatal(ctx->decoder))
511 ctx->dispatch_vkResetFenceResource100000MESA(ctx, &args);
512
513
514 if (!vn_cs_decoder_get_fatal(ctx->decoder) && (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT))
515 vn_encode_vkResetFenceResource100000MESA_reply(ctx->encoder, &args);
516
517 vn_cs_decoder_reset_temp_pool(ctx->decoder);
518 }
519
520 #pragma GCC diagnostic pop
521
522 #endif /* VN_PROTOCOL_RENDERER_FENCE_H */
523