1/* WARNING: This is auto-generated file. Do not modify, since changes will 2 * be lost! Modify the generating script instead. 3 * This file was generated by /scripts/gen_framework.py 4 */ 5 6 7inline VkOffset2D makeOffset2D (int32_t x, int32_t y) 8{ 9 VkOffset2D res; 10 res.x = x; 11 res.y = y; 12 return res; 13} 14 15inline VkOffset3D makeOffset3D (int32_t x, int32_t y, int32_t z) 16{ 17 VkOffset3D res; 18 res.x = x; 19 res.y = y; 20 res.z = z; 21 return res; 22} 23 24inline VkExtent2D makeExtent2D (uint32_t width, uint32_t height) 25{ 26 VkExtent2D res; 27 res.width = width; 28 res.height = height; 29 return res; 30} 31 32inline VkExtent3D makeExtent3D (uint32_t width, uint32_t height, uint32_t depth) 33{ 34 VkExtent3D res; 35 res.width = width; 36 res.height = height; 37 res.depth = depth; 38 return res; 39} 40 41inline VkViewport makeViewport (float x, float y, float width, float height, float minDepth, float maxDepth) 42{ 43 VkViewport res; 44 res.x = x; 45 res.y = y; 46 res.width = width; 47 res.height = height; 48 res.minDepth = minDepth; 49 res.maxDepth = maxDepth; 50 return res; 51} 52 53inline VkComponentMapping makeComponentMapping (VkComponentSwizzle r, VkComponentSwizzle g, VkComponentSwizzle b, VkComponentSwizzle a) 54{ 55 VkComponentMapping res; 56 res.r = r; 57 res.g = g; 58 res.b = b; 59 res.a = a; 60 return res; 61} 62 63inline VkAllocationCallbacks makeAllocationCallbacks (void* pUserData, PFN_vkAllocationFunction pfnAllocation, PFN_vkReallocationFunction pfnReallocation, PFN_vkFreeFunction pfnFree, PFN_vkInternalAllocationNotification pfnInternalAllocation, PFN_vkInternalFreeNotification pfnInternalFree) 64{ 65 VkAllocationCallbacks res; 66 res.pUserData = pUserData; 67 res.pfnAllocation = pfnAllocation; 68 res.pfnReallocation = pfnReallocation; 69 res.pfnFree = pfnFree; 70 res.pfnInternalAllocation = pfnInternalAllocation; 71 res.pfnInternalFree = pfnInternalFree; 72 return res; 73} 74 75inline VkMemoryRequirements makeMemoryRequirements (VkDeviceSize size, VkDeviceSize alignment, uint32_t memoryTypeBits) 76{ 77 VkMemoryRequirements res; 78 res.size = size; 79 res.alignment = alignment; 80 res.memoryTypeBits = memoryTypeBits; 81 return res; 82} 83 84inline VkDescriptorBufferInfo makeDescriptorBufferInfo (VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range) 85{ 86 VkDescriptorBufferInfo res; 87 res.buffer = buffer; 88 res.offset = offset; 89 res.range = range; 90 return res; 91} 92 93inline VkDescriptorImageInfo makeDescriptorImageInfo (VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout) 94{ 95 VkDescriptorImageInfo res; 96 res.sampler = sampler; 97 res.imageView = imageView; 98 res.imageLayout = imageLayout; 99 return res; 100} 101 102inline VkImageSubresource makeImageSubresource (VkImageAspectFlags aspectMask, uint32_t mipLevel, uint32_t arrayLayer) 103{ 104 VkImageSubresource res; 105 res.aspectMask = aspectMask; 106 res.mipLevel = mipLevel; 107 res.arrayLayer = arrayLayer; 108 return res; 109} 110 111inline VkImageSubresourceLayers makeImageSubresourceLayers (VkImageAspectFlags aspectMask, uint32_t mipLevel, uint32_t baseArrayLayer, uint32_t layerCount) 112{ 113 VkImageSubresourceLayers res; 114 res.aspectMask = aspectMask; 115 res.mipLevel = mipLevel; 116 res.baseArrayLayer = baseArrayLayer; 117 res.layerCount = layerCount; 118 return res; 119} 120 121inline VkImageSubresourceRange makeImageSubresourceRange (VkImageAspectFlags aspectMask, uint32_t baseMipLevel, uint32_t levelCount, uint32_t baseArrayLayer, uint32_t layerCount) 122{ 123 VkImageSubresourceRange res; 124 res.aspectMask = aspectMask; 125 res.baseMipLevel = baseMipLevel; 126 res.levelCount = levelCount; 127 res.baseArrayLayer = baseArrayLayer; 128 res.layerCount = layerCount; 129 return res; 130} 131 132inline VkSubresourceLayout makeSubresourceLayout (VkDeviceSize offset, VkDeviceSize size, VkDeviceSize rowPitch, VkDeviceSize arrayPitch, VkDeviceSize depthPitch) 133{ 134 VkSubresourceLayout res; 135 res.offset = offset; 136 res.size = size; 137 res.rowPitch = rowPitch; 138 res.arrayPitch = arrayPitch; 139 res.depthPitch = depthPitch; 140 return res; 141} 142 143inline VkBufferCopy makeBufferCopy (VkDeviceSize srcOffset, VkDeviceSize dstOffset, VkDeviceSize size) 144{ 145 VkBufferCopy res; 146 res.srcOffset = srcOffset; 147 res.dstOffset = dstOffset; 148 res.size = size; 149 return res; 150} 151 152inline VkSparseMemoryBind makeSparseMemoryBind (VkDeviceSize resourceOffset, VkDeviceSize size, VkDeviceMemory memory, VkDeviceSize memoryOffset, VkSparseMemoryBindFlags flags) 153{ 154 VkSparseMemoryBind res; 155 res.resourceOffset = resourceOffset; 156 res.size = size; 157 res.memory = memory; 158 res.memoryOffset = memoryOffset; 159 res.flags = flags; 160 return res; 161} 162 163inline VkSparseBufferMemoryBindInfo makeSparseBufferMemoryBindInfo (VkBuffer buffer, uint32_t bindCount, const VkSparseMemoryBind* pBinds) 164{ 165 VkSparseBufferMemoryBindInfo res; 166 res.buffer = buffer; 167 res.bindCount = bindCount; 168 res.pBinds = pBinds; 169 return res; 170} 171 172inline VkSparseImageOpaqueMemoryBindInfo makeSparseImageOpaqueMemoryBindInfo (VkImage image, uint32_t bindCount, const VkSparseMemoryBind* pBinds) 173{ 174 VkSparseImageOpaqueMemoryBindInfo res; 175 res.image = image; 176 res.bindCount = bindCount; 177 res.pBinds = pBinds; 178 return res; 179} 180 181inline VkSparseImageMemoryBindInfo makeSparseImageMemoryBindInfo (VkImage image, uint32_t bindCount, const VkSparseImageMemoryBind* pBinds) 182{ 183 VkSparseImageMemoryBindInfo res; 184 res.image = image; 185 res.bindCount = bindCount; 186 res.pBinds = pBinds; 187 return res; 188} 189 190inline VkCopyMemoryIndirectCommandNV makeCopyMemoryIndirectCommandNV (VkDeviceAddress srcAddress, VkDeviceAddress dstAddress, VkDeviceSize size) 191{ 192 VkCopyMemoryIndirectCommandNV res; 193 res.srcAddress = srcAddress; 194 res.dstAddress = dstAddress; 195 res.size = size; 196 return res; 197} 198 199inline VkDescriptorSetLayoutBinding makeDescriptorSetLayoutBinding (uint32_t binding, VkDescriptorType descriptorType, uint32_t descriptorCount, VkShaderStageFlags stageFlags, const VkSampler* pImmutableSamplers) 200{ 201 VkDescriptorSetLayoutBinding res; 202 res.binding = binding; 203 res.descriptorType = descriptorType; 204 res.descriptorCount = descriptorCount; 205 res.stageFlags = stageFlags; 206 res.pImmutableSamplers = pImmutableSamplers; 207 return res; 208} 209 210inline VkDescriptorPoolSize makeDescriptorPoolSize (VkDescriptorType type, uint32_t descriptorCount) 211{ 212 VkDescriptorPoolSize res; 213 res.type = type; 214 res.descriptorCount = descriptorCount; 215 return res; 216} 217 218inline VkSpecializationMapEntry makeSpecializationMapEntry (uint32_t constantID, uint32_t offset, size_t size) 219{ 220 VkSpecializationMapEntry res; 221 res.constantID = constantID; 222 res.offset = offset; 223 res.size = size; 224 return res; 225} 226 227inline VkSpecializationInfo makeSpecializationInfo (uint32_t mapEntryCount, const VkSpecializationMapEntry* pMapEntries, size_t dataSize, const void* pData) 228{ 229 VkSpecializationInfo res; 230 res.mapEntryCount = mapEntryCount; 231 res.pMapEntries = pMapEntries; 232 res.dataSize = dataSize; 233 res.pData = pData; 234 return res; 235} 236 237inline VkVertexInputBindingDescription makeVertexInputBindingDescription (uint32_t binding, uint32_t stride, VkVertexInputRate inputRate) 238{ 239 VkVertexInputBindingDescription res; 240 res.binding = binding; 241 res.stride = stride; 242 res.inputRate = inputRate; 243 return res; 244} 245 246inline VkVertexInputAttributeDescription makeVertexInputAttributeDescription (uint32_t location, uint32_t binding, VkFormat format, uint32_t offset) 247{ 248 VkVertexInputAttributeDescription res; 249 res.location = location; 250 res.binding = binding; 251 res.format = format; 252 res.offset = offset; 253 return res; 254} 255 256inline VkPipelineColorBlendAttachmentState makePipelineColorBlendAttachmentState (VkBool32 blendEnable, VkBlendFactor srcColorBlendFactor, VkBlendFactor dstColorBlendFactor, VkBlendOp colorBlendOp, VkBlendFactor srcAlphaBlendFactor, VkBlendFactor dstAlphaBlendFactor, VkBlendOp alphaBlendOp, VkColorComponentFlags colorWriteMask) 257{ 258 VkPipelineColorBlendAttachmentState res; 259 res.blendEnable = blendEnable; 260 res.srcColorBlendFactor = srcColorBlendFactor; 261 res.dstColorBlendFactor = dstColorBlendFactor; 262 res.colorBlendOp = colorBlendOp; 263 res.srcAlphaBlendFactor = srcAlphaBlendFactor; 264 res.dstAlphaBlendFactor = dstAlphaBlendFactor; 265 res.alphaBlendOp = alphaBlendOp; 266 res.colorWriteMask = colorWriteMask; 267 return res; 268} 269 270inline VkStencilOpState makeStencilOpState (VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, uint32_t compareMask, uint32_t writeMask, uint32_t reference) 271{ 272 VkStencilOpState res; 273 res.failOp = failOp; 274 res.passOp = passOp; 275 res.depthFailOp = depthFailOp; 276 res.compareOp = compareOp; 277 res.compareMask = compareMask; 278 res.writeMask = writeMask; 279 res.reference = reference; 280 return res; 281} 282 283inline VkPushConstantRange makePushConstantRange (VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size) 284{ 285 VkPushConstantRange res; 286 res.stageFlags = stageFlags; 287 res.offset = offset; 288 res.size = size; 289 return res; 290} 291 292inline VkClearDepthStencilValue makeClearDepthStencilValue (float depth, uint32_t stencil) 293{ 294 VkClearDepthStencilValue res; 295 res.depth = depth; 296 res.stencil = stencil; 297 return res; 298} 299 300inline VkAttachmentDescription makeAttachmentDescription (VkAttachmentDescriptionFlags flags, VkFormat format, VkSampleCountFlagBits samples, VkAttachmentLoadOp loadOp, VkAttachmentStoreOp storeOp, VkAttachmentLoadOp stencilLoadOp, VkAttachmentStoreOp stencilStoreOp, VkImageLayout initialLayout, VkImageLayout finalLayout) 301{ 302 VkAttachmentDescription res; 303 res.flags = flags; 304 res.format = format; 305 res.samples = samples; 306 res.loadOp = loadOp; 307 res.storeOp = storeOp; 308 res.stencilLoadOp = stencilLoadOp; 309 res.stencilStoreOp = stencilStoreOp; 310 res.initialLayout = initialLayout; 311 res.finalLayout = finalLayout; 312 return res; 313} 314 315inline VkAttachmentReference makeAttachmentReference (uint32_t attachment, VkImageLayout layout) 316{ 317 VkAttachmentReference res; 318 res.attachment = attachment; 319 res.layout = layout; 320 return res; 321} 322 323inline VkSubpassDescription makeSubpassDescription (VkSubpassDescriptionFlags flags, VkPipelineBindPoint pipelineBindPoint, uint32_t inputAttachmentCount, const VkAttachmentReference* pInputAttachments, uint32_t colorAttachmentCount, const VkAttachmentReference* pColorAttachments, const VkAttachmentReference* pResolveAttachments, const VkAttachmentReference* pDepthStencilAttachment, uint32_t preserveAttachmentCount, const uint32_t* pPreserveAttachments) 324{ 325 VkSubpassDescription res; 326 res.flags = flags; 327 res.pipelineBindPoint = pipelineBindPoint; 328 res.inputAttachmentCount = inputAttachmentCount; 329 res.pInputAttachments = pInputAttachments; 330 res.colorAttachmentCount = colorAttachmentCount; 331 res.pColorAttachments = pColorAttachments; 332 res.pResolveAttachments = pResolveAttachments; 333 res.pDepthStencilAttachment = pDepthStencilAttachment; 334 res.preserveAttachmentCount = preserveAttachmentCount; 335 res.pPreserveAttachments = pPreserveAttachments; 336 return res; 337} 338 339inline VkSubpassDependency makeSubpassDependency (uint32_t srcSubpass, uint32_t dstSubpass, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask, VkDependencyFlags dependencyFlags) 340{ 341 VkSubpassDependency res; 342 res.srcSubpass = srcSubpass; 343 res.dstSubpass = dstSubpass; 344 res.srcStageMask = srcStageMask; 345 res.dstStageMask = dstStageMask; 346 res.srcAccessMask = srcAccessMask; 347 res.dstAccessMask = dstAccessMask; 348 res.dependencyFlags = dependencyFlags; 349 return res; 350} 351 352inline VkDrawIndirectCommand makeDrawIndirectCommand (uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) 353{ 354 VkDrawIndirectCommand res; 355 res.vertexCount = vertexCount; 356 res.instanceCount = instanceCount; 357 res.firstVertex = firstVertex; 358 res.firstInstance = firstInstance; 359 return res; 360} 361 362inline VkDrawIndexedIndirectCommand makeDrawIndexedIndirectCommand (uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) 363{ 364 VkDrawIndexedIndirectCommand res; 365 res.indexCount = indexCount; 366 res.instanceCount = instanceCount; 367 res.firstIndex = firstIndex; 368 res.vertexOffset = vertexOffset; 369 res.firstInstance = firstInstance; 370 return res; 371} 372 373inline VkDispatchIndirectCommand makeDispatchIndirectCommand (uint32_t x, uint32_t y, uint32_t z) 374{ 375 VkDispatchIndirectCommand res; 376 res.x = x; 377 res.y = y; 378 res.z = z; 379 return res; 380} 381 382inline VkMultiDrawInfoEXT makeMultiDrawInfoEXT (uint32_t firstVertex, uint32_t vertexCount) 383{ 384 VkMultiDrawInfoEXT res; 385 res.firstVertex = firstVertex; 386 res.vertexCount = vertexCount; 387 return res; 388} 389 390inline VkMultiDrawIndexedInfoEXT makeMultiDrawIndexedInfoEXT (uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset) 391{ 392 VkMultiDrawIndexedInfoEXT res; 393 res.firstIndex = firstIndex; 394 res.indexCount = indexCount; 395 res.vertexOffset = vertexOffset; 396 return res; 397} 398 399inline VkDisplayPlanePropertiesKHR makeDisplayPlanePropertiesKHR (VkDisplayKHR currentDisplay, uint32_t currentStackIndex) 400{ 401 VkDisplayPlanePropertiesKHR res; 402 res.currentDisplay = currentDisplay; 403 res.currentStackIndex = currentStackIndex; 404 return res; 405} 406 407inline VkSurfaceFormatKHR makeSurfaceFormatKHR (VkFormat format, VkColorSpaceKHR colorSpace) 408{ 409 VkSurfaceFormatKHR res; 410 res.format = format; 411 res.colorSpace = colorSpace; 412 return res; 413} 414 415inline VkBindShaderGroupIndirectCommandNV makeBindShaderGroupIndirectCommandNV (uint32_t groupIndex) 416{ 417 VkBindShaderGroupIndirectCommandNV res; 418 res.groupIndex = groupIndex; 419 return res; 420} 421 422inline VkBindIndexBufferIndirectCommandNV makeBindIndexBufferIndirectCommandNV (VkDeviceAddress bufferAddress, uint32_t size, VkIndexType indexType) 423{ 424 VkBindIndexBufferIndirectCommandNV res; 425 res.bufferAddress = bufferAddress; 426 res.size = size; 427 res.indexType = indexType; 428 return res; 429} 430 431inline VkBindVertexBufferIndirectCommandNV makeBindVertexBufferIndirectCommandNV (VkDeviceAddress bufferAddress, uint32_t size, uint32_t stride) 432{ 433 VkBindVertexBufferIndirectCommandNV res; 434 res.bufferAddress = bufferAddress; 435 res.size = size; 436 res.stride = stride; 437 return res; 438} 439 440inline VkSetStateFlagsIndirectCommandNV makeSetStateFlagsIndirectCommandNV (uint32_t data) 441{ 442 VkSetStateFlagsIndirectCommandNV res; 443 res.data = data; 444 return res; 445} 446 447inline VkIndirectCommandsStreamNV makeIndirectCommandsStreamNV (VkBuffer buffer, VkDeviceSize offset) 448{ 449 VkIndirectCommandsStreamNV res; 450 res.buffer = buffer; 451 res.offset = offset; 452 return res; 453} 454 455inline VkConformanceVersion makeConformanceVersion (uint8_t major, uint8_t minor, uint8_t subminor, uint8_t patch) 456{ 457 VkConformanceVersion res; 458 res.major = major; 459 res.minor = minor; 460 res.subminor = subminor; 461 res.patch = patch; 462 return res; 463} 464 465inline VkPresentRegionKHR makePresentRegionKHR (uint32_t rectangleCount, const VkRectLayerKHR* pRectangles) 466{ 467 VkPresentRegionKHR res; 468 res.rectangleCount = rectangleCount; 469 res.pRectangles = pRectangles; 470 return res; 471} 472 473inline VkExternalMemoryProperties makeExternalMemoryProperties (VkExternalMemoryFeatureFlags externalMemoryFeatures, VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes, VkExternalMemoryHandleTypeFlags compatibleHandleTypes) 474{ 475 VkExternalMemoryProperties res; 476 res.externalMemoryFeatures = externalMemoryFeatures; 477 res.exportFromImportedHandleTypes = exportFromImportedHandleTypes; 478 res.compatibleHandleTypes = compatibleHandleTypes; 479 return res; 480} 481 482inline VkDescriptorUpdateTemplateEntry makeDescriptorUpdateTemplateEntry (uint32_t dstBinding, uint32_t dstArrayElement, uint32_t descriptorCount, VkDescriptorType descriptorType, size_t offset, size_t stride) 483{ 484 VkDescriptorUpdateTemplateEntry res; 485 res.dstBinding = dstBinding; 486 res.dstArrayElement = dstArrayElement; 487 res.descriptorCount = descriptorCount; 488 res.descriptorType = descriptorType; 489 res.offset = offset; 490 res.stride = stride; 491 return res; 492} 493 494inline VkXYColorEXT makeXYColorEXT (float x, float y) 495{ 496 VkXYColorEXT res; 497 res.x = x; 498 res.y = y; 499 return res; 500} 501 502inline VkRefreshCycleDurationGOOGLE makeRefreshCycleDurationGOOGLE (uint64_t refreshDuration) 503{ 504 VkRefreshCycleDurationGOOGLE res; 505 res.refreshDuration = refreshDuration; 506 return res; 507} 508 509inline VkPastPresentationTimingGOOGLE makePastPresentationTimingGOOGLE (uint32_t presentID, uint64_t desiredPresentTime, uint64_t actualPresentTime, uint64_t earliestPresentTime, uint64_t presentMargin) 510{ 511 VkPastPresentationTimingGOOGLE res; 512 res.presentID = presentID; 513 res.desiredPresentTime = desiredPresentTime; 514 res.actualPresentTime = actualPresentTime; 515 res.earliestPresentTime = earliestPresentTime; 516 res.presentMargin = presentMargin; 517 return res; 518} 519 520inline VkPresentTimeGOOGLE makePresentTimeGOOGLE (uint32_t presentID, uint64_t desiredPresentTime) 521{ 522 VkPresentTimeGOOGLE res; 523 res.presentID = presentID; 524 res.desiredPresentTime = desiredPresentTime; 525 return res; 526} 527 528inline VkViewportWScalingNV makeViewportWScalingNV (float xcoeff, float ycoeff) 529{ 530 VkViewportWScalingNV res; 531 res.xcoeff = xcoeff; 532 res.ycoeff = ycoeff; 533 return res; 534} 535 536inline VkViewportSwizzleNV makeViewportSwizzleNV (VkViewportCoordinateSwizzleNV x, VkViewportCoordinateSwizzleNV y, VkViewportCoordinateSwizzleNV z, VkViewportCoordinateSwizzleNV w) 537{ 538 VkViewportSwizzleNV res; 539 res.x = x; 540 res.y = y; 541 res.z = z; 542 res.w = w; 543 return res; 544} 545 546inline VkInputAttachmentAspectReference makeInputAttachmentAspectReference (uint32_t subpass, uint32_t inputAttachmentIndex, VkImageAspectFlags aspectMask) 547{ 548 VkInputAttachmentAspectReference res; 549 res.subpass = subpass; 550 res.inputAttachmentIndex = inputAttachmentIndex; 551 res.aspectMask = aspectMask; 552 return res; 553} 554 555inline VkSampleLocationEXT makeSampleLocationEXT (float x, float y) 556{ 557 VkSampleLocationEXT res; 558 res.x = x; 559 res.y = y; 560 return res; 561} 562 563inline VkShaderResourceUsageAMD makeShaderResourceUsageAMD (uint32_t numUsedVgprs, uint32_t numUsedSgprs, uint32_t ldsSizePerLocalWorkGroup, size_t ldsUsageSizeInBytes, size_t scratchMemUsageInBytes) 564{ 565 VkShaderResourceUsageAMD res; 566 res.numUsedVgprs = numUsedVgprs; 567 res.numUsedSgprs = numUsedSgprs; 568 res.ldsSizePerLocalWorkGroup = ldsSizePerLocalWorkGroup; 569 res.ldsUsageSizeInBytes = ldsUsageSizeInBytes; 570 res.scratchMemUsageInBytes = scratchMemUsageInBytes; 571 return res; 572} 573 574inline VkVertexInputBindingDivisorDescriptionEXT makeVertexInputBindingDivisorDescriptionEXT (uint32_t binding, uint32_t divisor) 575{ 576 VkVertexInputBindingDivisorDescriptionEXT res; 577 res.binding = binding; 578 res.divisor = divisor; 579 return res; 580} 581 582inline VkShadingRatePaletteNV makeShadingRatePaletteNV (uint32_t shadingRatePaletteEntryCount, const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries) 583{ 584 VkShadingRatePaletteNV res; 585 res.shadingRatePaletteEntryCount = shadingRatePaletteEntryCount; 586 res.pShadingRatePaletteEntries = pShadingRatePaletteEntries; 587 return res; 588} 589 590inline VkCoarseSampleLocationNV makeCoarseSampleLocationNV (uint32_t pixelX, uint32_t pixelY, uint32_t sample) 591{ 592 VkCoarseSampleLocationNV res; 593 res.pixelX = pixelX; 594 res.pixelY = pixelY; 595 res.sample = sample; 596 return res; 597} 598 599inline VkCoarseSampleOrderCustomNV makeCoarseSampleOrderCustomNV (VkShadingRatePaletteEntryNV shadingRate, uint32_t sampleCount, uint32_t sampleLocationCount, const VkCoarseSampleLocationNV* pSampleLocations) 600{ 601 VkCoarseSampleOrderCustomNV res; 602 res.shadingRate = shadingRate; 603 res.sampleCount = sampleCount; 604 res.sampleLocationCount = sampleLocationCount; 605 res.pSampleLocations = pSampleLocations; 606 return res; 607} 608 609inline VkDrawMeshTasksIndirectCommandNV makeDrawMeshTasksIndirectCommandNV (uint32_t taskCount, uint32_t firstTask) 610{ 611 VkDrawMeshTasksIndirectCommandNV res; 612 res.taskCount = taskCount; 613 res.firstTask = firstTask; 614 return res; 615} 616 617inline VkDrawMeshTasksIndirectCommandEXT makeDrawMeshTasksIndirectCommandEXT (uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) 618{ 619 VkDrawMeshTasksIndirectCommandEXT res; 620 res.groupCountX = groupCountX; 621 res.groupCountY = groupCountY; 622 res.groupCountZ = groupCountZ; 623 return res; 624} 625 626inline VkStridedDeviceAddressRegionKHR makeStridedDeviceAddressRegionKHR (VkDeviceAddress deviceAddress, VkDeviceSize stride, VkDeviceSize size) 627{ 628 VkStridedDeviceAddressRegionKHR res; 629 res.deviceAddress = deviceAddress; 630 res.stride = stride; 631 res.size = size; 632 return res; 633} 634 635inline VkTraceRaysIndirectCommandKHR makeTraceRaysIndirectCommandKHR (uint32_t width, uint32_t height, uint32_t depth) 636{ 637 VkTraceRaysIndirectCommandKHR res; 638 res.width = width; 639 res.height = height; 640 res.depth = depth; 641 return res; 642} 643 644inline VkTraceRaysIndirectCommand2KHR makeTraceRaysIndirectCommand2KHR (VkDeviceAddress raygenShaderRecordAddress, VkDeviceSize raygenShaderRecordSize, VkDeviceAddress missShaderBindingTableAddress, VkDeviceSize missShaderBindingTableSize, VkDeviceSize missShaderBindingTableStride, VkDeviceAddress hitShaderBindingTableAddress, VkDeviceSize hitShaderBindingTableSize, VkDeviceSize hitShaderBindingTableStride, VkDeviceAddress callableShaderBindingTableAddress, VkDeviceSize callableShaderBindingTableSize, VkDeviceSize callableShaderBindingTableStride, uint32_t width, uint32_t height, uint32_t depth) 645{ 646 VkTraceRaysIndirectCommand2KHR res; 647 res.raygenShaderRecordAddress = raygenShaderRecordAddress; 648 res.raygenShaderRecordSize = raygenShaderRecordSize; 649 res.missShaderBindingTableAddress = missShaderBindingTableAddress; 650 res.missShaderBindingTableSize = missShaderBindingTableSize; 651 res.missShaderBindingTableStride = missShaderBindingTableStride; 652 res.hitShaderBindingTableAddress = hitShaderBindingTableAddress; 653 res.hitShaderBindingTableSize = hitShaderBindingTableSize; 654 res.hitShaderBindingTableStride = hitShaderBindingTableStride; 655 res.callableShaderBindingTableAddress = callableShaderBindingTableAddress; 656 res.callableShaderBindingTableSize = callableShaderBindingTableSize; 657 res.callableShaderBindingTableStride = callableShaderBindingTableStride; 658 res.width = width; 659 res.height = height; 660 res.depth = depth; 661 return res; 662} 663 664inline VkDrmFormatModifierPropertiesEXT makeDrmFormatModifierPropertiesEXT (uint64_t drmFormatModifier, uint32_t drmFormatModifierPlaneCount, VkFormatFeatureFlags drmFormatModifierTilingFeatures) 665{ 666 VkDrmFormatModifierPropertiesEXT res; 667 res.drmFormatModifier = drmFormatModifier; 668 res.drmFormatModifierPlaneCount = drmFormatModifierPlaneCount; 669 res.drmFormatModifierTilingFeatures = drmFormatModifierTilingFeatures; 670 return res; 671} 672 673inline VkPipelineCreationFeedback makePipelineCreationFeedback (VkPipelineCreationFeedbackFlags flags, uint64_t duration) 674{ 675 VkPipelineCreationFeedback res; 676 res.flags = flags; 677 res.duration = duration; 678 return res; 679} 680 681inline VkAccelerationStructureBuildRangeInfoKHR makeAccelerationStructureBuildRangeInfoKHR (uint32_t primitiveCount, uint32_t primitiveOffset, uint32_t firstVertex, uint32_t transformOffset) 682{ 683 VkAccelerationStructureBuildRangeInfoKHR res; 684 res.primitiveCount = primitiveCount; 685 res.primitiveOffset = primitiveOffset; 686 res.firstVertex = firstVertex; 687 res.transformOffset = transformOffset; 688 return res; 689} 690 691inline VkAabbPositionsKHR makeAabbPositionsKHR (float minX, float minY, float minZ, float maxX, float maxY, float maxZ) 692{ 693 VkAabbPositionsKHR res; 694 res.minX = minX; 695 res.minY = minY; 696 res.minZ = minZ; 697 res.maxX = maxX; 698 res.maxY = maxY; 699 res.maxZ = maxZ; 700 return res; 701} 702 703inline VkColorBlendEquationEXT makeColorBlendEquationEXT (VkBlendFactor srcColorBlendFactor, VkBlendFactor dstColorBlendFactor, VkBlendOp colorBlendOp, VkBlendFactor srcAlphaBlendFactor, VkBlendFactor dstAlphaBlendFactor, VkBlendOp alphaBlendOp) 704{ 705 VkColorBlendEquationEXT res; 706 res.srcColorBlendFactor = srcColorBlendFactor; 707 res.dstColorBlendFactor = dstColorBlendFactor; 708 res.colorBlendOp = colorBlendOp; 709 res.srcAlphaBlendFactor = srcAlphaBlendFactor; 710 res.dstAlphaBlendFactor = dstAlphaBlendFactor; 711 res.alphaBlendOp = alphaBlendOp; 712 return res; 713} 714 715inline VkColorBlendAdvancedEXT makeColorBlendAdvancedEXT (VkBlendOp advancedBlendOp, VkBool32 srcPremultiplied, VkBool32 dstPremultiplied, VkBlendOverlapEXT blendOverlap, VkBool32 clampResults) 716{ 717 VkColorBlendAdvancedEXT res; 718 res.advancedBlendOp = advancedBlendOp; 719 res.srcPremultiplied = srcPremultiplied; 720 res.dstPremultiplied = dstPremultiplied; 721 res.blendOverlap = blendOverlap; 722 res.clampResults = clampResults; 723 return res; 724} 725 726inline VkMutableDescriptorTypeListEXT makeMutableDescriptorTypeListEXT (uint32_t descriptorTypeCount, const VkDescriptorType* pDescriptorTypes) 727{ 728 VkMutableDescriptorTypeListEXT res; 729 res.descriptorTypeCount = descriptorTypeCount; 730 res.pDescriptorTypes = pDescriptorTypes; 731 return res; 732} 733 734inline VkVideoEncodeH264QpEXT makeVideoEncodeH264QpEXT (int32_t qpI, int32_t qpP, int32_t qpB) 735{ 736 VkVideoEncodeH264QpEXT res; 737 res.qpI = qpI; 738 res.qpP = qpP; 739 res.qpB = qpB; 740 return res; 741} 742 743inline VkVideoEncodeH264FrameSizeEXT makeVideoEncodeH264FrameSizeEXT (uint32_t frameISize, uint32_t framePSize, uint32_t frameBSize) 744{ 745 VkVideoEncodeH264FrameSizeEXT res; 746 res.frameISize = frameISize; 747 res.framePSize = framePSize; 748 res.frameBSize = frameBSize; 749 return res; 750} 751 752inline VkVideoEncodeH265QpEXT makeVideoEncodeH265QpEXT (int32_t qpI, int32_t qpP, int32_t qpB) 753{ 754 VkVideoEncodeH265QpEXT res; 755 res.qpI = qpI; 756 res.qpP = qpP; 757 res.qpB = qpB; 758 return res; 759} 760 761inline VkVideoEncodeH265FrameSizeEXT makeVideoEncodeH265FrameSizeEXT (uint32_t frameISize, uint32_t framePSize, uint32_t frameBSize) 762{ 763 VkVideoEncodeH265FrameSizeEXT res; 764 res.frameISize = frameISize; 765 res.framePSize = framePSize; 766 res.frameBSize = frameBSize; 767 return res; 768} 769 770inline VkSRTDataNV makeSRTDataNV (float sx, float a, float b, float pvx, float sy, float c, float pvy, float sz, float pvz, float qx, float qy, float qz, float qw, float tx, float ty, float tz) 771{ 772 VkSRTDataNV res; 773 res.sx = sx; 774 res.a = a; 775 res.b = b; 776 res.pvx = pvx; 777 res.sy = sy; 778 res.c = c; 779 res.pvy = pvy; 780 res.sz = sz; 781 res.pvz = pvz; 782 res.qx = qx; 783 res.qy = qy; 784 res.qz = qz; 785 res.qw = qw; 786 res.tx = tx; 787 res.ty = ty; 788 res.tz = tz; 789 return res; 790} 791 792inline VkDrmFormatModifierProperties2EXT makeDrmFormatModifierProperties2EXT (uint64_t drmFormatModifier, uint32_t drmFormatModifierPlaneCount, VkFormatFeatureFlags2 drmFormatModifierTilingFeatures) 793{ 794 VkDrmFormatModifierProperties2EXT res; 795 res.drmFormatModifier = drmFormatModifier; 796 res.drmFormatModifierPlaneCount = drmFormatModifierPlaneCount; 797 res.drmFormatModifierTilingFeatures = drmFormatModifierTilingFeatures; 798 return res; 799} 800 801inline VkRenderPassCreationFeedbackInfoEXT makeRenderPassCreationFeedbackInfoEXT (uint32_t postMergeSubpassCount) 802{ 803 VkRenderPassCreationFeedbackInfoEXT res; 804 res.postMergeSubpassCount = postMergeSubpassCount; 805 return res; 806} 807 808inline VkMicromapUsageEXT makeMicromapUsageEXT (uint32_t count, uint32_t subdivisionLevel, uint32_t format) 809{ 810 VkMicromapUsageEXT res; 811 res.count = count; 812 res.subdivisionLevel = subdivisionLevel; 813 res.format = format; 814 return res; 815} 816 817inline VkMicromapTriangleEXT makeMicromapTriangleEXT (uint32_t dataOffset, uint16_t subdivisionLevel, uint16_t format) 818{ 819 VkMicromapTriangleEXT res; 820 res.dataOffset = dataOffset; 821 res.subdivisionLevel = subdivisionLevel; 822 res.format = format; 823 return res; 824} 825 826inline VkDeviceFaultAddressInfoEXT makeDeviceFaultAddressInfoEXT (VkDeviceFaultAddressTypeEXT addressType, VkDeviceAddress reportedAddress, VkDeviceSize addressPrecision) 827{ 828 VkDeviceFaultAddressInfoEXT res; 829 res.addressType = addressType; 830 res.reportedAddress = reportedAddress; 831 res.addressPrecision = addressPrecision; 832 return res; 833} 834 835inline VkDecompressMemoryRegionNV makeDecompressMemoryRegionNV (VkDeviceAddress srcAddress, VkDeviceAddress dstAddress, VkDeviceSize compressedSize, VkDeviceSize decompressedSize, VkMemoryDecompressionMethodFlagsNV decompressionMethod) 836{ 837 VkDecompressMemoryRegionNV res; 838 res.srcAddress = srcAddress; 839 res.dstAddress = dstAddress; 840 res.compressedSize = compressedSize; 841 res.decompressedSize = decompressedSize; 842 res.decompressionMethod = decompressionMethod; 843 return res; 844} 845 846inline StdVideoEncodeH264WeightTableFlags makeStdVideoEncodeH264WeightTableFlags (uint32_t luma_weight_l0_flag, uint32_t chroma_weight_l0_flag, uint32_t luma_weight_l1_flag, uint32_t chroma_weight_l1_flag) 847{ 848 StdVideoEncodeH264WeightTableFlags res; 849 res.luma_weight_l0_flag = luma_weight_l0_flag; 850 res.chroma_weight_l0_flag = chroma_weight_l0_flag; 851 res.luma_weight_l1_flag = luma_weight_l1_flag; 852 res.chroma_weight_l1_flag = chroma_weight_l1_flag; 853 return res; 854} 855 856inline StdVideoEncodeH264RefListModEntry makeStdVideoEncodeH264RefListModEntry (StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc, uint16_t abs_diff_pic_num_minus1, uint16_t long_term_pic_num) 857{ 858 StdVideoEncodeH264RefListModEntry res; 859 res.modification_of_pic_nums_idc = modification_of_pic_nums_idc; 860 res.abs_diff_pic_num_minus1 = abs_diff_pic_num_minus1; 861 res.long_term_pic_num = long_term_pic_num; 862 return res; 863} 864 865inline StdVideoEncodeH264RefPicMarkingEntry makeStdVideoEncodeH264RefPicMarkingEntry (StdVideoH264MemMgmtControlOp operation, uint16_t difference_of_pic_nums_minus1, uint16_t long_term_pic_num, uint16_t long_term_frame_idx, uint16_t max_long_term_frame_idx_plus1) 866{ 867 StdVideoEncodeH264RefPicMarkingEntry res; 868 res.operation = operation; 869 res.difference_of_pic_nums_minus1 = difference_of_pic_nums_minus1; 870 res.long_term_pic_num = long_term_pic_num; 871 res.long_term_frame_idx = long_term_frame_idx; 872 res.max_long_term_frame_idx_plus1 = max_long_term_frame_idx_plus1; 873 return res; 874} 875 876inline StdVideoEncodeH265WeightTableFlags makeStdVideoEncodeH265WeightTableFlags (uint16_t luma_weight_l0_flag, uint16_t chroma_weight_l0_flag, uint16_t luma_weight_l1_flag, uint16_t chroma_weight_l1_flag) 877{ 878 StdVideoEncodeH265WeightTableFlags res; 879 res.luma_weight_l0_flag = luma_weight_l0_flag; 880 res.chroma_weight_l0_flag = chroma_weight_l0_flag; 881 res.luma_weight_l1_flag = luma_weight_l1_flag; 882 res.chroma_weight_l1_flag = chroma_weight_l1_flag; 883 return res; 884} 885