1 /* THIS FILE IS GENERATED. DO NOT EDIT. */ 2 3 /* 4 * Vulkan 5 * 6 * Copyright (c) 2015-2016 The Khronos Group Inc. 7 * Copyright (c) 2015-2016 Valve Corporation. 8 * Copyright (c) 2015-2016 LunarG, Inc. 9 * Copyright (c) 2015-2016 Google Inc. 10 * 11 * Licensed under the Apache License, Version 2.0 (the "License"); 12 * you may not use this file except in compliance with the License. 13 * You may obtain a copy of the License at 14 * 15 * http://www.apache.org/licenses/LICENSE-2.0 16 * 17 * Unless required by applicable law or agreed to in writing, software 18 * distributed under the License is distributed on an "AS IS" BASIS, 19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 * See the License for the specific language governing permissions and 21 * limitations under the License. 22 * 23 * Author: Courtney Goeltzenleuchter <courtney (at) LunarG.com> 24 * Author: Tobin Ehlis <tobin (at) lunarg.com> 25 */ 26 #include "vk_struct_size_helper.h" 27 #include <string.h> 28 #include <assert.h> 29 30 // Function definitions 31 size_t vk_size_vkallocationcallbacks(const VkAllocationCallbacks* pStruct) 32 { 33 size_t structSize = 0; 34 if (pStruct) { 35 structSize = sizeof(VkAllocationCallbacks); 36 } 37 return structSize; 38 } 39 #ifdef VK_USE_PLATFORM_ANDROID_KHR 40 size_t vk_size_vkandroidsurfacecreateinfokhr(const VkAndroidSurfaceCreateInfoKHR* pStruct) 41 { 42 size_t structSize = 0; 43 if (pStruct) { 44 structSize = sizeof(VkAndroidSurfaceCreateInfoKHR); 45 structSize += sizeof(ANativeWindow); 46 } 47 return structSize; 48 } 49 #endif //VK_USE_PLATFORM_ANDROID_KHR 50 size_t vk_size_vkapplicationinfo(const VkApplicationInfo* pStruct) 51 { 52 size_t structSize = 0; 53 if (pStruct) { 54 structSize = sizeof(VkApplicationInfo); 55 structSize += (pStruct->pApplicationName != NULL) ? sizeof(char)*(1+strlen(pStruct->pApplicationName)) : 0; 56 structSize += (pStruct->pEngineName != NULL) ? sizeof(char)*(1+strlen(pStruct->pEngineName)) : 0; 57 } 58 return structSize; 59 } 60 size_t vk_size_vkattachmentdescription(const VkAttachmentDescription* pStruct) 61 { 62 size_t structSize = 0; 63 if (pStruct) { 64 structSize = sizeof(VkAttachmentDescription); 65 } 66 return structSize; 67 } 68 size_t vk_size_vkattachmentreference(const VkAttachmentReference* pStruct) 69 { 70 size_t structSize = 0; 71 if (pStruct) { 72 structSize = sizeof(VkAttachmentReference); 73 } 74 return structSize; 75 } 76 size_t vk_size_vkbindsparseinfo(const VkBindSparseInfo* pStruct) 77 { 78 size_t structSize = 0; 79 if (pStruct) { 80 structSize = sizeof(VkBindSparseInfo); 81 structSize += pStruct->waitSemaphoreCount*sizeof(VkSemaphore); 82 uint32_t i = 0; 83 for (i = 0; i < pStruct->bufferBindCount; i++) { 84 structSize += vk_size_vksparsebuffermemorybindinfo(&pStruct->pBufferBinds[i]); 85 } 86 for (i = 0; i < pStruct->imageOpaqueBindCount; i++) { 87 structSize += vk_size_vksparseimageopaquememorybindinfo(&pStruct->pImageOpaqueBinds[i]); 88 } 89 for (i = 0; i < pStruct->imageBindCount; i++) { 90 structSize += vk_size_vksparseimagememorybindinfo(&pStruct->pImageBinds[i]); 91 } 92 structSize += pStruct->signalSemaphoreCount*sizeof(VkSemaphore); 93 } 94 return structSize; 95 } 96 size_t vk_size_vkbuffercopy(const VkBufferCopy* pStruct) 97 { 98 size_t structSize = 0; 99 if (pStruct) { 100 structSize = sizeof(VkBufferCopy); 101 } 102 return structSize; 103 } 104 size_t vk_size_vkbuffercreateinfo(const VkBufferCreateInfo* pStruct) 105 { 106 size_t structSize = 0; 107 if (pStruct) { 108 structSize = sizeof(VkBufferCreateInfo); 109 structSize += pStruct->queueFamilyIndexCount*sizeof(uint32_t); 110 } 111 return structSize; 112 } 113 size_t vk_size_vkbufferimagecopy(const VkBufferImageCopy* pStruct) 114 { 115 size_t structSize = 0; 116 if (pStruct) { 117 structSize = sizeof(VkBufferImageCopy); 118 } 119 return structSize; 120 } 121 size_t vk_size_vkbuffermemorybarrier(const VkBufferMemoryBarrier* pStruct) 122 { 123 size_t structSize = 0; 124 if (pStruct) { 125 structSize = sizeof(VkBufferMemoryBarrier); 126 } 127 return structSize; 128 } 129 size_t vk_size_vkbufferviewcreateinfo(const VkBufferViewCreateInfo* pStruct) 130 { 131 size_t structSize = 0; 132 if (pStruct) { 133 structSize = sizeof(VkBufferViewCreateInfo); 134 } 135 return structSize; 136 } 137 size_t vk_size_vkclearattachment(const VkClearAttachment* pStruct) 138 { 139 size_t structSize = 0; 140 if (pStruct) { 141 structSize = sizeof(VkClearAttachment); 142 } 143 return structSize; 144 } 145 size_t vk_size_vkclearcolorvalue(const VkClearColorValue* pStruct) 146 { 147 size_t structSize = 0; 148 if (pStruct) { 149 structSize = sizeof(VkClearColorValue); 150 } 151 return structSize; 152 } 153 size_t vk_size_vkcleardepthstencilvalue(const VkClearDepthStencilValue* pStruct) 154 { 155 size_t structSize = 0; 156 if (pStruct) { 157 structSize = sizeof(VkClearDepthStencilValue); 158 } 159 return structSize; 160 } 161 size_t vk_size_vkclearrect(const VkClearRect* pStruct) 162 { 163 size_t structSize = 0; 164 if (pStruct) { 165 structSize = sizeof(VkClearRect); 166 } 167 return structSize; 168 } 169 size_t vk_size_vkclearvalue(const VkClearValue* pStruct) 170 { 171 size_t structSize = 0; 172 if (pStruct) { 173 structSize = sizeof(VkClearValue); 174 } 175 return structSize; 176 } 177 size_t vk_size_vkcommandbufferallocateinfo(const VkCommandBufferAllocateInfo* pStruct) 178 { 179 size_t structSize = 0; 180 if (pStruct) { 181 structSize = sizeof(VkCommandBufferAllocateInfo); 182 } 183 return structSize; 184 } 185 size_t vk_size_vkcommandbufferbegininfo(const VkCommandBufferBeginInfo* pStruct) 186 { 187 size_t structSize = 0; 188 if (pStruct) { 189 structSize = sizeof(VkCommandBufferBeginInfo); 190 structSize += vk_size_vkcommandbufferinheritanceinfo(pStruct->pInheritanceInfo); 191 } 192 return structSize; 193 } 194 size_t vk_size_vkcommandbufferinheritanceinfo(const VkCommandBufferInheritanceInfo* pStruct) 195 { 196 size_t structSize = 0; 197 if (pStruct) { 198 structSize = sizeof(VkCommandBufferInheritanceInfo); 199 } 200 return structSize; 201 } 202 size_t vk_size_vkcommandpoolcreateinfo(const VkCommandPoolCreateInfo* pStruct) 203 { 204 size_t structSize = 0; 205 if (pStruct) { 206 structSize = sizeof(VkCommandPoolCreateInfo); 207 } 208 return structSize; 209 } 210 size_t vk_size_vkcomponentmapping(const VkComponentMapping* pStruct) 211 { 212 size_t structSize = 0; 213 if (pStruct) { 214 structSize = sizeof(VkComponentMapping); 215 } 216 return structSize; 217 } 218 size_t vk_size_vkcomputepipelinecreateinfo(const VkComputePipelineCreateInfo* pStruct) 219 { 220 size_t structSize = 0; 221 if (pStruct) { 222 structSize = sizeof(VkComputePipelineCreateInfo); 223 } 224 return structSize; 225 } 226 size_t vk_size_vkcopydescriptorset(const VkCopyDescriptorSet* pStruct) 227 { 228 size_t structSize = 0; 229 if (pStruct) { 230 structSize = sizeof(VkCopyDescriptorSet); 231 } 232 return structSize; 233 } 234 size_t vk_size_vkdebugmarkermarkerinfoext(const VkDebugMarkerMarkerInfoEXT* pStruct) 235 { 236 size_t structSize = 0; 237 if (pStruct) { 238 structSize = sizeof(VkDebugMarkerMarkerInfoEXT); 239 structSize += (pStruct->pMarkerName != NULL) ? sizeof(char)*(1+strlen(pStruct->pMarkerName)) : 0; 240 } 241 return structSize; 242 } 243 size_t vk_size_vkdebugmarkerobjectnameinfoext(const VkDebugMarkerObjectNameInfoEXT* pStruct) 244 { 245 size_t structSize = 0; 246 if (pStruct) { 247 structSize = sizeof(VkDebugMarkerObjectNameInfoEXT); 248 structSize += (pStruct->pObjectName != NULL) ? sizeof(char)*(1+strlen(pStruct->pObjectName)) : 0; 249 } 250 return structSize; 251 } 252 size_t vk_size_vkdebugmarkerobjecttaginfoext(const VkDebugMarkerObjectTagInfoEXT* pStruct) 253 { 254 size_t structSize = 0; 255 if (pStruct) { 256 structSize = sizeof(VkDebugMarkerObjectTagInfoEXT); 257 structSize += pStruct->tagSize; 258 } 259 return structSize; 260 } 261 size_t vk_size_vkdebugreportcallbackcreateinfoext(const VkDebugReportCallbackCreateInfoEXT* pStruct) 262 { 263 size_t structSize = 0; 264 if (pStruct) { 265 structSize = sizeof(VkDebugReportCallbackCreateInfoEXT); 266 } 267 return structSize; 268 } 269 size_t vk_size_vkdedicatedallocationbuffercreateinfonv(const VkDedicatedAllocationBufferCreateInfoNV* pStruct) 270 { 271 size_t structSize = 0; 272 if (pStruct) { 273 structSize = sizeof(VkDedicatedAllocationBufferCreateInfoNV); 274 } 275 return structSize; 276 } 277 size_t vk_size_vkdedicatedallocationimagecreateinfonv(const VkDedicatedAllocationImageCreateInfoNV* pStruct) 278 { 279 size_t structSize = 0; 280 if (pStruct) { 281 structSize = sizeof(VkDedicatedAllocationImageCreateInfoNV); 282 } 283 return structSize; 284 } 285 size_t vk_size_vkdedicatedallocationmemoryallocateinfonv(const VkDedicatedAllocationMemoryAllocateInfoNV* pStruct) 286 { 287 size_t structSize = 0; 288 if (pStruct) { 289 structSize = sizeof(VkDedicatedAllocationMemoryAllocateInfoNV); 290 } 291 return structSize; 292 } 293 size_t vk_size_vkdescriptorbufferinfo(const VkDescriptorBufferInfo* pStruct) 294 { 295 size_t structSize = 0; 296 if (pStruct) { 297 structSize = sizeof(VkDescriptorBufferInfo); 298 } 299 return structSize; 300 } 301 size_t vk_size_vkdescriptorimageinfo(const VkDescriptorImageInfo* pStruct) 302 { 303 size_t structSize = 0; 304 if (pStruct) { 305 structSize = sizeof(VkDescriptorImageInfo); 306 } 307 return structSize; 308 } 309 size_t vk_size_vkdescriptorpoolcreateinfo(const VkDescriptorPoolCreateInfo* pStruct) 310 { 311 size_t structSize = 0; 312 if (pStruct) { 313 structSize = sizeof(VkDescriptorPoolCreateInfo); 314 uint32_t i = 0; 315 for (i = 0; i < pStruct->poolSizeCount; i++) { 316 structSize += vk_size_vkdescriptorpoolsize(&pStruct->pPoolSizes[i]); 317 } 318 } 319 return structSize; 320 } 321 size_t vk_size_vkdescriptorpoolsize(const VkDescriptorPoolSize* pStruct) 322 { 323 size_t structSize = 0; 324 if (pStruct) { 325 structSize = sizeof(VkDescriptorPoolSize); 326 } 327 return structSize; 328 } 329 size_t vk_size_vkdescriptorsetallocateinfo(const VkDescriptorSetAllocateInfo* pStruct) 330 { 331 size_t structSize = 0; 332 if (pStruct) { 333 structSize = sizeof(VkDescriptorSetAllocateInfo); 334 structSize += pStruct->descriptorSetCount*sizeof(VkDescriptorSetLayout); 335 } 336 return structSize; 337 } 338 size_t vk_size_vkdescriptorsetlayoutbinding(const VkDescriptorSetLayoutBinding* pStruct) 339 { 340 size_t structSize = 0; 341 if (pStruct) { 342 structSize = sizeof(VkDescriptorSetLayoutBinding); 343 structSize += pStruct->descriptorCount*sizeof(VkSampler); 344 } 345 return structSize; 346 } 347 size_t vk_size_vkdescriptorsetlayoutcreateinfo(const VkDescriptorSetLayoutCreateInfo* pStruct) 348 { 349 size_t structSize = 0; 350 if (pStruct) { 351 structSize = sizeof(VkDescriptorSetLayoutCreateInfo); 352 uint32_t i = 0; 353 for (i = 0; i < pStruct->bindingCount; i++) { 354 structSize += vk_size_vkdescriptorsetlayoutbinding(&pStruct->pBindings[i]); 355 } 356 } 357 return structSize; 358 } 359 size_t vk_size_vkdevicecreateinfo(const VkDeviceCreateInfo* pStruct) 360 { 361 size_t structSize = 0; 362 if (pStruct) { 363 structSize = sizeof(VkDeviceCreateInfo); 364 uint32_t i = 0; 365 for (i = 0; i < pStruct->queueCreateInfoCount; i++) { 366 structSize += vk_size_vkdevicequeuecreateinfo(&pStruct->pQueueCreateInfos[i]); 367 } 368 for (i = 0; i < pStruct->enabledLayerCount; i++) { 369 structSize += (sizeof(char*) + (sizeof(char) * (1 + strlen(pStruct->ppEnabledLayerNames[i])))); 370 } 371 for (i = 0; i < pStruct->enabledExtensionCount; i++) { 372 structSize += (sizeof(char*) + (sizeof(char) * (1 + strlen(pStruct->ppEnabledExtensionNames[i])))); 373 } 374 structSize += vk_size_vkphysicaldevicefeatures(pStruct->pEnabledFeatures); 375 } 376 return structSize; 377 } 378 size_t vk_size_vkdevicequeuecreateinfo(const VkDeviceQueueCreateInfo* pStruct) 379 { 380 size_t structSize = 0; 381 if (pStruct) { 382 structSize = sizeof(VkDeviceQueueCreateInfo); 383 structSize += pStruct->queueCount*sizeof(float); 384 } 385 return structSize; 386 } 387 size_t vk_size_vkdispatchindirectcommand(const VkDispatchIndirectCommand* pStruct) 388 { 389 size_t structSize = 0; 390 if (pStruct) { 391 structSize = sizeof(VkDispatchIndirectCommand); 392 } 393 return structSize; 394 } 395 size_t vk_size_vkdisplaymodecreateinfokhr(const VkDisplayModeCreateInfoKHR* pStruct) 396 { 397 size_t structSize = 0; 398 if (pStruct) { 399 structSize = sizeof(VkDisplayModeCreateInfoKHR); 400 } 401 return structSize; 402 } 403 size_t vk_size_vkdisplaymodeparameterskhr(const VkDisplayModeParametersKHR* pStruct) 404 { 405 size_t structSize = 0; 406 if (pStruct) { 407 structSize = sizeof(VkDisplayModeParametersKHR); 408 } 409 return structSize; 410 } 411 size_t vk_size_vkdisplaymodepropertieskhr(const VkDisplayModePropertiesKHR* pStruct) 412 { 413 size_t structSize = 0; 414 if (pStruct) { 415 structSize = sizeof(VkDisplayModePropertiesKHR); 416 } 417 return structSize; 418 } 419 size_t vk_size_vkdisplayplanecapabilitieskhr(const VkDisplayPlaneCapabilitiesKHR* pStruct) 420 { 421 size_t structSize = 0; 422 if (pStruct) { 423 structSize = sizeof(VkDisplayPlaneCapabilitiesKHR); 424 } 425 return structSize; 426 } 427 size_t vk_size_vkdisplayplanepropertieskhr(const VkDisplayPlanePropertiesKHR* pStruct) 428 { 429 size_t structSize = 0; 430 if (pStruct) { 431 structSize = sizeof(VkDisplayPlanePropertiesKHR); 432 } 433 return structSize; 434 } 435 size_t vk_size_vkdisplaypresentinfokhr(const VkDisplayPresentInfoKHR* pStruct) 436 { 437 size_t structSize = 0; 438 if (pStruct) { 439 structSize = sizeof(VkDisplayPresentInfoKHR); 440 } 441 return structSize; 442 } 443 size_t vk_size_vkdisplaypropertieskhr(const VkDisplayPropertiesKHR* pStruct) 444 { 445 size_t structSize = 0; 446 if (pStruct) { 447 structSize = sizeof(VkDisplayPropertiesKHR); 448 structSize += (pStruct->displayName != NULL) ? sizeof(char)*(1+strlen(pStruct->displayName)) : 0; 449 } 450 return structSize; 451 } 452 size_t vk_size_vkdisplaysurfacecreateinfokhr(const VkDisplaySurfaceCreateInfoKHR* pStruct) 453 { 454 size_t structSize = 0; 455 if (pStruct) { 456 structSize = sizeof(VkDisplaySurfaceCreateInfoKHR); 457 } 458 return structSize; 459 } 460 size_t vk_size_vkdrawindexedindirectcommand(const VkDrawIndexedIndirectCommand* pStruct) 461 { 462 size_t structSize = 0; 463 if (pStruct) { 464 structSize = sizeof(VkDrawIndexedIndirectCommand); 465 } 466 return structSize; 467 } 468 size_t vk_size_vkdrawindirectcommand(const VkDrawIndirectCommand* pStruct) 469 { 470 size_t structSize = 0; 471 if (pStruct) { 472 structSize = sizeof(VkDrawIndirectCommand); 473 } 474 return structSize; 475 } 476 size_t vk_size_vkeventcreateinfo(const VkEventCreateInfo* pStruct) 477 { 478 size_t structSize = 0; 479 if (pStruct) { 480 structSize = sizeof(VkEventCreateInfo); 481 } 482 return structSize; 483 } 484 size_t vk_size_vkexportmemoryallocateinfonv(const VkExportMemoryAllocateInfoNV* pStruct) 485 { 486 size_t structSize = 0; 487 if (pStruct) { 488 structSize = sizeof(VkExportMemoryAllocateInfoNV); 489 } 490 return structSize; 491 } 492 #ifdef VK_USE_PLATFORM_WIN32_KHR 493 size_t vk_size_vkexportmemorywin32handleinfonv(const VkExportMemoryWin32HandleInfoNV* pStruct) 494 { 495 size_t structSize = 0; 496 if (pStruct) { 497 structSize = sizeof(VkExportMemoryWin32HandleInfoNV); 498 structSize += sizeof(SECURITY_ATTRIBUTES); 499 } 500 return structSize; 501 } 502 #endif //VK_USE_PLATFORM_WIN32_KHR 503 size_t vk_size_vkextensionproperties(const VkExtensionProperties* pStruct) 504 { 505 size_t structSize = 0; 506 if (pStruct) { 507 structSize = sizeof(VkExtensionProperties); 508 } 509 return structSize; 510 } 511 size_t vk_size_vkextent2d(const VkExtent2D* pStruct) 512 { 513 size_t structSize = 0; 514 if (pStruct) { 515 structSize = sizeof(VkExtent2D); 516 } 517 return structSize; 518 } 519 size_t vk_size_vkextent3d(const VkExtent3D* pStruct) 520 { 521 size_t structSize = 0; 522 if (pStruct) { 523 structSize = sizeof(VkExtent3D); 524 } 525 return structSize; 526 } 527 size_t vk_size_vkexternalimageformatpropertiesnv(const VkExternalImageFormatPropertiesNV* pStruct) 528 { 529 size_t structSize = 0; 530 if (pStruct) { 531 structSize = sizeof(VkExternalImageFormatPropertiesNV); 532 } 533 return structSize; 534 } 535 size_t vk_size_vkexternalmemoryimagecreateinfonv(const VkExternalMemoryImageCreateInfoNV* pStruct) 536 { 537 size_t structSize = 0; 538 if (pStruct) { 539 structSize = sizeof(VkExternalMemoryImageCreateInfoNV); 540 } 541 return structSize; 542 } 543 size_t vk_size_vkfencecreateinfo(const VkFenceCreateInfo* pStruct) 544 { 545 size_t structSize = 0; 546 if (pStruct) { 547 structSize = sizeof(VkFenceCreateInfo); 548 } 549 return structSize; 550 } 551 size_t vk_size_vkformatproperties(const VkFormatProperties* pStruct) 552 { 553 size_t structSize = 0; 554 if (pStruct) { 555 structSize = sizeof(VkFormatProperties); 556 } 557 return structSize; 558 } 559 size_t vk_size_vkframebuffercreateinfo(const VkFramebufferCreateInfo* pStruct) 560 { 561 size_t structSize = 0; 562 if (pStruct) { 563 structSize = sizeof(VkFramebufferCreateInfo); 564 structSize += pStruct->attachmentCount*sizeof(VkImageView); 565 } 566 return structSize; 567 } 568 size_t vk_size_vkgraphicspipelinecreateinfo(const VkGraphicsPipelineCreateInfo* pStruct) 569 { 570 size_t structSize = 0; 571 if (pStruct) { 572 structSize = sizeof(VkGraphicsPipelineCreateInfo); 573 uint32_t i = 0; 574 for (i = 0; i < pStruct->stageCount; i++) { 575 structSize += vk_size_vkpipelineshaderstagecreateinfo(&pStruct->pStages[i]); 576 } 577 structSize += vk_size_vkpipelinevertexinputstatecreateinfo(pStruct->pVertexInputState); 578 structSize += vk_size_vkpipelineinputassemblystatecreateinfo(pStruct->pInputAssemblyState); 579 structSize += vk_size_vkpipelinetessellationstatecreateinfo(pStruct->pTessellationState); 580 structSize += vk_size_vkpipelineviewportstatecreateinfo(pStruct->pViewportState); 581 structSize += vk_size_vkpipelinerasterizationstatecreateinfo(pStruct->pRasterizationState); 582 structSize += vk_size_vkpipelinemultisamplestatecreateinfo(pStruct->pMultisampleState); 583 structSize += vk_size_vkpipelinedepthstencilstatecreateinfo(pStruct->pDepthStencilState); 584 structSize += vk_size_vkpipelinecolorblendstatecreateinfo(pStruct->pColorBlendState); 585 structSize += vk_size_vkpipelinedynamicstatecreateinfo(pStruct->pDynamicState); 586 } 587 return structSize; 588 } 589 size_t vk_size_vkimageblit(const VkImageBlit* pStruct) 590 { 591 size_t structSize = 0; 592 if (pStruct) { 593 structSize = sizeof(VkImageBlit); 594 } 595 return structSize; 596 } 597 size_t vk_size_vkimagecopy(const VkImageCopy* pStruct) 598 { 599 size_t structSize = 0; 600 if (pStruct) { 601 structSize = sizeof(VkImageCopy); 602 } 603 return structSize; 604 } 605 size_t vk_size_vkimagecreateinfo(const VkImageCreateInfo* pStruct) 606 { 607 size_t structSize = 0; 608 if (pStruct) { 609 structSize = sizeof(VkImageCreateInfo); 610 structSize += pStruct->queueFamilyIndexCount*sizeof(uint32_t); 611 } 612 return structSize; 613 } 614 size_t vk_size_vkimageformatproperties(const VkImageFormatProperties* pStruct) 615 { 616 size_t structSize = 0; 617 if (pStruct) { 618 structSize = sizeof(VkImageFormatProperties); 619 } 620 return structSize; 621 } 622 size_t vk_size_vkimagememorybarrier(const VkImageMemoryBarrier* pStruct) 623 { 624 size_t structSize = 0; 625 if (pStruct) { 626 structSize = sizeof(VkImageMemoryBarrier); 627 } 628 return structSize; 629 } 630 size_t vk_size_vkimageresolve(const VkImageResolve* pStruct) 631 { 632 size_t structSize = 0; 633 if (pStruct) { 634 structSize = sizeof(VkImageResolve); 635 } 636 return structSize; 637 } 638 size_t vk_size_vkimagesubresource(const VkImageSubresource* pStruct) 639 { 640 size_t structSize = 0; 641 if (pStruct) { 642 structSize = sizeof(VkImageSubresource); 643 } 644 return structSize; 645 } 646 size_t vk_size_vkimagesubresourcelayers(const VkImageSubresourceLayers* pStruct) 647 { 648 size_t structSize = 0; 649 if (pStruct) { 650 structSize = sizeof(VkImageSubresourceLayers); 651 } 652 return structSize; 653 } 654 size_t vk_size_vkimagesubresourcerange(const VkImageSubresourceRange* pStruct) 655 { 656 size_t structSize = 0; 657 if (pStruct) { 658 structSize = sizeof(VkImageSubresourceRange); 659 } 660 return structSize; 661 } 662 size_t vk_size_vkimageviewcreateinfo(const VkImageViewCreateInfo* pStruct) 663 { 664 size_t structSize = 0; 665 if (pStruct) { 666 structSize = sizeof(VkImageViewCreateInfo); 667 } 668 return structSize; 669 } 670 #ifdef VK_USE_PLATFORM_WIN32_KHR 671 size_t vk_size_vkimportmemorywin32handleinfonv(const VkImportMemoryWin32HandleInfoNV* pStruct) 672 { 673 size_t structSize = 0; 674 if (pStruct) { 675 structSize = sizeof(VkImportMemoryWin32HandleInfoNV); 676 } 677 return structSize; 678 } 679 #endif //VK_USE_PLATFORM_WIN32_KHR 680 size_t vk_size_vkinstancecreateinfo(const VkInstanceCreateInfo* pStruct) 681 { 682 size_t structSize = 0; 683 if (pStruct) { 684 structSize = sizeof(VkInstanceCreateInfo); 685 structSize += vk_size_vkapplicationinfo(pStruct->pApplicationInfo); 686 uint32_t i = 0; 687 for (i = 0; i < pStruct->enabledLayerCount; i++) { 688 structSize += (sizeof(char*) + (sizeof(char) * (1 + strlen(pStruct->ppEnabledLayerNames[i])))); 689 } 690 for (i = 0; i < pStruct->enabledExtensionCount; i++) { 691 structSize += (sizeof(char*) + (sizeof(char) * (1 + strlen(pStruct->ppEnabledExtensionNames[i])))); 692 } 693 } 694 return structSize; 695 } 696 size_t vk_size_vklayerproperties(const VkLayerProperties* pStruct) 697 { 698 size_t structSize = 0; 699 if (pStruct) { 700 structSize = sizeof(VkLayerProperties); 701 } 702 return structSize; 703 } 704 size_t vk_size_vkmappedmemoryrange(const VkMappedMemoryRange* pStruct) 705 { 706 size_t structSize = 0; 707 if (pStruct) { 708 structSize = sizeof(VkMappedMemoryRange); 709 } 710 return structSize; 711 } 712 size_t vk_size_vkmemoryallocateinfo(const VkMemoryAllocateInfo* pStruct) 713 { 714 size_t structSize = 0; 715 if (pStruct) { 716 structSize = sizeof(VkMemoryAllocateInfo); 717 } 718 return structSize; 719 } 720 size_t vk_size_vkmemorybarrier(const VkMemoryBarrier* pStruct) 721 { 722 size_t structSize = 0; 723 if (pStruct) { 724 structSize = sizeof(VkMemoryBarrier); 725 } 726 return structSize; 727 } 728 size_t vk_size_vkmemoryheap(const VkMemoryHeap* pStruct) 729 { 730 size_t structSize = 0; 731 if (pStruct) { 732 structSize = sizeof(VkMemoryHeap); 733 } 734 return structSize; 735 } 736 size_t vk_size_vkmemoryrequirements(const VkMemoryRequirements* pStruct) 737 { 738 size_t structSize = 0; 739 if (pStruct) { 740 structSize = sizeof(VkMemoryRequirements); 741 } 742 return structSize; 743 } 744 size_t vk_size_vkmemorytype(const VkMemoryType* pStruct) 745 { 746 size_t structSize = 0; 747 if (pStruct) { 748 structSize = sizeof(VkMemoryType); 749 } 750 return structSize; 751 } 752 #ifdef VK_USE_PLATFORM_MIR_KHR 753 size_t vk_size_vkmirsurfacecreateinfokhr(const VkMirSurfaceCreateInfoKHR* pStruct) 754 { 755 size_t structSize = 0; 756 if (pStruct) { 757 structSize = sizeof(VkMirSurfaceCreateInfoKHR); 758 structSize += sizeof(MirConnection); 759 structSize += sizeof(MirSurface); 760 } 761 return structSize; 762 } 763 #endif //VK_USE_PLATFORM_MIR_KHR 764 size_t vk_size_vkoffset2d(const VkOffset2D* pStruct) 765 { 766 size_t structSize = 0; 767 if (pStruct) { 768 structSize = sizeof(VkOffset2D); 769 } 770 return structSize; 771 } 772 size_t vk_size_vkoffset3d(const VkOffset3D* pStruct) 773 { 774 size_t structSize = 0; 775 if (pStruct) { 776 structSize = sizeof(VkOffset3D); 777 } 778 return structSize; 779 } 780 size_t vk_size_vkphysicaldevicefeatures(const VkPhysicalDeviceFeatures* pStruct) 781 { 782 size_t structSize = 0; 783 if (pStruct) { 784 structSize = sizeof(VkPhysicalDeviceFeatures); 785 } 786 return structSize; 787 } 788 size_t vk_size_vkphysicaldevicelimits(const VkPhysicalDeviceLimits* pStruct) 789 { 790 size_t structSize = 0; 791 if (pStruct) { 792 structSize = sizeof(VkPhysicalDeviceLimits); 793 structSize += pStruct->minMemoryMapAlignment; 794 } 795 return structSize; 796 } 797 size_t vk_size_vkphysicaldevicememoryproperties(const VkPhysicalDeviceMemoryProperties* pStruct) 798 { 799 size_t structSize = 0; 800 if (pStruct) { 801 structSize = sizeof(VkPhysicalDeviceMemoryProperties); 802 } 803 return structSize; 804 } 805 size_t vk_size_vkphysicaldeviceproperties(const VkPhysicalDeviceProperties* pStruct) 806 { 807 size_t structSize = 0; 808 if (pStruct) { 809 structSize = sizeof(VkPhysicalDeviceProperties); 810 } 811 return structSize; 812 } 813 size_t vk_size_vkphysicaldevicesparseproperties(const VkPhysicalDeviceSparseProperties* pStruct) 814 { 815 size_t structSize = 0; 816 if (pStruct) { 817 structSize = sizeof(VkPhysicalDeviceSparseProperties); 818 } 819 return structSize; 820 } 821 size_t vk_size_vkpipelinecachecreateinfo(const VkPipelineCacheCreateInfo* pStruct) 822 { 823 size_t structSize = 0; 824 if (pStruct) { 825 structSize = sizeof(VkPipelineCacheCreateInfo); 826 structSize += pStruct->initialDataSize; 827 } 828 return structSize; 829 } 830 size_t vk_size_vkpipelinecolorblendattachmentstate(const VkPipelineColorBlendAttachmentState* pStruct) 831 { 832 size_t structSize = 0; 833 if (pStruct) { 834 structSize = sizeof(VkPipelineColorBlendAttachmentState); 835 } 836 return structSize; 837 } 838 size_t vk_size_vkpipelinecolorblendstatecreateinfo(const VkPipelineColorBlendStateCreateInfo* pStruct) 839 { 840 size_t structSize = 0; 841 if (pStruct) { 842 structSize = sizeof(VkPipelineColorBlendStateCreateInfo); 843 uint32_t i = 0; 844 for (i = 0; i < pStruct->attachmentCount; i++) { 845 structSize += vk_size_vkpipelinecolorblendattachmentstate(&pStruct->pAttachments[i]); 846 } 847 } 848 return structSize; 849 } 850 size_t vk_size_vkpipelinedepthstencilstatecreateinfo(const VkPipelineDepthStencilStateCreateInfo* pStruct) 851 { 852 size_t structSize = 0; 853 if (pStruct) { 854 structSize = sizeof(VkPipelineDepthStencilStateCreateInfo); 855 } 856 return structSize; 857 } 858 size_t vk_size_vkpipelinedynamicstatecreateinfo(const VkPipelineDynamicStateCreateInfo* pStruct) 859 { 860 size_t structSize = 0; 861 if (pStruct) { 862 structSize = sizeof(VkPipelineDynamicStateCreateInfo); 863 structSize += pStruct->dynamicStateCount*sizeof(VkDynamicState); 864 } 865 return structSize; 866 } 867 size_t vk_size_vkpipelineinputassemblystatecreateinfo(const VkPipelineInputAssemblyStateCreateInfo* pStruct) 868 { 869 size_t structSize = 0; 870 if (pStruct) { 871 structSize = sizeof(VkPipelineInputAssemblyStateCreateInfo); 872 } 873 return structSize; 874 } 875 size_t vk_size_vkpipelinelayoutcreateinfo(const VkPipelineLayoutCreateInfo* pStruct) 876 { 877 size_t structSize = 0; 878 if (pStruct) { 879 structSize = sizeof(VkPipelineLayoutCreateInfo); 880 structSize += pStruct->setLayoutCount*sizeof(VkDescriptorSetLayout); 881 uint32_t i = 0; 882 for (i = 0; i < pStruct->pushConstantRangeCount; i++) { 883 structSize += vk_size_vkpushconstantrange(&pStruct->pPushConstantRanges[i]); 884 } 885 } 886 return structSize; 887 } 888 size_t vk_size_vkpipelinemultisamplestatecreateinfo(const VkPipelineMultisampleStateCreateInfo* pStruct) 889 { 890 size_t structSize = 0; 891 if (pStruct) { 892 structSize = sizeof(VkPipelineMultisampleStateCreateInfo); 893 structSize += sizeof(VkSampleMask); 894 } 895 return structSize; 896 } 897 size_t vk_size_vkpipelinerasterizationstatecreateinfo(const VkPipelineRasterizationStateCreateInfo* pStruct) 898 { 899 size_t structSize = 0; 900 if (pStruct) { 901 structSize = sizeof(VkPipelineRasterizationStateCreateInfo); 902 } 903 return structSize; 904 } 905 size_t vk_size_vkpipelinerasterizationstaterasterizationorderamd(const VkPipelineRasterizationStateRasterizationOrderAMD* pStruct) 906 { 907 size_t structSize = 0; 908 if (pStruct) { 909 structSize = sizeof(VkPipelineRasterizationStateRasterizationOrderAMD); 910 } 911 return structSize; 912 } 913 size_t vk_size_vkpipelineshaderstagecreateinfo(const VkPipelineShaderStageCreateInfo* pStruct) 914 { 915 size_t structSize = 0; 916 if (pStruct) { 917 structSize = sizeof(VkPipelineShaderStageCreateInfo); 918 structSize += (pStruct->pName != NULL) ? sizeof(char)*(1+strlen(pStruct->pName)) : 0; 919 structSize += vk_size_vkspecializationinfo(pStruct->pSpecializationInfo); 920 } 921 return structSize; 922 } 923 size_t vk_size_vkpipelinetessellationstatecreateinfo(const VkPipelineTessellationStateCreateInfo* pStruct) 924 { 925 size_t structSize = 0; 926 if (pStruct) { 927 structSize = sizeof(VkPipelineTessellationStateCreateInfo); 928 } 929 return structSize; 930 } 931 size_t vk_size_vkpipelinevertexinputstatecreateinfo(const VkPipelineVertexInputStateCreateInfo* pStruct) 932 { 933 size_t structSize = 0; 934 if (pStruct) { 935 structSize = sizeof(VkPipelineVertexInputStateCreateInfo); 936 uint32_t i = 0; 937 for (i = 0; i < pStruct->vertexBindingDescriptionCount; i++) { 938 structSize += vk_size_vkvertexinputbindingdescription(&pStruct->pVertexBindingDescriptions[i]); 939 } 940 for (i = 0; i < pStruct->vertexAttributeDescriptionCount; i++) { 941 structSize += vk_size_vkvertexinputattributedescription(&pStruct->pVertexAttributeDescriptions[i]); 942 } 943 } 944 return structSize; 945 } 946 size_t vk_size_vkpipelineviewportstatecreateinfo(const VkPipelineViewportStateCreateInfo* pStruct) 947 { 948 size_t structSize = 0; 949 if (pStruct) { 950 structSize = sizeof(VkPipelineViewportStateCreateInfo); 951 uint32_t i = 0; 952 for (i = 0; i < pStruct->viewportCount; i++) { 953 structSize += vk_size_vkviewport(&pStruct->pViewports[i]); 954 } 955 for (i = 0; i < pStruct->scissorCount; i++) { 956 structSize += vk_size_vkrect2d(&pStruct->pScissors[i]); 957 } 958 } 959 return structSize; 960 } 961 size_t vk_size_vkpresentinfokhr(const VkPresentInfoKHR* pStruct) 962 { 963 size_t structSize = 0; 964 if (pStruct) { 965 structSize = sizeof(VkPresentInfoKHR); 966 structSize += pStruct->waitSemaphoreCount*sizeof(VkSemaphore); 967 structSize += pStruct->swapchainCount*sizeof(VkSwapchainKHR); 968 structSize += pStruct->swapchainCount*sizeof(uint32_t); 969 structSize += sizeof(VkResult); 970 } 971 return structSize; 972 } 973 size_t vk_size_vkpushconstantrange(const VkPushConstantRange* pStruct) 974 { 975 size_t structSize = 0; 976 if (pStruct) { 977 structSize = sizeof(VkPushConstantRange); 978 } 979 return structSize; 980 } 981 size_t vk_size_vkquerypoolcreateinfo(const VkQueryPoolCreateInfo* pStruct) 982 { 983 size_t structSize = 0; 984 if (pStruct) { 985 structSize = sizeof(VkQueryPoolCreateInfo); 986 } 987 return structSize; 988 } 989 size_t vk_size_vkqueuefamilyproperties(const VkQueueFamilyProperties* pStruct) 990 { 991 size_t structSize = 0; 992 if (pStruct) { 993 structSize = sizeof(VkQueueFamilyProperties); 994 } 995 return structSize; 996 } 997 size_t vk_size_vkrect2d(const VkRect2D* pStruct) 998 { 999 size_t structSize = 0; 1000 if (pStruct) { 1001 structSize = sizeof(VkRect2D); 1002 } 1003 return structSize; 1004 } 1005 size_t vk_size_vkrenderpassbegininfo(const VkRenderPassBeginInfo* pStruct) 1006 { 1007 size_t structSize = 0; 1008 if (pStruct) { 1009 structSize = sizeof(VkRenderPassBeginInfo); 1010 uint32_t i = 0; 1011 for (i = 0; i < pStruct->clearValueCount; i++) { 1012 structSize += vk_size_vkclearvalue(&pStruct->pClearValues[i]); 1013 } 1014 } 1015 return structSize; 1016 } 1017 size_t vk_size_vkrenderpasscreateinfo(const VkRenderPassCreateInfo* pStruct) 1018 { 1019 size_t structSize = 0; 1020 if (pStruct) { 1021 structSize = sizeof(VkRenderPassCreateInfo); 1022 uint32_t i = 0; 1023 for (i = 0; i < pStruct->attachmentCount; i++) { 1024 structSize += vk_size_vkattachmentdescription(&pStruct->pAttachments[i]); 1025 } 1026 for (i = 0; i < pStruct->subpassCount; i++) { 1027 structSize += vk_size_vksubpassdescription(&pStruct->pSubpasses[i]); 1028 } 1029 for (i = 0; i < pStruct->dependencyCount; i++) { 1030 structSize += vk_size_vksubpassdependency(&pStruct->pDependencies[i]); 1031 } 1032 } 1033 return structSize; 1034 } 1035 size_t vk_size_vksamplercreateinfo(const VkSamplerCreateInfo* pStruct) 1036 { 1037 size_t structSize = 0; 1038 if (pStruct) { 1039 structSize = sizeof(VkSamplerCreateInfo); 1040 } 1041 return structSize; 1042 } 1043 size_t vk_size_vksemaphorecreateinfo(const VkSemaphoreCreateInfo* pStruct) 1044 { 1045 size_t structSize = 0; 1046 if (pStruct) { 1047 structSize = sizeof(VkSemaphoreCreateInfo); 1048 } 1049 return structSize; 1050 } 1051 size_t vk_size_vkshadermodulecreateinfo(const VkShaderModuleCreateInfo* pStruct) 1052 { 1053 size_t structSize = 0; 1054 if (pStruct) { 1055 structSize = sizeof(VkShaderModuleCreateInfo); 1056 structSize += pStruct->codeSize; 1057 } 1058 return structSize; 1059 } 1060 size_t vk_size_vksparsebuffermemorybindinfo(const VkSparseBufferMemoryBindInfo* pStruct) 1061 { 1062 size_t structSize = 0; 1063 if (pStruct) { 1064 structSize = sizeof(VkSparseBufferMemoryBindInfo); 1065 uint32_t i = 0; 1066 for (i = 0; i < pStruct->bindCount; i++) { 1067 structSize += vk_size_vksparsememorybind(&pStruct->pBinds[i]); 1068 } 1069 } 1070 return structSize; 1071 } 1072 size_t vk_size_vksparseimageformatproperties(const VkSparseImageFormatProperties* pStruct) 1073 { 1074 size_t structSize = 0; 1075 if (pStruct) { 1076 structSize = sizeof(VkSparseImageFormatProperties); 1077 } 1078 return structSize; 1079 } 1080 size_t vk_size_vksparseimagememorybind(const VkSparseImageMemoryBind* pStruct) 1081 { 1082 size_t structSize = 0; 1083 if (pStruct) { 1084 structSize = sizeof(VkSparseImageMemoryBind); 1085 } 1086 return structSize; 1087 } 1088 size_t vk_size_vksparseimagememorybindinfo(const VkSparseImageMemoryBindInfo* pStruct) 1089 { 1090 size_t structSize = 0; 1091 if (pStruct) { 1092 structSize = sizeof(VkSparseImageMemoryBindInfo); 1093 uint32_t i = 0; 1094 for (i = 0; i < pStruct->bindCount; i++) { 1095 structSize += vk_size_vksparseimagememorybind(&pStruct->pBinds[i]); 1096 } 1097 } 1098 return structSize; 1099 } 1100 size_t vk_size_vksparseimagememoryrequirements(const VkSparseImageMemoryRequirements* pStruct) 1101 { 1102 size_t structSize = 0; 1103 if (pStruct) { 1104 structSize = sizeof(VkSparseImageMemoryRequirements); 1105 } 1106 return structSize; 1107 } 1108 size_t vk_size_vksparseimageopaquememorybindinfo(const VkSparseImageOpaqueMemoryBindInfo* pStruct) 1109 { 1110 size_t structSize = 0; 1111 if (pStruct) { 1112 structSize = sizeof(VkSparseImageOpaqueMemoryBindInfo); 1113 uint32_t i = 0; 1114 for (i = 0; i < pStruct->bindCount; i++) { 1115 structSize += vk_size_vksparsememorybind(&pStruct->pBinds[i]); 1116 } 1117 } 1118 return structSize; 1119 } 1120 size_t vk_size_vksparsememorybind(const VkSparseMemoryBind* pStruct) 1121 { 1122 size_t structSize = 0; 1123 if (pStruct) { 1124 structSize = sizeof(VkSparseMemoryBind); 1125 } 1126 return structSize; 1127 } 1128 size_t vk_size_vkspecializationinfo(const VkSpecializationInfo* pStruct) 1129 { 1130 size_t structSize = 0; 1131 if (pStruct) { 1132 structSize = sizeof(VkSpecializationInfo); 1133 uint32_t i = 0; 1134 for (i = 0; i < pStruct->mapEntryCount; i++) { 1135 structSize += vk_size_vkspecializationmapentry(&pStruct->pMapEntries[i]); 1136 } 1137 structSize += pStruct->dataSize; 1138 } 1139 return structSize; 1140 } 1141 size_t vk_size_vkspecializationmapentry(const VkSpecializationMapEntry* pStruct) 1142 { 1143 size_t structSize = 0; 1144 if (pStruct) { 1145 structSize = sizeof(VkSpecializationMapEntry); 1146 structSize += pStruct->size; 1147 } 1148 return structSize; 1149 } 1150 size_t vk_size_vkstencilopstate(const VkStencilOpState* pStruct) 1151 { 1152 size_t structSize = 0; 1153 if (pStruct) { 1154 structSize = sizeof(VkStencilOpState); 1155 } 1156 return structSize; 1157 } 1158 size_t vk_size_vksubmitinfo(const VkSubmitInfo* pStruct) 1159 { 1160 size_t structSize = 0; 1161 if (pStruct) { 1162 structSize = sizeof(VkSubmitInfo); 1163 structSize += pStruct->waitSemaphoreCount*sizeof(VkSemaphore); 1164 structSize += sizeof(VkPipelineStageFlags); 1165 structSize += pStruct->commandBufferCount*sizeof(VkCommandBuffer); 1166 structSize += pStruct->signalSemaphoreCount*sizeof(VkSemaphore); 1167 } 1168 return structSize; 1169 } 1170 size_t vk_size_vksubpassdependency(const VkSubpassDependency* pStruct) 1171 { 1172 size_t structSize = 0; 1173 if (pStruct) { 1174 structSize = sizeof(VkSubpassDependency); 1175 } 1176 return structSize; 1177 } 1178 size_t vk_size_vksubpassdescription(const VkSubpassDescription* pStruct) 1179 { 1180 size_t structSize = 0; 1181 if (pStruct) { 1182 structSize = sizeof(VkSubpassDescription); 1183 uint32_t i = 0; 1184 for (i = 0; i < pStruct->inputAttachmentCount; i++) { 1185 structSize += vk_size_vkattachmentreference(&pStruct->pInputAttachments[i]); 1186 } 1187 for (i = 0; i < pStruct->colorAttachmentCount; i++) { 1188 structSize += vk_size_vkattachmentreference(&pStruct->pColorAttachments[i]); 1189 } 1190 for (i = 0; i < pStruct->colorAttachmentCount; i++) { 1191 structSize += vk_size_vkattachmentreference(&pStruct->pResolveAttachments[i]); 1192 } 1193 structSize += vk_size_vkattachmentreference(pStruct->pDepthStencilAttachment); 1194 structSize += pStruct->preserveAttachmentCount*sizeof(uint32_t); 1195 } 1196 return structSize; 1197 } 1198 size_t vk_size_vksubresourcelayout(const VkSubresourceLayout* pStruct) 1199 { 1200 size_t structSize = 0; 1201 if (pStruct) { 1202 structSize = sizeof(VkSubresourceLayout); 1203 } 1204 return structSize; 1205 } 1206 size_t vk_size_vksurfacecapabilitieskhr(const VkSurfaceCapabilitiesKHR* pStruct) 1207 { 1208 size_t structSize = 0; 1209 if (pStruct) { 1210 structSize = sizeof(VkSurfaceCapabilitiesKHR); 1211 } 1212 return structSize; 1213 } 1214 size_t vk_size_vksurfaceformatkhr(const VkSurfaceFormatKHR* pStruct) 1215 { 1216 size_t structSize = 0; 1217 if (pStruct) { 1218 structSize = sizeof(VkSurfaceFormatKHR); 1219 } 1220 return structSize; 1221 } 1222 size_t vk_size_vkswapchaincreateinfokhr(const VkSwapchainCreateInfoKHR* pStruct) 1223 { 1224 size_t structSize = 0; 1225 if (pStruct) { 1226 structSize = sizeof(VkSwapchainCreateInfoKHR); 1227 structSize += pStruct->queueFamilyIndexCount*sizeof(uint32_t); 1228 } 1229 return structSize; 1230 } 1231 size_t vk_size_vkvalidationflagsext(const VkValidationFlagsEXT* pStruct) 1232 { 1233 size_t structSize = 0; 1234 if (pStruct) { 1235 structSize = sizeof(VkValidationFlagsEXT); 1236 structSize += sizeof(VkValidationCheckEXT); 1237 } 1238 return structSize; 1239 } 1240 size_t vk_size_vkvertexinputattributedescription(const VkVertexInputAttributeDescription* pStruct) 1241 { 1242 size_t structSize = 0; 1243 if (pStruct) { 1244 structSize = sizeof(VkVertexInputAttributeDescription); 1245 } 1246 return structSize; 1247 } 1248 size_t vk_size_vkvertexinputbindingdescription(const VkVertexInputBindingDescription* pStruct) 1249 { 1250 size_t structSize = 0; 1251 if (pStruct) { 1252 structSize = sizeof(VkVertexInputBindingDescription); 1253 } 1254 return structSize; 1255 } 1256 size_t vk_size_vkviewport(const VkViewport* pStruct) 1257 { 1258 size_t structSize = 0; 1259 if (pStruct) { 1260 structSize = sizeof(VkViewport); 1261 } 1262 return structSize; 1263 } 1264 #ifdef VK_USE_PLATFORM_WAYLAND_KHR 1265 size_t vk_size_vkwaylandsurfacecreateinfokhr(const VkWaylandSurfaceCreateInfoKHR* pStruct) 1266 { 1267 size_t structSize = 0; 1268 if (pStruct) { 1269 structSize = sizeof(VkWaylandSurfaceCreateInfoKHR); 1270 structSize += sizeof(struct wl_display); 1271 structSize += sizeof(struct wl_surface); 1272 } 1273 return structSize; 1274 } 1275 #endif //VK_USE_PLATFORM_WAYLAND_KHR 1276 #ifdef VK_USE_PLATFORM_WIN32_KHR 1277 size_t vk_size_vkwin32keyedmutexacquirereleaseinfonv(const VkWin32KeyedMutexAcquireReleaseInfoNV* pStruct) 1278 { 1279 size_t structSize = 0; 1280 if (pStruct) { 1281 structSize = sizeof(VkWin32KeyedMutexAcquireReleaseInfoNV); 1282 structSize += pStruct->acquireCount*sizeof(VkDeviceMemory); 1283 structSize += pStruct->acquireCount*sizeof(uint64_t); 1284 structSize += pStruct->acquireCount*sizeof(uint32_t); 1285 structSize += pStruct->releaseCount*sizeof(VkDeviceMemory); 1286 structSize += pStruct->releaseCount*sizeof(uint64_t); 1287 } 1288 return structSize; 1289 } 1290 #endif //VK_USE_PLATFORM_WIN32_KHR 1291 #ifdef VK_USE_PLATFORM_WIN32_KHR 1292 size_t vk_size_vkwin32surfacecreateinfokhr(const VkWin32SurfaceCreateInfoKHR* pStruct) 1293 { 1294 size_t structSize = 0; 1295 if (pStruct) { 1296 structSize = sizeof(VkWin32SurfaceCreateInfoKHR); 1297 } 1298 return structSize; 1299 } 1300 #endif //VK_USE_PLATFORM_WIN32_KHR 1301 size_t vk_size_vkwritedescriptorset(const VkWriteDescriptorSet* pStruct) 1302 { 1303 size_t structSize = 0; 1304 if (pStruct) { 1305 structSize = sizeof(VkWriteDescriptorSet); 1306 uint32_t i = 0; 1307 for (i = 0; i < pStruct->descriptorCount; i++) { 1308 structSize += vk_size_vkdescriptorimageinfo(&pStruct->pImageInfo[i]); 1309 } 1310 for (i = 0; i < pStruct->descriptorCount; i++) { 1311 structSize += vk_size_vkdescriptorbufferinfo(&pStruct->pBufferInfo[i]); 1312 } 1313 structSize += pStruct->descriptorCount*sizeof(VkBufferView); 1314 } 1315 return structSize; 1316 } 1317 #ifdef VK_USE_PLATFORM_XCB_KHR 1318 size_t vk_size_vkxcbsurfacecreateinfokhr(const VkXcbSurfaceCreateInfoKHR* pStruct) 1319 { 1320 size_t structSize = 0; 1321 if (pStruct) { 1322 structSize = sizeof(VkXcbSurfaceCreateInfoKHR); 1323 } 1324 return structSize; 1325 } 1326 #endif //VK_USE_PLATFORM_XCB_KHR 1327 #ifdef VK_USE_PLATFORM_XLIB_KHR 1328 size_t vk_size_vkxlibsurfacecreateinfokhr(const VkXlibSurfaceCreateInfoKHR* pStruct) 1329 { 1330 size_t structSize = 0; 1331 if (pStruct) { 1332 structSize = sizeof(VkXlibSurfaceCreateInfoKHR); 1333 structSize += sizeof(Display); 1334 } 1335 return structSize; 1336 } 1337 #endif //VK_USE_PLATFORM_XLIB_KHR 1338 // CODEGEN : file ../vk_helper.py line #1442 1339 size_t get_struct_chain_size(const void* pStruct) 1340 { 1341 // Just use VkApplicationInfo as struct until actual type is resolved 1342 VkApplicationInfo* pNext = (VkApplicationInfo*)pStruct; 1343 size_t structSize = 0; 1344 while (pNext) { 1345 switch (pNext->sType) { 1346 case VK_STRUCTURE_TYPE_APPLICATION_INFO: 1347 { 1348 structSize += vk_size_vkapplicationinfo((VkApplicationInfo*)pNext); 1349 break; 1350 } 1351 case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: 1352 { 1353 structSize += vk_size_vkbindsparseinfo((VkBindSparseInfo*)pNext); 1354 break; 1355 } 1356 case VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO: 1357 { 1358 structSize += vk_size_vkbuffercreateinfo((VkBufferCreateInfo*)pNext); 1359 break; 1360 } 1361 case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER: 1362 { 1363 structSize += vk_size_vkbuffermemorybarrier((VkBufferMemoryBarrier*)pNext); 1364 break; 1365 } 1366 case VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO: 1367 { 1368 structSize += vk_size_vkbufferviewcreateinfo((VkBufferViewCreateInfo*)pNext); 1369 break; 1370 } 1371 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO: 1372 { 1373 structSize += vk_size_vkcommandbufferallocateinfo((VkCommandBufferAllocateInfo*)pNext); 1374 break; 1375 } 1376 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO: 1377 { 1378 structSize += vk_size_vkcommandbufferbegininfo((VkCommandBufferBeginInfo*)pNext); 1379 break; 1380 } 1381 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO: 1382 { 1383 structSize += vk_size_vkcommandbufferinheritanceinfo((VkCommandBufferInheritanceInfo*)pNext); 1384 break; 1385 } 1386 case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO: 1387 { 1388 structSize += vk_size_vkcommandpoolcreateinfo((VkCommandPoolCreateInfo*)pNext); 1389 break; 1390 } 1391 case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: 1392 { 1393 structSize += vk_size_vkcomputepipelinecreateinfo((VkComputePipelineCreateInfo*)pNext); 1394 break; 1395 } 1396 case VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET: 1397 { 1398 structSize += vk_size_vkcopydescriptorset((VkCopyDescriptorSet*)pNext); 1399 break; 1400 } 1401 case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO: 1402 { 1403 structSize += vk_size_vkdescriptorpoolcreateinfo((VkDescriptorPoolCreateInfo*)pNext); 1404 break; 1405 } 1406 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: 1407 { 1408 structSize += vk_size_vkdescriptorsetallocateinfo((VkDescriptorSetAllocateInfo*)pNext); 1409 break; 1410 } 1411 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: 1412 { 1413 structSize += vk_size_vkdescriptorsetlayoutcreateinfo((VkDescriptorSetLayoutCreateInfo*)pNext); 1414 break; 1415 } 1416 case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: 1417 { 1418 structSize += vk_size_vkdevicecreateinfo((VkDeviceCreateInfo*)pNext); 1419 break; 1420 } 1421 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO: 1422 { 1423 structSize += vk_size_vkdevicequeuecreateinfo((VkDeviceQueueCreateInfo*)pNext); 1424 break; 1425 } 1426 case VK_STRUCTURE_TYPE_EVENT_CREATE_INFO: 1427 { 1428 structSize += vk_size_vkeventcreateinfo((VkEventCreateInfo*)pNext); 1429 break; 1430 } 1431 case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO: 1432 { 1433 structSize += vk_size_vkfencecreateinfo((VkFenceCreateInfo*)pNext); 1434 break; 1435 } 1436 case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO: 1437 { 1438 structSize += vk_size_vkframebuffercreateinfo((VkFramebufferCreateInfo*)pNext); 1439 break; 1440 } 1441 case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: 1442 { 1443 structSize += vk_size_vkgraphicspipelinecreateinfo((VkGraphicsPipelineCreateInfo*)pNext); 1444 break; 1445 } 1446 case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO: 1447 { 1448 structSize += vk_size_vkimagecreateinfo((VkImageCreateInfo*)pNext); 1449 break; 1450 } 1451 case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER: 1452 { 1453 structSize += vk_size_vkimagememorybarrier((VkImageMemoryBarrier*)pNext); 1454 break; 1455 } 1456 case VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO: 1457 { 1458 structSize += vk_size_vkimageviewcreateinfo((VkImageViewCreateInfo*)pNext); 1459 break; 1460 } 1461 case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO: 1462 { 1463 structSize += vk_size_vkinstancecreateinfo((VkInstanceCreateInfo*)pNext); 1464 break; 1465 } 1466 case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE: 1467 { 1468 structSize += vk_size_vkmappedmemoryrange((VkMappedMemoryRange*)pNext); 1469 break; 1470 } 1471 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: 1472 { 1473 structSize += vk_size_vkmemoryallocateinfo((VkMemoryAllocateInfo*)pNext); 1474 break; 1475 } 1476 case VK_STRUCTURE_TYPE_MEMORY_BARRIER: 1477 { 1478 structSize += vk_size_vkmemorybarrier((VkMemoryBarrier*)pNext); 1479 break; 1480 } 1481 case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO: 1482 { 1483 structSize += vk_size_vkpipelinecachecreateinfo((VkPipelineCacheCreateInfo*)pNext); 1484 break; 1485 } 1486 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO: 1487 { 1488 structSize += vk_size_vkpipelinecolorblendstatecreateinfo((VkPipelineColorBlendStateCreateInfo*)pNext); 1489 break; 1490 } 1491 case VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO: 1492 { 1493 structSize += vk_size_vkpipelinedepthstencilstatecreateinfo((VkPipelineDepthStencilStateCreateInfo*)pNext); 1494 break; 1495 } 1496 case VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO: 1497 { 1498 structSize += vk_size_vkpipelinedynamicstatecreateinfo((VkPipelineDynamicStateCreateInfo*)pNext); 1499 break; 1500 } 1501 case VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO: 1502 { 1503 structSize += vk_size_vkpipelineinputassemblystatecreateinfo((VkPipelineInputAssemblyStateCreateInfo*)pNext); 1504 break; 1505 } 1506 case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: 1507 { 1508 structSize += vk_size_vkpipelinelayoutcreateinfo((VkPipelineLayoutCreateInfo*)pNext); 1509 break; 1510 } 1511 case VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO: 1512 { 1513 structSize += vk_size_vkpipelinemultisamplestatecreateinfo((VkPipelineMultisampleStateCreateInfo*)pNext); 1514 break; 1515 } 1516 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO: 1517 { 1518 structSize += vk_size_vkpipelinerasterizationstatecreateinfo((VkPipelineRasterizationStateCreateInfo*)pNext); 1519 break; 1520 } 1521 case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO: 1522 { 1523 structSize += vk_size_vkpipelineshaderstagecreateinfo((VkPipelineShaderStageCreateInfo*)pNext); 1524 break; 1525 } 1526 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO: 1527 { 1528 structSize += vk_size_vkpipelinetessellationstatecreateinfo((VkPipelineTessellationStateCreateInfo*)pNext); 1529 break; 1530 } 1531 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO: 1532 { 1533 structSize += vk_size_vkpipelinevertexinputstatecreateinfo((VkPipelineVertexInputStateCreateInfo*)pNext); 1534 break; 1535 } 1536 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO: 1537 { 1538 structSize += vk_size_vkpipelineviewportstatecreateinfo((VkPipelineViewportStateCreateInfo*)pNext); 1539 break; 1540 } 1541 case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO: 1542 { 1543 structSize += vk_size_vkquerypoolcreateinfo((VkQueryPoolCreateInfo*)pNext); 1544 break; 1545 } 1546 case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO: 1547 { 1548 structSize += vk_size_vkrenderpassbegininfo((VkRenderPassBeginInfo*)pNext); 1549 break; 1550 } 1551 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: 1552 { 1553 structSize += vk_size_vkrenderpasscreateinfo((VkRenderPassCreateInfo*)pNext); 1554 break; 1555 } 1556 case VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO: 1557 { 1558 structSize += vk_size_vksamplercreateinfo((VkSamplerCreateInfo*)pNext); 1559 break; 1560 } 1561 case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO: 1562 { 1563 structSize += vk_size_vksemaphorecreateinfo((VkSemaphoreCreateInfo*)pNext); 1564 break; 1565 } 1566 case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: 1567 { 1568 structSize += vk_size_vkshadermodulecreateinfo((VkShaderModuleCreateInfo*)pNext); 1569 break; 1570 } 1571 case VK_STRUCTURE_TYPE_SUBMIT_INFO: 1572 { 1573 structSize += vk_size_vksubmitinfo((VkSubmitInfo*)pNext); 1574 break; 1575 } 1576 case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: 1577 { 1578 structSize += vk_size_vkwritedescriptorset((VkWriteDescriptorSet*)pNext); 1579 break; 1580 } 1581 default: 1582 assert(0); 1583 structSize += 0; 1584 } 1585 pNext = (VkApplicationInfo*)pNext->pNext; 1586 } 1587 return structSize; 1588 } 1589 // CODEGEN : file ../vk_helper.py line #1442 1590 size_t get_dynamic_struct_size(const void* pStruct) 1591 { 1592 // Just use VkApplicationInfo as struct until actual type is resolved 1593 VkApplicationInfo* pNext = (VkApplicationInfo*)pStruct; 1594 size_t structSize = 0; 1595 switch (pNext->sType) { 1596 case VK_STRUCTURE_TYPE_APPLICATION_INFO: 1597 { 1598 structSize += vk_size_vkapplicationinfo((VkApplicationInfo*)pNext); 1599 break; 1600 } 1601 case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: 1602 { 1603 structSize += vk_size_vkbindsparseinfo((VkBindSparseInfo*)pNext); 1604 break; 1605 } 1606 case VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO: 1607 { 1608 structSize += vk_size_vkbuffercreateinfo((VkBufferCreateInfo*)pNext); 1609 break; 1610 } 1611 case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER: 1612 { 1613 structSize += vk_size_vkbuffermemorybarrier((VkBufferMemoryBarrier*)pNext); 1614 break; 1615 } 1616 case VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO: 1617 { 1618 structSize += vk_size_vkbufferviewcreateinfo((VkBufferViewCreateInfo*)pNext); 1619 break; 1620 } 1621 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO: 1622 { 1623 structSize += vk_size_vkcommandbufferallocateinfo((VkCommandBufferAllocateInfo*)pNext); 1624 break; 1625 } 1626 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO: 1627 { 1628 structSize += vk_size_vkcommandbufferbegininfo((VkCommandBufferBeginInfo*)pNext); 1629 break; 1630 } 1631 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO: 1632 { 1633 structSize += vk_size_vkcommandbufferinheritanceinfo((VkCommandBufferInheritanceInfo*)pNext); 1634 break; 1635 } 1636 case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO: 1637 { 1638 structSize += vk_size_vkcommandpoolcreateinfo((VkCommandPoolCreateInfo*)pNext); 1639 break; 1640 } 1641 case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: 1642 { 1643 structSize += vk_size_vkcomputepipelinecreateinfo((VkComputePipelineCreateInfo*)pNext); 1644 break; 1645 } 1646 case VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET: 1647 { 1648 structSize += vk_size_vkcopydescriptorset((VkCopyDescriptorSet*)pNext); 1649 break; 1650 } 1651 case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO: 1652 { 1653 structSize += vk_size_vkdescriptorpoolcreateinfo((VkDescriptorPoolCreateInfo*)pNext); 1654 break; 1655 } 1656 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: 1657 { 1658 structSize += vk_size_vkdescriptorsetallocateinfo((VkDescriptorSetAllocateInfo*)pNext); 1659 break; 1660 } 1661 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: 1662 { 1663 structSize += vk_size_vkdescriptorsetlayoutcreateinfo((VkDescriptorSetLayoutCreateInfo*)pNext); 1664 break; 1665 } 1666 case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: 1667 { 1668 structSize += vk_size_vkdevicecreateinfo((VkDeviceCreateInfo*)pNext); 1669 break; 1670 } 1671 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO: 1672 { 1673 structSize += vk_size_vkdevicequeuecreateinfo((VkDeviceQueueCreateInfo*)pNext); 1674 break; 1675 } 1676 case VK_STRUCTURE_TYPE_EVENT_CREATE_INFO: 1677 { 1678 structSize += vk_size_vkeventcreateinfo((VkEventCreateInfo*)pNext); 1679 break; 1680 } 1681 case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO: 1682 { 1683 structSize += vk_size_vkfencecreateinfo((VkFenceCreateInfo*)pNext); 1684 break; 1685 } 1686 case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO: 1687 { 1688 structSize += vk_size_vkframebuffercreateinfo((VkFramebufferCreateInfo*)pNext); 1689 break; 1690 } 1691 case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: 1692 { 1693 structSize += vk_size_vkgraphicspipelinecreateinfo((VkGraphicsPipelineCreateInfo*)pNext); 1694 break; 1695 } 1696 case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO: 1697 { 1698 structSize += vk_size_vkimagecreateinfo((VkImageCreateInfo*)pNext); 1699 break; 1700 } 1701 case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER: 1702 { 1703 structSize += vk_size_vkimagememorybarrier((VkImageMemoryBarrier*)pNext); 1704 break; 1705 } 1706 case VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO: 1707 { 1708 structSize += vk_size_vkimageviewcreateinfo((VkImageViewCreateInfo*)pNext); 1709 break; 1710 } 1711 case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO: 1712 { 1713 structSize += vk_size_vkinstancecreateinfo((VkInstanceCreateInfo*)pNext); 1714 break; 1715 } 1716 case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE: 1717 { 1718 structSize += vk_size_vkmappedmemoryrange((VkMappedMemoryRange*)pNext); 1719 break; 1720 } 1721 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: 1722 { 1723 structSize += vk_size_vkmemoryallocateinfo((VkMemoryAllocateInfo*)pNext); 1724 break; 1725 } 1726 case VK_STRUCTURE_TYPE_MEMORY_BARRIER: 1727 { 1728 structSize += vk_size_vkmemorybarrier((VkMemoryBarrier*)pNext); 1729 break; 1730 } 1731 case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO: 1732 { 1733 structSize += vk_size_vkpipelinecachecreateinfo((VkPipelineCacheCreateInfo*)pNext); 1734 break; 1735 } 1736 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO: 1737 { 1738 structSize += vk_size_vkpipelinecolorblendstatecreateinfo((VkPipelineColorBlendStateCreateInfo*)pNext); 1739 break; 1740 } 1741 case VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO: 1742 { 1743 structSize += vk_size_vkpipelinedepthstencilstatecreateinfo((VkPipelineDepthStencilStateCreateInfo*)pNext); 1744 break; 1745 } 1746 case VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO: 1747 { 1748 structSize += vk_size_vkpipelinedynamicstatecreateinfo((VkPipelineDynamicStateCreateInfo*)pNext); 1749 break; 1750 } 1751 case VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO: 1752 { 1753 structSize += vk_size_vkpipelineinputassemblystatecreateinfo((VkPipelineInputAssemblyStateCreateInfo*)pNext); 1754 break; 1755 } 1756 case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: 1757 { 1758 structSize += vk_size_vkpipelinelayoutcreateinfo((VkPipelineLayoutCreateInfo*)pNext); 1759 break; 1760 } 1761 case VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO: 1762 { 1763 structSize += vk_size_vkpipelinemultisamplestatecreateinfo((VkPipelineMultisampleStateCreateInfo*)pNext); 1764 break; 1765 } 1766 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO: 1767 { 1768 structSize += vk_size_vkpipelinerasterizationstatecreateinfo((VkPipelineRasterizationStateCreateInfo*)pNext); 1769 break; 1770 } 1771 case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO: 1772 { 1773 structSize += vk_size_vkpipelineshaderstagecreateinfo((VkPipelineShaderStageCreateInfo*)pNext); 1774 break; 1775 } 1776 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO: 1777 { 1778 structSize += vk_size_vkpipelinetessellationstatecreateinfo((VkPipelineTessellationStateCreateInfo*)pNext); 1779 break; 1780 } 1781 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO: 1782 { 1783 structSize += vk_size_vkpipelinevertexinputstatecreateinfo((VkPipelineVertexInputStateCreateInfo*)pNext); 1784 break; 1785 } 1786 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO: 1787 { 1788 structSize += vk_size_vkpipelineviewportstatecreateinfo((VkPipelineViewportStateCreateInfo*)pNext); 1789 break; 1790 } 1791 case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO: 1792 { 1793 structSize += vk_size_vkquerypoolcreateinfo((VkQueryPoolCreateInfo*)pNext); 1794 break; 1795 } 1796 case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO: 1797 { 1798 structSize += vk_size_vkrenderpassbegininfo((VkRenderPassBeginInfo*)pNext); 1799 break; 1800 } 1801 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: 1802 { 1803 structSize += vk_size_vkrenderpasscreateinfo((VkRenderPassCreateInfo*)pNext); 1804 break; 1805 } 1806 case VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO: 1807 { 1808 structSize += vk_size_vksamplercreateinfo((VkSamplerCreateInfo*)pNext); 1809 break; 1810 } 1811 case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO: 1812 { 1813 structSize += vk_size_vksemaphorecreateinfo((VkSemaphoreCreateInfo*)pNext); 1814 break; 1815 } 1816 case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: 1817 { 1818 structSize += vk_size_vkshadermodulecreateinfo((VkShaderModuleCreateInfo*)pNext); 1819 break; 1820 } 1821 case VK_STRUCTURE_TYPE_SUBMIT_INFO: 1822 { 1823 structSize += vk_size_vksubmitinfo((VkSubmitInfo*)pNext); 1824 break; 1825 } 1826 case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: 1827 { 1828 structSize += vk_size_vkwritedescriptorset((VkWriteDescriptorSet*)pNext); 1829 break; 1830 } 1831 default: 1832 assert(0); 1833 structSize += 0; 1834 } 1835 return structSize; 1836 }