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_COMMAND_BUFFER_H 9#define VN_PROTOCOL_DRIVER_COMMAND_BUFFER_H 10 11#include "vn_instance.h" 12#include "vn_protocol_driver_structs.h" 13 14/* struct VkCommandBufferAllocateInfo chain */ 15 16static inline size_t 17vn_sizeof_VkCommandBufferAllocateInfo_pnext(const void *val) 18{ 19 /* no known/supported struct */ 20 return vn_sizeof_simple_pointer(NULL); 21} 22 23static inline size_t 24vn_sizeof_VkCommandBufferAllocateInfo_self(const VkCommandBufferAllocateInfo *val) 25{ 26 size_t size = 0; 27 /* skip val->{sType,pNext} */ 28 size += vn_sizeof_VkCommandPool(&val->commandPool); 29 size += vn_sizeof_VkCommandBufferLevel(&val->level); 30 size += vn_sizeof_uint32_t(&val->commandBufferCount); 31 return size; 32} 33 34static inline size_t 35vn_sizeof_VkCommandBufferAllocateInfo(const VkCommandBufferAllocateInfo *val) 36{ 37 size_t size = 0; 38 39 size += vn_sizeof_VkStructureType(&val->sType); 40 size += vn_sizeof_VkCommandBufferAllocateInfo_pnext(val->pNext); 41 size += vn_sizeof_VkCommandBufferAllocateInfo_self(val); 42 43 return size; 44} 45 46static inline void 47vn_encode_VkCommandBufferAllocateInfo_pnext(struct vn_cs_encoder *enc, const void *val) 48{ 49 /* no known/supported struct */ 50 vn_encode_simple_pointer(enc, NULL); 51} 52 53static inline void 54vn_encode_VkCommandBufferAllocateInfo_self(struct vn_cs_encoder *enc, const VkCommandBufferAllocateInfo *val) 55{ 56 /* skip val->{sType,pNext} */ 57 vn_encode_VkCommandPool(enc, &val->commandPool); 58 vn_encode_VkCommandBufferLevel(enc, &val->level); 59 vn_encode_uint32_t(enc, &val->commandBufferCount); 60} 61 62static inline void 63vn_encode_VkCommandBufferAllocateInfo(struct vn_cs_encoder *enc, const VkCommandBufferAllocateInfo *val) 64{ 65 assert(val->sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO); 66 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO }); 67 vn_encode_VkCommandBufferAllocateInfo_pnext(enc, val->pNext); 68 vn_encode_VkCommandBufferAllocateInfo_self(enc, val); 69} 70 71/* struct VkCommandBufferInheritanceInfo chain */ 72 73static inline size_t 74vn_sizeof_VkCommandBufferInheritanceInfo_pnext(const void *val) 75{ 76 /* no known/supported struct */ 77 return vn_sizeof_simple_pointer(NULL); 78} 79 80static inline size_t 81vn_sizeof_VkCommandBufferInheritanceInfo_self(const VkCommandBufferInheritanceInfo *val) 82{ 83 size_t size = 0; 84 /* skip val->{sType,pNext} */ 85 size += vn_sizeof_VkRenderPass(&val->renderPass); 86 size += vn_sizeof_uint32_t(&val->subpass); 87 size += vn_sizeof_VkFramebuffer(&val->framebuffer); 88 size += vn_sizeof_VkBool32(&val->occlusionQueryEnable); 89 size += vn_sizeof_VkFlags(&val->queryFlags); 90 size += vn_sizeof_VkFlags(&val->pipelineStatistics); 91 return size; 92} 93 94static inline size_t 95vn_sizeof_VkCommandBufferInheritanceInfo(const VkCommandBufferInheritanceInfo *val) 96{ 97 size_t size = 0; 98 99 size += vn_sizeof_VkStructureType(&val->sType); 100 size += vn_sizeof_VkCommandBufferInheritanceInfo_pnext(val->pNext); 101 size += vn_sizeof_VkCommandBufferInheritanceInfo_self(val); 102 103 return size; 104} 105 106static inline void 107vn_encode_VkCommandBufferInheritanceInfo_pnext(struct vn_cs_encoder *enc, const void *val) 108{ 109 /* no known/supported struct */ 110 vn_encode_simple_pointer(enc, NULL); 111} 112 113static inline void 114vn_encode_VkCommandBufferInheritanceInfo_self(struct vn_cs_encoder *enc, const VkCommandBufferInheritanceInfo *val) 115{ 116 /* skip val->{sType,pNext} */ 117 vn_encode_VkRenderPass(enc, &val->renderPass); 118 vn_encode_uint32_t(enc, &val->subpass); 119 vn_encode_VkFramebuffer(enc, &val->framebuffer); 120 vn_encode_VkBool32(enc, &val->occlusionQueryEnable); 121 vn_encode_VkFlags(enc, &val->queryFlags); 122 vn_encode_VkFlags(enc, &val->pipelineStatistics); 123} 124 125static inline void 126vn_encode_VkCommandBufferInheritanceInfo(struct vn_cs_encoder *enc, const VkCommandBufferInheritanceInfo *val) 127{ 128 assert(val->sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO); 129 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO }); 130 vn_encode_VkCommandBufferInheritanceInfo_pnext(enc, val->pNext); 131 vn_encode_VkCommandBufferInheritanceInfo_self(enc, val); 132} 133 134static inline void 135vn_decode_VkCommandBufferInheritanceInfo_pnext(struct vn_cs_decoder *dec, const void *val) 136{ 137 /* no known/supported struct */ 138 if (vn_decode_simple_pointer(dec)) 139 assert(false); 140} 141 142static inline void 143vn_decode_VkCommandBufferInheritanceInfo_self(struct vn_cs_decoder *dec, VkCommandBufferInheritanceInfo *val) 144{ 145 /* skip val->{sType,pNext} */ 146 vn_decode_VkRenderPass(dec, &val->renderPass); 147 vn_decode_uint32_t(dec, &val->subpass); 148 vn_decode_VkFramebuffer(dec, &val->framebuffer); 149 vn_decode_VkBool32(dec, &val->occlusionQueryEnable); 150 vn_decode_VkFlags(dec, &val->queryFlags); 151 vn_decode_VkFlags(dec, &val->pipelineStatistics); 152} 153 154static inline void 155vn_decode_VkCommandBufferInheritanceInfo(struct vn_cs_decoder *dec, VkCommandBufferInheritanceInfo *val) 156{ 157 VkStructureType stype; 158 vn_decode_VkStructureType(dec, &stype); 159 assert(stype == VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO); 160 161 assert(val->sType == stype); 162 vn_decode_VkCommandBufferInheritanceInfo_pnext(dec, val->pNext); 163 vn_decode_VkCommandBufferInheritanceInfo_self(dec, val); 164} 165 166/* struct VkDeviceGroupCommandBufferBeginInfo chain */ 167 168static inline size_t 169vn_sizeof_VkDeviceGroupCommandBufferBeginInfo_pnext(const void *val) 170{ 171 /* no known/supported struct */ 172 return vn_sizeof_simple_pointer(NULL); 173} 174 175static inline size_t 176vn_sizeof_VkDeviceGroupCommandBufferBeginInfo_self(const VkDeviceGroupCommandBufferBeginInfo *val) 177{ 178 size_t size = 0; 179 /* skip val->{sType,pNext} */ 180 size += vn_sizeof_uint32_t(&val->deviceMask); 181 return size; 182} 183 184static inline size_t 185vn_sizeof_VkDeviceGroupCommandBufferBeginInfo(const VkDeviceGroupCommandBufferBeginInfo *val) 186{ 187 size_t size = 0; 188 189 size += vn_sizeof_VkStructureType(&val->sType); 190 size += vn_sizeof_VkDeviceGroupCommandBufferBeginInfo_pnext(val->pNext); 191 size += vn_sizeof_VkDeviceGroupCommandBufferBeginInfo_self(val); 192 193 return size; 194} 195 196static inline void 197vn_encode_VkDeviceGroupCommandBufferBeginInfo_pnext(struct vn_cs_encoder *enc, const void *val) 198{ 199 /* no known/supported struct */ 200 vn_encode_simple_pointer(enc, NULL); 201} 202 203static inline void 204vn_encode_VkDeviceGroupCommandBufferBeginInfo_self(struct vn_cs_encoder *enc, const VkDeviceGroupCommandBufferBeginInfo *val) 205{ 206 /* skip val->{sType,pNext} */ 207 vn_encode_uint32_t(enc, &val->deviceMask); 208} 209 210static inline void 211vn_encode_VkDeviceGroupCommandBufferBeginInfo(struct vn_cs_encoder *enc, const VkDeviceGroupCommandBufferBeginInfo *val) 212{ 213 assert(val->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO); 214 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO }); 215 vn_encode_VkDeviceGroupCommandBufferBeginInfo_pnext(enc, val->pNext); 216 vn_encode_VkDeviceGroupCommandBufferBeginInfo_self(enc, val); 217} 218 219static inline void 220vn_decode_VkDeviceGroupCommandBufferBeginInfo_pnext(struct vn_cs_decoder *dec, const void *val) 221{ 222 /* no known/supported struct */ 223 if (vn_decode_simple_pointer(dec)) 224 assert(false); 225} 226 227static inline void 228vn_decode_VkDeviceGroupCommandBufferBeginInfo_self(struct vn_cs_decoder *dec, VkDeviceGroupCommandBufferBeginInfo *val) 229{ 230 /* skip val->{sType,pNext} */ 231 vn_decode_uint32_t(dec, &val->deviceMask); 232} 233 234static inline void 235vn_decode_VkDeviceGroupCommandBufferBeginInfo(struct vn_cs_decoder *dec, VkDeviceGroupCommandBufferBeginInfo *val) 236{ 237 VkStructureType stype; 238 vn_decode_VkStructureType(dec, &stype); 239 assert(stype == VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO); 240 241 assert(val->sType == stype); 242 vn_decode_VkDeviceGroupCommandBufferBeginInfo_pnext(dec, val->pNext); 243 vn_decode_VkDeviceGroupCommandBufferBeginInfo_self(dec, val); 244} 245 246/* struct VkCommandBufferBeginInfo chain */ 247 248static inline size_t 249vn_sizeof_VkCommandBufferBeginInfo_pnext(const void *val) 250{ 251 const VkBaseInStructure *pnext = val; 252 size_t size = 0; 253 254 while (pnext) { 255 switch ((int32_t)pnext->sType) { 256 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 257 size += vn_sizeof_simple_pointer(pnext); 258 size += vn_sizeof_VkStructureType(&pnext->sType); 259 size += vn_sizeof_VkCommandBufferBeginInfo_pnext(pnext->pNext); 260 size += vn_sizeof_VkDeviceGroupCommandBufferBeginInfo_self((const VkDeviceGroupCommandBufferBeginInfo *)pnext); 261 return size; 262 default: 263 /* ignore unknown/unsupported struct */ 264 break; 265 } 266 pnext = pnext->pNext; 267 } 268 269 return vn_sizeof_simple_pointer(NULL); 270} 271 272static inline size_t 273vn_sizeof_VkCommandBufferBeginInfo_self(const VkCommandBufferBeginInfo *val) 274{ 275 size_t size = 0; 276 /* skip val->{sType,pNext} */ 277 size += vn_sizeof_VkFlags(&val->flags); 278 size += vn_sizeof_simple_pointer(val->pInheritanceInfo); 279 if (val->pInheritanceInfo) 280 size += vn_sizeof_VkCommandBufferInheritanceInfo(val->pInheritanceInfo); 281 return size; 282} 283 284static inline size_t 285vn_sizeof_VkCommandBufferBeginInfo(const VkCommandBufferBeginInfo *val) 286{ 287 size_t size = 0; 288 289 size += vn_sizeof_VkStructureType(&val->sType); 290 size += vn_sizeof_VkCommandBufferBeginInfo_pnext(val->pNext); 291 size += vn_sizeof_VkCommandBufferBeginInfo_self(val); 292 293 return size; 294} 295 296static inline void 297vn_encode_VkCommandBufferBeginInfo_pnext(struct vn_cs_encoder *enc, const void *val) 298{ 299 const VkBaseInStructure *pnext = val; 300 301 while (pnext) { 302 switch ((int32_t)pnext->sType) { 303 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 304 vn_encode_simple_pointer(enc, pnext); 305 vn_encode_VkStructureType(enc, &pnext->sType); 306 vn_encode_VkCommandBufferBeginInfo_pnext(enc, pnext->pNext); 307 vn_encode_VkDeviceGroupCommandBufferBeginInfo_self(enc, (const VkDeviceGroupCommandBufferBeginInfo *)pnext); 308 return; 309 default: 310 /* ignore unknown/unsupported struct */ 311 break; 312 } 313 pnext = pnext->pNext; 314 } 315 316 vn_encode_simple_pointer(enc, NULL); 317} 318 319static inline void 320vn_encode_VkCommandBufferBeginInfo_self(struct vn_cs_encoder *enc, const VkCommandBufferBeginInfo *val) 321{ 322 /* skip val->{sType,pNext} */ 323 vn_encode_VkFlags(enc, &val->flags); 324 if (vn_encode_simple_pointer(enc, val->pInheritanceInfo)) 325 vn_encode_VkCommandBufferInheritanceInfo(enc, val->pInheritanceInfo); 326} 327 328static inline void 329vn_encode_VkCommandBufferBeginInfo(struct vn_cs_encoder *enc, const VkCommandBufferBeginInfo *val) 330{ 331 assert(val->sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO); 332 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }); 333 vn_encode_VkCommandBufferBeginInfo_pnext(enc, val->pNext); 334 vn_encode_VkCommandBufferBeginInfo_self(enc, val); 335} 336 337static inline void 338vn_decode_VkCommandBufferBeginInfo_pnext(struct vn_cs_decoder *dec, const void *val) 339{ 340 VkBaseOutStructure *pnext = (VkBaseOutStructure *)val; 341 VkStructureType stype; 342 343 if (!vn_decode_simple_pointer(dec)) 344 return; 345 346 vn_decode_VkStructureType(dec, &stype); 347 while (true) { 348 assert(pnext); 349 if (pnext->sType == stype) 350 break; 351 } 352 353 switch ((int32_t)pnext->sType) { 354 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 355 vn_decode_VkCommandBufferBeginInfo_pnext(dec, pnext->pNext); 356 vn_decode_VkDeviceGroupCommandBufferBeginInfo_self(dec, (VkDeviceGroupCommandBufferBeginInfo *)pnext); 357 break; 358 default: 359 assert(false); 360 break; 361 } 362} 363 364static inline void 365vn_decode_VkCommandBufferBeginInfo_self(struct vn_cs_decoder *dec, VkCommandBufferBeginInfo *val) 366{ 367 /* skip val->{sType,pNext} */ 368 vn_decode_VkFlags(dec, &val->flags); 369 if (vn_decode_simple_pointer(dec)) { 370 vn_decode_VkCommandBufferInheritanceInfo(dec, (VkCommandBufferInheritanceInfo *)val->pInheritanceInfo); 371 } else { 372 val->pInheritanceInfo = NULL; 373 } 374} 375 376static inline void 377vn_decode_VkCommandBufferBeginInfo(struct vn_cs_decoder *dec, VkCommandBufferBeginInfo *val) 378{ 379 VkStructureType stype; 380 vn_decode_VkStructureType(dec, &stype); 381 assert(stype == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO); 382 383 assert(val->sType == stype); 384 vn_decode_VkCommandBufferBeginInfo_pnext(dec, val->pNext); 385 vn_decode_VkCommandBufferBeginInfo_self(dec, val); 386} 387 388/* struct VkBufferCopy */ 389 390static inline size_t 391vn_sizeof_VkBufferCopy(const VkBufferCopy *val) 392{ 393 size_t size = 0; 394 size += vn_sizeof_VkDeviceSize(&val->srcOffset); 395 size += vn_sizeof_VkDeviceSize(&val->dstOffset); 396 size += vn_sizeof_VkDeviceSize(&val->size); 397 return size; 398} 399 400static inline void 401vn_encode_VkBufferCopy(struct vn_cs_encoder *enc, const VkBufferCopy *val) 402{ 403 vn_encode_VkDeviceSize(enc, &val->srcOffset); 404 vn_encode_VkDeviceSize(enc, &val->dstOffset); 405 vn_encode_VkDeviceSize(enc, &val->size); 406} 407 408/* struct VkImageSubresourceLayers */ 409 410static inline size_t 411vn_sizeof_VkImageSubresourceLayers(const VkImageSubresourceLayers *val) 412{ 413 size_t size = 0; 414 size += vn_sizeof_VkFlags(&val->aspectMask); 415 size += vn_sizeof_uint32_t(&val->mipLevel); 416 size += vn_sizeof_uint32_t(&val->baseArrayLayer); 417 size += vn_sizeof_uint32_t(&val->layerCount); 418 return size; 419} 420 421static inline void 422vn_encode_VkImageSubresourceLayers(struct vn_cs_encoder *enc, const VkImageSubresourceLayers *val) 423{ 424 vn_encode_VkFlags(enc, &val->aspectMask); 425 vn_encode_uint32_t(enc, &val->mipLevel); 426 vn_encode_uint32_t(enc, &val->baseArrayLayer); 427 vn_encode_uint32_t(enc, &val->layerCount); 428} 429 430/* struct VkImageCopy */ 431 432static inline size_t 433vn_sizeof_VkImageCopy(const VkImageCopy *val) 434{ 435 size_t size = 0; 436 size += vn_sizeof_VkImageSubresourceLayers(&val->srcSubresource); 437 size += vn_sizeof_VkOffset3D(&val->srcOffset); 438 size += vn_sizeof_VkImageSubresourceLayers(&val->dstSubresource); 439 size += vn_sizeof_VkOffset3D(&val->dstOffset); 440 size += vn_sizeof_VkExtent3D(&val->extent); 441 return size; 442} 443 444static inline void 445vn_encode_VkImageCopy(struct vn_cs_encoder *enc, const VkImageCopy *val) 446{ 447 vn_encode_VkImageSubresourceLayers(enc, &val->srcSubresource); 448 vn_encode_VkOffset3D(enc, &val->srcOffset); 449 vn_encode_VkImageSubresourceLayers(enc, &val->dstSubresource); 450 vn_encode_VkOffset3D(enc, &val->dstOffset); 451 vn_encode_VkExtent3D(enc, &val->extent); 452} 453 454/* struct VkImageBlit */ 455 456static inline size_t 457vn_sizeof_VkImageBlit(const VkImageBlit *val) 458{ 459 size_t size = 0; 460 size += vn_sizeof_VkImageSubresourceLayers(&val->srcSubresource); 461 size += vn_sizeof_array_size(2); 462 for (uint32_t i = 0; i < 2; i++) 463 size += vn_sizeof_VkOffset3D(&val->srcOffsets[i]); 464 size += vn_sizeof_VkImageSubresourceLayers(&val->dstSubresource); 465 size += vn_sizeof_array_size(2); 466 for (uint32_t i = 0; i < 2; i++) 467 size += vn_sizeof_VkOffset3D(&val->dstOffsets[i]); 468 return size; 469} 470 471static inline void 472vn_encode_VkImageBlit(struct vn_cs_encoder *enc, const VkImageBlit *val) 473{ 474 vn_encode_VkImageSubresourceLayers(enc, &val->srcSubresource); 475 vn_encode_array_size(enc, 2); 476 for (uint32_t i = 0; i < 2; i++) 477 vn_encode_VkOffset3D(enc, &val->srcOffsets[i]); 478 vn_encode_VkImageSubresourceLayers(enc, &val->dstSubresource); 479 vn_encode_array_size(enc, 2); 480 for (uint32_t i = 0; i < 2; i++) 481 vn_encode_VkOffset3D(enc, &val->dstOffsets[i]); 482} 483 484/* struct VkBufferImageCopy */ 485 486static inline size_t 487vn_sizeof_VkBufferImageCopy(const VkBufferImageCopy *val) 488{ 489 size_t size = 0; 490 size += vn_sizeof_VkDeviceSize(&val->bufferOffset); 491 size += vn_sizeof_uint32_t(&val->bufferRowLength); 492 size += vn_sizeof_uint32_t(&val->bufferImageHeight); 493 size += vn_sizeof_VkImageSubresourceLayers(&val->imageSubresource); 494 size += vn_sizeof_VkOffset3D(&val->imageOffset); 495 size += vn_sizeof_VkExtent3D(&val->imageExtent); 496 return size; 497} 498 499static inline void 500vn_encode_VkBufferImageCopy(struct vn_cs_encoder *enc, const VkBufferImageCopy *val) 501{ 502 vn_encode_VkDeviceSize(enc, &val->bufferOffset); 503 vn_encode_uint32_t(enc, &val->bufferRowLength); 504 vn_encode_uint32_t(enc, &val->bufferImageHeight); 505 vn_encode_VkImageSubresourceLayers(enc, &val->imageSubresource); 506 vn_encode_VkOffset3D(enc, &val->imageOffset); 507 vn_encode_VkExtent3D(enc, &val->imageExtent); 508} 509 510/* union VkClearColorValue */ 511 512static inline size_t 513vn_sizeof_VkClearColorValue_tag(const VkClearColorValue *val, uint32_t tag) 514{ 515 size_t size = vn_sizeof_uint32_t(&tag); 516 switch (tag) { 517 case 0: 518 size += vn_sizeof_array_size(4); 519 size += vn_sizeof_float_array(val->float32, 4); 520 break; 521 case 1: 522 size += vn_sizeof_array_size(4); 523 size += vn_sizeof_int32_t_array(val->int32, 4); 524 break; 525 case 2: 526 size += vn_sizeof_array_size(4); 527 size += vn_sizeof_uint32_t_array(val->uint32, 4); 528 break; 529 default: 530 assert(false); 531 break; 532 } 533 return size; 534} 535 536static inline size_t 537vn_sizeof_VkClearColorValue(const VkClearColorValue *val) 538{ 539 return vn_sizeof_VkClearColorValue_tag(val, 2); 540} 541 542static inline void 543vn_encode_VkClearColorValue_tag(struct vn_cs_encoder *enc, const VkClearColorValue *val, uint32_t tag) 544{ 545 vn_encode_uint32_t(enc, &tag); 546 switch (tag) { 547 case 0: 548 vn_encode_array_size(enc, 4); 549 vn_encode_float_array(enc, val->float32, 4); 550 break; 551 case 1: 552 vn_encode_array_size(enc, 4); 553 vn_encode_int32_t_array(enc, val->int32, 4); 554 break; 555 case 2: 556 vn_encode_array_size(enc, 4); 557 vn_encode_uint32_t_array(enc, val->uint32, 4); 558 break; 559 default: 560 assert(false); 561 break; 562 } 563} 564 565static inline void 566vn_encode_VkClearColorValue(struct vn_cs_encoder *enc, const VkClearColorValue *val) 567{ 568 vn_encode_VkClearColorValue_tag(enc, val, 2); /* union with default tag */ 569} 570 571/* struct VkClearDepthStencilValue */ 572 573static inline size_t 574vn_sizeof_VkClearDepthStencilValue(const VkClearDepthStencilValue *val) 575{ 576 size_t size = 0; 577 size += vn_sizeof_float(&val->depth); 578 size += vn_sizeof_uint32_t(&val->stencil); 579 return size; 580} 581 582static inline void 583vn_encode_VkClearDepthStencilValue(struct vn_cs_encoder *enc, const VkClearDepthStencilValue *val) 584{ 585 vn_encode_float(enc, &val->depth); 586 vn_encode_uint32_t(enc, &val->stencil); 587} 588 589/* union VkClearValue */ 590 591static inline size_t 592vn_sizeof_VkClearValue_tag(const VkClearValue *val, uint32_t tag) 593{ 594 size_t size = vn_sizeof_uint32_t(&tag); 595 switch (tag) { 596 case 0: 597 size += vn_sizeof_VkClearColorValue(&val->color); 598 break; 599 case 1: 600 size += vn_sizeof_VkClearDepthStencilValue(&val->depthStencil); 601 break; 602 default: 603 assert(false); 604 break; 605 } 606 return size; 607} 608 609static inline size_t 610vn_sizeof_VkClearValue(const VkClearValue *val) 611{ 612 return vn_sizeof_VkClearValue_tag(val, 0); 613} 614 615static inline void 616vn_encode_VkClearValue_tag(struct vn_cs_encoder *enc, const VkClearValue *val, uint32_t tag) 617{ 618 vn_encode_uint32_t(enc, &tag); 619 switch (tag) { 620 case 0: 621 vn_encode_VkClearColorValue(enc, &val->color); 622 break; 623 case 1: 624 vn_encode_VkClearDepthStencilValue(enc, &val->depthStencil); 625 break; 626 default: 627 assert(false); 628 break; 629 } 630} 631 632static inline void 633vn_encode_VkClearValue(struct vn_cs_encoder *enc, const VkClearValue *val) 634{ 635 vn_encode_VkClearValue_tag(enc, val, 0); /* union with default tag */ 636} 637 638/* struct VkClearAttachment */ 639 640static inline size_t 641vn_sizeof_VkClearAttachment(const VkClearAttachment *val) 642{ 643 size_t size = 0; 644 size += vn_sizeof_VkFlags(&val->aspectMask); 645 size += vn_sizeof_uint32_t(&val->colorAttachment); 646 size += vn_sizeof_VkClearValue(&val->clearValue); 647 return size; 648} 649 650static inline void 651vn_encode_VkClearAttachment(struct vn_cs_encoder *enc, const VkClearAttachment *val) 652{ 653 vn_encode_VkFlags(enc, &val->aspectMask); 654 vn_encode_uint32_t(enc, &val->colorAttachment); 655 vn_encode_VkClearValue(enc, &val->clearValue); 656} 657 658/* struct VkClearRect */ 659 660static inline size_t 661vn_sizeof_VkClearRect(const VkClearRect *val) 662{ 663 size_t size = 0; 664 size += vn_sizeof_VkRect2D(&val->rect); 665 size += vn_sizeof_uint32_t(&val->baseArrayLayer); 666 size += vn_sizeof_uint32_t(&val->layerCount); 667 return size; 668} 669 670static inline void 671vn_encode_VkClearRect(struct vn_cs_encoder *enc, const VkClearRect *val) 672{ 673 vn_encode_VkRect2D(enc, &val->rect); 674 vn_encode_uint32_t(enc, &val->baseArrayLayer); 675 vn_encode_uint32_t(enc, &val->layerCount); 676} 677 678/* struct VkImageResolve */ 679 680static inline size_t 681vn_sizeof_VkImageResolve(const VkImageResolve *val) 682{ 683 size_t size = 0; 684 size += vn_sizeof_VkImageSubresourceLayers(&val->srcSubresource); 685 size += vn_sizeof_VkOffset3D(&val->srcOffset); 686 size += vn_sizeof_VkImageSubresourceLayers(&val->dstSubresource); 687 size += vn_sizeof_VkOffset3D(&val->dstOffset); 688 size += vn_sizeof_VkExtent3D(&val->extent); 689 return size; 690} 691 692static inline void 693vn_encode_VkImageResolve(struct vn_cs_encoder *enc, const VkImageResolve *val) 694{ 695 vn_encode_VkImageSubresourceLayers(enc, &val->srcSubresource); 696 vn_encode_VkOffset3D(enc, &val->srcOffset); 697 vn_encode_VkImageSubresourceLayers(enc, &val->dstSubresource); 698 vn_encode_VkOffset3D(enc, &val->dstOffset); 699 vn_encode_VkExtent3D(enc, &val->extent); 700} 701 702/* struct VkMemoryBarrier chain */ 703 704static inline size_t 705vn_sizeof_VkMemoryBarrier_pnext(const void *val) 706{ 707 /* no known/supported struct */ 708 return vn_sizeof_simple_pointer(NULL); 709} 710 711static inline size_t 712vn_sizeof_VkMemoryBarrier_self(const VkMemoryBarrier *val) 713{ 714 size_t size = 0; 715 /* skip val->{sType,pNext} */ 716 size += vn_sizeof_VkFlags(&val->srcAccessMask); 717 size += vn_sizeof_VkFlags(&val->dstAccessMask); 718 return size; 719} 720 721static inline size_t 722vn_sizeof_VkMemoryBarrier(const VkMemoryBarrier *val) 723{ 724 size_t size = 0; 725 726 size += vn_sizeof_VkStructureType(&val->sType); 727 size += vn_sizeof_VkMemoryBarrier_pnext(val->pNext); 728 size += vn_sizeof_VkMemoryBarrier_self(val); 729 730 return size; 731} 732 733static inline void 734vn_encode_VkMemoryBarrier_pnext(struct vn_cs_encoder *enc, const void *val) 735{ 736 /* no known/supported struct */ 737 vn_encode_simple_pointer(enc, NULL); 738} 739 740static inline void 741vn_encode_VkMemoryBarrier_self(struct vn_cs_encoder *enc, const VkMemoryBarrier *val) 742{ 743 /* skip val->{sType,pNext} */ 744 vn_encode_VkFlags(enc, &val->srcAccessMask); 745 vn_encode_VkFlags(enc, &val->dstAccessMask); 746} 747 748static inline void 749vn_encode_VkMemoryBarrier(struct vn_cs_encoder *enc, const VkMemoryBarrier *val) 750{ 751 assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_BARRIER); 752 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_BARRIER }); 753 vn_encode_VkMemoryBarrier_pnext(enc, val->pNext); 754 vn_encode_VkMemoryBarrier_self(enc, val); 755} 756 757/* struct VkBufferMemoryBarrier chain */ 758 759static inline size_t 760vn_sizeof_VkBufferMemoryBarrier_pnext(const void *val) 761{ 762 /* no known/supported struct */ 763 return vn_sizeof_simple_pointer(NULL); 764} 765 766static inline size_t 767vn_sizeof_VkBufferMemoryBarrier_self(const VkBufferMemoryBarrier *val) 768{ 769 size_t size = 0; 770 /* skip val->{sType,pNext} */ 771 size += vn_sizeof_VkFlags(&val->srcAccessMask); 772 size += vn_sizeof_VkFlags(&val->dstAccessMask); 773 size += vn_sizeof_uint32_t(&val->srcQueueFamilyIndex); 774 size += vn_sizeof_uint32_t(&val->dstQueueFamilyIndex); 775 size += vn_sizeof_VkBuffer(&val->buffer); 776 size += vn_sizeof_VkDeviceSize(&val->offset); 777 size += vn_sizeof_VkDeviceSize(&val->size); 778 return size; 779} 780 781static inline size_t 782vn_sizeof_VkBufferMemoryBarrier(const VkBufferMemoryBarrier *val) 783{ 784 size_t size = 0; 785 786 size += vn_sizeof_VkStructureType(&val->sType); 787 size += vn_sizeof_VkBufferMemoryBarrier_pnext(val->pNext); 788 size += vn_sizeof_VkBufferMemoryBarrier_self(val); 789 790 return size; 791} 792 793static inline void 794vn_encode_VkBufferMemoryBarrier_pnext(struct vn_cs_encoder *enc, const void *val) 795{ 796 /* no known/supported struct */ 797 vn_encode_simple_pointer(enc, NULL); 798} 799 800static inline void 801vn_encode_VkBufferMemoryBarrier_self(struct vn_cs_encoder *enc, const VkBufferMemoryBarrier *val) 802{ 803 /* skip val->{sType,pNext} */ 804 vn_encode_VkFlags(enc, &val->srcAccessMask); 805 vn_encode_VkFlags(enc, &val->dstAccessMask); 806 vn_encode_uint32_t(enc, &val->srcQueueFamilyIndex); 807 vn_encode_uint32_t(enc, &val->dstQueueFamilyIndex); 808 vn_encode_VkBuffer(enc, &val->buffer); 809 vn_encode_VkDeviceSize(enc, &val->offset); 810 vn_encode_VkDeviceSize(enc, &val->size); 811} 812 813static inline void 814vn_encode_VkBufferMemoryBarrier(struct vn_cs_encoder *enc, const VkBufferMemoryBarrier *val) 815{ 816 assert(val->sType == VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER); 817 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER }); 818 vn_encode_VkBufferMemoryBarrier_pnext(enc, val->pNext); 819 vn_encode_VkBufferMemoryBarrier_self(enc, val); 820} 821 822/* struct VkImageMemoryBarrier chain */ 823 824static inline size_t 825vn_sizeof_VkImageMemoryBarrier_pnext(const void *val) 826{ 827 /* no known/supported struct */ 828 return vn_sizeof_simple_pointer(NULL); 829} 830 831static inline size_t 832vn_sizeof_VkImageMemoryBarrier_self(const VkImageMemoryBarrier *val) 833{ 834 size_t size = 0; 835 /* skip val->{sType,pNext} */ 836 size += vn_sizeof_VkFlags(&val->srcAccessMask); 837 size += vn_sizeof_VkFlags(&val->dstAccessMask); 838 size += vn_sizeof_VkImageLayout(&val->oldLayout); 839 size += vn_sizeof_VkImageLayout(&val->newLayout); 840 size += vn_sizeof_uint32_t(&val->srcQueueFamilyIndex); 841 size += vn_sizeof_uint32_t(&val->dstQueueFamilyIndex); 842 size += vn_sizeof_VkImage(&val->image); 843 size += vn_sizeof_VkImageSubresourceRange(&val->subresourceRange); 844 return size; 845} 846 847static inline size_t 848vn_sizeof_VkImageMemoryBarrier(const VkImageMemoryBarrier *val) 849{ 850 size_t size = 0; 851 852 size += vn_sizeof_VkStructureType(&val->sType); 853 size += vn_sizeof_VkImageMemoryBarrier_pnext(val->pNext); 854 size += vn_sizeof_VkImageMemoryBarrier_self(val); 855 856 return size; 857} 858 859static inline void 860vn_encode_VkImageMemoryBarrier_pnext(struct vn_cs_encoder *enc, const void *val) 861{ 862 /* no known/supported struct */ 863 vn_encode_simple_pointer(enc, NULL); 864} 865 866static inline void 867vn_encode_VkImageMemoryBarrier_self(struct vn_cs_encoder *enc, const VkImageMemoryBarrier *val) 868{ 869 /* skip val->{sType,pNext} */ 870 vn_encode_VkFlags(enc, &val->srcAccessMask); 871 vn_encode_VkFlags(enc, &val->dstAccessMask); 872 vn_encode_VkImageLayout(enc, &val->oldLayout); 873 vn_encode_VkImageLayout(enc, &val->newLayout); 874 vn_encode_uint32_t(enc, &val->srcQueueFamilyIndex); 875 vn_encode_uint32_t(enc, &val->dstQueueFamilyIndex); 876 vn_encode_VkImage(enc, &val->image); 877 vn_encode_VkImageSubresourceRange(enc, &val->subresourceRange); 878} 879 880static inline void 881vn_encode_VkImageMemoryBarrier(struct vn_cs_encoder *enc, const VkImageMemoryBarrier *val) 882{ 883 assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER); 884 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER }); 885 vn_encode_VkImageMemoryBarrier_pnext(enc, val->pNext); 886 vn_encode_VkImageMemoryBarrier_self(enc, val); 887} 888 889/* struct VkDeviceGroupRenderPassBeginInfo chain */ 890 891static inline size_t 892vn_sizeof_VkDeviceGroupRenderPassBeginInfo_pnext(const void *val) 893{ 894 /* no known/supported struct */ 895 return vn_sizeof_simple_pointer(NULL); 896} 897 898static inline size_t 899vn_sizeof_VkDeviceGroupRenderPassBeginInfo_self(const VkDeviceGroupRenderPassBeginInfo *val) 900{ 901 size_t size = 0; 902 /* skip val->{sType,pNext} */ 903 size += vn_sizeof_uint32_t(&val->deviceMask); 904 size += vn_sizeof_uint32_t(&val->deviceRenderAreaCount); 905 if (val->pDeviceRenderAreas) { 906 size += vn_sizeof_array_size(val->deviceRenderAreaCount); 907 for (uint32_t i = 0; i < val->deviceRenderAreaCount; i++) 908 size += vn_sizeof_VkRect2D(&val->pDeviceRenderAreas[i]); 909 } else { 910 size += vn_sizeof_array_size(0); 911 } 912 return size; 913} 914 915static inline size_t 916vn_sizeof_VkDeviceGroupRenderPassBeginInfo(const VkDeviceGroupRenderPassBeginInfo *val) 917{ 918 size_t size = 0; 919 920 size += vn_sizeof_VkStructureType(&val->sType); 921 size += vn_sizeof_VkDeviceGroupRenderPassBeginInfo_pnext(val->pNext); 922 size += vn_sizeof_VkDeviceGroupRenderPassBeginInfo_self(val); 923 924 return size; 925} 926 927static inline void 928vn_encode_VkDeviceGroupRenderPassBeginInfo_pnext(struct vn_cs_encoder *enc, const void *val) 929{ 930 /* no known/supported struct */ 931 vn_encode_simple_pointer(enc, NULL); 932} 933 934static inline void 935vn_encode_VkDeviceGroupRenderPassBeginInfo_self(struct vn_cs_encoder *enc, const VkDeviceGroupRenderPassBeginInfo *val) 936{ 937 /* skip val->{sType,pNext} */ 938 vn_encode_uint32_t(enc, &val->deviceMask); 939 vn_encode_uint32_t(enc, &val->deviceRenderAreaCount); 940 if (val->pDeviceRenderAreas) { 941 vn_encode_array_size(enc, val->deviceRenderAreaCount); 942 for (uint32_t i = 0; i < val->deviceRenderAreaCount; i++) 943 vn_encode_VkRect2D(enc, &val->pDeviceRenderAreas[i]); 944 } else { 945 vn_encode_array_size(enc, 0); 946 } 947} 948 949static inline void 950vn_encode_VkDeviceGroupRenderPassBeginInfo(struct vn_cs_encoder *enc, const VkDeviceGroupRenderPassBeginInfo *val) 951{ 952 assert(val->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO); 953 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO }); 954 vn_encode_VkDeviceGroupRenderPassBeginInfo_pnext(enc, val->pNext); 955 vn_encode_VkDeviceGroupRenderPassBeginInfo_self(enc, val); 956} 957 958/* struct VkRenderPassAttachmentBeginInfo chain */ 959 960static inline size_t 961vn_sizeof_VkRenderPassAttachmentBeginInfo_pnext(const void *val) 962{ 963 /* no known/supported struct */ 964 return vn_sizeof_simple_pointer(NULL); 965} 966 967static inline size_t 968vn_sizeof_VkRenderPassAttachmentBeginInfo_self(const VkRenderPassAttachmentBeginInfo *val) 969{ 970 size_t size = 0; 971 /* skip val->{sType,pNext} */ 972 size += vn_sizeof_uint32_t(&val->attachmentCount); 973 if (val->pAttachments) { 974 size += vn_sizeof_array_size(val->attachmentCount); 975 for (uint32_t i = 0; i < val->attachmentCount; i++) 976 size += vn_sizeof_VkImageView(&val->pAttachments[i]); 977 } else { 978 size += vn_sizeof_array_size(0); 979 } 980 return size; 981} 982 983static inline size_t 984vn_sizeof_VkRenderPassAttachmentBeginInfo(const VkRenderPassAttachmentBeginInfo *val) 985{ 986 size_t size = 0; 987 988 size += vn_sizeof_VkStructureType(&val->sType); 989 size += vn_sizeof_VkRenderPassAttachmentBeginInfo_pnext(val->pNext); 990 size += vn_sizeof_VkRenderPassAttachmentBeginInfo_self(val); 991 992 return size; 993} 994 995static inline void 996vn_encode_VkRenderPassAttachmentBeginInfo_pnext(struct vn_cs_encoder *enc, const void *val) 997{ 998 /* no known/supported struct */ 999 vn_encode_simple_pointer(enc, NULL); 1000} 1001 1002static inline void 1003vn_encode_VkRenderPassAttachmentBeginInfo_self(struct vn_cs_encoder *enc, const VkRenderPassAttachmentBeginInfo *val) 1004{ 1005 /* skip val->{sType,pNext} */ 1006 vn_encode_uint32_t(enc, &val->attachmentCount); 1007 if (val->pAttachments) { 1008 vn_encode_array_size(enc, val->attachmentCount); 1009 for (uint32_t i = 0; i < val->attachmentCount; i++) 1010 vn_encode_VkImageView(enc, &val->pAttachments[i]); 1011 } else { 1012 vn_encode_array_size(enc, 0); 1013 } 1014} 1015 1016static inline void 1017vn_encode_VkRenderPassAttachmentBeginInfo(struct vn_cs_encoder *enc, const VkRenderPassAttachmentBeginInfo *val) 1018{ 1019 assert(val->sType == VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO); 1020 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO }); 1021 vn_encode_VkRenderPassAttachmentBeginInfo_pnext(enc, val->pNext); 1022 vn_encode_VkRenderPassAttachmentBeginInfo_self(enc, val); 1023} 1024 1025/* struct VkRenderPassBeginInfo chain */ 1026 1027static inline size_t 1028vn_sizeof_VkRenderPassBeginInfo_pnext(const void *val) 1029{ 1030 const VkBaseInStructure *pnext = val; 1031 size_t size = 0; 1032 1033 while (pnext) { 1034 switch ((int32_t)pnext->sType) { 1035 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 1036 size += vn_sizeof_simple_pointer(pnext); 1037 size += vn_sizeof_VkStructureType(&pnext->sType); 1038 size += vn_sizeof_VkRenderPassBeginInfo_pnext(pnext->pNext); 1039 size += vn_sizeof_VkDeviceGroupRenderPassBeginInfo_self((const VkDeviceGroupRenderPassBeginInfo *)pnext); 1040 return size; 1041 case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: 1042 size += vn_sizeof_simple_pointer(pnext); 1043 size += vn_sizeof_VkStructureType(&pnext->sType); 1044 size += vn_sizeof_VkRenderPassBeginInfo_pnext(pnext->pNext); 1045 size += vn_sizeof_VkRenderPassAttachmentBeginInfo_self((const VkRenderPassAttachmentBeginInfo *)pnext); 1046 return size; 1047 default: 1048 /* ignore unknown/unsupported struct */ 1049 break; 1050 } 1051 pnext = pnext->pNext; 1052 } 1053 1054 return vn_sizeof_simple_pointer(NULL); 1055} 1056 1057static inline size_t 1058vn_sizeof_VkRenderPassBeginInfo_self(const VkRenderPassBeginInfo *val) 1059{ 1060 size_t size = 0; 1061 /* skip val->{sType,pNext} */ 1062 size += vn_sizeof_VkRenderPass(&val->renderPass); 1063 size += vn_sizeof_VkFramebuffer(&val->framebuffer); 1064 size += vn_sizeof_VkRect2D(&val->renderArea); 1065 size += vn_sizeof_uint32_t(&val->clearValueCount); 1066 if (val->pClearValues) { 1067 size += vn_sizeof_array_size(val->clearValueCount); 1068 for (uint32_t i = 0; i < val->clearValueCount; i++) 1069 size += vn_sizeof_VkClearValue(&val->pClearValues[i]); 1070 } else { 1071 size += vn_sizeof_array_size(0); 1072 } 1073 return size; 1074} 1075 1076static inline size_t 1077vn_sizeof_VkRenderPassBeginInfo(const VkRenderPassBeginInfo *val) 1078{ 1079 size_t size = 0; 1080 1081 size += vn_sizeof_VkStructureType(&val->sType); 1082 size += vn_sizeof_VkRenderPassBeginInfo_pnext(val->pNext); 1083 size += vn_sizeof_VkRenderPassBeginInfo_self(val); 1084 1085 return size; 1086} 1087 1088static inline void 1089vn_encode_VkRenderPassBeginInfo_pnext(struct vn_cs_encoder *enc, const void *val) 1090{ 1091 const VkBaseInStructure *pnext = val; 1092 1093 while (pnext) { 1094 switch ((int32_t)pnext->sType) { 1095 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 1096 vn_encode_simple_pointer(enc, pnext); 1097 vn_encode_VkStructureType(enc, &pnext->sType); 1098 vn_encode_VkRenderPassBeginInfo_pnext(enc, pnext->pNext); 1099 vn_encode_VkDeviceGroupRenderPassBeginInfo_self(enc, (const VkDeviceGroupRenderPassBeginInfo *)pnext); 1100 return; 1101 case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: 1102 vn_encode_simple_pointer(enc, pnext); 1103 vn_encode_VkStructureType(enc, &pnext->sType); 1104 vn_encode_VkRenderPassBeginInfo_pnext(enc, pnext->pNext); 1105 vn_encode_VkRenderPassAttachmentBeginInfo_self(enc, (const VkRenderPassAttachmentBeginInfo *)pnext); 1106 return; 1107 default: 1108 /* ignore unknown/unsupported struct */ 1109 break; 1110 } 1111 pnext = pnext->pNext; 1112 } 1113 1114 vn_encode_simple_pointer(enc, NULL); 1115} 1116 1117static inline void 1118vn_encode_VkRenderPassBeginInfo_self(struct vn_cs_encoder *enc, const VkRenderPassBeginInfo *val) 1119{ 1120 /* skip val->{sType,pNext} */ 1121 vn_encode_VkRenderPass(enc, &val->renderPass); 1122 vn_encode_VkFramebuffer(enc, &val->framebuffer); 1123 vn_encode_VkRect2D(enc, &val->renderArea); 1124 vn_encode_uint32_t(enc, &val->clearValueCount); 1125 if (val->pClearValues) { 1126 vn_encode_array_size(enc, val->clearValueCount); 1127 for (uint32_t i = 0; i < val->clearValueCount; i++) 1128 vn_encode_VkClearValue(enc, &val->pClearValues[i]); 1129 } else { 1130 vn_encode_array_size(enc, 0); 1131 } 1132} 1133 1134static inline void 1135vn_encode_VkRenderPassBeginInfo(struct vn_cs_encoder *enc, const VkRenderPassBeginInfo *val) 1136{ 1137 assert(val->sType == VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO); 1138 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO }); 1139 vn_encode_VkRenderPassBeginInfo_pnext(enc, val->pNext); 1140 vn_encode_VkRenderPassBeginInfo_self(enc, val); 1141} 1142 1143/* struct VkSubpassBeginInfo chain */ 1144 1145static inline size_t 1146vn_sizeof_VkSubpassBeginInfo_pnext(const void *val) 1147{ 1148 /* no known/supported struct */ 1149 return vn_sizeof_simple_pointer(NULL); 1150} 1151 1152static inline size_t 1153vn_sizeof_VkSubpassBeginInfo_self(const VkSubpassBeginInfo *val) 1154{ 1155 size_t size = 0; 1156 /* skip val->{sType,pNext} */ 1157 size += vn_sizeof_VkSubpassContents(&val->contents); 1158 return size; 1159} 1160 1161static inline size_t 1162vn_sizeof_VkSubpassBeginInfo(const VkSubpassBeginInfo *val) 1163{ 1164 size_t size = 0; 1165 1166 size += vn_sizeof_VkStructureType(&val->sType); 1167 size += vn_sizeof_VkSubpassBeginInfo_pnext(val->pNext); 1168 size += vn_sizeof_VkSubpassBeginInfo_self(val); 1169 1170 return size; 1171} 1172 1173static inline void 1174vn_encode_VkSubpassBeginInfo_pnext(struct vn_cs_encoder *enc, const void *val) 1175{ 1176 /* no known/supported struct */ 1177 vn_encode_simple_pointer(enc, NULL); 1178} 1179 1180static inline void 1181vn_encode_VkSubpassBeginInfo_self(struct vn_cs_encoder *enc, const VkSubpassBeginInfo *val) 1182{ 1183 /* skip val->{sType,pNext} */ 1184 vn_encode_VkSubpassContents(enc, &val->contents); 1185} 1186 1187static inline void 1188vn_encode_VkSubpassBeginInfo(struct vn_cs_encoder *enc, const VkSubpassBeginInfo *val) 1189{ 1190 assert(val->sType == VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO); 1191 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO }); 1192 vn_encode_VkSubpassBeginInfo_pnext(enc, val->pNext); 1193 vn_encode_VkSubpassBeginInfo_self(enc, val); 1194} 1195 1196/* struct VkSubpassEndInfo chain */ 1197 1198static inline size_t 1199vn_sizeof_VkSubpassEndInfo_pnext(const void *val) 1200{ 1201 /* no known/supported struct */ 1202 return vn_sizeof_simple_pointer(NULL); 1203} 1204 1205static inline size_t 1206vn_sizeof_VkSubpassEndInfo_self(const VkSubpassEndInfo *val) 1207{ 1208 size_t size = 0; 1209 /* skip val->{sType,pNext} */ 1210 return size; 1211} 1212 1213static inline size_t 1214vn_sizeof_VkSubpassEndInfo(const VkSubpassEndInfo *val) 1215{ 1216 size_t size = 0; 1217 1218 size += vn_sizeof_VkStructureType(&val->sType); 1219 size += vn_sizeof_VkSubpassEndInfo_pnext(val->pNext); 1220 size += vn_sizeof_VkSubpassEndInfo_self(val); 1221 1222 return size; 1223} 1224 1225static inline void 1226vn_encode_VkSubpassEndInfo_pnext(struct vn_cs_encoder *enc, const void *val) 1227{ 1228 /* no known/supported struct */ 1229 vn_encode_simple_pointer(enc, NULL); 1230} 1231 1232static inline void 1233vn_encode_VkSubpassEndInfo_self(struct vn_cs_encoder *enc, const VkSubpassEndInfo *val) 1234{ 1235 /* skip val->{sType,pNext} */ 1236} 1237 1238static inline void 1239vn_encode_VkSubpassEndInfo(struct vn_cs_encoder *enc, const VkSubpassEndInfo *val) 1240{ 1241 assert(val->sType == VK_STRUCTURE_TYPE_SUBPASS_END_INFO); 1242 vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SUBPASS_END_INFO }); 1243 vn_encode_VkSubpassEndInfo_pnext(enc, val->pNext); 1244 vn_encode_VkSubpassEndInfo_self(enc, val); 1245} 1246 1247static inline size_t vn_sizeof_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) 1248{ 1249 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT; 1250 const VkFlags cmd_flags = 0; 1251 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1252 1253 cmd_size += vn_sizeof_VkDevice(&device); 1254 cmd_size += vn_sizeof_simple_pointer(pAllocateInfo); 1255 if (pAllocateInfo) 1256 cmd_size += vn_sizeof_VkCommandBufferAllocateInfo(pAllocateInfo); 1257 if (pCommandBuffers) { 1258 cmd_size += vn_sizeof_array_size((pAllocateInfo ? pAllocateInfo->commandBufferCount : 0)); 1259 for (uint32_t i = 0; i < (pAllocateInfo ? pAllocateInfo->commandBufferCount : 0); i++) 1260 cmd_size += vn_sizeof_VkCommandBuffer(&pCommandBuffers[i]); 1261 } else { 1262 cmd_size += vn_sizeof_array_size(0); 1263 } 1264 1265 return cmd_size; 1266} 1267 1268static inline void vn_encode_vkAllocateCommandBuffers(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) 1269{ 1270 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT; 1271 1272 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1273 vn_encode_VkFlags(enc, &cmd_flags); 1274 1275 vn_encode_VkDevice(enc, &device); 1276 if (vn_encode_simple_pointer(enc, pAllocateInfo)) 1277 vn_encode_VkCommandBufferAllocateInfo(enc, pAllocateInfo); 1278 if (pCommandBuffers) { 1279 vn_encode_array_size(enc, (pAllocateInfo ? pAllocateInfo->commandBufferCount : 0)); 1280 for (uint32_t i = 0; i < (pAllocateInfo ? pAllocateInfo->commandBufferCount : 0); i++) 1281 vn_encode_VkCommandBuffer(enc, &pCommandBuffers[i]); 1282 } else { 1283 vn_encode_array_size(enc, 0); 1284 } 1285} 1286 1287static inline size_t vn_sizeof_vkAllocateCommandBuffers_reply(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) 1288{ 1289 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT; 1290 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1291 1292 VkResult ret; 1293 cmd_size += vn_sizeof_VkResult(&ret); 1294 /* skip device */ 1295 /* skip pAllocateInfo */ 1296 if (pCommandBuffers) { 1297 cmd_size += vn_sizeof_array_size((pAllocateInfo ? pAllocateInfo->commandBufferCount : 0)); 1298 for (uint32_t i = 0; i < (pAllocateInfo ? pAllocateInfo->commandBufferCount : 0); i++) 1299 cmd_size += vn_sizeof_VkCommandBuffer(&pCommandBuffers[i]); 1300 } else { 1301 cmd_size += vn_sizeof_array_size(0); 1302 } 1303 1304 return cmd_size; 1305} 1306 1307static inline VkResult vn_decode_vkAllocateCommandBuffers_reply(struct vn_cs_decoder *dec, VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) 1308{ 1309 VkCommandTypeEXT command_type; 1310 vn_decode_VkCommandTypeEXT(dec, &command_type); 1311 assert(command_type == VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT); 1312 1313 VkResult ret; 1314 vn_decode_VkResult(dec, &ret); 1315 /* skip device */ 1316 /* skip pAllocateInfo */ 1317 if (vn_peek_array_size(dec)) { 1318 const uint32_t iter_count = vn_decode_array_size(dec, (pAllocateInfo ? pAllocateInfo->commandBufferCount : 0)); 1319 for (uint32_t i = 0; i < iter_count; i++) 1320 vn_decode_VkCommandBuffer(dec, &pCommandBuffers[i]); 1321 } else { 1322 vn_decode_array_size_unchecked(dec); 1323 pCommandBuffers = NULL; 1324 } 1325 1326 return ret; 1327} 1328 1329static inline size_t vn_sizeof_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 1330{ 1331 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT; 1332 const VkFlags cmd_flags = 0; 1333 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1334 1335 cmd_size += vn_sizeof_VkDevice(&device); 1336 cmd_size += vn_sizeof_VkCommandPool(&commandPool); 1337 cmd_size += vn_sizeof_uint32_t(&commandBufferCount); 1338 if (pCommandBuffers) { 1339 cmd_size += vn_sizeof_array_size(commandBufferCount); 1340 for (uint32_t i = 0; i < commandBufferCount; i++) 1341 cmd_size += vn_sizeof_VkCommandBuffer(&pCommandBuffers[i]); 1342 } else { 1343 cmd_size += vn_sizeof_array_size(0); 1344 } 1345 1346 return cmd_size; 1347} 1348 1349static inline void vn_encode_vkFreeCommandBuffers(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 1350{ 1351 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT; 1352 1353 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1354 vn_encode_VkFlags(enc, &cmd_flags); 1355 1356 vn_encode_VkDevice(enc, &device); 1357 vn_encode_VkCommandPool(enc, &commandPool); 1358 vn_encode_uint32_t(enc, &commandBufferCount); 1359 if (pCommandBuffers) { 1360 vn_encode_array_size(enc, commandBufferCount); 1361 for (uint32_t i = 0; i < commandBufferCount; i++) 1362 vn_encode_VkCommandBuffer(enc, &pCommandBuffers[i]); 1363 } else { 1364 vn_encode_array_size(enc, 0); 1365 } 1366} 1367 1368static inline size_t vn_sizeof_vkFreeCommandBuffers_reply(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 1369{ 1370 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT; 1371 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1372 1373 /* skip device */ 1374 /* skip commandPool */ 1375 /* skip commandBufferCount */ 1376 /* skip pCommandBuffers */ 1377 1378 return cmd_size; 1379} 1380 1381static inline void vn_decode_vkFreeCommandBuffers_reply(struct vn_cs_decoder *dec, VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 1382{ 1383 VkCommandTypeEXT command_type; 1384 vn_decode_VkCommandTypeEXT(dec, &command_type); 1385 assert(command_type == VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT); 1386 1387 /* skip device */ 1388 /* skip commandPool */ 1389 /* skip commandBufferCount */ 1390 /* skip pCommandBuffers */ 1391} 1392 1393static inline size_t vn_sizeof_vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) 1394{ 1395 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT; 1396 const VkFlags cmd_flags = 0; 1397 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1398 1399 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1400 cmd_size += vn_sizeof_simple_pointer(pBeginInfo); 1401 if (pBeginInfo) 1402 cmd_size += vn_sizeof_VkCommandBufferBeginInfo(pBeginInfo); 1403 1404 return cmd_size; 1405} 1406 1407static inline void vn_encode_vkBeginCommandBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) 1408{ 1409 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT; 1410 1411 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1412 vn_encode_VkFlags(enc, &cmd_flags); 1413 1414 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1415 if (vn_encode_simple_pointer(enc, pBeginInfo)) 1416 vn_encode_VkCommandBufferBeginInfo(enc, pBeginInfo); 1417} 1418 1419static inline size_t vn_sizeof_vkBeginCommandBuffer_reply(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) 1420{ 1421 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT; 1422 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1423 1424 VkResult ret; 1425 cmd_size += vn_sizeof_VkResult(&ret); 1426 /* skip commandBuffer */ 1427 /* skip pBeginInfo */ 1428 1429 return cmd_size; 1430} 1431 1432static inline VkResult vn_decode_vkBeginCommandBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) 1433{ 1434 VkCommandTypeEXT command_type; 1435 vn_decode_VkCommandTypeEXT(dec, &command_type); 1436 assert(command_type == VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT); 1437 1438 VkResult ret; 1439 vn_decode_VkResult(dec, &ret); 1440 /* skip commandBuffer */ 1441 /* skip pBeginInfo */ 1442 1443 return ret; 1444} 1445 1446static inline size_t vn_sizeof_vkEndCommandBuffer(VkCommandBuffer commandBuffer) 1447{ 1448 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkEndCommandBuffer_EXT; 1449 const VkFlags cmd_flags = 0; 1450 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1451 1452 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1453 1454 return cmd_size; 1455} 1456 1457static inline void vn_encode_vkEndCommandBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer) 1458{ 1459 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkEndCommandBuffer_EXT; 1460 1461 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1462 vn_encode_VkFlags(enc, &cmd_flags); 1463 1464 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1465} 1466 1467static inline size_t vn_sizeof_vkEndCommandBuffer_reply(VkCommandBuffer commandBuffer) 1468{ 1469 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkEndCommandBuffer_EXT; 1470 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1471 1472 VkResult ret; 1473 cmd_size += vn_sizeof_VkResult(&ret); 1474 /* skip commandBuffer */ 1475 1476 return cmd_size; 1477} 1478 1479static inline VkResult vn_decode_vkEndCommandBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer) 1480{ 1481 VkCommandTypeEXT command_type; 1482 vn_decode_VkCommandTypeEXT(dec, &command_type); 1483 assert(command_type == VK_COMMAND_TYPE_vkEndCommandBuffer_EXT); 1484 1485 VkResult ret; 1486 vn_decode_VkResult(dec, &ret); 1487 /* skip commandBuffer */ 1488 1489 return ret; 1490} 1491 1492static inline size_t vn_sizeof_vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) 1493{ 1494 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkResetCommandBuffer_EXT; 1495 const VkFlags cmd_flags = 0; 1496 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1497 1498 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1499 cmd_size += vn_sizeof_VkFlags(&flags); 1500 1501 return cmd_size; 1502} 1503 1504static inline void vn_encode_vkResetCommandBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) 1505{ 1506 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkResetCommandBuffer_EXT; 1507 1508 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1509 vn_encode_VkFlags(enc, &cmd_flags); 1510 1511 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1512 vn_encode_VkFlags(enc, &flags); 1513} 1514 1515static inline size_t vn_sizeof_vkResetCommandBuffer_reply(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) 1516{ 1517 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkResetCommandBuffer_EXT; 1518 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1519 1520 VkResult ret; 1521 cmd_size += vn_sizeof_VkResult(&ret); 1522 /* skip commandBuffer */ 1523 /* skip flags */ 1524 1525 return cmd_size; 1526} 1527 1528static inline VkResult vn_decode_vkResetCommandBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) 1529{ 1530 VkCommandTypeEXT command_type; 1531 vn_decode_VkCommandTypeEXT(dec, &command_type); 1532 assert(command_type == VK_COMMAND_TYPE_vkResetCommandBuffer_EXT); 1533 1534 VkResult ret; 1535 vn_decode_VkResult(dec, &ret); 1536 /* skip commandBuffer */ 1537 /* skip flags */ 1538 1539 return ret; 1540} 1541 1542static inline size_t vn_sizeof_vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) 1543{ 1544 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindPipeline_EXT; 1545 const VkFlags cmd_flags = 0; 1546 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1547 1548 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1549 cmd_size += vn_sizeof_VkPipelineBindPoint(&pipelineBindPoint); 1550 cmd_size += vn_sizeof_VkPipeline(&pipeline); 1551 1552 return cmd_size; 1553} 1554 1555static inline void vn_encode_vkCmdBindPipeline(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) 1556{ 1557 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindPipeline_EXT; 1558 1559 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1560 vn_encode_VkFlags(enc, &cmd_flags); 1561 1562 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1563 vn_encode_VkPipelineBindPoint(enc, &pipelineBindPoint); 1564 vn_encode_VkPipeline(enc, &pipeline); 1565} 1566 1567static inline size_t vn_sizeof_vkCmdBindPipeline_reply(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) 1568{ 1569 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindPipeline_EXT; 1570 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1571 1572 /* skip commandBuffer */ 1573 /* skip pipelineBindPoint */ 1574 /* skip pipeline */ 1575 1576 return cmd_size; 1577} 1578 1579static inline void vn_decode_vkCmdBindPipeline_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) 1580{ 1581 VkCommandTypeEXT command_type; 1582 vn_decode_VkCommandTypeEXT(dec, &command_type); 1583 assert(command_type == VK_COMMAND_TYPE_vkCmdBindPipeline_EXT); 1584 1585 /* skip commandBuffer */ 1586 /* skip pipelineBindPoint */ 1587 /* skip pipeline */ 1588} 1589 1590static inline size_t vn_sizeof_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) 1591{ 1592 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetViewport_EXT; 1593 const VkFlags cmd_flags = 0; 1594 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1595 1596 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1597 cmd_size += vn_sizeof_uint32_t(&firstViewport); 1598 cmd_size += vn_sizeof_uint32_t(&viewportCount); 1599 if (pViewports) { 1600 cmd_size += vn_sizeof_array_size(viewportCount); 1601 for (uint32_t i = 0; i < viewportCount; i++) 1602 cmd_size += vn_sizeof_VkViewport(&pViewports[i]); 1603 } else { 1604 cmd_size += vn_sizeof_array_size(0); 1605 } 1606 1607 return cmd_size; 1608} 1609 1610static inline void vn_encode_vkCmdSetViewport(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) 1611{ 1612 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetViewport_EXT; 1613 1614 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1615 vn_encode_VkFlags(enc, &cmd_flags); 1616 1617 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1618 vn_encode_uint32_t(enc, &firstViewport); 1619 vn_encode_uint32_t(enc, &viewportCount); 1620 if (pViewports) { 1621 vn_encode_array_size(enc, viewportCount); 1622 for (uint32_t i = 0; i < viewportCount; i++) 1623 vn_encode_VkViewport(enc, &pViewports[i]); 1624 } else { 1625 vn_encode_array_size(enc, 0); 1626 } 1627} 1628 1629static inline size_t vn_sizeof_vkCmdSetViewport_reply(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) 1630{ 1631 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetViewport_EXT; 1632 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1633 1634 /* skip commandBuffer */ 1635 /* skip firstViewport */ 1636 /* skip viewportCount */ 1637 /* skip pViewports */ 1638 1639 return cmd_size; 1640} 1641 1642static inline void vn_decode_vkCmdSetViewport_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) 1643{ 1644 VkCommandTypeEXT command_type; 1645 vn_decode_VkCommandTypeEXT(dec, &command_type); 1646 assert(command_type == VK_COMMAND_TYPE_vkCmdSetViewport_EXT); 1647 1648 /* skip commandBuffer */ 1649 /* skip firstViewport */ 1650 /* skip viewportCount */ 1651 /* skip pViewports */ 1652} 1653 1654static inline size_t vn_sizeof_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) 1655{ 1656 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetScissor_EXT; 1657 const VkFlags cmd_flags = 0; 1658 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1659 1660 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1661 cmd_size += vn_sizeof_uint32_t(&firstScissor); 1662 cmd_size += vn_sizeof_uint32_t(&scissorCount); 1663 if (pScissors) { 1664 cmd_size += vn_sizeof_array_size(scissorCount); 1665 for (uint32_t i = 0; i < scissorCount; i++) 1666 cmd_size += vn_sizeof_VkRect2D(&pScissors[i]); 1667 } else { 1668 cmd_size += vn_sizeof_array_size(0); 1669 } 1670 1671 return cmd_size; 1672} 1673 1674static inline void vn_encode_vkCmdSetScissor(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) 1675{ 1676 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetScissor_EXT; 1677 1678 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1679 vn_encode_VkFlags(enc, &cmd_flags); 1680 1681 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1682 vn_encode_uint32_t(enc, &firstScissor); 1683 vn_encode_uint32_t(enc, &scissorCount); 1684 if (pScissors) { 1685 vn_encode_array_size(enc, scissorCount); 1686 for (uint32_t i = 0; i < scissorCount; i++) 1687 vn_encode_VkRect2D(enc, &pScissors[i]); 1688 } else { 1689 vn_encode_array_size(enc, 0); 1690 } 1691} 1692 1693static inline size_t vn_sizeof_vkCmdSetScissor_reply(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) 1694{ 1695 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetScissor_EXT; 1696 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1697 1698 /* skip commandBuffer */ 1699 /* skip firstScissor */ 1700 /* skip scissorCount */ 1701 /* skip pScissors */ 1702 1703 return cmd_size; 1704} 1705 1706static inline void vn_decode_vkCmdSetScissor_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) 1707{ 1708 VkCommandTypeEXT command_type; 1709 vn_decode_VkCommandTypeEXT(dec, &command_type); 1710 assert(command_type == VK_COMMAND_TYPE_vkCmdSetScissor_EXT); 1711 1712 /* skip commandBuffer */ 1713 /* skip firstScissor */ 1714 /* skip scissorCount */ 1715 /* skip pScissors */ 1716} 1717 1718static inline size_t vn_sizeof_vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) 1719{ 1720 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT; 1721 const VkFlags cmd_flags = 0; 1722 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1723 1724 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1725 cmd_size += vn_sizeof_float(&lineWidth); 1726 1727 return cmd_size; 1728} 1729 1730static inline void vn_encode_vkCmdSetLineWidth(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, float lineWidth) 1731{ 1732 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT; 1733 1734 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1735 vn_encode_VkFlags(enc, &cmd_flags); 1736 1737 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1738 vn_encode_float(enc, &lineWidth); 1739} 1740 1741static inline size_t vn_sizeof_vkCmdSetLineWidth_reply(VkCommandBuffer commandBuffer, float lineWidth) 1742{ 1743 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT; 1744 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1745 1746 /* skip commandBuffer */ 1747 /* skip lineWidth */ 1748 1749 return cmd_size; 1750} 1751 1752static inline void vn_decode_vkCmdSetLineWidth_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, float lineWidth) 1753{ 1754 VkCommandTypeEXT command_type; 1755 vn_decode_VkCommandTypeEXT(dec, &command_type); 1756 assert(command_type == VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT); 1757 1758 /* skip commandBuffer */ 1759 /* skip lineWidth */ 1760} 1761 1762static inline size_t vn_sizeof_vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) 1763{ 1764 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT; 1765 const VkFlags cmd_flags = 0; 1766 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1767 1768 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1769 cmd_size += vn_sizeof_float(&depthBiasConstantFactor); 1770 cmd_size += vn_sizeof_float(&depthBiasClamp); 1771 cmd_size += vn_sizeof_float(&depthBiasSlopeFactor); 1772 1773 return cmd_size; 1774} 1775 1776static inline void vn_encode_vkCmdSetDepthBias(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) 1777{ 1778 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT; 1779 1780 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1781 vn_encode_VkFlags(enc, &cmd_flags); 1782 1783 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1784 vn_encode_float(enc, &depthBiasConstantFactor); 1785 vn_encode_float(enc, &depthBiasClamp); 1786 vn_encode_float(enc, &depthBiasSlopeFactor); 1787} 1788 1789static inline size_t vn_sizeof_vkCmdSetDepthBias_reply(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) 1790{ 1791 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT; 1792 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1793 1794 /* skip commandBuffer */ 1795 /* skip depthBiasConstantFactor */ 1796 /* skip depthBiasClamp */ 1797 /* skip depthBiasSlopeFactor */ 1798 1799 return cmd_size; 1800} 1801 1802static inline void vn_decode_vkCmdSetDepthBias_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) 1803{ 1804 VkCommandTypeEXT command_type; 1805 vn_decode_VkCommandTypeEXT(dec, &command_type); 1806 assert(command_type == VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT); 1807 1808 /* skip commandBuffer */ 1809 /* skip depthBiasConstantFactor */ 1810 /* skip depthBiasClamp */ 1811 /* skip depthBiasSlopeFactor */ 1812} 1813 1814static inline size_t vn_sizeof_vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) 1815{ 1816 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT; 1817 const VkFlags cmd_flags = 0; 1818 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1819 1820 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1821 cmd_size += vn_sizeof_array_size(4); 1822 cmd_size += vn_sizeof_float_array(blendConstants, 4); 1823 1824 return cmd_size; 1825} 1826 1827static inline void vn_encode_vkCmdSetBlendConstants(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const float blendConstants[4]) 1828{ 1829 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT; 1830 1831 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1832 vn_encode_VkFlags(enc, &cmd_flags); 1833 1834 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1835 vn_encode_array_size(enc, 4); 1836 vn_encode_float_array(enc, blendConstants, 4); 1837} 1838 1839static inline size_t vn_sizeof_vkCmdSetBlendConstants_reply(VkCommandBuffer commandBuffer, const float blendConstants[4]) 1840{ 1841 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT; 1842 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1843 1844 /* skip commandBuffer */ 1845 /* skip blendConstants */ 1846 1847 return cmd_size; 1848} 1849 1850static inline void vn_decode_vkCmdSetBlendConstants_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, const float blendConstants[4]) 1851{ 1852 VkCommandTypeEXT command_type; 1853 vn_decode_VkCommandTypeEXT(dec, &command_type); 1854 assert(command_type == VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT); 1855 1856 /* skip commandBuffer */ 1857 /* skip blendConstants */ 1858} 1859 1860static inline size_t vn_sizeof_vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) 1861{ 1862 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT; 1863 const VkFlags cmd_flags = 0; 1864 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1865 1866 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1867 cmd_size += vn_sizeof_float(&minDepthBounds); 1868 cmd_size += vn_sizeof_float(&maxDepthBounds); 1869 1870 return cmd_size; 1871} 1872 1873static inline void vn_encode_vkCmdSetDepthBounds(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) 1874{ 1875 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT; 1876 1877 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1878 vn_encode_VkFlags(enc, &cmd_flags); 1879 1880 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1881 vn_encode_float(enc, &minDepthBounds); 1882 vn_encode_float(enc, &maxDepthBounds); 1883} 1884 1885static inline size_t vn_sizeof_vkCmdSetDepthBounds_reply(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) 1886{ 1887 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT; 1888 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1889 1890 /* skip commandBuffer */ 1891 /* skip minDepthBounds */ 1892 /* skip maxDepthBounds */ 1893 1894 return cmd_size; 1895} 1896 1897static inline void vn_decode_vkCmdSetDepthBounds_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) 1898{ 1899 VkCommandTypeEXT command_type; 1900 vn_decode_VkCommandTypeEXT(dec, &command_type); 1901 assert(command_type == VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT); 1902 1903 /* skip commandBuffer */ 1904 /* skip minDepthBounds */ 1905 /* skip maxDepthBounds */ 1906} 1907 1908static inline size_t vn_sizeof_vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) 1909{ 1910 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT; 1911 const VkFlags cmd_flags = 0; 1912 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1913 1914 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1915 cmd_size += vn_sizeof_VkFlags(&faceMask); 1916 cmd_size += vn_sizeof_uint32_t(&compareMask); 1917 1918 return cmd_size; 1919} 1920 1921static inline void vn_encode_vkCmdSetStencilCompareMask(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) 1922{ 1923 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT; 1924 1925 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1926 vn_encode_VkFlags(enc, &cmd_flags); 1927 1928 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1929 vn_encode_VkFlags(enc, &faceMask); 1930 vn_encode_uint32_t(enc, &compareMask); 1931} 1932 1933static inline size_t vn_sizeof_vkCmdSetStencilCompareMask_reply(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) 1934{ 1935 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT; 1936 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1937 1938 /* skip commandBuffer */ 1939 /* skip faceMask */ 1940 /* skip compareMask */ 1941 1942 return cmd_size; 1943} 1944 1945static inline void vn_decode_vkCmdSetStencilCompareMask_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) 1946{ 1947 VkCommandTypeEXT command_type; 1948 vn_decode_VkCommandTypeEXT(dec, &command_type); 1949 assert(command_type == VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT); 1950 1951 /* skip commandBuffer */ 1952 /* skip faceMask */ 1953 /* skip compareMask */ 1954} 1955 1956static inline size_t vn_sizeof_vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) 1957{ 1958 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT; 1959 const VkFlags cmd_flags = 0; 1960 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 1961 1962 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 1963 cmd_size += vn_sizeof_VkFlags(&faceMask); 1964 cmd_size += vn_sizeof_uint32_t(&writeMask); 1965 1966 return cmd_size; 1967} 1968 1969static inline void vn_encode_vkCmdSetStencilWriteMask(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) 1970{ 1971 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT; 1972 1973 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 1974 vn_encode_VkFlags(enc, &cmd_flags); 1975 1976 vn_encode_VkCommandBuffer(enc, &commandBuffer); 1977 vn_encode_VkFlags(enc, &faceMask); 1978 vn_encode_uint32_t(enc, &writeMask); 1979} 1980 1981static inline size_t vn_sizeof_vkCmdSetStencilWriteMask_reply(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) 1982{ 1983 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT; 1984 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 1985 1986 /* skip commandBuffer */ 1987 /* skip faceMask */ 1988 /* skip writeMask */ 1989 1990 return cmd_size; 1991} 1992 1993static inline void vn_decode_vkCmdSetStencilWriteMask_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) 1994{ 1995 VkCommandTypeEXT command_type; 1996 vn_decode_VkCommandTypeEXT(dec, &command_type); 1997 assert(command_type == VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT); 1998 1999 /* skip commandBuffer */ 2000 /* skip faceMask */ 2001 /* skip writeMask */ 2002} 2003 2004static inline size_t vn_sizeof_vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) 2005{ 2006 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT; 2007 const VkFlags cmd_flags = 0; 2008 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2009 2010 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2011 cmd_size += vn_sizeof_VkFlags(&faceMask); 2012 cmd_size += vn_sizeof_uint32_t(&reference); 2013 2014 return cmd_size; 2015} 2016 2017static inline void vn_encode_vkCmdSetStencilReference(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) 2018{ 2019 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT; 2020 2021 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2022 vn_encode_VkFlags(enc, &cmd_flags); 2023 2024 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2025 vn_encode_VkFlags(enc, &faceMask); 2026 vn_encode_uint32_t(enc, &reference); 2027} 2028 2029static inline size_t vn_sizeof_vkCmdSetStencilReference_reply(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) 2030{ 2031 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT; 2032 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2033 2034 /* skip commandBuffer */ 2035 /* skip faceMask */ 2036 /* skip reference */ 2037 2038 return cmd_size; 2039} 2040 2041static inline void vn_decode_vkCmdSetStencilReference_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) 2042{ 2043 VkCommandTypeEXT command_type; 2044 vn_decode_VkCommandTypeEXT(dec, &command_type); 2045 assert(command_type == VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT); 2046 2047 /* skip commandBuffer */ 2048 /* skip faceMask */ 2049 /* skip reference */ 2050} 2051 2052static inline size_t vn_sizeof_vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) 2053{ 2054 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT; 2055 const VkFlags cmd_flags = 0; 2056 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2057 2058 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2059 cmd_size += vn_sizeof_VkPipelineBindPoint(&pipelineBindPoint); 2060 cmd_size += vn_sizeof_VkPipelineLayout(&layout); 2061 cmd_size += vn_sizeof_uint32_t(&firstSet); 2062 cmd_size += vn_sizeof_uint32_t(&descriptorSetCount); 2063 if (pDescriptorSets) { 2064 cmd_size += vn_sizeof_array_size(descriptorSetCount); 2065 for (uint32_t i = 0; i < descriptorSetCount; i++) 2066 cmd_size += vn_sizeof_VkDescriptorSet(&pDescriptorSets[i]); 2067 } else { 2068 cmd_size += vn_sizeof_array_size(0); 2069 } 2070 cmd_size += vn_sizeof_uint32_t(&dynamicOffsetCount); 2071 if (pDynamicOffsets) { 2072 cmd_size += vn_sizeof_array_size(dynamicOffsetCount); 2073 cmd_size += vn_sizeof_uint32_t_array(pDynamicOffsets, dynamicOffsetCount); 2074 } else { 2075 cmd_size += vn_sizeof_array_size(0); 2076 } 2077 2078 return cmd_size; 2079} 2080 2081static inline void vn_encode_vkCmdBindDescriptorSets(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) 2082{ 2083 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT; 2084 2085 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2086 vn_encode_VkFlags(enc, &cmd_flags); 2087 2088 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2089 vn_encode_VkPipelineBindPoint(enc, &pipelineBindPoint); 2090 vn_encode_VkPipelineLayout(enc, &layout); 2091 vn_encode_uint32_t(enc, &firstSet); 2092 vn_encode_uint32_t(enc, &descriptorSetCount); 2093 if (pDescriptorSets) { 2094 vn_encode_array_size(enc, descriptorSetCount); 2095 for (uint32_t i = 0; i < descriptorSetCount; i++) 2096 vn_encode_VkDescriptorSet(enc, &pDescriptorSets[i]); 2097 } else { 2098 vn_encode_array_size(enc, 0); 2099 } 2100 vn_encode_uint32_t(enc, &dynamicOffsetCount); 2101 if (pDynamicOffsets) { 2102 vn_encode_array_size(enc, dynamicOffsetCount); 2103 vn_encode_uint32_t_array(enc, pDynamicOffsets, dynamicOffsetCount); 2104 } else { 2105 vn_encode_array_size(enc, 0); 2106 } 2107} 2108 2109static inline size_t vn_sizeof_vkCmdBindDescriptorSets_reply(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) 2110{ 2111 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT; 2112 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2113 2114 /* skip commandBuffer */ 2115 /* skip pipelineBindPoint */ 2116 /* skip layout */ 2117 /* skip firstSet */ 2118 /* skip descriptorSetCount */ 2119 /* skip pDescriptorSets */ 2120 /* skip dynamicOffsetCount */ 2121 /* skip pDynamicOffsets */ 2122 2123 return cmd_size; 2124} 2125 2126static inline void vn_decode_vkCmdBindDescriptorSets_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) 2127{ 2128 VkCommandTypeEXT command_type; 2129 vn_decode_VkCommandTypeEXT(dec, &command_type); 2130 assert(command_type == VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT); 2131 2132 /* skip commandBuffer */ 2133 /* skip pipelineBindPoint */ 2134 /* skip layout */ 2135 /* skip firstSet */ 2136 /* skip descriptorSetCount */ 2137 /* skip pDescriptorSets */ 2138 /* skip dynamicOffsetCount */ 2139 /* skip pDynamicOffsets */ 2140} 2141 2142static inline size_t vn_sizeof_vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) 2143{ 2144 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT; 2145 const VkFlags cmd_flags = 0; 2146 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2147 2148 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2149 cmd_size += vn_sizeof_VkBuffer(&buffer); 2150 cmd_size += vn_sizeof_VkDeviceSize(&offset); 2151 cmd_size += vn_sizeof_VkIndexType(&indexType); 2152 2153 return cmd_size; 2154} 2155 2156static inline void vn_encode_vkCmdBindIndexBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) 2157{ 2158 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT; 2159 2160 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2161 vn_encode_VkFlags(enc, &cmd_flags); 2162 2163 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2164 vn_encode_VkBuffer(enc, &buffer); 2165 vn_encode_VkDeviceSize(enc, &offset); 2166 vn_encode_VkIndexType(enc, &indexType); 2167} 2168 2169static inline size_t vn_sizeof_vkCmdBindIndexBuffer_reply(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) 2170{ 2171 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT; 2172 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2173 2174 /* skip commandBuffer */ 2175 /* skip buffer */ 2176 /* skip offset */ 2177 /* skip indexType */ 2178 2179 return cmd_size; 2180} 2181 2182static inline void vn_decode_vkCmdBindIndexBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) 2183{ 2184 VkCommandTypeEXT command_type; 2185 vn_decode_VkCommandTypeEXT(dec, &command_type); 2186 assert(command_type == VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT); 2187 2188 /* skip commandBuffer */ 2189 /* skip buffer */ 2190 /* skip offset */ 2191 /* skip indexType */ 2192} 2193 2194static inline size_t vn_sizeof_vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) 2195{ 2196 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT; 2197 const VkFlags cmd_flags = 0; 2198 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2199 2200 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2201 cmd_size += vn_sizeof_uint32_t(&firstBinding); 2202 cmd_size += vn_sizeof_uint32_t(&bindingCount); 2203 if (pBuffers) { 2204 cmd_size += vn_sizeof_array_size(bindingCount); 2205 for (uint32_t i = 0; i < bindingCount; i++) 2206 cmd_size += vn_sizeof_VkBuffer(&pBuffers[i]); 2207 } else { 2208 cmd_size += vn_sizeof_array_size(0); 2209 } 2210 if (pOffsets) { 2211 cmd_size += vn_sizeof_array_size(bindingCount); 2212 cmd_size += vn_sizeof_VkDeviceSize_array(pOffsets, bindingCount); 2213 } else { 2214 cmd_size += vn_sizeof_array_size(0); 2215 } 2216 2217 return cmd_size; 2218} 2219 2220static inline void vn_encode_vkCmdBindVertexBuffers(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) 2221{ 2222 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT; 2223 2224 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2225 vn_encode_VkFlags(enc, &cmd_flags); 2226 2227 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2228 vn_encode_uint32_t(enc, &firstBinding); 2229 vn_encode_uint32_t(enc, &bindingCount); 2230 if (pBuffers) { 2231 vn_encode_array_size(enc, bindingCount); 2232 for (uint32_t i = 0; i < bindingCount; i++) 2233 vn_encode_VkBuffer(enc, &pBuffers[i]); 2234 } else { 2235 vn_encode_array_size(enc, 0); 2236 } 2237 if (pOffsets) { 2238 vn_encode_array_size(enc, bindingCount); 2239 vn_encode_VkDeviceSize_array(enc, pOffsets, bindingCount); 2240 } else { 2241 vn_encode_array_size(enc, 0); 2242 } 2243} 2244 2245static inline size_t vn_sizeof_vkCmdBindVertexBuffers_reply(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) 2246{ 2247 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT; 2248 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2249 2250 /* skip commandBuffer */ 2251 /* skip firstBinding */ 2252 /* skip bindingCount */ 2253 /* skip pBuffers */ 2254 /* skip pOffsets */ 2255 2256 return cmd_size; 2257} 2258 2259static inline void vn_decode_vkCmdBindVertexBuffers_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) 2260{ 2261 VkCommandTypeEXT command_type; 2262 vn_decode_VkCommandTypeEXT(dec, &command_type); 2263 assert(command_type == VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT); 2264 2265 /* skip commandBuffer */ 2266 /* skip firstBinding */ 2267 /* skip bindingCount */ 2268 /* skip pBuffers */ 2269 /* skip pOffsets */ 2270} 2271 2272static inline size_t vn_sizeof_vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 2273{ 2274 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDraw_EXT; 2275 const VkFlags cmd_flags = 0; 2276 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2277 2278 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2279 cmd_size += vn_sizeof_uint32_t(&vertexCount); 2280 cmd_size += vn_sizeof_uint32_t(&instanceCount); 2281 cmd_size += vn_sizeof_uint32_t(&firstVertex); 2282 cmd_size += vn_sizeof_uint32_t(&firstInstance); 2283 2284 return cmd_size; 2285} 2286 2287static inline void vn_encode_vkCmdDraw(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 2288{ 2289 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDraw_EXT; 2290 2291 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2292 vn_encode_VkFlags(enc, &cmd_flags); 2293 2294 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2295 vn_encode_uint32_t(enc, &vertexCount); 2296 vn_encode_uint32_t(enc, &instanceCount); 2297 vn_encode_uint32_t(enc, &firstVertex); 2298 vn_encode_uint32_t(enc, &firstInstance); 2299} 2300 2301static inline size_t vn_sizeof_vkCmdDraw_reply(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 2302{ 2303 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDraw_EXT; 2304 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2305 2306 /* skip commandBuffer */ 2307 /* skip vertexCount */ 2308 /* skip instanceCount */ 2309 /* skip firstVertex */ 2310 /* skip firstInstance */ 2311 2312 return cmd_size; 2313} 2314 2315static inline void vn_decode_vkCmdDraw_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 2316{ 2317 VkCommandTypeEXT command_type; 2318 vn_decode_VkCommandTypeEXT(dec, &command_type); 2319 assert(command_type == VK_COMMAND_TYPE_vkCmdDraw_EXT); 2320 2321 /* skip commandBuffer */ 2322 /* skip vertexCount */ 2323 /* skip instanceCount */ 2324 /* skip firstVertex */ 2325 /* skip firstInstance */ 2326} 2327 2328static inline size_t vn_sizeof_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 2329{ 2330 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT; 2331 const VkFlags cmd_flags = 0; 2332 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2333 2334 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2335 cmd_size += vn_sizeof_uint32_t(&indexCount); 2336 cmd_size += vn_sizeof_uint32_t(&instanceCount); 2337 cmd_size += vn_sizeof_uint32_t(&firstIndex); 2338 cmd_size += vn_sizeof_int32_t(&vertexOffset); 2339 cmd_size += vn_sizeof_uint32_t(&firstInstance); 2340 2341 return cmd_size; 2342} 2343 2344static inline void vn_encode_vkCmdDrawIndexed(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 2345{ 2346 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT; 2347 2348 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2349 vn_encode_VkFlags(enc, &cmd_flags); 2350 2351 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2352 vn_encode_uint32_t(enc, &indexCount); 2353 vn_encode_uint32_t(enc, &instanceCount); 2354 vn_encode_uint32_t(enc, &firstIndex); 2355 vn_encode_int32_t(enc, &vertexOffset); 2356 vn_encode_uint32_t(enc, &firstInstance); 2357} 2358 2359static inline size_t vn_sizeof_vkCmdDrawIndexed_reply(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 2360{ 2361 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT; 2362 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2363 2364 /* skip commandBuffer */ 2365 /* skip indexCount */ 2366 /* skip instanceCount */ 2367 /* skip firstIndex */ 2368 /* skip vertexOffset */ 2369 /* skip firstInstance */ 2370 2371 return cmd_size; 2372} 2373 2374static inline void vn_decode_vkCmdDrawIndexed_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 2375{ 2376 VkCommandTypeEXT command_type; 2377 vn_decode_VkCommandTypeEXT(dec, &command_type); 2378 assert(command_type == VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT); 2379 2380 /* skip commandBuffer */ 2381 /* skip indexCount */ 2382 /* skip instanceCount */ 2383 /* skip firstIndex */ 2384 /* skip vertexOffset */ 2385 /* skip firstInstance */ 2386} 2387 2388static inline size_t vn_sizeof_vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2389{ 2390 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT; 2391 const VkFlags cmd_flags = 0; 2392 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2393 2394 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2395 cmd_size += vn_sizeof_VkBuffer(&buffer); 2396 cmd_size += vn_sizeof_VkDeviceSize(&offset); 2397 cmd_size += vn_sizeof_uint32_t(&drawCount); 2398 cmd_size += vn_sizeof_uint32_t(&stride); 2399 2400 return cmd_size; 2401} 2402 2403static inline void vn_encode_vkCmdDrawIndirect(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2404{ 2405 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT; 2406 2407 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2408 vn_encode_VkFlags(enc, &cmd_flags); 2409 2410 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2411 vn_encode_VkBuffer(enc, &buffer); 2412 vn_encode_VkDeviceSize(enc, &offset); 2413 vn_encode_uint32_t(enc, &drawCount); 2414 vn_encode_uint32_t(enc, &stride); 2415} 2416 2417static inline size_t vn_sizeof_vkCmdDrawIndirect_reply(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2418{ 2419 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT; 2420 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2421 2422 /* skip commandBuffer */ 2423 /* skip buffer */ 2424 /* skip offset */ 2425 /* skip drawCount */ 2426 /* skip stride */ 2427 2428 return cmd_size; 2429} 2430 2431static inline void vn_decode_vkCmdDrawIndirect_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2432{ 2433 VkCommandTypeEXT command_type; 2434 vn_decode_VkCommandTypeEXT(dec, &command_type); 2435 assert(command_type == VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT); 2436 2437 /* skip commandBuffer */ 2438 /* skip buffer */ 2439 /* skip offset */ 2440 /* skip drawCount */ 2441 /* skip stride */ 2442} 2443 2444static inline size_t vn_sizeof_vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2445{ 2446 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT; 2447 const VkFlags cmd_flags = 0; 2448 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2449 2450 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2451 cmd_size += vn_sizeof_VkBuffer(&buffer); 2452 cmd_size += vn_sizeof_VkDeviceSize(&offset); 2453 cmd_size += vn_sizeof_uint32_t(&drawCount); 2454 cmd_size += vn_sizeof_uint32_t(&stride); 2455 2456 return cmd_size; 2457} 2458 2459static inline void vn_encode_vkCmdDrawIndexedIndirect(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2460{ 2461 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT; 2462 2463 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2464 vn_encode_VkFlags(enc, &cmd_flags); 2465 2466 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2467 vn_encode_VkBuffer(enc, &buffer); 2468 vn_encode_VkDeviceSize(enc, &offset); 2469 vn_encode_uint32_t(enc, &drawCount); 2470 vn_encode_uint32_t(enc, &stride); 2471} 2472 2473static inline size_t vn_sizeof_vkCmdDrawIndexedIndirect_reply(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2474{ 2475 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT; 2476 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2477 2478 /* skip commandBuffer */ 2479 /* skip buffer */ 2480 /* skip offset */ 2481 /* skip drawCount */ 2482 /* skip stride */ 2483 2484 return cmd_size; 2485} 2486 2487static inline void vn_decode_vkCmdDrawIndexedIndirect_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 2488{ 2489 VkCommandTypeEXT command_type; 2490 vn_decode_VkCommandTypeEXT(dec, &command_type); 2491 assert(command_type == VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT); 2492 2493 /* skip commandBuffer */ 2494 /* skip buffer */ 2495 /* skip offset */ 2496 /* skip drawCount */ 2497 /* skip stride */ 2498} 2499 2500static inline size_t vn_sizeof_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 2501{ 2502 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatch_EXT; 2503 const VkFlags cmd_flags = 0; 2504 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2505 2506 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2507 cmd_size += vn_sizeof_uint32_t(&groupCountX); 2508 cmd_size += vn_sizeof_uint32_t(&groupCountY); 2509 cmd_size += vn_sizeof_uint32_t(&groupCountZ); 2510 2511 return cmd_size; 2512} 2513 2514static inline void vn_encode_vkCmdDispatch(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 2515{ 2516 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatch_EXT; 2517 2518 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2519 vn_encode_VkFlags(enc, &cmd_flags); 2520 2521 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2522 vn_encode_uint32_t(enc, &groupCountX); 2523 vn_encode_uint32_t(enc, &groupCountY); 2524 vn_encode_uint32_t(enc, &groupCountZ); 2525} 2526 2527static inline size_t vn_sizeof_vkCmdDispatch_reply(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 2528{ 2529 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatch_EXT; 2530 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2531 2532 /* skip commandBuffer */ 2533 /* skip groupCountX */ 2534 /* skip groupCountY */ 2535 /* skip groupCountZ */ 2536 2537 return cmd_size; 2538} 2539 2540static inline void vn_decode_vkCmdDispatch_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 2541{ 2542 VkCommandTypeEXT command_type; 2543 vn_decode_VkCommandTypeEXT(dec, &command_type); 2544 assert(command_type == VK_COMMAND_TYPE_vkCmdDispatch_EXT); 2545 2546 /* skip commandBuffer */ 2547 /* skip groupCountX */ 2548 /* skip groupCountY */ 2549 /* skip groupCountZ */ 2550} 2551 2552static inline size_t vn_sizeof_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) 2553{ 2554 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT; 2555 const VkFlags cmd_flags = 0; 2556 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2557 2558 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2559 cmd_size += vn_sizeof_VkBuffer(&buffer); 2560 cmd_size += vn_sizeof_VkDeviceSize(&offset); 2561 2562 return cmd_size; 2563} 2564 2565static inline void vn_encode_vkCmdDispatchIndirect(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) 2566{ 2567 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT; 2568 2569 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2570 vn_encode_VkFlags(enc, &cmd_flags); 2571 2572 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2573 vn_encode_VkBuffer(enc, &buffer); 2574 vn_encode_VkDeviceSize(enc, &offset); 2575} 2576 2577static inline size_t vn_sizeof_vkCmdDispatchIndirect_reply(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) 2578{ 2579 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT; 2580 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2581 2582 /* skip commandBuffer */ 2583 /* skip buffer */ 2584 /* skip offset */ 2585 2586 return cmd_size; 2587} 2588 2589static inline void vn_decode_vkCmdDispatchIndirect_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) 2590{ 2591 VkCommandTypeEXT command_type; 2592 vn_decode_VkCommandTypeEXT(dec, &command_type); 2593 assert(command_type == VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT); 2594 2595 /* skip commandBuffer */ 2596 /* skip buffer */ 2597 /* skip offset */ 2598} 2599 2600static inline size_t vn_sizeof_vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) 2601{ 2602 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT; 2603 const VkFlags cmd_flags = 0; 2604 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2605 2606 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2607 cmd_size += vn_sizeof_VkBuffer(&srcBuffer); 2608 cmd_size += vn_sizeof_VkBuffer(&dstBuffer); 2609 cmd_size += vn_sizeof_uint32_t(®ionCount); 2610 if (pRegions) { 2611 cmd_size += vn_sizeof_array_size(regionCount); 2612 for (uint32_t i = 0; i < regionCount; i++) 2613 cmd_size += vn_sizeof_VkBufferCopy(&pRegions[i]); 2614 } else { 2615 cmd_size += vn_sizeof_array_size(0); 2616 } 2617 2618 return cmd_size; 2619} 2620 2621static inline void vn_encode_vkCmdCopyBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) 2622{ 2623 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT; 2624 2625 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2626 vn_encode_VkFlags(enc, &cmd_flags); 2627 2628 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2629 vn_encode_VkBuffer(enc, &srcBuffer); 2630 vn_encode_VkBuffer(enc, &dstBuffer); 2631 vn_encode_uint32_t(enc, ®ionCount); 2632 if (pRegions) { 2633 vn_encode_array_size(enc, regionCount); 2634 for (uint32_t i = 0; i < regionCount; i++) 2635 vn_encode_VkBufferCopy(enc, &pRegions[i]); 2636 } else { 2637 vn_encode_array_size(enc, 0); 2638 } 2639} 2640 2641static inline size_t vn_sizeof_vkCmdCopyBuffer_reply(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) 2642{ 2643 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT; 2644 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2645 2646 /* skip commandBuffer */ 2647 /* skip srcBuffer */ 2648 /* skip dstBuffer */ 2649 /* skip regionCount */ 2650 /* skip pRegions */ 2651 2652 return cmd_size; 2653} 2654 2655static inline void vn_decode_vkCmdCopyBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) 2656{ 2657 VkCommandTypeEXT command_type; 2658 vn_decode_VkCommandTypeEXT(dec, &command_type); 2659 assert(command_type == VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT); 2660 2661 /* skip commandBuffer */ 2662 /* skip srcBuffer */ 2663 /* skip dstBuffer */ 2664 /* skip regionCount */ 2665 /* skip pRegions */ 2666} 2667 2668static inline size_t vn_sizeof_vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) 2669{ 2670 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyImage_EXT; 2671 const VkFlags cmd_flags = 0; 2672 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2673 2674 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2675 cmd_size += vn_sizeof_VkImage(&srcImage); 2676 cmd_size += vn_sizeof_VkImageLayout(&srcImageLayout); 2677 cmd_size += vn_sizeof_VkImage(&dstImage); 2678 cmd_size += vn_sizeof_VkImageLayout(&dstImageLayout); 2679 cmd_size += vn_sizeof_uint32_t(®ionCount); 2680 if (pRegions) { 2681 cmd_size += vn_sizeof_array_size(regionCount); 2682 for (uint32_t i = 0; i < regionCount; i++) 2683 cmd_size += vn_sizeof_VkImageCopy(&pRegions[i]); 2684 } else { 2685 cmd_size += vn_sizeof_array_size(0); 2686 } 2687 2688 return cmd_size; 2689} 2690 2691static inline void vn_encode_vkCmdCopyImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) 2692{ 2693 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyImage_EXT; 2694 2695 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2696 vn_encode_VkFlags(enc, &cmd_flags); 2697 2698 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2699 vn_encode_VkImage(enc, &srcImage); 2700 vn_encode_VkImageLayout(enc, &srcImageLayout); 2701 vn_encode_VkImage(enc, &dstImage); 2702 vn_encode_VkImageLayout(enc, &dstImageLayout); 2703 vn_encode_uint32_t(enc, ®ionCount); 2704 if (pRegions) { 2705 vn_encode_array_size(enc, regionCount); 2706 for (uint32_t i = 0; i < regionCount; i++) 2707 vn_encode_VkImageCopy(enc, &pRegions[i]); 2708 } else { 2709 vn_encode_array_size(enc, 0); 2710 } 2711} 2712 2713static inline size_t vn_sizeof_vkCmdCopyImage_reply(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) 2714{ 2715 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyImage_EXT; 2716 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2717 2718 /* skip commandBuffer */ 2719 /* skip srcImage */ 2720 /* skip srcImageLayout */ 2721 /* skip dstImage */ 2722 /* skip dstImageLayout */ 2723 /* skip regionCount */ 2724 /* skip pRegions */ 2725 2726 return cmd_size; 2727} 2728 2729static inline void vn_decode_vkCmdCopyImage_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) 2730{ 2731 VkCommandTypeEXT command_type; 2732 vn_decode_VkCommandTypeEXT(dec, &command_type); 2733 assert(command_type == VK_COMMAND_TYPE_vkCmdCopyImage_EXT); 2734 2735 /* skip commandBuffer */ 2736 /* skip srcImage */ 2737 /* skip srcImageLayout */ 2738 /* skip dstImage */ 2739 /* skip dstImageLayout */ 2740 /* skip regionCount */ 2741 /* skip pRegions */ 2742} 2743 2744static inline size_t vn_sizeof_vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) 2745{ 2746 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBlitImage_EXT; 2747 const VkFlags cmd_flags = 0; 2748 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2749 2750 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2751 cmd_size += vn_sizeof_VkImage(&srcImage); 2752 cmd_size += vn_sizeof_VkImageLayout(&srcImageLayout); 2753 cmd_size += vn_sizeof_VkImage(&dstImage); 2754 cmd_size += vn_sizeof_VkImageLayout(&dstImageLayout); 2755 cmd_size += vn_sizeof_uint32_t(®ionCount); 2756 if (pRegions) { 2757 cmd_size += vn_sizeof_array_size(regionCount); 2758 for (uint32_t i = 0; i < regionCount; i++) 2759 cmd_size += vn_sizeof_VkImageBlit(&pRegions[i]); 2760 } else { 2761 cmd_size += vn_sizeof_array_size(0); 2762 } 2763 cmd_size += vn_sizeof_VkFilter(&filter); 2764 2765 return cmd_size; 2766} 2767 2768static inline void vn_encode_vkCmdBlitImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) 2769{ 2770 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBlitImage_EXT; 2771 2772 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2773 vn_encode_VkFlags(enc, &cmd_flags); 2774 2775 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2776 vn_encode_VkImage(enc, &srcImage); 2777 vn_encode_VkImageLayout(enc, &srcImageLayout); 2778 vn_encode_VkImage(enc, &dstImage); 2779 vn_encode_VkImageLayout(enc, &dstImageLayout); 2780 vn_encode_uint32_t(enc, ®ionCount); 2781 if (pRegions) { 2782 vn_encode_array_size(enc, regionCount); 2783 for (uint32_t i = 0; i < regionCount; i++) 2784 vn_encode_VkImageBlit(enc, &pRegions[i]); 2785 } else { 2786 vn_encode_array_size(enc, 0); 2787 } 2788 vn_encode_VkFilter(enc, &filter); 2789} 2790 2791static inline size_t vn_sizeof_vkCmdBlitImage_reply(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) 2792{ 2793 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBlitImage_EXT; 2794 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2795 2796 /* skip commandBuffer */ 2797 /* skip srcImage */ 2798 /* skip srcImageLayout */ 2799 /* skip dstImage */ 2800 /* skip dstImageLayout */ 2801 /* skip regionCount */ 2802 /* skip pRegions */ 2803 /* skip filter */ 2804 2805 return cmd_size; 2806} 2807 2808static inline void vn_decode_vkCmdBlitImage_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) 2809{ 2810 VkCommandTypeEXT command_type; 2811 vn_decode_VkCommandTypeEXT(dec, &command_type); 2812 assert(command_type == VK_COMMAND_TYPE_vkCmdBlitImage_EXT); 2813 2814 /* skip commandBuffer */ 2815 /* skip srcImage */ 2816 /* skip srcImageLayout */ 2817 /* skip dstImage */ 2818 /* skip dstImageLayout */ 2819 /* skip regionCount */ 2820 /* skip pRegions */ 2821 /* skip filter */ 2822} 2823 2824static inline size_t vn_sizeof_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2825{ 2826 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT; 2827 const VkFlags cmd_flags = 0; 2828 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2829 2830 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2831 cmd_size += vn_sizeof_VkBuffer(&srcBuffer); 2832 cmd_size += vn_sizeof_VkImage(&dstImage); 2833 cmd_size += vn_sizeof_VkImageLayout(&dstImageLayout); 2834 cmd_size += vn_sizeof_uint32_t(®ionCount); 2835 if (pRegions) { 2836 cmd_size += vn_sizeof_array_size(regionCount); 2837 for (uint32_t i = 0; i < regionCount; i++) 2838 cmd_size += vn_sizeof_VkBufferImageCopy(&pRegions[i]); 2839 } else { 2840 cmd_size += vn_sizeof_array_size(0); 2841 } 2842 2843 return cmd_size; 2844} 2845 2846static inline void vn_encode_vkCmdCopyBufferToImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2847{ 2848 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT; 2849 2850 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2851 vn_encode_VkFlags(enc, &cmd_flags); 2852 2853 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2854 vn_encode_VkBuffer(enc, &srcBuffer); 2855 vn_encode_VkImage(enc, &dstImage); 2856 vn_encode_VkImageLayout(enc, &dstImageLayout); 2857 vn_encode_uint32_t(enc, ®ionCount); 2858 if (pRegions) { 2859 vn_encode_array_size(enc, regionCount); 2860 for (uint32_t i = 0; i < regionCount; i++) 2861 vn_encode_VkBufferImageCopy(enc, &pRegions[i]); 2862 } else { 2863 vn_encode_array_size(enc, 0); 2864 } 2865} 2866 2867static inline size_t vn_sizeof_vkCmdCopyBufferToImage_reply(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2868{ 2869 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT; 2870 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2871 2872 /* skip commandBuffer */ 2873 /* skip srcBuffer */ 2874 /* skip dstImage */ 2875 /* skip dstImageLayout */ 2876 /* skip regionCount */ 2877 /* skip pRegions */ 2878 2879 return cmd_size; 2880} 2881 2882static inline void vn_decode_vkCmdCopyBufferToImage_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2883{ 2884 VkCommandTypeEXT command_type; 2885 vn_decode_VkCommandTypeEXT(dec, &command_type); 2886 assert(command_type == VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT); 2887 2888 /* skip commandBuffer */ 2889 /* skip srcBuffer */ 2890 /* skip dstImage */ 2891 /* skip dstImageLayout */ 2892 /* skip regionCount */ 2893 /* skip pRegions */ 2894} 2895 2896static inline size_t vn_sizeof_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2897{ 2898 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT; 2899 const VkFlags cmd_flags = 0; 2900 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2901 2902 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2903 cmd_size += vn_sizeof_VkImage(&srcImage); 2904 cmd_size += vn_sizeof_VkImageLayout(&srcImageLayout); 2905 cmd_size += vn_sizeof_VkBuffer(&dstBuffer); 2906 cmd_size += vn_sizeof_uint32_t(®ionCount); 2907 if (pRegions) { 2908 cmd_size += vn_sizeof_array_size(regionCount); 2909 for (uint32_t i = 0; i < regionCount; i++) 2910 cmd_size += vn_sizeof_VkBufferImageCopy(&pRegions[i]); 2911 } else { 2912 cmd_size += vn_sizeof_array_size(0); 2913 } 2914 2915 return cmd_size; 2916} 2917 2918static inline void vn_encode_vkCmdCopyImageToBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2919{ 2920 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT; 2921 2922 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2923 vn_encode_VkFlags(enc, &cmd_flags); 2924 2925 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2926 vn_encode_VkImage(enc, &srcImage); 2927 vn_encode_VkImageLayout(enc, &srcImageLayout); 2928 vn_encode_VkBuffer(enc, &dstBuffer); 2929 vn_encode_uint32_t(enc, ®ionCount); 2930 if (pRegions) { 2931 vn_encode_array_size(enc, regionCount); 2932 for (uint32_t i = 0; i < regionCount; i++) 2933 vn_encode_VkBufferImageCopy(enc, &pRegions[i]); 2934 } else { 2935 vn_encode_array_size(enc, 0); 2936 } 2937} 2938 2939static inline size_t vn_sizeof_vkCmdCopyImageToBuffer_reply(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2940{ 2941 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT; 2942 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 2943 2944 /* skip commandBuffer */ 2945 /* skip srcImage */ 2946 /* skip srcImageLayout */ 2947 /* skip dstBuffer */ 2948 /* skip regionCount */ 2949 /* skip pRegions */ 2950 2951 return cmd_size; 2952} 2953 2954static inline void vn_decode_vkCmdCopyImageToBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) 2955{ 2956 VkCommandTypeEXT command_type; 2957 vn_decode_VkCommandTypeEXT(dec, &command_type); 2958 assert(command_type == VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT); 2959 2960 /* skip commandBuffer */ 2961 /* skip srcImage */ 2962 /* skip srcImageLayout */ 2963 /* skip dstBuffer */ 2964 /* skip regionCount */ 2965 /* skip pRegions */ 2966} 2967 2968static inline size_t vn_sizeof_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) 2969{ 2970 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT; 2971 const VkFlags cmd_flags = 0; 2972 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 2973 2974 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 2975 cmd_size += vn_sizeof_VkBuffer(&dstBuffer); 2976 cmd_size += vn_sizeof_VkDeviceSize(&dstOffset); 2977 cmd_size += vn_sizeof_VkDeviceSize(&dataSize); 2978 if (pData) { 2979 cmd_size += vn_sizeof_array_size(dataSize); 2980 cmd_size += vn_sizeof_blob_array(pData, dataSize); 2981 } else { 2982 cmd_size += vn_sizeof_array_size(0); 2983 } 2984 2985 return cmd_size; 2986} 2987 2988static inline void vn_encode_vkCmdUpdateBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) 2989{ 2990 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT; 2991 2992 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 2993 vn_encode_VkFlags(enc, &cmd_flags); 2994 2995 vn_encode_VkCommandBuffer(enc, &commandBuffer); 2996 vn_encode_VkBuffer(enc, &dstBuffer); 2997 vn_encode_VkDeviceSize(enc, &dstOffset); 2998 vn_encode_VkDeviceSize(enc, &dataSize); 2999 if (pData) { 3000 vn_encode_array_size(enc, dataSize); 3001 vn_encode_blob_array(enc, pData, dataSize); 3002 } else { 3003 vn_encode_array_size(enc, 0); 3004 } 3005} 3006 3007static inline size_t vn_sizeof_vkCmdUpdateBuffer_reply(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) 3008{ 3009 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT; 3010 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3011 3012 /* skip commandBuffer */ 3013 /* skip dstBuffer */ 3014 /* skip dstOffset */ 3015 /* skip dataSize */ 3016 /* skip pData */ 3017 3018 return cmd_size; 3019} 3020 3021static inline void vn_decode_vkCmdUpdateBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) 3022{ 3023 VkCommandTypeEXT command_type; 3024 vn_decode_VkCommandTypeEXT(dec, &command_type); 3025 assert(command_type == VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT); 3026 3027 /* skip commandBuffer */ 3028 /* skip dstBuffer */ 3029 /* skip dstOffset */ 3030 /* skip dataSize */ 3031 /* skip pData */ 3032} 3033 3034static inline size_t vn_sizeof_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) 3035{ 3036 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdFillBuffer_EXT; 3037 const VkFlags cmd_flags = 0; 3038 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3039 3040 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3041 cmd_size += vn_sizeof_VkBuffer(&dstBuffer); 3042 cmd_size += vn_sizeof_VkDeviceSize(&dstOffset); 3043 cmd_size += vn_sizeof_VkDeviceSize(&size); 3044 cmd_size += vn_sizeof_uint32_t(&data); 3045 3046 return cmd_size; 3047} 3048 3049static inline void vn_encode_vkCmdFillBuffer(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) 3050{ 3051 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdFillBuffer_EXT; 3052 3053 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3054 vn_encode_VkFlags(enc, &cmd_flags); 3055 3056 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3057 vn_encode_VkBuffer(enc, &dstBuffer); 3058 vn_encode_VkDeviceSize(enc, &dstOffset); 3059 vn_encode_VkDeviceSize(enc, &size); 3060 vn_encode_uint32_t(enc, &data); 3061} 3062 3063static inline size_t vn_sizeof_vkCmdFillBuffer_reply(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) 3064{ 3065 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdFillBuffer_EXT; 3066 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3067 3068 /* skip commandBuffer */ 3069 /* skip dstBuffer */ 3070 /* skip dstOffset */ 3071 /* skip size */ 3072 /* skip data */ 3073 3074 return cmd_size; 3075} 3076 3077static inline void vn_decode_vkCmdFillBuffer_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) 3078{ 3079 VkCommandTypeEXT command_type; 3080 vn_decode_VkCommandTypeEXT(dec, &command_type); 3081 assert(command_type == VK_COMMAND_TYPE_vkCmdFillBuffer_EXT); 3082 3083 /* skip commandBuffer */ 3084 /* skip dstBuffer */ 3085 /* skip dstOffset */ 3086 /* skip size */ 3087 /* skip data */ 3088} 3089 3090static inline size_t vn_sizeof_vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3091{ 3092 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearColorImage_EXT; 3093 const VkFlags cmd_flags = 0; 3094 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3095 3096 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3097 cmd_size += vn_sizeof_VkImage(&image); 3098 cmd_size += vn_sizeof_VkImageLayout(&imageLayout); 3099 cmd_size += vn_sizeof_simple_pointer(pColor); 3100 if (pColor) 3101 cmd_size += vn_sizeof_VkClearColorValue(pColor); 3102 cmd_size += vn_sizeof_uint32_t(&rangeCount); 3103 if (pRanges) { 3104 cmd_size += vn_sizeof_array_size(rangeCount); 3105 for (uint32_t i = 0; i < rangeCount; i++) 3106 cmd_size += vn_sizeof_VkImageSubresourceRange(&pRanges[i]); 3107 } else { 3108 cmd_size += vn_sizeof_array_size(0); 3109 } 3110 3111 return cmd_size; 3112} 3113 3114static inline void vn_encode_vkCmdClearColorImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3115{ 3116 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearColorImage_EXT; 3117 3118 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3119 vn_encode_VkFlags(enc, &cmd_flags); 3120 3121 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3122 vn_encode_VkImage(enc, &image); 3123 vn_encode_VkImageLayout(enc, &imageLayout); 3124 if (vn_encode_simple_pointer(enc, pColor)) 3125 vn_encode_VkClearColorValue(enc, pColor); 3126 vn_encode_uint32_t(enc, &rangeCount); 3127 if (pRanges) { 3128 vn_encode_array_size(enc, rangeCount); 3129 for (uint32_t i = 0; i < rangeCount; i++) 3130 vn_encode_VkImageSubresourceRange(enc, &pRanges[i]); 3131 } else { 3132 vn_encode_array_size(enc, 0); 3133 } 3134} 3135 3136static inline size_t vn_sizeof_vkCmdClearColorImage_reply(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3137{ 3138 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearColorImage_EXT; 3139 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3140 3141 /* skip commandBuffer */ 3142 /* skip image */ 3143 /* skip imageLayout */ 3144 /* skip pColor */ 3145 /* skip rangeCount */ 3146 /* skip pRanges */ 3147 3148 return cmd_size; 3149} 3150 3151static inline void vn_decode_vkCmdClearColorImage_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3152{ 3153 VkCommandTypeEXT command_type; 3154 vn_decode_VkCommandTypeEXT(dec, &command_type); 3155 assert(command_type == VK_COMMAND_TYPE_vkCmdClearColorImage_EXT); 3156 3157 /* skip commandBuffer */ 3158 /* skip image */ 3159 /* skip imageLayout */ 3160 /* skip pColor */ 3161 /* skip rangeCount */ 3162 /* skip pRanges */ 3163} 3164 3165static inline size_t vn_sizeof_vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3166{ 3167 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT; 3168 const VkFlags cmd_flags = 0; 3169 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3170 3171 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3172 cmd_size += vn_sizeof_VkImage(&image); 3173 cmd_size += vn_sizeof_VkImageLayout(&imageLayout); 3174 cmd_size += vn_sizeof_simple_pointer(pDepthStencil); 3175 if (pDepthStencil) 3176 cmd_size += vn_sizeof_VkClearDepthStencilValue(pDepthStencil); 3177 cmd_size += vn_sizeof_uint32_t(&rangeCount); 3178 if (pRanges) { 3179 cmd_size += vn_sizeof_array_size(rangeCount); 3180 for (uint32_t i = 0; i < rangeCount; i++) 3181 cmd_size += vn_sizeof_VkImageSubresourceRange(&pRanges[i]); 3182 } else { 3183 cmd_size += vn_sizeof_array_size(0); 3184 } 3185 3186 return cmd_size; 3187} 3188 3189static inline void vn_encode_vkCmdClearDepthStencilImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3190{ 3191 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT; 3192 3193 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3194 vn_encode_VkFlags(enc, &cmd_flags); 3195 3196 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3197 vn_encode_VkImage(enc, &image); 3198 vn_encode_VkImageLayout(enc, &imageLayout); 3199 if (vn_encode_simple_pointer(enc, pDepthStencil)) 3200 vn_encode_VkClearDepthStencilValue(enc, pDepthStencil); 3201 vn_encode_uint32_t(enc, &rangeCount); 3202 if (pRanges) { 3203 vn_encode_array_size(enc, rangeCount); 3204 for (uint32_t i = 0; i < rangeCount; i++) 3205 vn_encode_VkImageSubresourceRange(enc, &pRanges[i]); 3206 } else { 3207 vn_encode_array_size(enc, 0); 3208 } 3209} 3210 3211static inline size_t vn_sizeof_vkCmdClearDepthStencilImage_reply(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3212{ 3213 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT; 3214 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3215 3216 /* skip commandBuffer */ 3217 /* skip image */ 3218 /* skip imageLayout */ 3219 /* skip pDepthStencil */ 3220 /* skip rangeCount */ 3221 /* skip pRanges */ 3222 3223 return cmd_size; 3224} 3225 3226static inline void vn_decode_vkCmdClearDepthStencilImage_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 3227{ 3228 VkCommandTypeEXT command_type; 3229 vn_decode_VkCommandTypeEXT(dec, &command_type); 3230 assert(command_type == VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT); 3231 3232 /* skip commandBuffer */ 3233 /* skip image */ 3234 /* skip imageLayout */ 3235 /* skip pDepthStencil */ 3236 /* skip rangeCount */ 3237 /* skip pRanges */ 3238} 3239 3240static inline size_t vn_sizeof_vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) 3241{ 3242 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearAttachments_EXT; 3243 const VkFlags cmd_flags = 0; 3244 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3245 3246 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3247 cmd_size += vn_sizeof_uint32_t(&attachmentCount); 3248 if (pAttachments) { 3249 cmd_size += vn_sizeof_array_size(attachmentCount); 3250 for (uint32_t i = 0; i < attachmentCount; i++) 3251 cmd_size += vn_sizeof_VkClearAttachment(&pAttachments[i]); 3252 } else { 3253 cmd_size += vn_sizeof_array_size(0); 3254 } 3255 cmd_size += vn_sizeof_uint32_t(&rectCount); 3256 if (pRects) { 3257 cmd_size += vn_sizeof_array_size(rectCount); 3258 for (uint32_t i = 0; i < rectCount; i++) 3259 cmd_size += vn_sizeof_VkClearRect(&pRects[i]); 3260 } else { 3261 cmd_size += vn_sizeof_array_size(0); 3262 } 3263 3264 return cmd_size; 3265} 3266 3267static inline void vn_encode_vkCmdClearAttachments(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) 3268{ 3269 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearAttachments_EXT; 3270 3271 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3272 vn_encode_VkFlags(enc, &cmd_flags); 3273 3274 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3275 vn_encode_uint32_t(enc, &attachmentCount); 3276 if (pAttachments) { 3277 vn_encode_array_size(enc, attachmentCount); 3278 for (uint32_t i = 0; i < attachmentCount; i++) 3279 vn_encode_VkClearAttachment(enc, &pAttachments[i]); 3280 } else { 3281 vn_encode_array_size(enc, 0); 3282 } 3283 vn_encode_uint32_t(enc, &rectCount); 3284 if (pRects) { 3285 vn_encode_array_size(enc, rectCount); 3286 for (uint32_t i = 0; i < rectCount; i++) 3287 vn_encode_VkClearRect(enc, &pRects[i]); 3288 } else { 3289 vn_encode_array_size(enc, 0); 3290 } 3291} 3292 3293static inline size_t vn_sizeof_vkCmdClearAttachments_reply(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) 3294{ 3295 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdClearAttachments_EXT; 3296 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3297 3298 /* skip commandBuffer */ 3299 /* skip attachmentCount */ 3300 /* skip pAttachments */ 3301 /* skip rectCount */ 3302 /* skip pRects */ 3303 3304 return cmd_size; 3305} 3306 3307static inline void vn_decode_vkCmdClearAttachments_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) 3308{ 3309 VkCommandTypeEXT command_type; 3310 vn_decode_VkCommandTypeEXT(dec, &command_type); 3311 assert(command_type == VK_COMMAND_TYPE_vkCmdClearAttachments_EXT); 3312 3313 /* skip commandBuffer */ 3314 /* skip attachmentCount */ 3315 /* skip pAttachments */ 3316 /* skip rectCount */ 3317 /* skip pRects */ 3318} 3319 3320static inline size_t vn_sizeof_vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) 3321{ 3322 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResolveImage_EXT; 3323 const VkFlags cmd_flags = 0; 3324 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3325 3326 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3327 cmd_size += vn_sizeof_VkImage(&srcImage); 3328 cmd_size += vn_sizeof_VkImageLayout(&srcImageLayout); 3329 cmd_size += vn_sizeof_VkImage(&dstImage); 3330 cmd_size += vn_sizeof_VkImageLayout(&dstImageLayout); 3331 cmd_size += vn_sizeof_uint32_t(®ionCount); 3332 if (pRegions) { 3333 cmd_size += vn_sizeof_array_size(regionCount); 3334 for (uint32_t i = 0; i < regionCount; i++) 3335 cmd_size += vn_sizeof_VkImageResolve(&pRegions[i]); 3336 } else { 3337 cmd_size += vn_sizeof_array_size(0); 3338 } 3339 3340 return cmd_size; 3341} 3342 3343static inline void vn_encode_vkCmdResolveImage(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) 3344{ 3345 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResolveImage_EXT; 3346 3347 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3348 vn_encode_VkFlags(enc, &cmd_flags); 3349 3350 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3351 vn_encode_VkImage(enc, &srcImage); 3352 vn_encode_VkImageLayout(enc, &srcImageLayout); 3353 vn_encode_VkImage(enc, &dstImage); 3354 vn_encode_VkImageLayout(enc, &dstImageLayout); 3355 vn_encode_uint32_t(enc, ®ionCount); 3356 if (pRegions) { 3357 vn_encode_array_size(enc, regionCount); 3358 for (uint32_t i = 0; i < regionCount; i++) 3359 vn_encode_VkImageResolve(enc, &pRegions[i]); 3360 } else { 3361 vn_encode_array_size(enc, 0); 3362 } 3363} 3364 3365static inline size_t vn_sizeof_vkCmdResolveImage_reply(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) 3366{ 3367 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResolveImage_EXT; 3368 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3369 3370 /* skip commandBuffer */ 3371 /* skip srcImage */ 3372 /* skip srcImageLayout */ 3373 /* skip dstImage */ 3374 /* skip dstImageLayout */ 3375 /* skip regionCount */ 3376 /* skip pRegions */ 3377 3378 return cmd_size; 3379} 3380 3381static inline void vn_decode_vkCmdResolveImage_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) 3382{ 3383 VkCommandTypeEXT command_type; 3384 vn_decode_VkCommandTypeEXT(dec, &command_type); 3385 assert(command_type == VK_COMMAND_TYPE_vkCmdResolveImage_EXT); 3386 3387 /* skip commandBuffer */ 3388 /* skip srcImage */ 3389 /* skip srcImageLayout */ 3390 /* skip dstImage */ 3391 /* skip dstImageLayout */ 3392 /* skip regionCount */ 3393 /* skip pRegions */ 3394} 3395 3396static inline size_t vn_sizeof_vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3397{ 3398 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetEvent_EXT; 3399 const VkFlags cmd_flags = 0; 3400 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3401 3402 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3403 cmd_size += vn_sizeof_VkEvent(&event); 3404 cmd_size += vn_sizeof_VkFlags(&stageMask); 3405 3406 return cmd_size; 3407} 3408 3409static inline void vn_encode_vkCmdSetEvent(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3410{ 3411 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetEvent_EXT; 3412 3413 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3414 vn_encode_VkFlags(enc, &cmd_flags); 3415 3416 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3417 vn_encode_VkEvent(enc, &event); 3418 vn_encode_VkFlags(enc, &stageMask); 3419} 3420 3421static inline size_t vn_sizeof_vkCmdSetEvent_reply(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3422{ 3423 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetEvent_EXT; 3424 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3425 3426 /* skip commandBuffer */ 3427 /* skip event */ 3428 /* skip stageMask */ 3429 3430 return cmd_size; 3431} 3432 3433static inline void vn_decode_vkCmdSetEvent_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3434{ 3435 VkCommandTypeEXT command_type; 3436 vn_decode_VkCommandTypeEXT(dec, &command_type); 3437 assert(command_type == VK_COMMAND_TYPE_vkCmdSetEvent_EXT); 3438 3439 /* skip commandBuffer */ 3440 /* skip event */ 3441 /* skip stageMask */ 3442} 3443 3444static inline size_t vn_sizeof_vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3445{ 3446 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResetEvent_EXT; 3447 const VkFlags cmd_flags = 0; 3448 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3449 3450 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3451 cmd_size += vn_sizeof_VkEvent(&event); 3452 cmd_size += vn_sizeof_VkFlags(&stageMask); 3453 3454 return cmd_size; 3455} 3456 3457static inline void vn_encode_vkCmdResetEvent(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3458{ 3459 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResetEvent_EXT; 3460 3461 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3462 vn_encode_VkFlags(enc, &cmd_flags); 3463 3464 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3465 vn_encode_VkEvent(enc, &event); 3466 vn_encode_VkFlags(enc, &stageMask); 3467} 3468 3469static inline size_t vn_sizeof_vkCmdResetEvent_reply(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3470{ 3471 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResetEvent_EXT; 3472 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3473 3474 /* skip commandBuffer */ 3475 /* skip event */ 3476 /* skip stageMask */ 3477 3478 return cmd_size; 3479} 3480 3481static inline void vn_decode_vkCmdResetEvent_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 3482{ 3483 VkCommandTypeEXT command_type; 3484 vn_decode_VkCommandTypeEXT(dec, &command_type); 3485 assert(command_type == VK_COMMAND_TYPE_vkCmdResetEvent_EXT); 3486 3487 /* skip commandBuffer */ 3488 /* skip event */ 3489 /* skip stageMask */ 3490} 3491 3492static inline size_t vn_sizeof_vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3493{ 3494 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdWaitEvents_EXT; 3495 const VkFlags cmd_flags = 0; 3496 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3497 3498 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3499 cmd_size += vn_sizeof_uint32_t(&eventCount); 3500 if (pEvents) { 3501 cmd_size += vn_sizeof_array_size(eventCount); 3502 for (uint32_t i = 0; i < eventCount; i++) 3503 cmd_size += vn_sizeof_VkEvent(&pEvents[i]); 3504 } else { 3505 cmd_size += vn_sizeof_array_size(0); 3506 } 3507 cmd_size += vn_sizeof_VkFlags(&srcStageMask); 3508 cmd_size += vn_sizeof_VkFlags(&dstStageMask); 3509 cmd_size += vn_sizeof_uint32_t(&memoryBarrierCount); 3510 if (pMemoryBarriers) { 3511 cmd_size += vn_sizeof_array_size(memoryBarrierCount); 3512 for (uint32_t i = 0; i < memoryBarrierCount; i++) 3513 cmd_size += vn_sizeof_VkMemoryBarrier(&pMemoryBarriers[i]); 3514 } else { 3515 cmd_size += vn_sizeof_array_size(0); 3516 } 3517 cmd_size += vn_sizeof_uint32_t(&bufferMemoryBarrierCount); 3518 if (pBufferMemoryBarriers) { 3519 cmd_size += vn_sizeof_array_size(bufferMemoryBarrierCount); 3520 for (uint32_t i = 0; i < bufferMemoryBarrierCount; i++) 3521 cmd_size += vn_sizeof_VkBufferMemoryBarrier(&pBufferMemoryBarriers[i]); 3522 } else { 3523 cmd_size += vn_sizeof_array_size(0); 3524 } 3525 cmd_size += vn_sizeof_uint32_t(&imageMemoryBarrierCount); 3526 if (pImageMemoryBarriers) { 3527 cmd_size += vn_sizeof_array_size(imageMemoryBarrierCount); 3528 for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) 3529 cmd_size += vn_sizeof_VkImageMemoryBarrier(&pImageMemoryBarriers[i]); 3530 } else { 3531 cmd_size += vn_sizeof_array_size(0); 3532 } 3533 3534 return cmd_size; 3535} 3536 3537static inline void vn_encode_vkCmdWaitEvents(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3538{ 3539 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdWaitEvents_EXT; 3540 3541 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3542 vn_encode_VkFlags(enc, &cmd_flags); 3543 3544 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3545 vn_encode_uint32_t(enc, &eventCount); 3546 if (pEvents) { 3547 vn_encode_array_size(enc, eventCount); 3548 for (uint32_t i = 0; i < eventCount; i++) 3549 vn_encode_VkEvent(enc, &pEvents[i]); 3550 } else { 3551 vn_encode_array_size(enc, 0); 3552 } 3553 vn_encode_VkFlags(enc, &srcStageMask); 3554 vn_encode_VkFlags(enc, &dstStageMask); 3555 vn_encode_uint32_t(enc, &memoryBarrierCount); 3556 if (pMemoryBarriers) { 3557 vn_encode_array_size(enc, memoryBarrierCount); 3558 for (uint32_t i = 0; i < memoryBarrierCount; i++) 3559 vn_encode_VkMemoryBarrier(enc, &pMemoryBarriers[i]); 3560 } else { 3561 vn_encode_array_size(enc, 0); 3562 } 3563 vn_encode_uint32_t(enc, &bufferMemoryBarrierCount); 3564 if (pBufferMemoryBarriers) { 3565 vn_encode_array_size(enc, bufferMemoryBarrierCount); 3566 for (uint32_t i = 0; i < bufferMemoryBarrierCount; i++) 3567 vn_encode_VkBufferMemoryBarrier(enc, &pBufferMemoryBarriers[i]); 3568 } else { 3569 vn_encode_array_size(enc, 0); 3570 } 3571 vn_encode_uint32_t(enc, &imageMemoryBarrierCount); 3572 if (pImageMemoryBarriers) { 3573 vn_encode_array_size(enc, imageMemoryBarrierCount); 3574 for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) 3575 vn_encode_VkImageMemoryBarrier(enc, &pImageMemoryBarriers[i]); 3576 } else { 3577 vn_encode_array_size(enc, 0); 3578 } 3579} 3580 3581static inline size_t vn_sizeof_vkCmdWaitEvents_reply(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3582{ 3583 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdWaitEvents_EXT; 3584 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3585 3586 /* skip commandBuffer */ 3587 /* skip eventCount */ 3588 /* skip pEvents */ 3589 /* skip srcStageMask */ 3590 /* skip dstStageMask */ 3591 /* skip memoryBarrierCount */ 3592 /* skip pMemoryBarriers */ 3593 /* skip bufferMemoryBarrierCount */ 3594 /* skip pBufferMemoryBarriers */ 3595 /* skip imageMemoryBarrierCount */ 3596 /* skip pImageMemoryBarriers */ 3597 3598 return cmd_size; 3599} 3600 3601static inline void vn_decode_vkCmdWaitEvents_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3602{ 3603 VkCommandTypeEXT command_type; 3604 vn_decode_VkCommandTypeEXT(dec, &command_type); 3605 assert(command_type == VK_COMMAND_TYPE_vkCmdWaitEvents_EXT); 3606 3607 /* skip commandBuffer */ 3608 /* skip eventCount */ 3609 /* skip pEvents */ 3610 /* skip srcStageMask */ 3611 /* skip dstStageMask */ 3612 /* skip memoryBarrierCount */ 3613 /* skip pMemoryBarriers */ 3614 /* skip bufferMemoryBarrierCount */ 3615 /* skip pBufferMemoryBarriers */ 3616 /* skip imageMemoryBarrierCount */ 3617 /* skip pImageMemoryBarriers */ 3618} 3619 3620static inline size_t vn_sizeof_vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3621{ 3622 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT; 3623 const VkFlags cmd_flags = 0; 3624 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3625 3626 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3627 cmd_size += vn_sizeof_VkFlags(&srcStageMask); 3628 cmd_size += vn_sizeof_VkFlags(&dstStageMask); 3629 cmd_size += vn_sizeof_VkFlags(&dependencyFlags); 3630 cmd_size += vn_sizeof_uint32_t(&memoryBarrierCount); 3631 if (pMemoryBarriers) { 3632 cmd_size += vn_sizeof_array_size(memoryBarrierCount); 3633 for (uint32_t i = 0; i < memoryBarrierCount; i++) 3634 cmd_size += vn_sizeof_VkMemoryBarrier(&pMemoryBarriers[i]); 3635 } else { 3636 cmd_size += vn_sizeof_array_size(0); 3637 } 3638 cmd_size += vn_sizeof_uint32_t(&bufferMemoryBarrierCount); 3639 if (pBufferMemoryBarriers) { 3640 cmd_size += vn_sizeof_array_size(bufferMemoryBarrierCount); 3641 for (uint32_t i = 0; i < bufferMemoryBarrierCount; i++) 3642 cmd_size += vn_sizeof_VkBufferMemoryBarrier(&pBufferMemoryBarriers[i]); 3643 } else { 3644 cmd_size += vn_sizeof_array_size(0); 3645 } 3646 cmd_size += vn_sizeof_uint32_t(&imageMemoryBarrierCount); 3647 if (pImageMemoryBarriers) { 3648 cmd_size += vn_sizeof_array_size(imageMemoryBarrierCount); 3649 for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) 3650 cmd_size += vn_sizeof_VkImageMemoryBarrier(&pImageMemoryBarriers[i]); 3651 } else { 3652 cmd_size += vn_sizeof_array_size(0); 3653 } 3654 3655 return cmd_size; 3656} 3657 3658static inline void vn_encode_vkCmdPipelineBarrier(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3659{ 3660 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT; 3661 3662 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3663 vn_encode_VkFlags(enc, &cmd_flags); 3664 3665 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3666 vn_encode_VkFlags(enc, &srcStageMask); 3667 vn_encode_VkFlags(enc, &dstStageMask); 3668 vn_encode_VkFlags(enc, &dependencyFlags); 3669 vn_encode_uint32_t(enc, &memoryBarrierCount); 3670 if (pMemoryBarriers) { 3671 vn_encode_array_size(enc, memoryBarrierCount); 3672 for (uint32_t i = 0; i < memoryBarrierCount; i++) 3673 vn_encode_VkMemoryBarrier(enc, &pMemoryBarriers[i]); 3674 } else { 3675 vn_encode_array_size(enc, 0); 3676 } 3677 vn_encode_uint32_t(enc, &bufferMemoryBarrierCount); 3678 if (pBufferMemoryBarriers) { 3679 vn_encode_array_size(enc, bufferMemoryBarrierCount); 3680 for (uint32_t i = 0; i < bufferMemoryBarrierCount; i++) 3681 vn_encode_VkBufferMemoryBarrier(enc, &pBufferMemoryBarriers[i]); 3682 } else { 3683 vn_encode_array_size(enc, 0); 3684 } 3685 vn_encode_uint32_t(enc, &imageMemoryBarrierCount); 3686 if (pImageMemoryBarriers) { 3687 vn_encode_array_size(enc, imageMemoryBarrierCount); 3688 for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) 3689 vn_encode_VkImageMemoryBarrier(enc, &pImageMemoryBarriers[i]); 3690 } else { 3691 vn_encode_array_size(enc, 0); 3692 } 3693} 3694 3695static inline size_t vn_sizeof_vkCmdPipelineBarrier_reply(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3696{ 3697 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT; 3698 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3699 3700 /* skip commandBuffer */ 3701 /* skip srcStageMask */ 3702 /* skip dstStageMask */ 3703 /* skip dependencyFlags */ 3704 /* skip memoryBarrierCount */ 3705 /* skip pMemoryBarriers */ 3706 /* skip bufferMemoryBarrierCount */ 3707 /* skip pBufferMemoryBarriers */ 3708 /* skip imageMemoryBarrierCount */ 3709 /* skip pImageMemoryBarriers */ 3710 3711 return cmd_size; 3712} 3713 3714static inline void vn_decode_vkCmdPipelineBarrier_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 3715{ 3716 VkCommandTypeEXT command_type; 3717 vn_decode_VkCommandTypeEXT(dec, &command_type); 3718 assert(command_type == VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT); 3719 3720 /* skip commandBuffer */ 3721 /* skip srcStageMask */ 3722 /* skip dstStageMask */ 3723 /* skip dependencyFlags */ 3724 /* skip memoryBarrierCount */ 3725 /* skip pMemoryBarriers */ 3726 /* skip bufferMemoryBarrierCount */ 3727 /* skip pBufferMemoryBarriers */ 3728 /* skip imageMemoryBarrierCount */ 3729 /* skip pImageMemoryBarriers */ 3730} 3731 3732static inline size_t vn_sizeof_vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) 3733{ 3734 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginQuery_EXT; 3735 const VkFlags cmd_flags = 0; 3736 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3737 3738 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3739 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 3740 cmd_size += vn_sizeof_uint32_t(&query); 3741 cmd_size += vn_sizeof_VkFlags(&flags); 3742 3743 return cmd_size; 3744} 3745 3746static inline void vn_encode_vkCmdBeginQuery(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) 3747{ 3748 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginQuery_EXT; 3749 3750 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3751 vn_encode_VkFlags(enc, &cmd_flags); 3752 3753 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3754 vn_encode_VkQueryPool(enc, &queryPool); 3755 vn_encode_uint32_t(enc, &query); 3756 vn_encode_VkFlags(enc, &flags); 3757} 3758 3759static inline size_t vn_sizeof_vkCmdBeginQuery_reply(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) 3760{ 3761 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginQuery_EXT; 3762 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3763 3764 /* skip commandBuffer */ 3765 /* skip queryPool */ 3766 /* skip query */ 3767 /* skip flags */ 3768 3769 return cmd_size; 3770} 3771 3772static inline void vn_decode_vkCmdBeginQuery_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) 3773{ 3774 VkCommandTypeEXT command_type; 3775 vn_decode_VkCommandTypeEXT(dec, &command_type); 3776 assert(command_type == VK_COMMAND_TYPE_vkCmdBeginQuery_EXT); 3777 3778 /* skip commandBuffer */ 3779 /* skip queryPool */ 3780 /* skip query */ 3781 /* skip flags */ 3782} 3783 3784static inline size_t vn_sizeof_vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) 3785{ 3786 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndQuery_EXT; 3787 const VkFlags cmd_flags = 0; 3788 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3789 3790 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3791 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 3792 cmd_size += vn_sizeof_uint32_t(&query); 3793 3794 return cmd_size; 3795} 3796 3797static inline void vn_encode_vkCmdEndQuery(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) 3798{ 3799 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndQuery_EXT; 3800 3801 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3802 vn_encode_VkFlags(enc, &cmd_flags); 3803 3804 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3805 vn_encode_VkQueryPool(enc, &queryPool); 3806 vn_encode_uint32_t(enc, &query); 3807} 3808 3809static inline size_t vn_sizeof_vkCmdEndQuery_reply(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) 3810{ 3811 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndQuery_EXT; 3812 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3813 3814 /* skip commandBuffer */ 3815 /* skip queryPool */ 3816 /* skip query */ 3817 3818 return cmd_size; 3819} 3820 3821static inline void vn_decode_vkCmdEndQuery_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) 3822{ 3823 VkCommandTypeEXT command_type; 3824 vn_decode_VkCommandTypeEXT(dec, &command_type); 3825 assert(command_type == VK_COMMAND_TYPE_vkCmdEndQuery_EXT); 3826 3827 /* skip commandBuffer */ 3828 /* skip queryPool */ 3829 /* skip query */ 3830} 3831 3832static inline size_t vn_sizeof_vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) 3833{ 3834 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT; 3835 const VkFlags cmd_flags = 0; 3836 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3837 3838 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3839 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 3840 cmd_size += vn_sizeof_uint32_t(&firstQuery); 3841 cmd_size += vn_sizeof_uint32_t(&queryCount); 3842 3843 return cmd_size; 3844} 3845 3846static inline void vn_encode_vkCmdResetQueryPool(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) 3847{ 3848 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT; 3849 3850 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3851 vn_encode_VkFlags(enc, &cmd_flags); 3852 3853 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3854 vn_encode_VkQueryPool(enc, &queryPool); 3855 vn_encode_uint32_t(enc, &firstQuery); 3856 vn_encode_uint32_t(enc, &queryCount); 3857} 3858 3859static inline size_t vn_sizeof_vkCmdResetQueryPool_reply(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) 3860{ 3861 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT; 3862 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3863 3864 /* skip commandBuffer */ 3865 /* skip queryPool */ 3866 /* skip firstQuery */ 3867 /* skip queryCount */ 3868 3869 return cmd_size; 3870} 3871 3872static inline void vn_decode_vkCmdResetQueryPool_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) 3873{ 3874 VkCommandTypeEXT command_type; 3875 vn_decode_VkCommandTypeEXT(dec, &command_type); 3876 assert(command_type == VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT); 3877 3878 /* skip commandBuffer */ 3879 /* skip queryPool */ 3880 /* skip firstQuery */ 3881 /* skip queryCount */ 3882} 3883 3884static inline size_t vn_sizeof_vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) 3885{ 3886 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT; 3887 const VkFlags cmd_flags = 0; 3888 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3889 3890 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3891 cmd_size += vn_sizeof_VkPipelineStageFlagBits(&pipelineStage); 3892 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 3893 cmd_size += vn_sizeof_uint32_t(&query); 3894 3895 return cmd_size; 3896} 3897 3898static inline void vn_encode_vkCmdWriteTimestamp(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) 3899{ 3900 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT; 3901 3902 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3903 vn_encode_VkFlags(enc, &cmd_flags); 3904 3905 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3906 vn_encode_VkPipelineStageFlagBits(enc, &pipelineStage); 3907 vn_encode_VkQueryPool(enc, &queryPool); 3908 vn_encode_uint32_t(enc, &query); 3909} 3910 3911static inline size_t vn_sizeof_vkCmdWriteTimestamp_reply(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) 3912{ 3913 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT; 3914 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3915 3916 /* skip commandBuffer */ 3917 /* skip pipelineStage */ 3918 /* skip queryPool */ 3919 /* skip query */ 3920 3921 return cmd_size; 3922} 3923 3924static inline void vn_decode_vkCmdWriteTimestamp_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) 3925{ 3926 VkCommandTypeEXT command_type; 3927 vn_decode_VkCommandTypeEXT(dec, &command_type); 3928 assert(command_type == VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT); 3929 3930 /* skip commandBuffer */ 3931 /* skip pipelineStage */ 3932 /* skip queryPool */ 3933 /* skip query */ 3934} 3935 3936static inline size_t vn_sizeof_vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) 3937{ 3938 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT; 3939 const VkFlags cmd_flags = 0; 3940 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 3941 3942 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 3943 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 3944 cmd_size += vn_sizeof_uint32_t(&firstQuery); 3945 cmd_size += vn_sizeof_uint32_t(&queryCount); 3946 cmd_size += vn_sizeof_VkBuffer(&dstBuffer); 3947 cmd_size += vn_sizeof_VkDeviceSize(&dstOffset); 3948 cmd_size += vn_sizeof_VkDeviceSize(&stride); 3949 cmd_size += vn_sizeof_VkFlags(&flags); 3950 3951 return cmd_size; 3952} 3953 3954static inline void vn_encode_vkCmdCopyQueryPoolResults(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) 3955{ 3956 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT; 3957 3958 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 3959 vn_encode_VkFlags(enc, &cmd_flags); 3960 3961 vn_encode_VkCommandBuffer(enc, &commandBuffer); 3962 vn_encode_VkQueryPool(enc, &queryPool); 3963 vn_encode_uint32_t(enc, &firstQuery); 3964 vn_encode_uint32_t(enc, &queryCount); 3965 vn_encode_VkBuffer(enc, &dstBuffer); 3966 vn_encode_VkDeviceSize(enc, &dstOffset); 3967 vn_encode_VkDeviceSize(enc, &stride); 3968 vn_encode_VkFlags(enc, &flags); 3969} 3970 3971static inline size_t vn_sizeof_vkCmdCopyQueryPoolResults_reply(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) 3972{ 3973 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT; 3974 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 3975 3976 /* skip commandBuffer */ 3977 /* skip queryPool */ 3978 /* skip firstQuery */ 3979 /* skip queryCount */ 3980 /* skip dstBuffer */ 3981 /* skip dstOffset */ 3982 /* skip stride */ 3983 /* skip flags */ 3984 3985 return cmd_size; 3986} 3987 3988static inline void vn_decode_vkCmdCopyQueryPoolResults_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) 3989{ 3990 VkCommandTypeEXT command_type; 3991 vn_decode_VkCommandTypeEXT(dec, &command_type); 3992 assert(command_type == VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT); 3993 3994 /* skip commandBuffer */ 3995 /* skip queryPool */ 3996 /* skip firstQuery */ 3997 /* skip queryCount */ 3998 /* skip dstBuffer */ 3999 /* skip dstOffset */ 4000 /* skip stride */ 4001 /* skip flags */ 4002} 4003 4004static inline size_t vn_sizeof_vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) 4005{ 4006 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdPushConstants_EXT; 4007 const VkFlags cmd_flags = 0; 4008 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4009 4010 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4011 cmd_size += vn_sizeof_VkPipelineLayout(&layout); 4012 cmd_size += vn_sizeof_VkFlags(&stageFlags); 4013 cmd_size += vn_sizeof_uint32_t(&offset); 4014 cmd_size += vn_sizeof_uint32_t(&size); 4015 if (pValues) { 4016 cmd_size += vn_sizeof_array_size(size); 4017 cmd_size += vn_sizeof_blob_array(pValues, size); 4018 } else { 4019 cmd_size += vn_sizeof_array_size(0); 4020 } 4021 4022 return cmd_size; 4023} 4024 4025static inline void vn_encode_vkCmdPushConstants(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) 4026{ 4027 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdPushConstants_EXT; 4028 4029 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4030 vn_encode_VkFlags(enc, &cmd_flags); 4031 4032 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4033 vn_encode_VkPipelineLayout(enc, &layout); 4034 vn_encode_VkFlags(enc, &stageFlags); 4035 vn_encode_uint32_t(enc, &offset); 4036 vn_encode_uint32_t(enc, &size); 4037 if (pValues) { 4038 vn_encode_array_size(enc, size); 4039 vn_encode_blob_array(enc, pValues, size); 4040 } else { 4041 vn_encode_array_size(enc, 0); 4042 } 4043} 4044 4045static inline size_t vn_sizeof_vkCmdPushConstants_reply(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) 4046{ 4047 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdPushConstants_EXT; 4048 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4049 4050 /* skip commandBuffer */ 4051 /* skip layout */ 4052 /* skip stageFlags */ 4053 /* skip offset */ 4054 /* skip size */ 4055 /* skip pValues */ 4056 4057 return cmd_size; 4058} 4059 4060static inline void vn_decode_vkCmdPushConstants_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) 4061{ 4062 VkCommandTypeEXT command_type; 4063 vn_decode_VkCommandTypeEXT(dec, &command_type); 4064 assert(command_type == VK_COMMAND_TYPE_vkCmdPushConstants_EXT); 4065 4066 /* skip commandBuffer */ 4067 /* skip layout */ 4068 /* skip stageFlags */ 4069 /* skip offset */ 4070 /* skip size */ 4071 /* skip pValues */ 4072} 4073 4074static inline size_t vn_sizeof_vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) 4075{ 4076 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT; 4077 const VkFlags cmd_flags = 0; 4078 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4079 4080 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4081 cmd_size += vn_sizeof_simple_pointer(pRenderPassBegin); 4082 if (pRenderPassBegin) 4083 cmd_size += vn_sizeof_VkRenderPassBeginInfo(pRenderPassBegin); 4084 cmd_size += vn_sizeof_VkSubpassContents(&contents); 4085 4086 return cmd_size; 4087} 4088 4089static inline void vn_encode_vkCmdBeginRenderPass(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) 4090{ 4091 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT; 4092 4093 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4094 vn_encode_VkFlags(enc, &cmd_flags); 4095 4096 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4097 if (vn_encode_simple_pointer(enc, pRenderPassBegin)) 4098 vn_encode_VkRenderPassBeginInfo(enc, pRenderPassBegin); 4099 vn_encode_VkSubpassContents(enc, &contents); 4100} 4101 4102static inline size_t vn_sizeof_vkCmdBeginRenderPass_reply(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) 4103{ 4104 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT; 4105 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4106 4107 /* skip commandBuffer */ 4108 /* skip pRenderPassBegin */ 4109 /* skip contents */ 4110 4111 return cmd_size; 4112} 4113 4114static inline void vn_decode_vkCmdBeginRenderPass_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) 4115{ 4116 VkCommandTypeEXT command_type; 4117 vn_decode_VkCommandTypeEXT(dec, &command_type); 4118 assert(command_type == VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT); 4119 4120 /* skip commandBuffer */ 4121 /* skip pRenderPassBegin */ 4122 /* skip contents */ 4123} 4124 4125static inline size_t vn_sizeof_vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) 4126{ 4127 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdNextSubpass_EXT; 4128 const VkFlags cmd_flags = 0; 4129 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4130 4131 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4132 cmd_size += vn_sizeof_VkSubpassContents(&contents); 4133 4134 return cmd_size; 4135} 4136 4137static inline void vn_encode_vkCmdNextSubpass(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkSubpassContents contents) 4138{ 4139 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdNextSubpass_EXT; 4140 4141 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4142 vn_encode_VkFlags(enc, &cmd_flags); 4143 4144 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4145 vn_encode_VkSubpassContents(enc, &contents); 4146} 4147 4148static inline size_t vn_sizeof_vkCmdNextSubpass_reply(VkCommandBuffer commandBuffer, VkSubpassContents contents) 4149{ 4150 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdNextSubpass_EXT; 4151 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4152 4153 /* skip commandBuffer */ 4154 /* skip contents */ 4155 4156 return cmd_size; 4157} 4158 4159static inline void vn_decode_vkCmdNextSubpass_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkSubpassContents contents) 4160{ 4161 VkCommandTypeEXT command_type; 4162 vn_decode_VkCommandTypeEXT(dec, &command_type); 4163 assert(command_type == VK_COMMAND_TYPE_vkCmdNextSubpass_EXT); 4164 4165 /* skip commandBuffer */ 4166 /* skip contents */ 4167} 4168 4169static inline size_t vn_sizeof_vkCmdEndRenderPass(VkCommandBuffer commandBuffer) 4170{ 4171 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT; 4172 const VkFlags cmd_flags = 0; 4173 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4174 4175 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4176 4177 return cmd_size; 4178} 4179 4180static inline void vn_encode_vkCmdEndRenderPass(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer) 4181{ 4182 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT; 4183 4184 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4185 vn_encode_VkFlags(enc, &cmd_flags); 4186 4187 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4188} 4189 4190static inline size_t vn_sizeof_vkCmdEndRenderPass_reply(VkCommandBuffer commandBuffer) 4191{ 4192 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT; 4193 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4194 4195 /* skip commandBuffer */ 4196 4197 return cmd_size; 4198} 4199 4200static inline void vn_decode_vkCmdEndRenderPass_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer) 4201{ 4202 VkCommandTypeEXT command_type; 4203 vn_decode_VkCommandTypeEXT(dec, &command_type); 4204 assert(command_type == VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT); 4205 4206 /* skip commandBuffer */ 4207} 4208 4209static inline size_t vn_sizeof_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 4210{ 4211 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT; 4212 const VkFlags cmd_flags = 0; 4213 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4214 4215 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4216 cmd_size += vn_sizeof_uint32_t(&commandBufferCount); 4217 if (pCommandBuffers) { 4218 cmd_size += vn_sizeof_array_size(commandBufferCount); 4219 for (uint32_t i = 0; i < commandBufferCount; i++) 4220 cmd_size += vn_sizeof_VkCommandBuffer(&pCommandBuffers[i]); 4221 } else { 4222 cmd_size += vn_sizeof_array_size(0); 4223 } 4224 4225 return cmd_size; 4226} 4227 4228static inline void vn_encode_vkCmdExecuteCommands(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 4229{ 4230 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT; 4231 4232 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4233 vn_encode_VkFlags(enc, &cmd_flags); 4234 4235 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4236 vn_encode_uint32_t(enc, &commandBufferCount); 4237 if (pCommandBuffers) { 4238 vn_encode_array_size(enc, commandBufferCount); 4239 for (uint32_t i = 0; i < commandBufferCount; i++) 4240 vn_encode_VkCommandBuffer(enc, &pCommandBuffers[i]); 4241 } else { 4242 vn_encode_array_size(enc, 0); 4243 } 4244} 4245 4246static inline size_t vn_sizeof_vkCmdExecuteCommands_reply(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 4247{ 4248 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT; 4249 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4250 4251 /* skip commandBuffer */ 4252 /* skip commandBufferCount */ 4253 /* skip pCommandBuffers */ 4254 4255 return cmd_size; 4256} 4257 4258static inline void vn_decode_vkCmdExecuteCommands_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 4259{ 4260 VkCommandTypeEXT command_type; 4261 vn_decode_VkCommandTypeEXT(dec, &command_type); 4262 assert(command_type == VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT); 4263 4264 /* skip commandBuffer */ 4265 /* skip commandBufferCount */ 4266 /* skip pCommandBuffers */ 4267} 4268 4269static inline size_t vn_sizeof_vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) 4270{ 4271 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT; 4272 const VkFlags cmd_flags = 0; 4273 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4274 4275 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4276 cmd_size += vn_sizeof_uint32_t(&deviceMask); 4277 4278 return cmd_size; 4279} 4280 4281static inline void vn_encode_vkCmdSetDeviceMask(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t deviceMask) 4282{ 4283 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT; 4284 4285 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4286 vn_encode_VkFlags(enc, &cmd_flags); 4287 4288 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4289 vn_encode_uint32_t(enc, &deviceMask); 4290} 4291 4292static inline size_t vn_sizeof_vkCmdSetDeviceMask_reply(VkCommandBuffer commandBuffer, uint32_t deviceMask) 4293{ 4294 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT; 4295 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4296 4297 /* skip commandBuffer */ 4298 /* skip deviceMask */ 4299 4300 return cmd_size; 4301} 4302 4303static inline void vn_decode_vkCmdSetDeviceMask_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t deviceMask) 4304{ 4305 VkCommandTypeEXT command_type; 4306 vn_decode_VkCommandTypeEXT(dec, &command_type); 4307 assert(command_type == VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT); 4308 4309 /* skip commandBuffer */ 4310 /* skip deviceMask */ 4311} 4312 4313static inline size_t vn_sizeof_vkCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 4314{ 4315 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatchBase_EXT; 4316 const VkFlags cmd_flags = 0; 4317 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4318 4319 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4320 cmd_size += vn_sizeof_uint32_t(&baseGroupX); 4321 cmd_size += vn_sizeof_uint32_t(&baseGroupY); 4322 cmd_size += vn_sizeof_uint32_t(&baseGroupZ); 4323 cmd_size += vn_sizeof_uint32_t(&groupCountX); 4324 cmd_size += vn_sizeof_uint32_t(&groupCountY); 4325 cmd_size += vn_sizeof_uint32_t(&groupCountZ); 4326 4327 return cmd_size; 4328} 4329 4330static inline void vn_encode_vkCmdDispatchBase(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 4331{ 4332 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatchBase_EXT; 4333 4334 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4335 vn_encode_VkFlags(enc, &cmd_flags); 4336 4337 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4338 vn_encode_uint32_t(enc, &baseGroupX); 4339 vn_encode_uint32_t(enc, &baseGroupY); 4340 vn_encode_uint32_t(enc, &baseGroupZ); 4341 vn_encode_uint32_t(enc, &groupCountX); 4342 vn_encode_uint32_t(enc, &groupCountY); 4343 vn_encode_uint32_t(enc, &groupCountZ); 4344} 4345 4346static inline size_t vn_sizeof_vkCmdDispatchBase_reply(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 4347{ 4348 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDispatchBase_EXT; 4349 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4350 4351 /* skip commandBuffer */ 4352 /* skip baseGroupX */ 4353 /* skip baseGroupY */ 4354 /* skip baseGroupZ */ 4355 /* skip groupCountX */ 4356 /* skip groupCountY */ 4357 /* skip groupCountZ */ 4358 4359 return cmd_size; 4360} 4361 4362static inline void vn_decode_vkCmdDispatchBase_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 4363{ 4364 VkCommandTypeEXT command_type; 4365 vn_decode_VkCommandTypeEXT(dec, &command_type); 4366 assert(command_type == VK_COMMAND_TYPE_vkCmdDispatchBase_EXT); 4367 4368 /* skip commandBuffer */ 4369 /* skip baseGroupX */ 4370 /* skip baseGroupY */ 4371 /* skip baseGroupZ */ 4372 /* skip groupCountX */ 4373 /* skip groupCountY */ 4374 /* skip groupCountZ */ 4375} 4376 4377static inline size_t vn_sizeof_vkCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) 4378{ 4379 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT; 4380 const VkFlags cmd_flags = 0; 4381 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4382 4383 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4384 cmd_size += vn_sizeof_simple_pointer(pRenderPassBegin); 4385 if (pRenderPassBegin) 4386 cmd_size += vn_sizeof_VkRenderPassBeginInfo(pRenderPassBegin); 4387 cmd_size += vn_sizeof_simple_pointer(pSubpassBeginInfo); 4388 if (pSubpassBeginInfo) 4389 cmd_size += vn_sizeof_VkSubpassBeginInfo(pSubpassBeginInfo); 4390 4391 return cmd_size; 4392} 4393 4394static inline void vn_encode_vkCmdBeginRenderPass2(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) 4395{ 4396 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT; 4397 4398 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4399 vn_encode_VkFlags(enc, &cmd_flags); 4400 4401 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4402 if (vn_encode_simple_pointer(enc, pRenderPassBegin)) 4403 vn_encode_VkRenderPassBeginInfo(enc, pRenderPassBegin); 4404 if (vn_encode_simple_pointer(enc, pSubpassBeginInfo)) 4405 vn_encode_VkSubpassBeginInfo(enc, pSubpassBeginInfo); 4406} 4407 4408static inline size_t vn_sizeof_vkCmdBeginRenderPass2_reply(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) 4409{ 4410 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT; 4411 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4412 4413 /* skip commandBuffer */ 4414 /* skip pRenderPassBegin */ 4415 /* skip pSubpassBeginInfo */ 4416 4417 return cmd_size; 4418} 4419 4420static inline void vn_decode_vkCmdBeginRenderPass2_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) 4421{ 4422 VkCommandTypeEXT command_type; 4423 vn_decode_VkCommandTypeEXT(dec, &command_type); 4424 assert(command_type == VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT); 4425 4426 /* skip commandBuffer */ 4427 /* skip pRenderPassBegin */ 4428 /* skip pSubpassBeginInfo */ 4429} 4430 4431static inline size_t vn_sizeof_vkCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) 4432{ 4433 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT; 4434 const VkFlags cmd_flags = 0; 4435 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4436 4437 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4438 cmd_size += vn_sizeof_simple_pointer(pSubpassBeginInfo); 4439 if (pSubpassBeginInfo) 4440 cmd_size += vn_sizeof_VkSubpassBeginInfo(pSubpassBeginInfo); 4441 cmd_size += vn_sizeof_simple_pointer(pSubpassEndInfo); 4442 if (pSubpassEndInfo) 4443 cmd_size += vn_sizeof_VkSubpassEndInfo(pSubpassEndInfo); 4444 4445 return cmd_size; 4446} 4447 4448static inline void vn_encode_vkCmdNextSubpass2(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) 4449{ 4450 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT; 4451 4452 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4453 vn_encode_VkFlags(enc, &cmd_flags); 4454 4455 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4456 if (vn_encode_simple_pointer(enc, pSubpassBeginInfo)) 4457 vn_encode_VkSubpassBeginInfo(enc, pSubpassBeginInfo); 4458 if (vn_encode_simple_pointer(enc, pSubpassEndInfo)) 4459 vn_encode_VkSubpassEndInfo(enc, pSubpassEndInfo); 4460} 4461 4462static inline size_t vn_sizeof_vkCmdNextSubpass2_reply(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) 4463{ 4464 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT; 4465 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4466 4467 /* skip commandBuffer */ 4468 /* skip pSubpassBeginInfo */ 4469 /* skip pSubpassEndInfo */ 4470 4471 return cmd_size; 4472} 4473 4474static inline void vn_decode_vkCmdNextSubpass2_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) 4475{ 4476 VkCommandTypeEXT command_type; 4477 vn_decode_VkCommandTypeEXT(dec, &command_type); 4478 assert(command_type == VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT); 4479 4480 /* skip commandBuffer */ 4481 /* skip pSubpassBeginInfo */ 4482 /* skip pSubpassEndInfo */ 4483} 4484 4485static inline size_t vn_sizeof_vkCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) 4486{ 4487 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT; 4488 const VkFlags cmd_flags = 0; 4489 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4490 4491 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4492 cmd_size += vn_sizeof_simple_pointer(pSubpassEndInfo); 4493 if (pSubpassEndInfo) 4494 cmd_size += vn_sizeof_VkSubpassEndInfo(pSubpassEndInfo); 4495 4496 return cmd_size; 4497} 4498 4499static inline void vn_encode_vkCmdEndRenderPass2(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) 4500{ 4501 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT; 4502 4503 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4504 vn_encode_VkFlags(enc, &cmd_flags); 4505 4506 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4507 if (vn_encode_simple_pointer(enc, pSubpassEndInfo)) 4508 vn_encode_VkSubpassEndInfo(enc, pSubpassEndInfo); 4509} 4510 4511static inline size_t vn_sizeof_vkCmdEndRenderPass2_reply(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) 4512{ 4513 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT; 4514 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4515 4516 /* skip commandBuffer */ 4517 /* skip pSubpassEndInfo */ 4518 4519 return cmd_size; 4520} 4521 4522static inline void vn_decode_vkCmdEndRenderPass2_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) 4523{ 4524 VkCommandTypeEXT command_type; 4525 vn_decode_VkCommandTypeEXT(dec, &command_type); 4526 assert(command_type == VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT); 4527 4528 /* skip commandBuffer */ 4529 /* skip pSubpassEndInfo */ 4530} 4531 4532static inline size_t vn_sizeof_vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4533{ 4534 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT; 4535 const VkFlags cmd_flags = 0; 4536 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4537 4538 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4539 cmd_size += vn_sizeof_VkBuffer(&buffer); 4540 cmd_size += vn_sizeof_VkDeviceSize(&offset); 4541 cmd_size += vn_sizeof_VkBuffer(&countBuffer); 4542 cmd_size += vn_sizeof_VkDeviceSize(&countBufferOffset); 4543 cmd_size += vn_sizeof_uint32_t(&maxDrawCount); 4544 cmd_size += vn_sizeof_uint32_t(&stride); 4545 4546 return cmd_size; 4547} 4548 4549static inline void vn_encode_vkCmdDrawIndirectCount(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4550{ 4551 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT; 4552 4553 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4554 vn_encode_VkFlags(enc, &cmd_flags); 4555 4556 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4557 vn_encode_VkBuffer(enc, &buffer); 4558 vn_encode_VkDeviceSize(enc, &offset); 4559 vn_encode_VkBuffer(enc, &countBuffer); 4560 vn_encode_VkDeviceSize(enc, &countBufferOffset); 4561 vn_encode_uint32_t(enc, &maxDrawCount); 4562 vn_encode_uint32_t(enc, &stride); 4563} 4564 4565static inline size_t vn_sizeof_vkCmdDrawIndirectCount_reply(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4566{ 4567 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT; 4568 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4569 4570 /* skip commandBuffer */ 4571 /* skip buffer */ 4572 /* skip offset */ 4573 /* skip countBuffer */ 4574 /* skip countBufferOffset */ 4575 /* skip maxDrawCount */ 4576 /* skip stride */ 4577 4578 return cmd_size; 4579} 4580 4581static inline void vn_decode_vkCmdDrawIndirectCount_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4582{ 4583 VkCommandTypeEXT command_type; 4584 vn_decode_VkCommandTypeEXT(dec, &command_type); 4585 assert(command_type == VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT); 4586 4587 /* skip commandBuffer */ 4588 /* skip buffer */ 4589 /* skip offset */ 4590 /* skip countBuffer */ 4591 /* skip countBufferOffset */ 4592 /* skip maxDrawCount */ 4593 /* skip stride */ 4594} 4595 4596static inline size_t vn_sizeof_vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4597{ 4598 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT; 4599 const VkFlags cmd_flags = 0; 4600 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4601 4602 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4603 cmd_size += vn_sizeof_VkBuffer(&buffer); 4604 cmd_size += vn_sizeof_VkDeviceSize(&offset); 4605 cmd_size += vn_sizeof_VkBuffer(&countBuffer); 4606 cmd_size += vn_sizeof_VkDeviceSize(&countBufferOffset); 4607 cmd_size += vn_sizeof_uint32_t(&maxDrawCount); 4608 cmd_size += vn_sizeof_uint32_t(&stride); 4609 4610 return cmd_size; 4611} 4612 4613static inline void vn_encode_vkCmdDrawIndexedIndirectCount(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4614{ 4615 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT; 4616 4617 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4618 vn_encode_VkFlags(enc, &cmd_flags); 4619 4620 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4621 vn_encode_VkBuffer(enc, &buffer); 4622 vn_encode_VkDeviceSize(enc, &offset); 4623 vn_encode_VkBuffer(enc, &countBuffer); 4624 vn_encode_VkDeviceSize(enc, &countBufferOffset); 4625 vn_encode_uint32_t(enc, &maxDrawCount); 4626 vn_encode_uint32_t(enc, &stride); 4627} 4628 4629static inline size_t vn_sizeof_vkCmdDrawIndexedIndirectCount_reply(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4630{ 4631 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT; 4632 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4633 4634 /* skip commandBuffer */ 4635 /* skip buffer */ 4636 /* skip offset */ 4637 /* skip countBuffer */ 4638 /* skip countBufferOffset */ 4639 /* skip maxDrawCount */ 4640 /* skip stride */ 4641 4642 return cmd_size; 4643} 4644 4645static inline void vn_decode_vkCmdDrawIndexedIndirectCount_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 4646{ 4647 VkCommandTypeEXT command_type; 4648 vn_decode_VkCommandTypeEXT(dec, &command_type); 4649 assert(command_type == VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT); 4650 4651 /* skip commandBuffer */ 4652 /* skip buffer */ 4653 /* skip offset */ 4654 /* skip countBuffer */ 4655 /* skip countBufferOffset */ 4656 /* skip maxDrawCount */ 4657 /* skip stride */ 4658} 4659 4660static inline size_t vn_sizeof_vkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) 4661{ 4662 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT; 4663 const VkFlags cmd_flags = 0; 4664 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4665 4666 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4667 cmd_size += vn_sizeof_uint32_t(&firstBinding); 4668 cmd_size += vn_sizeof_uint32_t(&bindingCount); 4669 if (pBuffers) { 4670 cmd_size += vn_sizeof_array_size(bindingCount); 4671 for (uint32_t i = 0; i < bindingCount; i++) 4672 cmd_size += vn_sizeof_VkBuffer(&pBuffers[i]); 4673 } else { 4674 cmd_size += vn_sizeof_array_size(0); 4675 } 4676 if (pOffsets) { 4677 cmd_size += vn_sizeof_array_size(bindingCount); 4678 cmd_size += vn_sizeof_VkDeviceSize_array(pOffsets, bindingCount); 4679 } else { 4680 cmd_size += vn_sizeof_array_size(0); 4681 } 4682 if (pSizes) { 4683 cmd_size += vn_sizeof_array_size(bindingCount); 4684 cmd_size += vn_sizeof_VkDeviceSize_array(pSizes, bindingCount); 4685 } else { 4686 cmd_size += vn_sizeof_array_size(0); 4687 } 4688 4689 return cmd_size; 4690} 4691 4692static inline void vn_encode_vkCmdBindTransformFeedbackBuffersEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) 4693{ 4694 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT; 4695 4696 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4697 vn_encode_VkFlags(enc, &cmd_flags); 4698 4699 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4700 vn_encode_uint32_t(enc, &firstBinding); 4701 vn_encode_uint32_t(enc, &bindingCount); 4702 if (pBuffers) { 4703 vn_encode_array_size(enc, bindingCount); 4704 for (uint32_t i = 0; i < bindingCount; i++) 4705 vn_encode_VkBuffer(enc, &pBuffers[i]); 4706 } else { 4707 vn_encode_array_size(enc, 0); 4708 } 4709 if (pOffsets) { 4710 vn_encode_array_size(enc, bindingCount); 4711 vn_encode_VkDeviceSize_array(enc, pOffsets, bindingCount); 4712 } else { 4713 vn_encode_array_size(enc, 0); 4714 } 4715 if (pSizes) { 4716 vn_encode_array_size(enc, bindingCount); 4717 vn_encode_VkDeviceSize_array(enc, pSizes, bindingCount); 4718 } else { 4719 vn_encode_array_size(enc, 0); 4720 } 4721} 4722 4723static inline size_t vn_sizeof_vkCmdBindTransformFeedbackBuffersEXT_reply(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) 4724{ 4725 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT; 4726 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4727 4728 /* skip commandBuffer */ 4729 /* skip firstBinding */ 4730 /* skip bindingCount */ 4731 /* skip pBuffers */ 4732 /* skip pOffsets */ 4733 /* skip pSizes */ 4734 4735 return cmd_size; 4736} 4737 4738static inline void vn_decode_vkCmdBindTransformFeedbackBuffersEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) 4739{ 4740 VkCommandTypeEXT command_type; 4741 vn_decode_VkCommandTypeEXT(dec, &command_type); 4742 assert(command_type == VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT); 4743 4744 /* skip commandBuffer */ 4745 /* skip firstBinding */ 4746 /* skip bindingCount */ 4747 /* skip pBuffers */ 4748 /* skip pOffsets */ 4749 /* skip pSizes */ 4750} 4751 4752static inline size_t vn_sizeof_vkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4753{ 4754 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT; 4755 const VkFlags cmd_flags = 0; 4756 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4757 4758 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4759 cmd_size += vn_sizeof_uint32_t(&firstCounterBuffer); 4760 cmd_size += vn_sizeof_uint32_t(&counterBufferCount); 4761 if (pCounterBuffers) { 4762 cmd_size += vn_sizeof_array_size(counterBufferCount); 4763 for (uint32_t i = 0; i < counterBufferCount; i++) 4764 cmd_size += vn_sizeof_VkBuffer(&pCounterBuffers[i]); 4765 } else { 4766 cmd_size += vn_sizeof_array_size(0); 4767 } 4768 if (pCounterBufferOffsets) { 4769 cmd_size += vn_sizeof_array_size(counterBufferCount); 4770 cmd_size += vn_sizeof_VkDeviceSize_array(pCounterBufferOffsets, counterBufferCount); 4771 } else { 4772 cmd_size += vn_sizeof_array_size(0); 4773 } 4774 4775 return cmd_size; 4776} 4777 4778static inline void vn_encode_vkCmdBeginTransformFeedbackEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4779{ 4780 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT; 4781 4782 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4783 vn_encode_VkFlags(enc, &cmd_flags); 4784 4785 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4786 vn_encode_uint32_t(enc, &firstCounterBuffer); 4787 vn_encode_uint32_t(enc, &counterBufferCount); 4788 if (pCounterBuffers) { 4789 vn_encode_array_size(enc, counterBufferCount); 4790 for (uint32_t i = 0; i < counterBufferCount; i++) 4791 vn_encode_VkBuffer(enc, &pCounterBuffers[i]); 4792 } else { 4793 vn_encode_array_size(enc, 0); 4794 } 4795 if (pCounterBufferOffsets) { 4796 vn_encode_array_size(enc, counterBufferCount); 4797 vn_encode_VkDeviceSize_array(enc, pCounterBufferOffsets, counterBufferCount); 4798 } else { 4799 vn_encode_array_size(enc, 0); 4800 } 4801} 4802 4803static inline size_t vn_sizeof_vkCmdBeginTransformFeedbackEXT_reply(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4804{ 4805 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT; 4806 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4807 4808 /* skip commandBuffer */ 4809 /* skip firstCounterBuffer */ 4810 /* skip counterBufferCount */ 4811 /* skip pCounterBuffers */ 4812 /* skip pCounterBufferOffsets */ 4813 4814 return cmd_size; 4815} 4816 4817static inline void vn_decode_vkCmdBeginTransformFeedbackEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4818{ 4819 VkCommandTypeEXT command_type; 4820 vn_decode_VkCommandTypeEXT(dec, &command_type); 4821 assert(command_type == VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT); 4822 4823 /* skip commandBuffer */ 4824 /* skip firstCounterBuffer */ 4825 /* skip counterBufferCount */ 4826 /* skip pCounterBuffers */ 4827 /* skip pCounterBufferOffsets */ 4828} 4829 4830static inline size_t vn_sizeof_vkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4831{ 4832 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT; 4833 const VkFlags cmd_flags = 0; 4834 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4835 4836 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4837 cmd_size += vn_sizeof_uint32_t(&firstCounterBuffer); 4838 cmd_size += vn_sizeof_uint32_t(&counterBufferCount); 4839 if (pCounterBuffers) { 4840 cmd_size += vn_sizeof_array_size(counterBufferCount); 4841 for (uint32_t i = 0; i < counterBufferCount; i++) 4842 cmd_size += vn_sizeof_VkBuffer(&pCounterBuffers[i]); 4843 } else { 4844 cmd_size += vn_sizeof_array_size(0); 4845 } 4846 if (pCounterBufferOffsets) { 4847 cmd_size += vn_sizeof_array_size(counterBufferCount); 4848 cmd_size += vn_sizeof_VkDeviceSize_array(pCounterBufferOffsets, counterBufferCount); 4849 } else { 4850 cmd_size += vn_sizeof_array_size(0); 4851 } 4852 4853 return cmd_size; 4854} 4855 4856static inline void vn_encode_vkCmdEndTransformFeedbackEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4857{ 4858 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT; 4859 4860 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4861 vn_encode_VkFlags(enc, &cmd_flags); 4862 4863 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4864 vn_encode_uint32_t(enc, &firstCounterBuffer); 4865 vn_encode_uint32_t(enc, &counterBufferCount); 4866 if (pCounterBuffers) { 4867 vn_encode_array_size(enc, counterBufferCount); 4868 for (uint32_t i = 0; i < counterBufferCount; i++) 4869 vn_encode_VkBuffer(enc, &pCounterBuffers[i]); 4870 } else { 4871 vn_encode_array_size(enc, 0); 4872 } 4873 if (pCounterBufferOffsets) { 4874 vn_encode_array_size(enc, counterBufferCount); 4875 vn_encode_VkDeviceSize_array(enc, pCounterBufferOffsets, counterBufferCount); 4876 } else { 4877 vn_encode_array_size(enc, 0); 4878 } 4879} 4880 4881static inline size_t vn_sizeof_vkCmdEndTransformFeedbackEXT_reply(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4882{ 4883 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT; 4884 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4885 4886 /* skip commandBuffer */ 4887 /* skip firstCounterBuffer */ 4888 /* skip counterBufferCount */ 4889 /* skip pCounterBuffers */ 4890 /* skip pCounterBufferOffsets */ 4891 4892 return cmd_size; 4893} 4894 4895static inline void vn_decode_vkCmdEndTransformFeedbackEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 4896{ 4897 VkCommandTypeEXT command_type; 4898 vn_decode_VkCommandTypeEXT(dec, &command_type); 4899 assert(command_type == VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT); 4900 4901 /* skip commandBuffer */ 4902 /* skip firstCounterBuffer */ 4903 /* skip counterBufferCount */ 4904 /* skip pCounterBuffers */ 4905 /* skip pCounterBufferOffsets */ 4906} 4907 4908static inline size_t vn_sizeof_vkCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) 4909{ 4910 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT; 4911 const VkFlags cmd_flags = 0; 4912 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4913 4914 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4915 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 4916 cmd_size += vn_sizeof_uint32_t(&query); 4917 cmd_size += vn_sizeof_VkFlags(&flags); 4918 cmd_size += vn_sizeof_uint32_t(&index); 4919 4920 return cmd_size; 4921} 4922 4923static inline void vn_encode_vkCmdBeginQueryIndexedEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) 4924{ 4925 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT; 4926 4927 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4928 vn_encode_VkFlags(enc, &cmd_flags); 4929 4930 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4931 vn_encode_VkQueryPool(enc, &queryPool); 4932 vn_encode_uint32_t(enc, &query); 4933 vn_encode_VkFlags(enc, &flags); 4934 vn_encode_uint32_t(enc, &index); 4935} 4936 4937static inline size_t vn_sizeof_vkCmdBeginQueryIndexedEXT_reply(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) 4938{ 4939 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT; 4940 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4941 4942 /* skip commandBuffer */ 4943 /* skip queryPool */ 4944 /* skip query */ 4945 /* skip flags */ 4946 /* skip index */ 4947 4948 return cmd_size; 4949} 4950 4951static inline void vn_decode_vkCmdBeginQueryIndexedEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) 4952{ 4953 VkCommandTypeEXT command_type; 4954 vn_decode_VkCommandTypeEXT(dec, &command_type); 4955 assert(command_type == VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT); 4956 4957 /* skip commandBuffer */ 4958 /* skip queryPool */ 4959 /* skip query */ 4960 /* skip flags */ 4961 /* skip index */ 4962} 4963 4964static inline size_t vn_sizeof_vkCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) 4965{ 4966 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT; 4967 const VkFlags cmd_flags = 0; 4968 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 4969 4970 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 4971 cmd_size += vn_sizeof_VkQueryPool(&queryPool); 4972 cmd_size += vn_sizeof_uint32_t(&query); 4973 cmd_size += vn_sizeof_uint32_t(&index); 4974 4975 return cmd_size; 4976} 4977 4978static inline void vn_encode_vkCmdEndQueryIndexedEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) 4979{ 4980 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT; 4981 4982 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 4983 vn_encode_VkFlags(enc, &cmd_flags); 4984 4985 vn_encode_VkCommandBuffer(enc, &commandBuffer); 4986 vn_encode_VkQueryPool(enc, &queryPool); 4987 vn_encode_uint32_t(enc, &query); 4988 vn_encode_uint32_t(enc, &index); 4989} 4990 4991static inline size_t vn_sizeof_vkCmdEndQueryIndexedEXT_reply(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) 4992{ 4993 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT; 4994 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 4995 4996 /* skip commandBuffer */ 4997 /* skip queryPool */ 4998 /* skip query */ 4999 /* skip index */ 5000 5001 return cmd_size; 5002} 5003 5004static inline void vn_decode_vkCmdEndQueryIndexedEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) 5005{ 5006 VkCommandTypeEXT command_type; 5007 vn_decode_VkCommandTypeEXT(dec, &command_type); 5008 assert(command_type == VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT); 5009 5010 /* skip commandBuffer */ 5011 /* skip queryPool */ 5012 /* skip query */ 5013 /* skip index */ 5014} 5015 5016static inline size_t vn_sizeof_vkCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) 5017{ 5018 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT; 5019 const VkFlags cmd_flags = 0; 5020 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type) + vn_sizeof_VkFlags(&cmd_flags); 5021 5022 cmd_size += vn_sizeof_VkCommandBuffer(&commandBuffer); 5023 cmd_size += vn_sizeof_uint32_t(&instanceCount); 5024 cmd_size += vn_sizeof_uint32_t(&firstInstance); 5025 cmd_size += vn_sizeof_VkBuffer(&counterBuffer); 5026 cmd_size += vn_sizeof_VkDeviceSize(&counterBufferOffset); 5027 cmd_size += vn_sizeof_uint32_t(&counterOffset); 5028 cmd_size += vn_sizeof_uint32_t(&vertexStride); 5029 5030 return cmd_size; 5031} 5032 5033static inline void vn_encode_vkCmdDrawIndirectByteCountEXT(struct vn_cs_encoder *enc, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) 5034{ 5035 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT; 5036 5037 vn_encode_VkCommandTypeEXT(enc, &cmd_type); 5038 vn_encode_VkFlags(enc, &cmd_flags); 5039 5040 vn_encode_VkCommandBuffer(enc, &commandBuffer); 5041 vn_encode_uint32_t(enc, &instanceCount); 5042 vn_encode_uint32_t(enc, &firstInstance); 5043 vn_encode_VkBuffer(enc, &counterBuffer); 5044 vn_encode_VkDeviceSize(enc, &counterBufferOffset); 5045 vn_encode_uint32_t(enc, &counterOffset); 5046 vn_encode_uint32_t(enc, &vertexStride); 5047} 5048 5049static inline size_t vn_sizeof_vkCmdDrawIndirectByteCountEXT_reply(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) 5050{ 5051 const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT; 5052 size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); 5053 5054 /* skip commandBuffer */ 5055 /* skip instanceCount */ 5056 /* skip firstInstance */ 5057 /* skip counterBuffer */ 5058 /* skip counterBufferOffset */ 5059 /* skip counterOffset */ 5060 /* skip vertexStride */ 5061 5062 return cmd_size; 5063} 5064 5065static inline void vn_decode_vkCmdDrawIndirectByteCountEXT_reply(struct vn_cs_decoder *dec, VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) 5066{ 5067 VkCommandTypeEXT command_type; 5068 vn_decode_VkCommandTypeEXT(dec, &command_type); 5069 assert(command_type == VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT); 5070 5071 /* skip commandBuffer */ 5072 /* skip instanceCount */ 5073 /* skip firstInstance */ 5074 /* skip counterBuffer */ 5075 /* skip counterBufferOffset */ 5076 /* skip counterOffset */ 5077 /* skip vertexStride */ 5078} 5079 5080static inline void vn_submit_vkAllocateCommandBuffers(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers, struct vn_instance_submit_command *submit) 5081{ 5082 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5083 void *cmd_data = local_cmd_data; 5084 size_t cmd_size = vn_sizeof_vkAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); 5085 if (cmd_size > sizeof(local_cmd_data)) { 5086 cmd_data = malloc(cmd_size); 5087 if (!cmd_data) 5088 cmd_size = 0; 5089 } 5090 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkAllocateCommandBuffers_reply(device, pAllocateInfo, pCommandBuffers) : 0; 5091 5092 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5093 if (cmd_size) { 5094 vn_encode_vkAllocateCommandBuffers(enc, cmd_flags, device, pAllocateInfo, pCommandBuffers); 5095 vn_instance_submit_command(vn_instance, submit); 5096 if (cmd_data != local_cmd_data) 5097 free(cmd_data); 5098 } 5099} 5100 5101static inline void vn_submit_vkFreeCommandBuffers(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, struct vn_instance_submit_command *submit) 5102{ 5103 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5104 void *cmd_data = local_cmd_data; 5105 size_t cmd_size = vn_sizeof_vkFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); 5106 if (cmd_size > sizeof(local_cmd_data)) { 5107 cmd_data = malloc(cmd_size); 5108 if (!cmd_data) 5109 cmd_size = 0; 5110 } 5111 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkFreeCommandBuffers_reply(device, commandPool, commandBufferCount, pCommandBuffers) : 0; 5112 5113 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5114 if (cmd_size) { 5115 vn_encode_vkFreeCommandBuffers(enc, cmd_flags, device, commandPool, commandBufferCount, pCommandBuffers); 5116 vn_instance_submit_command(vn_instance, submit); 5117 if (cmd_data != local_cmd_data) 5118 free(cmd_data); 5119 } 5120} 5121 5122static inline void vn_submit_vkBeginCommandBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, struct vn_instance_submit_command *submit) 5123{ 5124 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5125 void *cmd_data = local_cmd_data; 5126 size_t cmd_size = vn_sizeof_vkBeginCommandBuffer(commandBuffer, pBeginInfo); 5127 if (cmd_size > sizeof(local_cmd_data)) { 5128 cmd_data = malloc(cmd_size); 5129 if (!cmd_data) 5130 cmd_size = 0; 5131 } 5132 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkBeginCommandBuffer_reply(commandBuffer, pBeginInfo) : 0; 5133 5134 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5135 if (cmd_size) { 5136 vn_encode_vkBeginCommandBuffer(enc, cmd_flags, commandBuffer, pBeginInfo); 5137 vn_instance_submit_command(vn_instance, submit); 5138 if (cmd_data != local_cmd_data) 5139 free(cmd_data); 5140 } 5141} 5142 5143static inline void vn_submit_vkEndCommandBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, struct vn_instance_submit_command *submit) 5144{ 5145 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5146 void *cmd_data = local_cmd_data; 5147 size_t cmd_size = vn_sizeof_vkEndCommandBuffer(commandBuffer); 5148 if (cmd_size > sizeof(local_cmd_data)) { 5149 cmd_data = malloc(cmd_size); 5150 if (!cmd_data) 5151 cmd_size = 0; 5152 } 5153 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkEndCommandBuffer_reply(commandBuffer) : 0; 5154 5155 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5156 if (cmd_size) { 5157 vn_encode_vkEndCommandBuffer(enc, cmd_flags, commandBuffer); 5158 vn_instance_submit_command(vn_instance, submit); 5159 if (cmd_data != local_cmd_data) 5160 free(cmd_data); 5161 } 5162} 5163 5164static inline void vn_submit_vkResetCommandBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, struct vn_instance_submit_command *submit) 5165{ 5166 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5167 void *cmd_data = local_cmd_data; 5168 size_t cmd_size = vn_sizeof_vkResetCommandBuffer(commandBuffer, flags); 5169 if (cmd_size > sizeof(local_cmd_data)) { 5170 cmd_data = malloc(cmd_size); 5171 if (!cmd_data) 5172 cmd_size = 0; 5173 } 5174 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkResetCommandBuffer_reply(commandBuffer, flags) : 0; 5175 5176 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5177 if (cmd_size) { 5178 vn_encode_vkResetCommandBuffer(enc, cmd_flags, commandBuffer, flags); 5179 vn_instance_submit_command(vn_instance, submit); 5180 if (cmd_data != local_cmd_data) 5181 free(cmd_data); 5182 } 5183} 5184 5185static inline void vn_submit_vkCmdBindPipeline(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, struct vn_instance_submit_command *submit) 5186{ 5187 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5188 void *cmd_data = local_cmd_data; 5189 size_t cmd_size = vn_sizeof_vkCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); 5190 if (cmd_size > sizeof(local_cmd_data)) { 5191 cmd_data = malloc(cmd_size); 5192 if (!cmd_data) 5193 cmd_size = 0; 5194 } 5195 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBindPipeline_reply(commandBuffer, pipelineBindPoint, pipeline) : 0; 5196 5197 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5198 if (cmd_size) { 5199 vn_encode_vkCmdBindPipeline(enc, cmd_flags, commandBuffer, pipelineBindPoint, pipeline); 5200 vn_instance_submit_command(vn_instance, submit); 5201 if (cmd_data != local_cmd_data) 5202 free(cmd_data); 5203 } 5204} 5205 5206static inline void vn_submit_vkCmdSetViewport(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports, struct vn_instance_submit_command *submit) 5207{ 5208 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5209 void *cmd_data = local_cmd_data; 5210 size_t cmd_size = vn_sizeof_vkCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); 5211 if (cmd_size > sizeof(local_cmd_data)) { 5212 cmd_data = malloc(cmd_size); 5213 if (!cmd_data) 5214 cmd_size = 0; 5215 } 5216 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetViewport_reply(commandBuffer, firstViewport, viewportCount, pViewports) : 0; 5217 5218 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5219 if (cmd_size) { 5220 vn_encode_vkCmdSetViewport(enc, cmd_flags, commandBuffer, firstViewport, viewportCount, pViewports); 5221 vn_instance_submit_command(vn_instance, submit); 5222 if (cmd_data != local_cmd_data) 5223 free(cmd_data); 5224 } 5225} 5226 5227static inline void vn_submit_vkCmdSetScissor(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors, struct vn_instance_submit_command *submit) 5228{ 5229 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5230 void *cmd_data = local_cmd_data; 5231 size_t cmd_size = vn_sizeof_vkCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); 5232 if (cmd_size > sizeof(local_cmd_data)) { 5233 cmd_data = malloc(cmd_size); 5234 if (!cmd_data) 5235 cmd_size = 0; 5236 } 5237 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetScissor_reply(commandBuffer, firstScissor, scissorCount, pScissors) : 0; 5238 5239 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5240 if (cmd_size) { 5241 vn_encode_vkCmdSetScissor(enc, cmd_flags, commandBuffer, firstScissor, scissorCount, pScissors); 5242 vn_instance_submit_command(vn_instance, submit); 5243 if (cmd_data != local_cmd_data) 5244 free(cmd_data); 5245 } 5246} 5247 5248static inline void vn_submit_vkCmdSetLineWidth(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, float lineWidth, struct vn_instance_submit_command *submit) 5249{ 5250 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5251 void *cmd_data = local_cmd_data; 5252 size_t cmd_size = vn_sizeof_vkCmdSetLineWidth(commandBuffer, lineWidth); 5253 if (cmd_size > sizeof(local_cmd_data)) { 5254 cmd_data = malloc(cmd_size); 5255 if (!cmd_data) 5256 cmd_size = 0; 5257 } 5258 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetLineWidth_reply(commandBuffer, lineWidth) : 0; 5259 5260 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5261 if (cmd_size) { 5262 vn_encode_vkCmdSetLineWidth(enc, cmd_flags, commandBuffer, lineWidth); 5263 vn_instance_submit_command(vn_instance, submit); 5264 if (cmd_data != local_cmd_data) 5265 free(cmd_data); 5266 } 5267} 5268 5269static inline void vn_submit_vkCmdSetDepthBias(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, struct vn_instance_submit_command *submit) 5270{ 5271 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5272 void *cmd_data = local_cmd_data; 5273 size_t cmd_size = vn_sizeof_vkCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); 5274 if (cmd_size > sizeof(local_cmd_data)) { 5275 cmd_data = malloc(cmd_size); 5276 if (!cmd_data) 5277 cmd_size = 0; 5278 } 5279 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetDepthBias_reply(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor) : 0; 5280 5281 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5282 if (cmd_size) { 5283 vn_encode_vkCmdSetDepthBias(enc, cmd_flags, commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); 5284 vn_instance_submit_command(vn_instance, submit); 5285 if (cmd_data != local_cmd_data) 5286 free(cmd_data); 5287 } 5288} 5289 5290static inline void vn_submit_vkCmdSetBlendConstants(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const float blendConstants[4], struct vn_instance_submit_command *submit) 5291{ 5292 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5293 void *cmd_data = local_cmd_data; 5294 size_t cmd_size = vn_sizeof_vkCmdSetBlendConstants(commandBuffer, blendConstants); 5295 if (cmd_size > sizeof(local_cmd_data)) { 5296 cmd_data = malloc(cmd_size); 5297 if (!cmd_data) 5298 cmd_size = 0; 5299 } 5300 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetBlendConstants_reply(commandBuffer, blendConstants) : 0; 5301 5302 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5303 if (cmd_size) { 5304 vn_encode_vkCmdSetBlendConstants(enc, cmd_flags, commandBuffer, blendConstants); 5305 vn_instance_submit_command(vn_instance, submit); 5306 if (cmd_data != local_cmd_data) 5307 free(cmd_data); 5308 } 5309} 5310 5311static inline void vn_submit_vkCmdSetDepthBounds(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, struct vn_instance_submit_command *submit) 5312{ 5313 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5314 void *cmd_data = local_cmd_data; 5315 size_t cmd_size = vn_sizeof_vkCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); 5316 if (cmd_size > sizeof(local_cmd_data)) { 5317 cmd_data = malloc(cmd_size); 5318 if (!cmd_data) 5319 cmd_size = 0; 5320 } 5321 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetDepthBounds_reply(commandBuffer, minDepthBounds, maxDepthBounds) : 0; 5322 5323 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5324 if (cmd_size) { 5325 vn_encode_vkCmdSetDepthBounds(enc, cmd_flags, commandBuffer, minDepthBounds, maxDepthBounds); 5326 vn_instance_submit_command(vn_instance, submit); 5327 if (cmd_data != local_cmd_data) 5328 free(cmd_data); 5329 } 5330} 5331 5332static inline void vn_submit_vkCmdSetStencilCompareMask(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask, struct vn_instance_submit_command *submit) 5333{ 5334 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5335 void *cmd_data = local_cmd_data; 5336 size_t cmd_size = vn_sizeof_vkCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); 5337 if (cmd_size > sizeof(local_cmd_data)) { 5338 cmd_data = malloc(cmd_size); 5339 if (!cmd_data) 5340 cmd_size = 0; 5341 } 5342 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetStencilCompareMask_reply(commandBuffer, faceMask, compareMask) : 0; 5343 5344 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5345 if (cmd_size) { 5346 vn_encode_vkCmdSetStencilCompareMask(enc, cmd_flags, commandBuffer, faceMask, compareMask); 5347 vn_instance_submit_command(vn_instance, submit); 5348 if (cmd_data != local_cmd_data) 5349 free(cmd_data); 5350 } 5351} 5352 5353static inline void vn_submit_vkCmdSetStencilWriteMask(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, struct vn_instance_submit_command *submit) 5354{ 5355 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5356 void *cmd_data = local_cmd_data; 5357 size_t cmd_size = vn_sizeof_vkCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); 5358 if (cmd_size > sizeof(local_cmd_data)) { 5359 cmd_data = malloc(cmd_size); 5360 if (!cmd_data) 5361 cmd_size = 0; 5362 } 5363 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetStencilWriteMask_reply(commandBuffer, faceMask, writeMask) : 0; 5364 5365 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5366 if (cmd_size) { 5367 vn_encode_vkCmdSetStencilWriteMask(enc, cmd_flags, commandBuffer, faceMask, writeMask); 5368 vn_instance_submit_command(vn_instance, submit); 5369 if (cmd_data != local_cmd_data) 5370 free(cmd_data); 5371 } 5372} 5373 5374static inline void vn_submit_vkCmdSetStencilReference(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, struct vn_instance_submit_command *submit) 5375{ 5376 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5377 void *cmd_data = local_cmd_data; 5378 size_t cmd_size = vn_sizeof_vkCmdSetStencilReference(commandBuffer, faceMask, reference); 5379 if (cmd_size > sizeof(local_cmd_data)) { 5380 cmd_data = malloc(cmd_size); 5381 if (!cmd_data) 5382 cmd_size = 0; 5383 } 5384 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetStencilReference_reply(commandBuffer, faceMask, reference) : 0; 5385 5386 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5387 if (cmd_size) { 5388 vn_encode_vkCmdSetStencilReference(enc, cmd_flags, commandBuffer, faceMask, reference); 5389 vn_instance_submit_command(vn_instance, submit); 5390 if (cmd_data != local_cmd_data) 5391 free(cmd_data); 5392 } 5393} 5394 5395static inline void vn_submit_vkCmdBindDescriptorSets(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, struct vn_instance_submit_command *submit) 5396{ 5397 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5398 void *cmd_data = local_cmd_data; 5399 size_t cmd_size = vn_sizeof_vkCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); 5400 if (cmd_size > sizeof(local_cmd_data)) { 5401 cmd_data = malloc(cmd_size); 5402 if (!cmd_data) 5403 cmd_size = 0; 5404 } 5405 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBindDescriptorSets_reply(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets) : 0; 5406 5407 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5408 if (cmd_size) { 5409 vn_encode_vkCmdBindDescriptorSets(enc, cmd_flags, commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); 5410 vn_instance_submit_command(vn_instance, submit); 5411 if (cmd_data != local_cmd_data) 5412 free(cmd_data); 5413 } 5414} 5415 5416static inline void vn_submit_vkCmdBindIndexBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType, struct vn_instance_submit_command *submit) 5417{ 5418 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5419 void *cmd_data = local_cmd_data; 5420 size_t cmd_size = vn_sizeof_vkCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); 5421 if (cmd_size > sizeof(local_cmd_data)) { 5422 cmd_data = malloc(cmd_size); 5423 if (!cmd_data) 5424 cmd_size = 0; 5425 } 5426 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBindIndexBuffer_reply(commandBuffer, buffer, offset, indexType) : 0; 5427 5428 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5429 if (cmd_size) { 5430 vn_encode_vkCmdBindIndexBuffer(enc, cmd_flags, commandBuffer, buffer, offset, indexType); 5431 vn_instance_submit_command(vn_instance, submit); 5432 if (cmd_data != local_cmd_data) 5433 free(cmd_data); 5434 } 5435} 5436 5437static inline void vn_submit_vkCmdBindVertexBuffers(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, struct vn_instance_submit_command *submit) 5438{ 5439 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5440 void *cmd_data = local_cmd_data; 5441 size_t cmd_size = vn_sizeof_vkCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); 5442 if (cmd_size > sizeof(local_cmd_data)) { 5443 cmd_data = malloc(cmd_size); 5444 if (!cmd_data) 5445 cmd_size = 0; 5446 } 5447 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBindVertexBuffers_reply(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets) : 0; 5448 5449 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5450 if (cmd_size) { 5451 vn_encode_vkCmdBindVertexBuffers(enc, cmd_flags, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); 5452 vn_instance_submit_command(vn_instance, submit); 5453 if (cmd_data != local_cmd_data) 5454 free(cmd_data); 5455 } 5456} 5457 5458static inline void vn_submit_vkCmdDraw(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, struct vn_instance_submit_command *submit) 5459{ 5460 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5461 void *cmd_data = local_cmd_data; 5462 size_t cmd_size = vn_sizeof_vkCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); 5463 if (cmd_size > sizeof(local_cmd_data)) { 5464 cmd_data = malloc(cmd_size); 5465 if (!cmd_data) 5466 cmd_size = 0; 5467 } 5468 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDraw_reply(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance) : 0; 5469 5470 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5471 if (cmd_size) { 5472 vn_encode_vkCmdDraw(enc, cmd_flags, commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); 5473 vn_instance_submit_command(vn_instance, submit); 5474 if (cmd_data != local_cmd_data) 5475 free(cmd_data); 5476 } 5477} 5478 5479static inline void vn_submit_vkCmdDrawIndexed(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, struct vn_instance_submit_command *submit) 5480{ 5481 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5482 void *cmd_data = local_cmd_data; 5483 size_t cmd_size = vn_sizeof_vkCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); 5484 if (cmd_size > sizeof(local_cmd_data)) { 5485 cmd_data = malloc(cmd_size); 5486 if (!cmd_data) 5487 cmd_size = 0; 5488 } 5489 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDrawIndexed_reply(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance) : 0; 5490 5491 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5492 if (cmd_size) { 5493 vn_encode_vkCmdDrawIndexed(enc, cmd_flags, commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); 5494 vn_instance_submit_command(vn_instance, submit); 5495 if (cmd_data != local_cmd_data) 5496 free(cmd_data); 5497 } 5498} 5499 5500static inline void vn_submit_vkCmdDrawIndirect(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, struct vn_instance_submit_command *submit) 5501{ 5502 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5503 void *cmd_data = local_cmd_data; 5504 size_t cmd_size = vn_sizeof_vkCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); 5505 if (cmd_size > sizeof(local_cmd_data)) { 5506 cmd_data = malloc(cmd_size); 5507 if (!cmd_data) 5508 cmd_size = 0; 5509 } 5510 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDrawIndirect_reply(commandBuffer, buffer, offset, drawCount, stride) : 0; 5511 5512 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5513 if (cmd_size) { 5514 vn_encode_vkCmdDrawIndirect(enc, cmd_flags, commandBuffer, buffer, offset, drawCount, stride); 5515 vn_instance_submit_command(vn_instance, submit); 5516 if (cmd_data != local_cmd_data) 5517 free(cmd_data); 5518 } 5519} 5520 5521static inline void vn_submit_vkCmdDrawIndexedIndirect(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, struct vn_instance_submit_command *submit) 5522{ 5523 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5524 void *cmd_data = local_cmd_data; 5525 size_t cmd_size = vn_sizeof_vkCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); 5526 if (cmd_size > sizeof(local_cmd_data)) { 5527 cmd_data = malloc(cmd_size); 5528 if (!cmd_data) 5529 cmd_size = 0; 5530 } 5531 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDrawIndexedIndirect_reply(commandBuffer, buffer, offset, drawCount, stride) : 0; 5532 5533 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5534 if (cmd_size) { 5535 vn_encode_vkCmdDrawIndexedIndirect(enc, cmd_flags, commandBuffer, buffer, offset, drawCount, stride); 5536 vn_instance_submit_command(vn_instance, submit); 5537 if (cmd_data != local_cmd_data) 5538 free(cmd_data); 5539 } 5540} 5541 5542static inline void vn_submit_vkCmdDispatch(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, struct vn_instance_submit_command *submit) 5543{ 5544 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5545 void *cmd_data = local_cmd_data; 5546 size_t cmd_size = vn_sizeof_vkCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); 5547 if (cmd_size > sizeof(local_cmd_data)) { 5548 cmd_data = malloc(cmd_size); 5549 if (!cmd_data) 5550 cmd_size = 0; 5551 } 5552 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDispatch_reply(commandBuffer, groupCountX, groupCountY, groupCountZ) : 0; 5553 5554 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5555 if (cmd_size) { 5556 vn_encode_vkCmdDispatch(enc, cmd_flags, commandBuffer, groupCountX, groupCountY, groupCountZ); 5557 vn_instance_submit_command(vn_instance, submit); 5558 if (cmd_data != local_cmd_data) 5559 free(cmd_data); 5560 } 5561} 5562 5563static inline void vn_submit_vkCmdDispatchIndirect(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, struct vn_instance_submit_command *submit) 5564{ 5565 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5566 void *cmd_data = local_cmd_data; 5567 size_t cmd_size = vn_sizeof_vkCmdDispatchIndirect(commandBuffer, buffer, offset); 5568 if (cmd_size > sizeof(local_cmd_data)) { 5569 cmd_data = malloc(cmd_size); 5570 if (!cmd_data) 5571 cmd_size = 0; 5572 } 5573 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDispatchIndirect_reply(commandBuffer, buffer, offset) : 0; 5574 5575 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5576 if (cmd_size) { 5577 vn_encode_vkCmdDispatchIndirect(enc, cmd_flags, commandBuffer, buffer, offset); 5578 vn_instance_submit_command(vn_instance, submit); 5579 if (cmd_data != local_cmd_data) 5580 free(cmd_data); 5581 } 5582} 5583 5584static inline void vn_submit_vkCmdCopyBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions, struct vn_instance_submit_command *submit) 5585{ 5586 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5587 void *cmd_data = local_cmd_data; 5588 size_t cmd_size = vn_sizeof_vkCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); 5589 if (cmd_size > sizeof(local_cmd_data)) { 5590 cmd_data = malloc(cmd_size); 5591 if (!cmd_data) 5592 cmd_size = 0; 5593 } 5594 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdCopyBuffer_reply(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions) : 0; 5595 5596 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5597 if (cmd_size) { 5598 vn_encode_vkCmdCopyBuffer(enc, cmd_flags, commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); 5599 vn_instance_submit_command(vn_instance, submit); 5600 if (cmd_data != local_cmd_data) 5601 free(cmd_data); 5602 } 5603} 5604 5605static inline void vn_submit_vkCmdCopyImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions, struct vn_instance_submit_command *submit) 5606{ 5607 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5608 void *cmd_data = local_cmd_data; 5609 size_t cmd_size = vn_sizeof_vkCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); 5610 if (cmd_size > sizeof(local_cmd_data)) { 5611 cmd_data = malloc(cmd_size); 5612 if (!cmd_data) 5613 cmd_size = 0; 5614 } 5615 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdCopyImage_reply(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions) : 0; 5616 5617 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5618 if (cmd_size) { 5619 vn_encode_vkCmdCopyImage(enc, cmd_flags, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); 5620 vn_instance_submit_command(vn_instance, submit); 5621 if (cmd_data != local_cmd_data) 5622 free(cmd_data); 5623 } 5624} 5625 5626static inline void vn_submit_vkCmdBlitImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter, struct vn_instance_submit_command *submit) 5627{ 5628 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5629 void *cmd_data = local_cmd_data; 5630 size_t cmd_size = vn_sizeof_vkCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); 5631 if (cmd_size > sizeof(local_cmd_data)) { 5632 cmd_data = malloc(cmd_size); 5633 if (!cmd_data) 5634 cmd_size = 0; 5635 } 5636 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBlitImage_reply(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter) : 0; 5637 5638 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5639 if (cmd_size) { 5640 vn_encode_vkCmdBlitImage(enc, cmd_flags, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); 5641 vn_instance_submit_command(vn_instance, submit); 5642 if (cmd_data != local_cmd_data) 5643 free(cmd_data); 5644 } 5645} 5646 5647static inline void vn_submit_vkCmdCopyBufferToImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions, struct vn_instance_submit_command *submit) 5648{ 5649 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5650 void *cmd_data = local_cmd_data; 5651 size_t cmd_size = vn_sizeof_vkCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); 5652 if (cmd_size > sizeof(local_cmd_data)) { 5653 cmd_data = malloc(cmd_size); 5654 if (!cmd_data) 5655 cmd_size = 0; 5656 } 5657 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdCopyBufferToImage_reply(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions) : 0; 5658 5659 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5660 if (cmd_size) { 5661 vn_encode_vkCmdCopyBufferToImage(enc, cmd_flags, commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); 5662 vn_instance_submit_command(vn_instance, submit); 5663 if (cmd_data != local_cmd_data) 5664 free(cmd_data); 5665 } 5666} 5667 5668static inline void vn_submit_vkCmdCopyImageToBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, struct vn_instance_submit_command *submit) 5669{ 5670 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5671 void *cmd_data = local_cmd_data; 5672 size_t cmd_size = vn_sizeof_vkCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); 5673 if (cmd_size > sizeof(local_cmd_data)) { 5674 cmd_data = malloc(cmd_size); 5675 if (!cmd_data) 5676 cmd_size = 0; 5677 } 5678 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdCopyImageToBuffer_reply(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions) : 0; 5679 5680 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5681 if (cmd_size) { 5682 vn_encode_vkCmdCopyImageToBuffer(enc, cmd_flags, commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); 5683 vn_instance_submit_command(vn_instance, submit); 5684 if (cmd_data != local_cmd_data) 5685 free(cmd_data); 5686 } 5687} 5688 5689static inline void vn_submit_vkCmdUpdateBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData, struct vn_instance_submit_command *submit) 5690{ 5691 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5692 void *cmd_data = local_cmd_data; 5693 size_t cmd_size = vn_sizeof_vkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); 5694 if (cmd_size > sizeof(local_cmd_data)) { 5695 cmd_data = malloc(cmd_size); 5696 if (!cmd_data) 5697 cmd_size = 0; 5698 } 5699 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdUpdateBuffer_reply(commandBuffer, dstBuffer, dstOffset, dataSize, pData) : 0; 5700 5701 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5702 if (cmd_size) { 5703 vn_encode_vkCmdUpdateBuffer(enc, cmd_flags, commandBuffer, dstBuffer, dstOffset, dataSize, pData); 5704 vn_instance_submit_command(vn_instance, submit); 5705 if (cmd_data != local_cmd_data) 5706 free(cmd_data); 5707 } 5708} 5709 5710static inline void vn_submit_vkCmdFillBuffer(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data, struct vn_instance_submit_command *submit) 5711{ 5712 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5713 void *cmd_data = local_cmd_data; 5714 size_t cmd_size = vn_sizeof_vkCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); 5715 if (cmd_size > sizeof(local_cmd_data)) { 5716 cmd_data = malloc(cmd_size); 5717 if (!cmd_data) 5718 cmd_size = 0; 5719 } 5720 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdFillBuffer_reply(commandBuffer, dstBuffer, dstOffset, size, data) : 0; 5721 5722 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5723 if (cmd_size) { 5724 vn_encode_vkCmdFillBuffer(enc, cmd_flags, commandBuffer, dstBuffer, dstOffset, size, data); 5725 vn_instance_submit_command(vn_instance, submit); 5726 if (cmd_data != local_cmd_data) 5727 free(cmd_data); 5728 } 5729} 5730 5731static inline void vn_submit_vkCmdClearColorImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, struct vn_instance_submit_command *submit) 5732{ 5733 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5734 void *cmd_data = local_cmd_data; 5735 size_t cmd_size = vn_sizeof_vkCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); 5736 if (cmd_size > sizeof(local_cmd_data)) { 5737 cmd_data = malloc(cmd_size); 5738 if (!cmd_data) 5739 cmd_size = 0; 5740 } 5741 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdClearColorImage_reply(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges) : 0; 5742 5743 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5744 if (cmd_size) { 5745 vn_encode_vkCmdClearColorImage(enc, cmd_flags, commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); 5746 vn_instance_submit_command(vn_instance, submit); 5747 if (cmd_data != local_cmd_data) 5748 free(cmd_data); 5749 } 5750} 5751 5752static inline void vn_submit_vkCmdClearDepthStencilImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, struct vn_instance_submit_command *submit) 5753{ 5754 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5755 void *cmd_data = local_cmd_data; 5756 size_t cmd_size = vn_sizeof_vkCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); 5757 if (cmd_size > sizeof(local_cmd_data)) { 5758 cmd_data = malloc(cmd_size); 5759 if (!cmd_data) 5760 cmd_size = 0; 5761 } 5762 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdClearDepthStencilImage_reply(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges) : 0; 5763 5764 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5765 if (cmd_size) { 5766 vn_encode_vkCmdClearDepthStencilImage(enc, cmd_flags, commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); 5767 vn_instance_submit_command(vn_instance, submit); 5768 if (cmd_data != local_cmd_data) 5769 free(cmd_data); 5770 } 5771} 5772 5773static inline void vn_submit_vkCmdClearAttachments(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects, struct vn_instance_submit_command *submit) 5774{ 5775 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5776 void *cmd_data = local_cmd_data; 5777 size_t cmd_size = vn_sizeof_vkCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); 5778 if (cmd_size > sizeof(local_cmd_data)) { 5779 cmd_data = malloc(cmd_size); 5780 if (!cmd_data) 5781 cmd_size = 0; 5782 } 5783 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdClearAttachments_reply(commandBuffer, attachmentCount, pAttachments, rectCount, pRects) : 0; 5784 5785 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5786 if (cmd_size) { 5787 vn_encode_vkCmdClearAttachments(enc, cmd_flags, commandBuffer, attachmentCount, pAttachments, rectCount, pRects); 5788 vn_instance_submit_command(vn_instance, submit); 5789 if (cmd_data != local_cmd_data) 5790 free(cmd_data); 5791 } 5792} 5793 5794static inline void vn_submit_vkCmdResolveImage(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions, struct vn_instance_submit_command *submit) 5795{ 5796 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5797 void *cmd_data = local_cmd_data; 5798 size_t cmd_size = vn_sizeof_vkCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); 5799 if (cmd_size > sizeof(local_cmd_data)) { 5800 cmd_data = malloc(cmd_size); 5801 if (!cmd_data) 5802 cmd_size = 0; 5803 } 5804 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdResolveImage_reply(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions) : 0; 5805 5806 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5807 if (cmd_size) { 5808 vn_encode_vkCmdResolveImage(enc, cmd_flags, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); 5809 vn_instance_submit_command(vn_instance, submit); 5810 if (cmd_data != local_cmd_data) 5811 free(cmd_data); 5812 } 5813} 5814 5815static inline void vn_submit_vkCmdSetEvent(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, struct vn_instance_submit_command *submit) 5816{ 5817 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5818 void *cmd_data = local_cmd_data; 5819 size_t cmd_size = vn_sizeof_vkCmdSetEvent(commandBuffer, event, stageMask); 5820 if (cmd_size > sizeof(local_cmd_data)) { 5821 cmd_data = malloc(cmd_size); 5822 if (!cmd_data) 5823 cmd_size = 0; 5824 } 5825 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetEvent_reply(commandBuffer, event, stageMask) : 0; 5826 5827 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5828 if (cmd_size) { 5829 vn_encode_vkCmdSetEvent(enc, cmd_flags, commandBuffer, event, stageMask); 5830 vn_instance_submit_command(vn_instance, submit); 5831 if (cmd_data != local_cmd_data) 5832 free(cmd_data); 5833 } 5834} 5835 5836static inline void vn_submit_vkCmdResetEvent(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, struct vn_instance_submit_command *submit) 5837{ 5838 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5839 void *cmd_data = local_cmd_data; 5840 size_t cmd_size = vn_sizeof_vkCmdResetEvent(commandBuffer, event, stageMask); 5841 if (cmd_size > sizeof(local_cmd_data)) { 5842 cmd_data = malloc(cmd_size); 5843 if (!cmd_data) 5844 cmd_size = 0; 5845 } 5846 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdResetEvent_reply(commandBuffer, event, stageMask) : 0; 5847 5848 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5849 if (cmd_size) { 5850 vn_encode_vkCmdResetEvent(enc, cmd_flags, commandBuffer, event, stageMask); 5851 vn_instance_submit_command(vn_instance, submit); 5852 if (cmd_data != local_cmd_data) 5853 free(cmd_data); 5854 } 5855} 5856 5857static inline void vn_submit_vkCmdWaitEvents(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers, struct vn_instance_submit_command *submit) 5858{ 5859 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5860 void *cmd_data = local_cmd_data; 5861 size_t cmd_size = vn_sizeof_vkCmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); 5862 if (cmd_size > sizeof(local_cmd_data)) { 5863 cmd_data = malloc(cmd_size); 5864 if (!cmd_data) 5865 cmd_size = 0; 5866 } 5867 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdWaitEvents_reply(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers) : 0; 5868 5869 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5870 if (cmd_size) { 5871 vn_encode_vkCmdWaitEvents(enc, cmd_flags, commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); 5872 vn_instance_submit_command(vn_instance, submit); 5873 if (cmd_data != local_cmd_data) 5874 free(cmd_data); 5875 } 5876} 5877 5878static inline void vn_submit_vkCmdPipelineBarrier(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers, struct vn_instance_submit_command *submit) 5879{ 5880 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5881 void *cmd_data = local_cmd_data; 5882 size_t cmd_size = vn_sizeof_vkCmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); 5883 if (cmd_size > sizeof(local_cmd_data)) { 5884 cmd_data = malloc(cmd_size); 5885 if (!cmd_data) 5886 cmd_size = 0; 5887 } 5888 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdPipelineBarrier_reply(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers) : 0; 5889 5890 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5891 if (cmd_size) { 5892 vn_encode_vkCmdPipelineBarrier(enc, cmd_flags, commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); 5893 vn_instance_submit_command(vn_instance, submit); 5894 if (cmd_data != local_cmd_data) 5895 free(cmd_data); 5896 } 5897} 5898 5899static inline void vn_submit_vkCmdBeginQuery(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, struct vn_instance_submit_command *submit) 5900{ 5901 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5902 void *cmd_data = local_cmd_data; 5903 size_t cmd_size = vn_sizeof_vkCmdBeginQuery(commandBuffer, queryPool, query, flags); 5904 if (cmd_size > sizeof(local_cmd_data)) { 5905 cmd_data = malloc(cmd_size); 5906 if (!cmd_data) 5907 cmd_size = 0; 5908 } 5909 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBeginQuery_reply(commandBuffer, queryPool, query, flags) : 0; 5910 5911 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5912 if (cmd_size) { 5913 vn_encode_vkCmdBeginQuery(enc, cmd_flags, commandBuffer, queryPool, query, flags); 5914 vn_instance_submit_command(vn_instance, submit); 5915 if (cmd_data != local_cmd_data) 5916 free(cmd_data); 5917 } 5918} 5919 5920static inline void vn_submit_vkCmdEndQuery(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, struct vn_instance_submit_command *submit) 5921{ 5922 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5923 void *cmd_data = local_cmd_data; 5924 size_t cmd_size = vn_sizeof_vkCmdEndQuery(commandBuffer, queryPool, query); 5925 if (cmd_size > sizeof(local_cmd_data)) { 5926 cmd_data = malloc(cmd_size); 5927 if (!cmd_data) 5928 cmd_size = 0; 5929 } 5930 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdEndQuery_reply(commandBuffer, queryPool, query) : 0; 5931 5932 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5933 if (cmd_size) { 5934 vn_encode_vkCmdEndQuery(enc, cmd_flags, commandBuffer, queryPool, query); 5935 vn_instance_submit_command(vn_instance, submit); 5936 if (cmd_data != local_cmd_data) 5937 free(cmd_data); 5938 } 5939} 5940 5941static inline void vn_submit_vkCmdResetQueryPool(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, struct vn_instance_submit_command *submit) 5942{ 5943 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5944 void *cmd_data = local_cmd_data; 5945 size_t cmd_size = vn_sizeof_vkCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); 5946 if (cmd_size > sizeof(local_cmd_data)) { 5947 cmd_data = malloc(cmd_size); 5948 if (!cmd_data) 5949 cmd_size = 0; 5950 } 5951 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdResetQueryPool_reply(commandBuffer, queryPool, firstQuery, queryCount) : 0; 5952 5953 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5954 if (cmd_size) { 5955 vn_encode_vkCmdResetQueryPool(enc, cmd_flags, commandBuffer, queryPool, firstQuery, queryCount); 5956 vn_instance_submit_command(vn_instance, submit); 5957 if (cmd_data != local_cmd_data) 5958 free(cmd_data); 5959 } 5960} 5961 5962static inline void vn_submit_vkCmdWriteTimestamp(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query, struct vn_instance_submit_command *submit) 5963{ 5964 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5965 void *cmd_data = local_cmd_data; 5966 size_t cmd_size = vn_sizeof_vkCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); 5967 if (cmd_size > sizeof(local_cmd_data)) { 5968 cmd_data = malloc(cmd_size); 5969 if (!cmd_data) 5970 cmd_size = 0; 5971 } 5972 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdWriteTimestamp_reply(commandBuffer, pipelineStage, queryPool, query) : 0; 5973 5974 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5975 if (cmd_size) { 5976 vn_encode_vkCmdWriteTimestamp(enc, cmd_flags, commandBuffer, pipelineStage, queryPool, query); 5977 vn_instance_submit_command(vn_instance, submit); 5978 if (cmd_data != local_cmd_data) 5979 free(cmd_data); 5980 } 5981} 5982 5983static inline void vn_submit_vkCmdCopyQueryPoolResults(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags, struct vn_instance_submit_command *submit) 5984{ 5985 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 5986 void *cmd_data = local_cmd_data; 5987 size_t cmd_size = vn_sizeof_vkCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); 5988 if (cmd_size > sizeof(local_cmd_data)) { 5989 cmd_data = malloc(cmd_size); 5990 if (!cmd_data) 5991 cmd_size = 0; 5992 } 5993 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdCopyQueryPoolResults_reply(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags) : 0; 5994 5995 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 5996 if (cmd_size) { 5997 vn_encode_vkCmdCopyQueryPoolResults(enc, cmd_flags, commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); 5998 vn_instance_submit_command(vn_instance, submit); 5999 if (cmd_data != local_cmd_data) 6000 free(cmd_data); 6001 } 6002} 6003 6004static inline void vn_submit_vkCmdPushConstants(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, struct vn_instance_submit_command *submit) 6005{ 6006 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6007 void *cmd_data = local_cmd_data; 6008 size_t cmd_size = vn_sizeof_vkCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); 6009 if (cmd_size > sizeof(local_cmd_data)) { 6010 cmd_data = malloc(cmd_size); 6011 if (!cmd_data) 6012 cmd_size = 0; 6013 } 6014 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdPushConstants_reply(commandBuffer, layout, stageFlags, offset, size, pValues) : 0; 6015 6016 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6017 if (cmd_size) { 6018 vn_encode_vkCmdPushConstants(enc, cmd_flags, commandBuffer, layout, stageFlags, offset, size, pValues); 6019 vn_instance_submit_command(vn_instance, submit); 6020 if (cmd_data != local_cmd_data) 6021 free(cmd_data); 6022 } 6023} 6024 6025static inline void vn_submit_vkCmdBeginRenderPass(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents, struct vn_instance_submit_command *submit) 6026{ 6027 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6028 void *cmd_data = local_cmd_data; 6029 size_t cmd_size = vn_sizeof_vkCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); 6030 if (cmd_size > sizeof(local_cmd_data)) { 6031 cmd_data = malloc(cmd_size); 6032 if (!cmd_data) 6033 cmd_size = 0; 6034 } 6035 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBeginRenderPass_reply(commandBuffer, pRenderPassBegin, contents) : 0; 6036 6037 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6038 if (cmd_size) { 6039 vn_encode_vkCmdBeginRenderPass(enc, cmd_flags, commandBuffer, pRenderPassBegin, contents); 6040 vn_instance_submit_command(vn_instance, submit); 6041 if (cmd_data != local_cmd_data) 6042 free(cmd_data); 6043 } 6044} 6045 6046static inline void vn_submit_vkCmdNextSubpass(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkSubpassContents contents, struct vn_instance_submit_command *submit) 6047{ 6048 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6049 void *cmd_data = local_cmd_data; 6050 size_t cmd_size = vn_sizeof_vkCmdNextSubpass(commandBuffer, contents); 6051 if (cmd_size > sizeof(local_cmd_data)) { 6052 cmd_data = malloc(cmd_size); 6053 if (!cmd_data) 6054 cmd_size = 0; 6055 } 6056 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdNextSubpass_reply(commandBuffer, contents) : 0; 6057 6058 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6059 if (cmd_size) { 6060 vn_encode_vkCmdNextSubpass(enc, cmd_flags, commandBuffer, contents); 6061 vn_instance_submit_command(vn_instance, submit); 6062 if (cmd_data != local_cmd_data) 6063 free(cmd_data); 6064 } 6065} 6066 6067static inline void vn_submit_vkCmdEndRenderPass(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, struct vn_instance_submit_command *submit) 6068{ 6069 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6070 void *cmd_data = local_cmd_data; 6071 size_t cmd_size = vn_sizeof_vkCmdEndRenderPass(commandBuffer); 6072 if (cmd_size > sizeof(local_cmd_data)) { 6073 cmd_data = malloc(cmd_size); 6074 if (!cmd_data) 6075 cmd_size = 0; 6076 } 6077 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdEndRenderPass_reply(commandBuffer) : 0; 6078 6079 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6080 if (cmd_size) { 6081 vn_encode_vkCmdEndRenderPass(enc, cmd_flags, commandBuffer); 6082 vn_instance_submit_command(vn_instance, submit); 6083 if (cmd_data != local_cmd_data) 6084 free(cmd_data); 6085 } 6086} 6087 6088static inline void vn_submit_vkCmdExecuteCommands(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, struct vn_instance_submit_command *submit) 6089{ 6090 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6091 void *cmd_data = local_cmd_data; 6092 size_t cmd_size = vn_sizeof_vkCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); 6093 if (cmd_size > sizeof(local_cmd_data)) { 6094 cmd_data = malloc(cmd_size); 6095 if (!cmd_data) 6096 cmd_size = 0; 6097 } 6098 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdExecuteCommands_reply(commandBuffer, commandBufferCount, pCommandBuffers) : 0; 6099 6100 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6101 if (cmd_size) { 6102 vn_encode_vkCmdExecuteCommands(enc, cmd_flags, commandBuffer, commandBufferCount, pCommandBuffers); 6103 vn_instance_submit_command(vn_instance, submit); 6104 if (cmd_data != local_cmd_data) 6105 free(cmd_data); 6106 } 6107} 6108 6109static inline void vn_submit_vkCmdSetDeviceMask(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t deviceMask, struct vn_instance_submit_command *submit) 6110{ 6111 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6112 void *cmd_data = local_cmd_data; 6113 size_t cmd_size = vn_sizeof_vkCmdSetDeviceMask(commandBuffer, deviceMask); 6114 if (cmd_size > sizeof(local_cmd_data)) { 6115 cmd_data = malloc(cmd_size); 6116 if (!cmd_data) 6117 cmd_size = 0; 6118 } 6119 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdSetDeviceMask_reply(commandBuffer, deviceMask) : 0; 6120 6121 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6122 if (cmd_size) { 6123 vn_encode_vkCmdSetDeviceMask(enc, cmd_flags, commandBuffer, deviceMask); 6124 vn_instance_submit_command(vn_instance, submit); 6125 if (cmd_data != local_cmd_data) 6126 free(cmd_data); 6127 } 6128} 6129 6130static inline void vn_submit_vkCmdDispatchBase(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, struct vn_instance_submit_command *submit) 6131{ 6132 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6133 void *cmd_data = local_cmd_data; 6134 size_t cmd_size = vn_sizeof_vkCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); 6135 if (cmd_size > sizeof(local_cmd_data)) { 6136 cmd_data = malloc(cmd_size); 6137 if (!cmd_data) 6138 cmd_size = 0; 6139 } 6140 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDispatchBase_reply(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ) : 0; 6141 6142 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6143 if (cmd_size) { 6144 vn_encode_vkCmdDispatchBase(enc, cmd_flags, commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); 6145 vn_instance_submit_command(vn_instance, submit); 6146 if (cmd_data != local_cmd_data) 6147 free(cmd_data); 6148 } 6149} 6150 6151static inline void vn_submit_vkCmdBeginRenderPass2(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, struct vn_instance_submit_command *submit) 6152{ 6153 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6154 void *cmd_data = local_cmd_data; 6155 size_t cmd_size = vn_sizeof_vkCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); 6156 if (cmd_size > sizeof(local_cmd_data)) { 6157 cmd_data = malloc(cmd_size); 6158 if (!cmd_data) 6159 cmd_size = 0; 6160 } 6161 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBeginRenderPass2_reply(commandBuffer, pRenderPassBegin, pSubpassBeginInfo) : 0; 6162 6163 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6164 if (cmd_size) { 6165 vn_encode_vkCmdBeginRenderPass2(enc, cmd_flags, commandBuffer, pRenderPassBegin, pSubpassBeginInfo); 6166 vn_instance_submit_command(vn_instance, submit); 6167 if (cmd_data != local_cmd_data) 6168 free(cmd_data); 6169 } 6170} 6171 6172static inline void vn_submit_vkCmdNextSubpass2(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, struct vn_instance_submit_command *submit) 6173{ 6174 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6175 void *cmd_data = local_cmd_data; 6176 size_t cmd_size = vn_sizeof_vkCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); 6177 if (cmd_size > sizeof(local_cmd_data)) { 6178 cmd_data = malloc(cmd_size); 6179 if (!cmd_data) 6180 cmd_size = 0; 6181 } 6182 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdNextSubpass2_reply(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo) : 0; 6183 6184 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6185 if (cmd_size) { 6186 vn_encode_vkCmdNextSubpass2(enc, cmd_flags, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); 6187 vn_instance_submit_command(vn_instance, submit); 6188 if (cmd_data != local_cmd_data) 6189 free(cmd_data); 6190 } 6191} 6192 6193static inline void vn_submit_vkCmdEndRenderPass2(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, struct vn_instance_submit_command *submit) 6194{ 6195 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6196 void *cmd_data = local_cmd_data; 6197 size_t cmd_size = vn_sizeof_vkCmdEndRenderPass2(commandBuffer, pSubpassEndInfo); 6198 if (cmd_size > sizeof(local_cmd_data)) { 6199 cmd_data = malloc(cmd_size); 6200 if (!cmd_data) 6201 cmd_size = 0; 6202 } 6203 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdEndRenderPass2_reply(commandBuffer, pSubpassEndInfo) : 0; 6204 6205 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6206 if (cmd_size) { 6207 vn_encode_vkCmdEndRenderPass2(enc, cmd_flags, commandBuffer, pSubpassEndInfo); 6208 vn_instance_submit_command(vn_instance, submit); 6209 if (cmd_data != local_cmd_data) 6210 free(cmd_data); 6211 } 6212} 6213 6214static inline void vn_submit_vkCmdDrawIndirectCount(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, struct vn_instance_submit_command *submit) 6215{ 6216 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6217 void *cmd_data = local_cmd_data; 6218 size_t cmd_size = vn_sizeof_vkCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); 6219 if (cmd_size > sizeof(local_cmd_data)) { 6220 cmd_data = malloc(cmd_size); 6221 if (!cmd_data) 6222 cmd_size = 0; 6223 } 6224 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDrawIndirectCount_reply(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride) : 0; 6225 6226 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6227 if (cmd_size) { 6228 vn_encode_vkCmdDrawIndirectCount(enc, cmd_flags, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); 6229 vn_instance_submit_command(vn_instance, submit); 6230 if (cmd_data != local_cmd_data) 6231 free(cmd_data); 6232 } 6233} 6234 6235static inline void vn_submit_vkCmdDrawIndexedIndirectCount(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, struct vn_instance_submit_command *submit) 6236{ 6237 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6238 void *cmd_data = local_cmd_data; 6239 size_t cmd_size = vn_sizeof_vkCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); 6240 if (cmd_size > sizeof(local_cmd_data)) { 6241 cmd_data = malloc(cmd_size); 6242 if (!cmd_data) 6243 cmd_size = 0; 6244 } 6245 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDrawIndexedIndirectCount_reply(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride) : 0; 6246 6247 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6248 if (cmd_size) { 6249 vn_encode_vkCmdDrawIndexedIndirectCount(enc, cmd_flags, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); 6250 vn_instance_submit_command(vn_instance, submit); 6251 if (cmd_data != local_cmd_data) 6252 free(cmd_data); 6253 } 6254} 6255 6256static inline void vn_submit_vkCmdBindTransformFeedbackBuffersEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, struct vn_instance_submit_command *submit) 6257{ 6258 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6259 void *cmd_data = local_cmd_data; 6260 size_t cmd_size = vn_sizeof_vkCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); 6261 if (cmd_size > sizeof(local_cmd_data)) { 6262 cmd_data = malloc(cmd_size); 6263 if (!cmd_data) 6264 cmd_size = 0; 6265 } 6266 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBindTransformFeedbackBuffersEXT_reply(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes) : 0; 6267 6268 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6269 if (cmd_size) { 6270 vn_encode_vkCmdBindTransformFeedbackBuffersEXT(enc, cmd_flags, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); 6271 vn_instance_submit_command(vn_instance, submit); 6272 if (cmd_data != local_cmd_data) 6273 free(cmd_data); 6274 } 6275} 6276 6277static inline void vn_submit_vkCmdBeginTransformFeedbackEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, struct vn_instance_submit_command *submit) 6278{ 6279 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6280 void *cmd_data = local_cmd_data; 6281 size_t cmd_size = vn_sizeof_vkCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); 6282 if (cmd_size > sizeof(local_cmd_data)) { 6283 cmd_data = malloc(cmd_size); 6284 if (!cmd_data) 6285 cmd_size = 0; 6286 } 6287 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBeginTransformFeedbackEXT_reply(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets) : 0; 6288 6289 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6290 if (cmd_size) { 6291 vn_encode_vkCmdBeginTransformFeedbackEXT(enc, cmd_flags, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); 6292 vn_instance_submit_command(vn_instance, submit); 6293 if (cmd_data != local_cmd_data) 6294 free(cmd_data); 6295 } 6296} 6297 6298static inline void vn_submit_vkCmdEndTransformFeedbackEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, struct vn_instance_submit_command *submit) 6299{ 6300 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6301 void *cmd_data = local_cmd_data; 6302 size_t cmd_size = vn_sizeof_vkCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); 6303 if (cmd_size > sizeof(local_cmd_data)) { 6304 cmd_data = malloc(cmd_size); 6305 if (!cmd_data) 6306 cmd_size = 0; 6307 } 6308 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdEndTransformFeedbackEXT_reply(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets) : 0; 6309 6310 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6311 if (cmd_size) { 6312 vn_encode_vkCmdEndTransformFeedbackEXT(enc, cmd_flags, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); 6313 vn_instance_submit_command(vn_instance, submit); 6314 if (cmd_data != local_cmd_data) 6315 free(cmd_data); 6316 } 6317} 6318 6319static inline void vn_submit_vkCmdBeginQueryIndexedEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index, struct vn_instance_submit_command *submit) 6320{ 6321 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6322 void *cmd_data = local_cmd_data; 6323 size_t cmd_size = vn_sizeof_vkCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); 6324 if (cmd_size > sizeof(local_cmd_data)) { 6325 cmd_data = malloc(cmd_size); 6326 if (!cmd_data) 6327 cmd_size = 0; 6328 } 6329 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdBeginQueryIndexedEXT_reply(commandBuffer, queryPool, query, flags, index) : 0; 6330 6331 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6332 if (cmd_size) { 6333 vn_encode_vkCmdBeginQueryIndexedEXT(enc, cmd_flags, commandBuffer, queryPool, query, flags, index); 6334 vn_instance_submit_command(vn_instance, submit); 6335 if (cmd_data != local_cmd_data) 6336 free(cmd_data); 6337 } 6338} 6339 6340static inline void vn_submit_vkCmdEndQueryIndexedEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index, struct vn_instance_submit_command *submit) 6341{ 6342 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6343 void *cmd_data = local_cmd_data; 6344 size_t cmd_size = vn_sizeof_vkCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); 6345 if (cmd_size > sizeof(local_cmd_data)) { 6346 cmd_data = malloc(cmd_size); 6347 if (!cmd_data) 6348 cmd_size = 0; 6349 } 6350 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdEndQueryIndexedEXT_reply(commandBuffer, queryPool, query, index) : 0; 6351 6352 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6353 if (cmd_size) { 6354 vn_encode_vkCmdEndQueryIndexedEXT(enc, cmd_flags, commandBuffer, queryPool, query, index); 6355 vn_instance_submit_command(vn_instance, submit); 6356 if (cmd_data != local_cmd_data) 6357 free(cmd_data); 6358 } 6359} 6360 6361static inline void vn_submit_vkCmdDrawIndirectByteCountEXT(struct vn_instance *vn_instance, VkCommandFlagsEXT cmd_flags, VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, struct vn_instance_submit_command *submit) 6362{ 6363 uint8_t local_cmd_data[VN_SUBMIT_LOCAL_CMD_SIZE]; 6364 void *cmd_data = local_cmd_data; 6365 size_t cmd_size = vn_sizeof_vkCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride); 6366 if (cmd_size > sizeof(local_cmd_data)) { 6367 cmd_data = malloc(cmd_size); 6368 if (!cmd_data) 6369 cmd_size = 0; 6370 } 6371 const size_t reply_size = cmd_flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT ? vn_sizeof_vkCmdDrawIndirectByteCountEXT_reply(commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride) : 0; 6372 6373 struct vn_cs_encoder *enc = vn_instance_submit_command_init(vn_instance, submit, cmd_data, cmd_size, reply_size); 6374 if (cmd_size) { 6375 vn_encode_vkCmdDrawIndirectByteCountEXT(enc, cmd_flags, commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride); 6376 vn_instance_submit_command(vn_instance, submit); 6377 if (cmd_data != local_cmd_data) 6378 free(cmd_data); 6379 } 6380} 6381 6382static inline VkResult vn_call_vkAllocateCommandBuffers(struct vn_instance *vn_instance, VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) 6383{ 6384 VN_TRACE_FUNC(); 6385 6386 struct vn_instance_submit_command submit; 6387 vn_submit_vkAllocateCommandBuffers(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, pAllocateInfo, pCommandBuffers, &submit); 6388 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6389 if (dec) { 6390 const VkResult ret = vn_decode_vkAllocateCommandBuffers_reply(dec, device, pAllocateInfo, pCommandBuffers); 6391 vn_instance_free_command_reply(vn_instance, &submit); 6392 return ret; 6393 } else { 6394 return VK_ERROR_OUT_OF_HOST_MEMORY; 6395 } 6396} 6397 6398static inline void vn_async_vkAllocateCommandBuffers(struct vn_instance *vn_instance, VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) 6399{ 6400 struct vn_instance_submit_command submit; 6401 vn_submit_vkAllocateCommandBuffers(vn_instance, 0, device, pAllocateInfo, pCommandBuffers, &submit); 6402} 6403 6404static inline void vn_call_vkFreeCommandBuffers(struct vn_instance *vn_instance, VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 6405{ 6406 VN_TRACE_FUNC(); 6407 6408 struct vn_instance_submit_command submit; 6409 vn_submit_vkFreeCommandBuffers(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, device, commandPool, commandBufferCount, pCommandBuffers, &submit); 6410 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6411 if (dec) { 6412 vn_decode_vkFreeCommandBuffers_reply(dec, device, commandPool, commandBufferCount, pCommandBuffers); 6413 vn_instance_free_command_reply(vn_instance, &submit); 6414 } 6415} 6416 6417static inline void vn_async_vkFreeCommandBuffers(struct vn_instance *vn_instance, VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 6418{ 6419 struct vn_instance_submit_command submit; 6420 vn_submit_vkFreeCommandBuffers(vn_instance, 0, device, commandPool, commandBufferCount, pCommandBuffers, &submit); 6421} 6422 6423static inline VkResult vn_call_vkBeginCommandBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) 6424{ 6425 VN_TRACE_FUNC(); 6426 6427 struct vn_instance_submit_command submit; 6428 vn_submit_vkBeginCommandBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pBeginInfo, &submit); 6429 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6430 if (dec) { 6431 const VkResult ret = vn_decode_vkBeginCommandBuffer_reply(dec, commandBuffer, pBeginInfo); 6432 vn_instance_free_command_reply(vn_instance, &submit); 6433 return ret; 6434 } else { 6435 return VK_ERROR_OUT_OF_HOST_MEMORY; 6436 } 6437} 6438 6439static inline void vn_async_vkBeginCommandBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) 6440{ 6441 struct vn_instance_submit_command submit; 6442 vn_submit_vkBeginCommandBuffer(vn_instance, 0, commandBuffer, pBeginInfo, &submit); 6443} 6444 6445static inline VkResult vn_call_vkEndCommandBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer) 6446{ 6447 VN_TRACE_FUNC(); 6448 6449 struct vn_instance_submit_command submit; 6450 vn_submit_vkEndCommandBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, &submit); 6451 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6452 if (dec) { 6453 const VkResult ret = vn_decode_vkEndCommandBuffer_reply(dec, commandBuffer); 6454 vn_instance_free_command_reply(vn_instance, &submit); 6455 return ret; 6456 } else { 6457 return VK_ERROR_OUT_OF_HOST_MEMORY; 6458 } 6459} 6460 6461static inline void vn_async_vkEndCommandBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer) 6462{ 6463 struct vn_instance_submit_command submit; 6464 vn_submit_vkEndCommandBuffer(vn_instance, 0, commandBuffer, &submit); 6465} 6466 6467static inline VkResult vn_call_vkResetCommandBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) 6468{ 6469 VN_TRACE_FUNC(); 6470 6471 struct vn_instance_submit_command submit; 6472 vn_submit_vkResetCommandBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, flags, &submit); 6473 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6474 if (dec) { 6475 const VkResult ret = vn_decode_vkResetCommandBuffer_reply(dec, commandBuffer, flags); 6476 vn_instance_free_command_reply(vn_instance, &submit); 6477 return ret; 6478 } else { 6479 return VK_ERROR_OUT_OF_HOST_MEMORY; 6480 } 6481} 6482 6483static inline void vn_async_vkResetCommandBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) 6484{ 6485 struct vn_instance_submit_command submit; 6486 vn_submit_vkResetCommandBuffer(vn_instance, 0, commandBuffer, flags, &submit); 6487} 6488 6489static inline void vn_call_vkCmdBindPipeline(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) 6490{ 6491 VN_TRACE_FUNC(); 6492 6493 struct vn_instance_submit_command submit; 6494 vn_submit_vkCmdBindPipeline(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pipelineBindPoint, pipeline, &submit); 6495 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6496 if (dec) { 6497 vn_decode_vkCmdBindPipeline_reply(dec, commandBuffer, pipelineBindPoint, pipeline); 6498 vn_instance_free_command_reply(vn_instance, &submit); 6499 } 6500} 6501 6502static inline void vn_async_vkCmdBindPipeline(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) 6503{ 6504 struct vn_instance_submit_command submit; 6505 vn_submit_vkCmdBindPipeline(vn_instance, 0, commandBuffer, pipelineBindPoint, pipeline, &submit); 6506} 6507 6508static inline void vn_call_vkCmdSetViewport(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) 6509{ 6510 VN_TRACE_FUNC(); 6511 6512 struct vn_instance_submit_command submit; 6513 vn_submit_vkCmdSetViewport(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, firstViewport, viewportCount, pViewports, &submit); 6514 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6515 if (dec) { 6516 vn_decode_vkCmdSetViewport_reply(dec, commandBuffer, firstViewport, viewportCount, pViewports); 6517 vn_instance_free_command_reply(vn_instance, &submit); 6518 } 6519} 6520 6521static inline void vn_async_vkCmdSetViewport(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) 6522{ 6523 struct vn_instance_submit_command submit; 6524 vn_submit_vkCmdSetViewport(vn_instance, 0, commandBuffer, firstViewport, viewportCount, pViewports, &submit); 6525} 6526 6527static inline void vn_call_vkCmdSetScissor(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) 6528{ 6529 VN_TRACE_FUNC(); 6530 6531 struct vn_instance_submit_command submit; 6532 vn_submit_vkCmdSetScissor(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, firstScissor, scissorCount, pScissors, &submit); 6533 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6534 if (dec) { 6535 vn_decode_vkCmdSetScissor_reply(dec, commandBuffer, firstScissor, scissorCount, pScissors); 6536 vn_instance_free_command_reply(vn_instance, &submit); 6537 } 6538} 6539 6540static inline void vn_async_vkCmdSetScissor(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) 6541{ 6542 struct vn_instance_submit_command submit; 6543 vn_submit_vkCmdSetScissor(vn_instance, 0, commandBuffer, firstScissor, scissorCount, pScissors, &submit); 6544} 6545 6546static inline void vn_call_vkCmdSetLineWidth(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, float lineWidth) 6547{ 6548 VN_TRACE_FUNC(); 6549 6550 struct vn_instance_submit_command submit; 6551 vn_submit_vkCmdSetLineWidth(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, lineWidth, &submit); 6552 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6553 if (dec) { 6554 vn_decode_vkCmdSetLineWidth_reply(dec, commandBuffer, lineWidth); 6555 vn_instance_free_command_reply(vn_instance, &submit); 6556 } 6557} 6558 6559static inline void vn_async_vkCmdSetLineWidth(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, float lineWidth) 6560{ 6561 struct vn_instance_submit_command submit; 6562 vn_submit_vkCmdSetLineWidth(vn_instance, 0, commandBuffer, lineWidth, &submit); 6563} 6564 6565static inline void vn_call_vkCmdSetDepthBias(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) 6566{ 6567 VN_TRACE_FUNC(); 6568 6569 struct vn_instance_submit_command submit; 6570 vn_submit_vkCmdSetDepthBias(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, &submit); 6571 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6572 if (dec) { 6573 vn_decode_vkCmdSetDepthBias_reply(dec, commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); 6574 vn_instance_free_command_reply(vn_instance, &submit); 6575 } 6576} 6577 6578static inline void vn_async_vkCmdSetDepthBias(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) 6579{ 6580 struct vn_instance_submit_command submit; 6581 vn_submit_vkCmdSetDepthBias(vn_instance, 0, commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, &submit); 6582} 6583 6584static inline void vn_call_vkCmdSetBlendConstants(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const float blendConstants[4]) 6585{ 6586 VN_TRACE_FUNC(); 6587 6588 struct vn_instance_submit_command submit; 6589 vn_submit_vkCmdSetBlendConstants(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, blendConstants, &submit); 6590 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6591 if (dec) { 6592 vn_decode_vkCmdSetBlendConstants_reply(dec, commandBuffer, blendConstants); 6593 vn_instance_free_command_reply(vn_instance, &submit); 6594 } 6595} 6596 6597static inline void vn_async_vkCmdSetBlendConstants(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const float blendConstants[4]) 6598{ 6599 struct vn_instance_submit_command submit; 6600 vn_submit_vkCmdSetBlendConstants(vn_instance, 0, commandBuffer, blendConstants, &submit); 6601} 6602 6603static inline void vn_call_vkCmdSetDepthBounds(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) 6604{ 6605 VN_TRACE_FUNC(); 6606 6607 struct vn_instance_submit_command submit; 6608 vn_submit_vkCmdSetDepthBounds(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, minDepthBounds, maxDepthBounds, &submit); 6609 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6610 if (dec) { 6611 vn_decode_vkCmdSetDepthBounds_reply(dec, commandBuffer, minDepthBounds, maxDepthBounds); 6612 vn_instance_free_command_reply(vn_instance, &submit); 6613 } 6614} 6615 6616static inline void vn_async_vkCmdSetDepthBounds(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) 6617{ 6618 struct vn_instance_submit_command submit; 6619 vn_submit_vkCmdSetDepthBounds(vn_instance, 0, commandBuffer, minDepthBounds, maxDepthBounds, &submit); 6620} 6621 6622static inline void vn_call_vkCmdSetStencilCompareMask(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) 6623{ 6624 VN_TRACE_FUNC(); 6625 6626 struct vn_instance_submit_command submit; 6627 vn_submit_vkCmdSetStencilCompareMask(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, faceMask, compareMask, &submit); 6628 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6629 if (dec) { 6630 vn_decode_vkCmdSetStencilCompareMask_reply(dec, commandBuffer, faceMask, compareMask); 6631 vn_instance_free_command_reply(vn_instance, &submit); 6632 } 6633} 6634 6635static inline void vn_async_vkCmdSetStencilCompareMask(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) 6636{ 6637 struct vn_instance_submit_command submit; 6638 vn_submit_vkCmdSetStencilCompareMask(vn_instance, 0, commandBuffer, faceMask, compareMask, &submit); 6639} 6640 6641static inline void vn_call_vkCmdSetStencilWriteMask(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) 6642{ 6643 VN_TRACE_FUNC(); 6644 6645 struct vn_instance_submit_command submit; 6646 vn_submit_vkCmdSetStencilWriteMask(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, faceMask, writeMask, &submit); 6647 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6648 if (dec) { 6649 vn_decode_vkCmdSetStencilWriteMask_reply(dec, commandBuffer, faceMask, writeMask); 6650 vn_instance_free_command_reply(vn_instance, &submit); 6651 } 6652} 6653 6654static inline void vn_async_vkCmdSetStencilWriteMask(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) 6655{ 6656 struct vn_instance_submit_command submit; 6657 vn_submit_vkCmdSetStencilWriteMask(vn_instance, 0, commandBuffer, faceMask, writeMask, &submit); 6658} 6659 6660static inline void vn_call_vkCmdSetStencilReference(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) 6661{ 6662 VN_TRACE_FUNC(); 6663 6664 struct vn_instance_submit_command submit; 6665 vn_submit_vkCmdSetStencilReference(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, faceMask, reference, &submit); 6666 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6667 if (dec) { 6668 vn_decode_vkCmdSetStencilReference_reply(dec, commandBuffer, faceMask, reference); 6669 vn_instance_free_command_reply(vn_instance, &submit); 6670 } 6671} 6672 6673static inline void vn_async_vkCmdSetStencilReference(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) 6674{ 6675 struct vn_instance_submit_command submit; 6676 vn_submit_vkCmdSetStencilReference(vn_instance, 0, commandBuffer, faceMask, reference, &submit); 6677} 6678 6679static inline void vn_call_vkCmdBindDescriptorSets(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) 6680{ 6681 VN_TRACE_FUNC(); 6682 6683 struct vn_instance_submit_command submit; 6684 vn_submit_vkCmdBindDescriptorSets(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, &submit); 6685 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6686 if (dec) { 6687 vn_decode_vkCmdBindDescriptorSets_reply(dec, commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); 6688 vn_instance_free_command_reply(vn_instance, &submit); 6689 } 6690} 6691 6692static inline void vn_async_vkCmdBindDescriptorSets(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) 6693{ 6694 struct vn_instance_submit_command submit; 6695 vn_submit_vkCmdBindDescriptorSets(vn_instance, 0, commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, &submit); 6696} 6697 6698static inline void vn_call_vkCmdBindIndexBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) 6699{ 6700 VN_TRACE_FUNC(); 6701 6702 struct vn_instance_submit_command submit; 6703 vn_submit_vkCmdBindIndexBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, buffer, offset, indexType, &submit); 6704 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6705 if (dec) { 6706 vn_decode_vkCmdBindIndexBuffer_reply(dec, commandBuffer, buffer, offset, indexType); 6707 vn_instance_free_command_reply(vn_instance, &submit); 6708 } 6709} 6710 6711static inline void vn_async_vkCmdBindIndexBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) 6712{ 6713 struct vn_instance_submit_command submit; 6714 vn_submit_vkCmdBindIndexBuffer(vn_instance, 0, commandBuffer, buffer, offset, indexType, &submit); 6715} 6716 6717static inline void vn_call_vkCmdBindVertexBuffers(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) 6718{ 6719 VN_TRACE_FUNC(); 6720 6721 struct vn_instance_submit_command submit; 6722 vn_submit_vkCmdBindVertexBuffers(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, &submit); 6723 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6724 if (dec) { 6725 vn_decode_vkCmdBindVertexBuffers_reply(dec, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); 6726 vn_instance_free_command_reply(vn_instance, &submit); 6727 } 6728} 6729 6730static inline void vn_async_vkCmdBindVertexBuffers(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) 6731{ 6732 struct vn_instance_submit_command submit; 6733 vn_submit_vkCmdBindVertexBuffers(vn_instance, 0, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, &submit); 6734} 6735 6736static inline void vn_call_vkCmdDraw(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 6737{ 6738 VN_TRACE_FUNC(); 6739 6740 struct vn_instance_submit_command submit; 6741 vn_submit_vkCmdDraw(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, &submit); 6742 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6743 if (dec) { 6744 vn_decode_vkCmdDraw_reply(dec, commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); 6745 vn_instance_free_command_reply(vn_instance, &submit); 6746 } 6747} 6748 6749static inline void vn_async_vkCmdDraw(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 6750{ 6751 struct vn_instance_submit_command submit; 6752 vn_submit_vkCmdDraw(vn_instance, 0, commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, &submit); 6753} 6754 6755static inline void vn_call_vkCmdDrawIndexed(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 6756{ 6757 VN_TRACE_FUNC(); 6758 6759 struct vn_instance_submit_command submit; 6760 vn_submit_vkCmdDrawIndexed(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance, &submit); 6761 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6762 if (dec) { 6763 vn_decode_vkCmdDrawIndexed_reply(dec, commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); 6764 vn_instance_free_command_reply(vn_instance, &submit); 6765 } 6766} 6767 6768static inline void vn_async_vkCmdDrawIndexed(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 6769{ 6770 struct vn_instance_submit_command submit; 6771 vn_submit_vkCmdDrawIndexed(vn_instance, 0, commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance, &submit); 6772} 6773 6774static inline void vn_call_vkCmdDrawIndirect(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 6775{ 6776 VN_TRACE_FUNC(); 6777 6778 struct vn_instance_submit_command submit; 6779 vn_submit_vkCmdDrawIndirect(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, buffer, offset, drawCount, stride, &submit); 6780 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6781 if (dec) { 6782 vn_decode_vkCmdDrawIndirect_reply(dec, commandBuffer, buffer, offset, drawCount, stride); 6783 vn_instance_free_command_reply(vn_instance, &submit); 6784 } 6785} 6786 6787static inline void vn_async_vkCmdDrawIndirect(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 6788{ 6789 struct vn_instance_submit_command submit; 6790 vn_submit_vkCmdDrawIndirect(vn_instance, 0, commandBuffer, buffer, offset, drawCount, stride, &submit); 6791} 6792 6793static inline void vn_call_vkCmdDrawIndexedIndirect(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 6794{ 6795 VN_TRACE_FUNC(); 6796 6797 struct vn_instance_submit_command submit; 6798 vn_submit_vkCmdDrawIndexedIndirect(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, buffer, offset, drawCount, stride, &submit); 6799 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6800 if (dec) { 6801 vn_decode_vkCmdDrawIndexedIndirect_reply(dec, commandBuffer, buffer, offset, drawCount, stride); 6802 vn_instance_free_command_reply(vn_instance, &submit); 6803 } 6804} 6805 6806static inline void vn_async_vkCmdDrawIndexedIndirect(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) 6807{ 6808 struct vn_instance_submit_command submit; 6809 vn_submit_vkCmdDrawIndexedIndirect(vn_instance, 0, commandBuffer, buffer, offset, drawCount, stride, &submit); 6810} 6811 6812static inline void vn_call_vkCmdDispatch(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 6813{ 6814 VN_TRACE_FUNC(); 6815 6816 struct vn_instance_submit_command submit; 6817 vn_submit_vkCmdDispatch(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, groupCountX, groupCountY, groupCountZ, &submit); 6818 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6819 if (dec) { 6820 vn_decode_vkCmdDispatch_reply(dec, commandBuffer, groupCountX, groupCountY, groupCountZ); 6821 vn_instance_free_command_reply(vn_instance, &submit); 6822 } 6823} 6824 6825static inline void vn_async_vkCmdDispatch(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 6826{ 6827 struct vn_instance_submit_command submit; 6828 vn_submit_vkCmdDispatch(vn_instance, 0, commandBuffer, groupCountX, groupCountY, groupCountZ, &submit); 6829} 6830 6831static inline void vn_call_vkCmdDispatchIndirect(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) 6832{ 6833 VN_TRACE_FUNC(); 6834 6835 struct vn_instance_submit_command submit; 6836 vn_submit_vkCmdDispatchIndirect(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, buffer, offset, &submit); 6837 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6838 if (dec) { 6839 vn_decode_vkCmdDispatchIndirect_reply(dec, commandBuffer, buffer, offset); 6840 vn_instance_free_command_reply(vn_instance, &submit); 6841 } 6842} 6843 6844static inline void vn_async_vkCmdDispatchIndirect(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) 6845{ 6846 struct vn_instance_submit_command submit; 6847 vn_submit_vkCmdDispatchIndirect(vn_instance, 0, commandBuffer, buffer, offset, &submit); 6848} 6849 6850static inline void vn_call_vkCmdCopyBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) 6851{ 6852 VN_TRACE_FUNC(); 6853 6854 struct vn_instance_submit_command submit; 6855 vn_submit_vkCmdCopyBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, &submit); 6856 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6857 if (dec) { 6858 vn_decode_vkCmdCopyBuffer_reply(dec, commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); 6859 vn_instance_free_command_reply(vn_instance, &submit); 6860 } 6861} 6862 6863static inline void vn_async_vkCmdCopyBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) 6864{ 6865 struct vn_instance_submit_command submit; 6866 vn_submit_vkCmdCopyBuffer(vn_instance, 0, commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, &submit); 6867} 6868 6869static inline void vn_call_vkCmdCopyImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) 6870{ 6871 VN_TRACE_FUNC(); 6872 6873 struct vn_instance_submit_command submit; 6874 vn_submit_vkCmdCopyImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, &submit); 6875 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6876 if (dec) { 6877 vn_decode_vkCmdCopyImage_reply(dec, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); 6878 vn_instance_free_command_reply(vn_instance, &submit); 6879 } 6880} 6881 6882static inline void vn_async_vkCmdCopyImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) 6883{ 6884 struct vn_instance_submit_command submit; 6885 vn_submit_vkCmdCopyImage(vn_instance, 0, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, &submit); 6886} 6887 6888static inline void vn_call_vkCmdBlitImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) 6889{ 6890 VN_TRACE_FUNC(); 6891 6892 struct vn_instance_submit_command submit; 6893 vn_submit_vkCmdBlitImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter, &submit); 6894 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6895 if (dec) { 6896 vn_decode_vkCmdBlitImage_reply(dec, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); 6897 vn_instance_free_command_reply(vn_instance, &submit); 6898 } 6899} 6900 6901static inline void vn_async_vkCmdBlitImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) 6902{ 6903 struct vn_instance_submit_command submit; 6904 vn_submit_vkCmdBlitImage(vn_instance, 0, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter, &submit); 6905} 6906 6907static inline void vn_call_vkCmdCopyBufferToImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) 6908{ 6909 VN_TRACE_FUNC(); 6910 6911 struct vn_instance_submit_command submit; 6912 vn_submit_vkCmdCopyBufferToImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, &submit); 6913 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6914 if (dec) { 6915 vn_decode_vkCmdCopyBufferToImage_reply(dec, commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); 6916 vn_instance_free_command_reply(vn_instance, &submit); 6917 } 6918} 6919 6920static inline void vn_async_vkCmdCopyBufferToImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) 6921{ 6922 struct vn_instance_submit_command submit; 6923 vn_submit_vkCmdCopyBufferToImage(vn_instance, 0, commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, &submit); 6924} 6925 6926static inline void vn_call_vkCmdCopyImageToBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) 6927{ 6928 VN_TRACE_FUNC(); 6929 6930 struct vn_instance_submit_command submit; 6931 vn_submit_vkCmdCopyImageToBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, &submit); 6932 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6933 if (dec) { 6934 vn_decode_vkCmdCopyImageToBuffer_reply(dec, commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); 6935 vn_instance_free_command_reply(vn_instance, &submit); 6936 } 6937} 6938 6939static inline void vn_async_vkCmdCopyImageToBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) 6940{ 6941 struct vn_instance_submit_command submit; 6942 vn_submit_vkCmdCopyImageToBuffer(vn_instance, 0, commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, &submit); 6943} 6944 6945static inline void vn_call_vkCmdUpdateBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) 6946{ 6947 VN_TRACE_FUNC(); 6948 6949 struct vn_instance_submit_command submit; 6950 vn_submit_vkCmdUpdateBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, dstBuffer, dstOffset, dataSize, pData, &submit); 6951 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6952 if (dec) { 6953 vn_decode_vkCmdUpdateBuffer_reply(dec, commandBuffer, dstBuffer, dstOffset, dataSize, pData); 6954 vn_instance_free_command_reply(vn_instance, &submit); 6955 } 6956} 6957 6958static inline void vn_async_vkCmdUpdateBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) 6959{ 6960 struct vn_instance_submit_command submit; 6961 vn_submit_vkCmdUpdateBuffer(vn_instance, 0, commandBuffer, dstBuffer, dstOffset, dataSize, pData, &submit); 6962} 6963 6964static inline void vn_call_vkCmdFillBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) 6965{ 6966 VN_TRACE_FUNC(); 6967 6968 struct vn_instance_submit_command submit; 6969 vn_submit_vkCmdFillBuffer(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, dstBuffer, dstOffset, size, data, &submit); 6970 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6971 if (dec) { 6972 vn_decode_vkCmdFillBuffer_reply(dec, commandBuffer, dstBuffer, dstOffset, size, data); 6973 vn_instance_free_command_reply(vn_instance, &submit); 6974 } 6975} 6976 6977static inline void vn_async_vkCmdFillBuffer(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) 6978{ 6979 struct vn_instance_submit_command submit; 6980 vn_submit_vkCmdFillBuffer(vn_instance, 0, commandBuffer, dstBuffer, dstOffset, size, data, &submit); 6981} 6982 6983static inline void vn_call_vkCmdClearColorImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 6984{ 6985 VN_TRACE_FUNC(); 6986 6987 struct vn_instance_submit_command submit; 6988 vn_submit_vkCmdClearColorImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, &submit); 6989 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 6990 if (dec) { 6991 vn_decode_vkCmdClearColorImage_reply(dec, commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); 6992 vn_instance_free_command_reply(vn_instance, &submit); 6993 } 6994} 6995 6996static inline void vn_async_vkCmdClearColorImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 6997{ 6998 struct vn_instance_submit_command submit; 6999 vn_submit_vkCmdClearColorImage(vn_instance, 0, commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, &submit); 7000} 7001 7002static inline void vn_call_vkCmdClearDepthStencilImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 7003{ 7004 VN_TRACE_FUNC(); 7005 7006 struct vn_instance_submit_command submit; 7007 vn_submit_vkCmdClearDepthStencilImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges, &submit); 7008 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7009 if (dec) { 7010 vn_decode_vkCmdClearDepthStencilImage_reply(dec, commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); 7011 vn_instance_free_command_reply(vn_instance, &submit); 7012 } 7013} 7014 7015static inline void vn_async_vkCmdClearDepthStencilImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) 7016{ 7017 struct vn_instance_submit_command submit; 7018 vn_submit_vkCmdClearDepthStencilImage(vn_instance, 0, commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges, &submit); 7019} 7020 7021static inline void vn_call_vkCmdClearAttachments(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) 7022{ 7023 VN_TRACE_FUNC(); 7024 7025 struct vn_instance_submit_command submit; 7026 vn_submit_vkCmdClearAttachments(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, attachmentCount, pAttachments, rectCount, pRects, &submit); 7027 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7028 if (dec) { 7029 vn_decode_vkCmdClearAttachments_reply(dec, commandBuffer, attachmentCount, pAttachments, rectCount, pRects); 7030 vn_instance_free_command_reply(vn_instance, &submit); 7031 } 7032} 7033 7034static inline void vn_async_vkCmdClearAttachments(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) 7035{ 7036 struct vn_instance_submit_command submit; 7037 vn_submit_vkCmdClearAttachments(vn_instance, 0, commandBuffer, attachmentCount, pAttachments, rectCount, pRects, &submit); 7038} 7039 7040static inline void vn_call_vkCmdResolveImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) 7041{ 7042 VN_TRACE_FUNC(); 7043 7044 struct vn_instance_submit_command submit; 7045 vn_submit_vkCmdResolveImage(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, &submit); 7046 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7047 if (dec) { 7048 vn_decode_vkCmdResolveImage_reply(dec, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); 7049 vn_instance_free_command_reply(vn_instance, &submit); 7050 } 7051} 7052 7053static inline void vn_async_vkCmdResolveImage(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) 7054{ 7055 struct vn_instance_submit_command submit; 7056 vn_submit_vkCmdResolveImage(vn_instance, 0, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, &submit); 7057} 7058 7059static inline void vn_call_vkCmdSetEvent(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 7060{ 7061 VN_TRACE_FUNC(); 7062 7063 struct vn_instance_submit_command submit; 7064 vn_submit_vkCmdSetEvent(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, event, stageMask, &submit); 7065 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7066 if (dec) { 7067 vn_decode_vkCmdSetEvent_reply(dec, commandBuffer, event, stageMask); 7068 vn_instance_free_command_reply(vn_instance, &submit); 7069 } 7070} 7071 7072static inline void vn_async_vkCmdSetEvent(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 7073{ 7074 struct vn_instance_submit_command submit; 7075 vn_submit_vkCmdSetEvent(vn_instance, 0, commandBuffer, event, stageMask, &submit); 7076} 7077 7078static inline void vn_call_vkCmdResetEvent(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 7079{ 7080 VN_TRACE_FUNC(); 7081 7082 struct vn_instance_submit_command submit; 7083 vn_submit_vkCmdResetEvent(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, event, stageMask, &submit); 7084 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7085 if (dec) { 7086 vn_decode_vkCmdResetEvent_reply(dec, commandBuffer, event, stageMask); 7087 vn_instance_free_command_reply(vn_instance, &submit); 7088 } 7089} 7090 7091static inline void vn_async_vkCmdResetEvent(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) 7092{ 7093 struct vn_instance_submit_command submit; 7094 vn_submit_vkCmdResetEvent(vn_instance, 0, commandBuffer, event, stageMask, &submit); 7095} 7096 7097static inline void vn_call_vkCmdWaitEvents(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 7098{ 7099 VN_TRACE_FUNC(); 7100 7101 struct vn_instance_submit_command submit; 7102 vn_submit_vkCmdWaitEvents(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, &submit); 7103 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7104 if (dec) { 7105 vn_decode_vkCmdWaitEvents_reply(dec, commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); 7106 vn_instance_free_command_reply(vn_instance, &submit); 7107 } 7108} 7109 7110static inline void vn_async_vkCmdWaitEvents(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 7111{ 7112 struct vn_instance_submit_command submit; 7113 vn_submit_vkCmdWaitEvents(vn_instance, 0, commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, &submit); 7114} 7115 7116static inline void vn_call_vkCmdPipelineBarrier(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 7117{ 7118 VN_TRACE_FUNC(); 7119 7120 struct vn_instance_submit_command submit; 7121 vn_submit_vkCmdPipelineBarrier(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, &submit); 7122 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7123 if (dec) { 7124 vn_decode_vkCmdPipelineBarrier_reply(dec, commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); 7125 vn_instance_free_command_reply(vn_instance, &submit); 7126 } 7127} 7128 7129static inline void vn_async_vkCmdPipelineBarrier(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) 7130{ 7131 struct vn_instance_submit_command submit; 7132 vn_submit_vkCmdPipelineBarrier(vn_instance, 0, commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, &submit); 7133} 7134 7135static inline void vn_call_vkCmdBeginQuery(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) 7136{ 7137 VN_TRACE_FUNC(); 7138 7139 struct vn_instance_submit_command submit; 7140 vn_submit_vkCmdBeginQuery(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, queryPool, query, flags, &submit); 7141 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7142 if (dec) { 7143 vn_decode_vkCmdBeginQuery_reply(dec, commandBuffer, queryPool, query, flags); 7144 vn_instance_free_command_reply(vn_instance, &submit); 7145 } 7146} 7147 7148static inline void vn_async_vkCmdBeginQuery(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) 7149{ 7150 struct vn_instance_submit_command submit; 7151 vn_submit_vkCmdBeginQuery(vn_instance, 0, commandBuffer, queryPool, query, flags, &submit); 7152} 7153 7154static inline void vn_call_vkCmdEndQuery(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) 7155{ 7156 VN_TRACE_FUNC(); 7157 7158 struct vn_instance_submit_command submit; 7159 vn_submit_vkCmdEndQuery(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, queryPool, query, &submit); 7160 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7161 if (dec) { 7162 vn_decode_vkCmdEndQuery_reply(dec, commandBuffer, queryPool, query); 7163 vn_instance_free_command_reply(vn_instance, &submit); 7164 } 7165} 7166 7167static inline void vn_async_vkCmdEndQuery(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) 7168{ 7169 struct vn_instance_submit_command submit; 7170 vn_submit_vkCmdEndQuery(vn_instance, 0, commandBuffer, queryPool, query, &submit); 7171} 7172 7173static inline void vn_call_vkCmdResetQueryPool(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) 7174{ 7175 VN_TRACE_FUNC(); 7176 7177 struct vn_instance_submit_command submit; 7178 vn_submit_vkCmdResetQueryPool(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, queryPool, firstQuery, queryCount, &submit); 7179 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7180 if (dec) { 7181 vn_decode_vkCmdResetQueryPool_reply(dec, commandBuffer, queryPool, firstQuery, queryCount); 7182 vn_instance_free_command_reply(vn_instance, &submit); 7183 } 7184} 7185 7186static inline void vn_async_vkCmdResetQueryPool(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) 7187{ 7188 struct vn_instance_submit_command submit; 7189 vn_submit_vkCmdResetQueryPool(vn_instance, 0, commandBuffer, queryPool, firstQuery, queryCount, &submit); 7190} 7191 7192static inline void vn_call_vkCmdWriteTimestamp(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) 7193{ 7194 VN_TRACE_FUNC(); 7195 7196 struct vn_instance_submit_command submit; 7197 vn_submit_vkCmdWriteTimestamp(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pipelineStage, queryPool, query, &submit); 7198 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7199 if (dec) { 7200 vn_decode_vkCmdWriteTimestamp_reply(dec, commandBuffer, pipelineStage, queryPool, query); 7201 vn_instance_free_command_reply(vn_instance, &submit); 7202 } 7203} 7204 7205static inline void vn_async_vkCmdWriteTimestamp(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) 7206{ 7207 struct vn_instance_submit_command submit; 7208 vn_submit_vkCmdWriteTimestamp(vn_instance, 0, commandBuffer, pipelineStage, queryPool, query, &submit); 7209} 7210 7211static inline void vn_call_vkCmdCopyQueryPoolResults(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) 7212{ 7213 VN_TRACE_FUNC(); 7214 7215 struct vn_instance_submit_command submit; 7216 vn_submit_vkCmdCopyQueryPoolResults(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags, &submit); 7217 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7218 if (dec) { 7219 vn_decode_vkCmdCopyQueryPoolResults_reply(dec, commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); 7220 vn_instance_free_command_reply(vn_instance, &submit); 7221 } 7222} 7223 7224static inline void vn_async_vkCmdCopyQueryPoolResults(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) 7225{ 7226 struct vn_instance_submit_command submit; 7227 vn_submit_vkCmdCopyQueryPoolResults(vn_instance, 0, commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags, &submit); 7228} 7229 7230static inline void vn_call_vkCmdPushConstants(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) 7231{ 7232 VN_TRACE_FUNC(); 7233 7234 struct vn_instance_submit_command submit; 7235 vn_submit_vkCmdPushConstants(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, layout, stageFlags, offset, size, pValues, &submit); 7236 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7237 if (dec) { 7238 vn_decode_vkCmdPushConstants_reply(dec, commandBuffer, layout, stageFlags, offset, size, pValues); 7239 vn_instance_free_command_reply(vn_instance, &submit); 7240 } 7241} 7242 7243static inline void vn_async_vkCmdPushConstants(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) 7244{ 7245 struct vn_instance_submit_command submit; 7246 vn_submit_vkCmdPushConstants(vn_instance, 0, commandBuffer, layout, stageFlags, offset, size, pValues, &submit); 7247} 7248 7249static inline void vn_call_vkCmdBeginRenderPass(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) 7250{ 7251 VN_TRACE_FUNC(); 7252 7253 struct vn_instance_submit_command submit; 7254 vn_submit_vkCmdBeginRenderPass(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pRenderPassBegin, contents, &submit); 7255 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7256 if (dec) { 7257 vn_decode_vkCmdBeginRenderPass_reply(dec, commandBuffer, pRenderPassBegin, contents); 7258 vn_instance_free_command_reply(vn_instance, &submit); 7259 } 7260} 7261 7262static inline void vn_async_vkCmdBeginRenderPass(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) 7263{ 7264 struct vn_instance_submit_command submit; 7265 vn_submit_vkCmdBeginRenderPass(vn_instance, 0, commandBuffer, pRenderPassBegin, contents, &submit); 7266} 7267 7268static inline void vn_call_vkCmdNextSubpass(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkSubpassContents contents) 7269{ 7270 VN_TRACE_FUNC(); 7271 7272 struct vn_instance_submit_command submit; 7273 vn_submit_vkCmdNextSubpass(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, contents, &submit); 7274 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7275 if (dec) { 7276 vn_decode_vkCmdNextSubpass_reply(dec, commandBuffer, contents); 7277 vn_instance_free_command_reply(vn_instance, &submit); 7278 } 7279} 7280 7281static inline void vn_async_vkCmdNextSubpass(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkSubpassContents contents) 7282{ 7283 struct vn_instance_submit_command submit; 7284 vn_submit_vkCmdNextSubpass(vn_instance, 0, commandBuffer, contents, &submit); 7285} 7286 7287static inline void vn_call_vkCmdEndRenderPass(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer) 7288{ 7289 VN_TRACE_FUNC(); 7290 7291 struct vn_instance_submit_command submit; 7292 vn_submit_vkCmdEndRenderPass(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, &submit); 7293 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7294 if (dec) { 7295 vn_decode_vkCmdEndRenderPass_reply(dec, commandBuffer); 7296 vn_instance_free_command_reply(vn_instance, &submit); 7297 } 7298} 7299 7300static inline void vn_async_vkCmdEndRenderPass(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer) 7301{ 7302 struct vn_instance_submit_command submit; 7303 vn_submit_vkCmdEndRenderPass(vn_instance, 0, commandBuffer, &submit); 7304} 7305 7306static inline void vn_call_vkCmdExecuteCommands(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 7307{ 7308 VN_TRACE_FUNC(); 7309 7310 struct vn_instance_submit_command submit; 7311 vn_submit_vkCmdExecuteCommands(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, commandBufferCount, pCommandBuffers, &submit); 7312 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7313 if (dec) { 7314 vn_decode_vkCmdExecuteCommands_reply(dec, commandBuffer, commandBufferCount, pCommandBuffers); 7315 vn_instance_free_command_reply(vn_instance, &submit); 7316 } 7317} 7318 7319static inline void vn_async_vkCmdExecuteCommands(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) 7320{ 7321 struct vn_instance_submit_command submit; 7322 vn_submit_vkCmdExecuteCommands(vn_instance, 0, commandBuffer, commandBufferCount, pCommandBuffers, &submit); 7323} 7324 7325static inline void vn_call_vkCmdSetDeviceMask(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t deviceMask) 7326{ 7327 VN_TRACE_FUNC(); 7328 7329 struct vn_instance_submit_command submit; 7330 vn_submit_vkCmdSetDeviceMask(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, deviceMask, &submit); 7331 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7332 if (dec) { 7333 vn_decode_vkCmdSetDeviceMask_reply(dec, commandBuffer, deviceMask); 7334 vn_instance_free_command_reply(vn_instance, &submit); 7335 } 7336} 7337 7338static inline void vn_async_vkCmdSetDeviceMask(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t deviceMask) 7339{ 7340 struct vn_instance_submit_command submit; 7341 vn_submit_vkCmdSetDeviceMask(vn_instance, 0, commandBuffer, deviceMask, &submit); 7342} 7343 7344static inline void vn_call_vkCmdDispatchBase(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 7345{ 7346 VN_TRACE_FUNC(); 7347 7348 struct vn_instance_submit_command submit; 7349 vn_submit_vkCmdDispatchBase(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ, &submit); 7350 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7351 if (dec) { 7352 vn_decode_vkCmdDispatchBase_reply(dec, commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); 7353 vn_instance_free_command_reply(vn_instance, &submit); 7354 } 7355} 7356 7357static inline void vn_async_vkCmdDispatchBase(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 7358{ 7359 struct vn_instance_submit_command submit; 7360 vn_submit_vkCmdDispatchBase(vn_instance, 0, commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ, &submit); 7361} 7362 7363static inline void vn_call_vkCmdBeginRenderPass2(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) 7364{ 7365 VN_TRACE_FUNC(); 7366 7367 struct vn_instance_submit_command submit; 7368 vn_submit_vkCmdBeginRenderPass2(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pRenderPassBegin, pSubpassBeginInfo, &submit); 7369 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7370 if (dec) { 7371 vn_decode_vkCmdBeginRenderPass2_reply(dec, commandBuffer, pRenderPassBegin, pSubpassBeginInfo); 7372 vn_instance_free_command_reply(vn_instance, &submit); 7373 } 7374} 7375 7376static inline void vn_async_vkCmdBeginRenderPass2(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) 7377{ 7378 struct vn_instance_submit_command submit; 7379 vn_submit_vkCmdBeginRenderPass2(vn_instance, 0, commandBuffer, pRenderPassBegin, pSubpassBeginInfo, &submit); 7380} 7381 7382static inline void vn_call_vkCmdNextSubpass2(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) 7383{ 7384 VN_TRACE_FUNC(); 7385 7386 struct vn_instance_submit_command submit; 7387 vn_submit_vkCmdNextSubpass2(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, &submit); 7388 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7389 if (dec) { 7390 vn_decode_vkCmdNextSubpass2_reply(dec, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); 7391 vn_instance_free_command_reply(vn_instance, &submit); 7392 } 7393} 7394 7395static inline void vn_async_vkCmdNextSubpass2(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) 7396{ 7397 struct vn_instance_submit_command submit; 7398 vn_submit_vkCmdNextSubpass2(vn_instance, 0, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, &submit); 7399} 7400 7401static inline void vn_call_vkCmdEndRenderPass2(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) 7402{ 7403 VN_TRACE_FUNC(); 7404 7405 struct vn_instance_submit_command submit; 7406 vn_submit_vkCmdEndRenderPass2(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, pSubpassEndInfo, &submit); 7407 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7408 if (dec) { 7409 vn_decode_vkCmdEndRenderPass2_reply(dec, commandBuffer, pSubpassEndInfo); 7410 vn_instance_free_command_reply(vn_instance, &submit); 7411 } 7412} 7413 7414static inline void vn_async_vkCmdEndRenderPass2(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) 7415{ 7416 struct vn_instance_submit_command submit; 7417 vn_submit_vkCmdEndRenderPass2(vn_instance, 0, commandBuffer, pSubpassEndInfo, &submit); 7418} 7419 7420static inline void vn_call_vkCmdDrawIndirectCount(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 7421{ 7422 VN_TRACE_FUNC(); 7423 7424 struct vn_instance_submit_command submit; 7425 vn_submit_vkCmdDrawIndirectCount(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, &submit); 7426 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7427 if (dec) { 7428 vn_decode_vkCmdDrawIndirectCount_reply(dec, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); 7429 vn_instance_free_command_reply(vn_instance, &submit); 7430 } 7431} 7432 7433static inline void vn_async_vkCmdDrawIndirectCount(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 7434{ 7435 struct vn_instance_submit_command submit; 7436 vn_submit_vkCmdDrawIndirectCount(vn_instance, 0, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, &submit); 7437} 7438 7439static inline void vn_call_vkCmdDrawIndexedIndirectCount(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 7440{ 7441 VN_TRACE_FUNC(); 7442 7443 struct vn_instance_submit_command submit; 7444 vn_submit_vkCmdDrawIndexedIndirectCount(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, &submit); 7445 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7446 if (dec) { 7447 vn_decode_vkCmdDrawIndexedIndirectCount_reply(dec, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); 7448 vn_instance_free_command_reply(vn_instance, &submit); 7449 } 7450} 7451 7452static inline void vn_async_vkCmdDrawIndexedIndirectCount(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) 7453{ 7454 struct vn_instance_submit_command submit; 7455 vn_submit_vkCmdDrawIndexedIndirectCount(vn_instance, 0, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, &submit); 7456} 7457 7458static inline void vn_call_vkCmdBindTransformFeedbackBuffersEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) 7459{ 7460 VN_TRACE_FUNC(); 7461 7462 struct vn_instance_submit_command submit; 7463 vn_submit_vkCmdBindTransformFeedbackBuffersEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, &submit); 7464 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7465 if (dec) { 7466 vn_decode_vkCmdBindTransformFeedbackBuffersEXT_reply(dec, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); 7467 vn_instance_free_command_reply(vn_instance, &submit); 7468 } 7469} 7470 7471static inline void vn_async_vkCmdBindTransformFeedbackBuffersEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) 7472{ 7473 struct vn_instance_submit_command submit; 7474 vn_submit_vkCmdBindTransformFeedbackBuffersEXT(vn_instance, 0, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, &submit); 7475} 7476 7477static inline void vn_call_vkCmdBeginTransformFeedbackEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 7478{ 7479 VN_TRACE_FUNC(); 7480 7481 struct vn_instance_submit_command submit; 7482 vn_submit_vkCmdBeginTransformFeedbackEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets, &submit); 7483 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7484 if (dec) { 7485 vn_decode_vkCmdBeginTransformFeedbackEXT_reply(dec, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); 7486 vn_instance_free_command_reply(vn_instance, &submit); 7487 } 7488} 7489 7490static inline void vn_async_vkCmdBeginTransformFeedbackEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 7491{ 7492 struct vn_instance_submit_command submit; 7493 vn_submit_vkCmdBeginTransformFeedbackEXT(vn_instance, 0, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets, &submit); 7494} 7495 7496static inline void vn_call_vkCmdEndTransformFeedbackEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 7497{ 7498 VN_TRACE_FUNC(); 7499 7500 struct vn_instance_submit_command submit; 7501 vn_submit_vkCmdEndTransformFeedbackEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets, &submit); 7502 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7503 if (dec) { 7504 vn_decode_vkCmdEndTransformFeedbackEXT_reply(dec, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); 7505 vn_instance_free_command_reply(vn_instance, &submit); 7506 } 7507} 7508 7509static inline void vn_async_vkCmdEndTransformFeedbackEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) 7510{ 7511 struct vn_instance_submit_command submit; 7512 vn_submit_vkCmdEndTransformFeedbackEXT(vn_instance, 0, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets, &submit); 7513} 7514 7515static inline void vn_call_vkCmdBeginQueryIndexedEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) 7516{ 7517 VN_TRACE_FUNC(); 7518 7519 struct vn_instance_submit_command submit; 7520 vn_submit_vkCmdBeginQueryIndexedEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, queryPool, query, flags, index, &submit); 7521 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7522 if (dec) { 7523 vn_decode_vkCmdBeginQueryIndexedEXT_reply(dec, commandBuffer, queryPool, query, flags, index); 7524 vn_instance_free_command_reply(vn_instance, &submit); 7525 } 7526} 7527 7528static inline void vn_async_vkCmdBeginQueryIndexedEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) 7529{ 7530 struct vn_instance_submit_command submit; 7531 vn_submit_vkCmdBeginQueryIndexedEXT(vn_instance, 0, commandBuffer, queryPool, query, flags, index, &submit); 7532} 7533 7534static inline void vn_call_vkCmdEndQueryIndexedEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) 7535{ 7536 VN_TRACE_FUNC(); 7537 7538 struct vn_instance_submit_command submit; 7539 vn_submit_vkCmdEndQueryIndexedEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, queryPool, query, index, &submit); 7540 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7541 if (dec) { 7542 vn_decode_vkCmdEndQueryIndexedEXT_reply(dec, commandBuffer, queryPool, query, index); 7543 vn_instance_free_command_reply(vn_instance, &submit); 7544 } 7545} 7546 7547static inline void vn_async_vkCmdEndQueryIndexedEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) 7548{ 7549 struct vn_instance_submit_command submit; 7550 vn_submit_vkCmdEndQueryIndexedEXT(vn_instance, 0, commandBuffer, queryPool, query, index, &submit); 7551} 7552 7553static inline void vn_call_vkCmdDrawIndirectByteCountEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) 7554{ 7555 VN_TRACE_FUNC(); 7556 7557 struct vn_instance_submit_command submit; 7558 vn_submit_vkCmdDrawIndirectByteCountEXT(vn_instance, VK_COMMAND_GENERATE_REPLY_BIT_EXT, commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride, &submit); 7559 struct vn_cs_decoder *dec = vn_instance_get_command_reply(vn_instance, &submit); 7560 if (dec) { 7561 vn_decode_vkCmdDrawIndirectByteCountEXT_reply(dec, commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride); 7562 vn_instance_free_command_reply(vn_instance, &submit); 7563 } 7564} 7565 7566static inline void vn_async_vkCmdDrawIndirectByteCountEXT(struct vn_instance *vn_instance, VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) 7567{ 7568 struct vn_instance_submit_command submit; 7569 vn_submit_vkCmdDrawIndirectByteCountEXT(vn_instance, 0, commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride, &submit); 7570} 7571 7572#endif /* VN_PROTOCOL_DRIVER_COMMAND_BUFFER_H */ 7573