1/* WARNING: This is auto-generated file. Do not modify, since changes will 2 * be lost! Modify the generating script instead. 3 */ 4 5inline VkAllocationCallbacks makeAllocationCallbacks (void* pUserData, PFN_vkAllocationFunction pfnAllocation, PFN_vkReallocationFunction pfnReallocation, PFN_vkFreeFunction pfnFree, PFN_vkInternalAllocationNotification pfnInternalAllocation, PFN_vkInternalFreeNotification pfnInternalFree) 6{ 7 VkAllocationCallbacks res; 8 res.pUserData = pUserData; 9 res.pfnAllocation = pfnAllocation; 10 res.pfnReallocation = pfnReallocation; 11 res.pfnFree = pfnFree; 12 res.pfnInternalAllocation = pfnInternalAllocation; 13 res.pfnInternalFree = pfnInternalFree; 14 return res; 15} 16 17inline VkExtent3D makeExtent3D (deUint32 width, deUint32 height, deUint32 depth) 18{ 19 VkExtent3D res; 20 res.width = width; 21 res.height = height; 22 res.depth = depth; 23 return res; 24} 25 26inline VkMemoryRequirements makeMemoryRequirements (VkDeviceSize size, VkDeviceSize alignment, deUint32 memoryTypeBits) 27{ 28 VkMemoryRequirements res; 29 res.size = size; 30 res.alignment = alignment; 31 res.memoryTypeBits = memoryTypeBits; 32 return res; 33} 34 35inline VkSparseMemoryBind makeSparseMemoryBind (VkDeviceSize resourceOffset, VkDeviceSize size, VkDeviceMemory memory, VkDeviceSize memoryOffset, VkSparseMemoryBindFlags flags) 36{ 37 VkSparseMemoryBind res; 38 res.resourceOffset = resourceOffset; 39 res.size = size; 40 res.memory = memory; 41 res.memoryOffset = memoryOffset; 42 res.flags = flags; 43 return res; 44} 45 46inline VkSparseBufferMemoryBindInfo makeSparseBufferMemoryBindInfo (VkBuffer buffer, deUint32 bindCount, const VkSparseMemoryBind* pBinds) 47{ 48 VkSparseBufferMemoryBindInfo res; 49 res.buffer = buffer; 50 res.bindCount = bindCount; 51 res.pBinds = pBinds; 52 return res; 53} 54 55inline VkSparseImageOpaqueMemoryBindInfo makeSparseImageOpaqueMemoryBindInfo (VkImage image, deUint32 bindCount, const VkSparseMemoryBind* pBinds) 56{ 57 VkSparseImageOpaqueMemoryBindInfo res; 58 res.image = image; 59 res.bindCount = bindCount; 60 res.pBinds = pBinds; 61 return res; 62} 63 64inline VkImageSubresource makeImageSubresource (VkImageAspectFlags aspectMask, deUint32 mipLevel, deUint32 arrayLayer) 65{ 66 VkImageSubresource res; 67 res.aspectMask = aspectMask; 68 res.mipLevel = mipLevel; 69 res.arrayLayer = arrayLayer; 70 return res; 71} 72 73inline VkOffset3D makeOffset3D (deInt32 x, deInt32 y, deInt32 z) 74{ 75 VkOffset3D res; 76 res.x = x; 77 res.y = y; 78 res.z = z; 79 return res; 80} 81 82inline VkSparseImageMemoryBindInfo makeSparseImageMemoryBindInfo (VkImage image, deUint32 bindCount, const VkSparseImageMemoryBind* pBinds) 83{ 84 VkSparseImageMemoryBindInfo res; 85 res.image = image; 86 res.bindCount = bindCount; 87 res.pBinds = pBinds; 88 return res; 89} 90 91inline VkSubresourceLayout makeSubresourceLayout (VkDeviceSize offset, VkDeviceSize size, VkDeviceSize rowPitch, VkDeviceSize arrayPitch, VkDeviceSize depthPitch) 92{ 93 VkSubresourceLayout res; 94 res.offset = offset; 95 res.size = size; 96 res.rowPitch = rowPitch; 97 res.arrayPitch = arrayPitch; 98 res.depthPitch = depthPitch; 99 return res; 100} 101 102inline VkComponentMapping makeComponentMapping (VkComponentSwizzle r, VkComponentSwizzle g, VkComponentSwizzle b, VkComponentSwizzle a) 103{ 104 VkComponentMapping res; 105 res.r = r; 106 res.g = g; 107 res.b = b; 108 res.a = a; 109 return res; 110} 111 112inline VkImageSubresourceRange makeImageSubresourceRange (VkImageAspectFlags aspectMask, deUint32 baseMipLevel, deUint32 levelCount, deUint32 baseArrayLayer, deUint32 layerCount) 113{ 114 VkImageSubresourceRange res; 115 res.aspectMask = aspectMask; 116 res.baseMipLevel = baseMipLevel; 117 res.levelCount = levelCount; 118 res.baseArrayLayer = baseArrayLayer; 119 res.layerCount = layerCount; 120 return res; 121} 122 123inline VkSpecializationMapEntry makeSpecializationMapEntry (deUint32 constantID, deUint32 offset, deUintptr size) 124{ 125 VkSpecializationMapEntry res; 126 res.constantID = constantID; 127 res.offset = offset; 128 res.size = size; 129 return res; 130} 131 132inline VkSpecializationInfo makeSpecializationInfo (deUint32 mapEntryCount, const VkSpecializationMapEntry* pMapEntries, deUintptr dataSize, const void* pData) 133{ 134 VkSpecializationInfo res; 135 res.mapEntryCount = mapEntryCount; 136 res.pMapEntries = pMapEntries; 137 res.dataSize = dataSize; 138 res.pData = pData; 139 return res; 140} 141 142inline VkVertexInputBindingDescription makeVertexInputBindingDescription (deUint32 binding, deUint32 stride, VkVertexInputRate inputRate) 143{ 144 VkVertexInputBindingDescription res; 145 res.binding = binding; 146 res.stride = stride; 147 res.inputRate = inputRate; 148 return res; 149} 150 151inline VkVertexInputAttributeDescription makeVertexInputAttributeDescription (deUint32 location, deUint32 binding, VkFormat format, deUint32 offset) 152{ 153 VkVertexInputAttributeDescription res; 154 res.location = location; 155 res.binding = binding; 156 res.format = format; 157 res.offset = offset; 158 return res; 159} 160 161inline VkViewport makeViewport (float x, float y, float width, float height, float minDepth, float maxDepth) 162{ 163 VkViewport res; 164 res.x = x; 165 res.y = y; 166 res.width = width; 167 res.height = height; 168 res.minDepth = minDepth; 169 res.maxDepth = maxDepth; 170 return res; 171} 172 173inline VkOffset2D makeOffset2D (deInt32 x, deInt32 y) 174{ 175 VkOffset2D res; 176 res.x = x; 177 res.y = y; 178 return res; 179} 180 181inline VkExtent2D makeExtent2D (deUint32 width, deUint32 height) 182{ 183 VkExtent2D res; 184 res.width = width; 185 res.height = height; 186 return res; 187} 188 189inline VkStencilOpState makeStencilOpState (VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, deUint32 compareMask, deUint32 writeMask, deUint32 reference) 190{ 191 VkStencilOpState res; 192 res.failOp = failOp; 193 res.passOp = passOp; 194 res.depthFailOp = depthFailOp; 195 res.compareOp = compareOp; 196 res.compareMask = compareMask; 197 res.writeMask = writeMask; 198 res.reference = reference; 199 return res; 200} 201 202inline VkPipelineColorBlendAttachmentState makePipelineColorBlendAttachmentState (VkBool32 blendEnable, VkBlendFactor srcColorBlendFactor, VkBlendFactor dstColorBlendFactor, VkBlendOp colorBlendOp, VkBlendFactor srcAlphaBlendFactor, VkBlendFactor dstAlphaBlendFactor, VkBlendOp alphaBlendOp, VkColorComponentFlags colorWriteMask) 203{ 204 VkPipelineColorBlendAttachmentState res; 205 res.blendEnable = blendEnable; 206 res.srcColorBlendFactor = srcColorBlendFactor; 207 res.dstColorBlendFactor = dstColorBlendFactor; 208 res.colorBlendOp = colorBlendOp; 209 res.srcAlphaBlendFactor = srcAlphaBlendFactor; 210 res.dstAlphaBlendFactor = dstAlphaBlendFactor; 211 res.alphaBlendOp = alphaBlendOp; 212 res.colorWriteMask = colorWriteMask; 213 return res; 214} 215 216inline VkPushConstantRange makePushConstantRange (VkShaderStageFlags stageFlags, deUint32 offset, deUint32 size) 217{ 218 VkPushConstantRange res; 219 res.stageFlags = stageFlags; 220 res.offset = offset; 221 res.size = size; 222 return res; 223} 224 225inline VkDescriptorSetLayoutBinding makeDescriptorSetLayoutBinding (deUint32 binding, VkDescriptorType descriptorType, deUint32 descriptorCount, VkShaderStageFlags stageFlags, const VkSampler* pImmutableSamplers) 226{ 227 VkDescriptorSetLayoutBinding res; 228 res.binding = binding; 229 res.descriptorType = descriptorType; 230 res.descriptorCount = descriptorCount; 231 res.stageFlags = stageFlags; 232 res.pImmutableSamplers = pImmutableSamplers; 233 return res; 234} 235 236inline VkDescriptorPoolSize makeDescriptorPoolSize (VkDescriptorType type, deUint32 descriptorCount) 237{ 238 VkDescriptorPoolSize res; 239 res.type = type; 240 res.descriptorCount = descriptorCount; 241 return res; 242} 243 244inline VkDescriptorImageInfo makeDescriptorImageInfo (VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout) 245{ 246 VkDescriptorImageInfo res; 247 res.sampler = sampler; 248 res.imageView = imageView; 249 res.imageLayout = imageLayout; 250 return res; 251} 252 253inline VkDescriptorBufferInfo makeDescriptorBufferInfo (VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range) 254{ 255 VkDescriptorBufferInfo res; 256 res.buffer = buffer; 257 res.offset = offset; 258 res.range = range; 259 return res; 260} 261 262inline VkAttachmentDescription makeAttachmentDescription (VkAttachmentDescriptionFlags flags, VkFormat format, VkSampleCountFlagBits samples, VkAttachmentLoadOp loadOp, VkAttachmentStoreOp storeOp, VkAttachmentLoadOp stencilLoadOp, VkAttachmentStoreOp stencilStoreOp, VkImageLayout initialLayout, VkImageLayout finalLayout) 263{ 264 VkAttachmentDescription res; 265 res.flags = flags; 266 res.format = format; 267 res.samples = samples; 268 res.loadOp = loadOp; 269 res.storeOp = storeOp; 270 res.stencilLoadOp = stencilLoadOp; 271 res.stencilStoreOp = stencilStoreOp; 272 res.initialLayout = initialLayout; 273 res.finalLayout = finalLayout; 274 return res; 275} 276 277inline VkAttachmentReference makeAttachmentReference (deUint32 attachment, VkImageLayout layout) 278{ 279 VkAttachmentReference res; 280 res.attachment = attachment; 281 res.layout = layout; 282 return res; 283} 284 285inline VkSubpassDescription makeSubpassDescription (VkSubpassDescriptionFlags flags, VkPipelineBindPoint pipelineBindPoint, deUint32 inputAttachmentCount, const VkAttachmentReference* pInputAttachments, deUint32 colorAttachmentCount, const VkAttachmentReference* pColorAttachments, const VkAttachmentReference* pResolveAttachments, const VkAttachmentReference* pDepthStencilAttachment, deUint32 preserveAttachmentCount, const deUint32* pPreserveAttachments) 286{ 287 VkSubpassDescription res; 288 res.flags = flags; 289 res.pipelineBindPoint = pipelineBindPoint; 290 res.inputAttachmentCount = inputAttachmentCount; 291 res.pInputAttachments = pInputAttachments; 292 res.colorAttachmentCount = colorAttachmentCount; 293 res.pColorAttachments = pColorAttachments; 294 res.pResolveAttachments = pResolveAttachments; 295 res.pDepthStencilAttachment = pDepthStencilAttachment; 296 res.preserveAttachmentCount = preserveAttachmentCount; 297 res.pPreserveAttachments = pPreserveAttachments; 298 return res; 299} 300 301inline VkSubpassDependency makeSubpassDependency (deUint32 srcSubpass, deUint32 dstSubpass, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask, VkDependencyFlags dependencyFlags) 302{ 303 VkSubpassDependency res; 304 res.srcSubpass = srcSubpass; 305 res.dstSubpass = dstSubpass; 306 res.srcStageMask = srcStageMask; 307 res.dstStageMask = dstStageMask; 308 res.srcAccessMask = srcAccessMask; 309 res.dstAccessMask = dstAccessMask; 310 res.dependencyFlags = dependencyFlags; 311 return res; 312} 313 314inline VkBufferCopy makeBufferCopy (VkDeviceSize srcOffset, VkDeviceSize dstOffset, VkDeviceSize size) 315{ 316 VkBufferCopy res; 317 res.srcOffset = srcOffset; 318 res.dstOffset = dstOffset; 319 res.size = size; 320 return res; 321} 322 323inline VkImageSubresourceLayers makeImageSubresourceLayers (VkImageAspectFlags aspectMask, deUint32 mipLevel, deUint32 baseArrayLayer, deUint32 layerCount) 324{ 325 VkImageSubresourceLayers res; 326 res.aspectMask = aspectMask; 327 res.mipLevel = mipLevel; 328 res.baseArrayLayer = baseArrayLayer; 329 res.layerCount = layerCount; 330 return res; 331} 332 333inline VkClearDepthStencilValue makeClearDepthStencilValue (float depth, deUint32 stencil) 334{ 335 VkClearDepthStencilValue res; 336 res.depth = depth; 337 res.stencil = stencil; 338 return res; 339} 340 341inline VkDispatchIndirectCommand makeDispatchIndirectCommand (deUint32 x, deUint32 y, deUint32 z) 342{ 343 VkDispatchIndirectCommand res; 344 res.x = x; 345 res.y = y; 346 res.z = z; 347 return res; 348} 349 350inline VkDrawIndexedIndirectCommand makeDrawIndexedIndirectCommand (deUint32 indexCount, deUint32 instanceCount, deUint32 firstIndex, deInt32 vertexOffset, deUint32 firstInstance) 351{ 352 VkDrawIndexedIndirectCommand res; 353 res.indexCount = indexCount; 354 res.instanceCount = instanceCount; 355 res.firstIndex = firstIndex; 356 res.vertexOffset = vertexOffset; 357 res.firstInstance = firstInstance; 358 return res; 359} 360 361inline VkDrawIndirectCommand makeDrawIndirectCommand (deUint32 vertexCount, deUint32 instanceCount, deUint32 firstVertex, deUint32 firstInstance) 362{ 363 VkDrawIndirectCommand res; 364 res.vertexCount = vertexCount; 365 res.instanceCount = instanceCount; 366 res.firstVertex = firstVertex; 367 res.firstInstance = firstInstance; 368 return res; 369} 370 371inline VkInputAttachmentAspectReference makeInputAttachmentAspectReference (deUint32 subpass, deUint32 inputAttachmentIndex, VkImageAspectFlags aspectMask) 372{ 373 VkInputAttachmentAspectReference res; 374 res.subpass = subpass; 375 res.inputAttachmentIndex = inputAttachmentIndex; 376 res.aspectMask = aspectMask; 377 return res; 378} 379 380inline VkDescriptorUpdateTemplateEntry makeDescriptorUpdateTemplateEntry (deUint32 dstBinding, deUint32 dstArrayElement, deUint32 descriptorCount, VkDescriptorType descriptorType, deUintptr offset, deUintptr stride) 381{ 382 VkDescriptorUpdateTemplateEntry res; 383 res.dstBinding = dstBinding; 384 res.dstArrayElement = dstArrayElement; 385 res.descriptorCount = descriptorCount; 386 res.descriptorType = descriptorType; 387 res.offset = offset; 388 res.stride = stride; 389 return res; 390} 391 392inline VkExternalMemoryProperties makeExternalMemoryProperties (VkExternalMemoryFeatureFlags externalMemoryFeatures, VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes, VkExternalMemoryHandleTypeFlags compatibleHandleTypes) 393{ 394 VkExternalMemoryProperties res; 395 res.externalMemoryFeatures = externalMemoryFeatures; 396 res.exportFromImportedHandleTypes = exportFromImportedHandleTypes; 397 res.compatibleHandleTypes = compatibleHandleTypes; 398 return res; 399} 400 401inline VkSurfaceFormatKHR makeSurfaceFormatKHR (VkFormat format, VkColorSpaceKHR colorSpace) 402{ 403 VkSurfaceFormatKHR res; 404 res.format = format; 405 res.colorSpace = colorSpace; 406 return res; 407} 408 409inline VkDisplayPlanePropertiesKHR makeDisplayPlanePropertiesKHR (VkDisplayKHR currentDisplay, deUint32 currentStackIndex) 410{ 411 VkDisplayPlanePropertiesKHR res; 412 res.currentDisplay = currentDisplay; 413 res.currentStackIndex = currentStackIndex; 414 return res; 415} 416 417inline VkPresentRegionKHR makePresentRegionKHR (deUint32 rectangleCount, const VkRectLayerKHR* pRectangles) 418{ 419 VkPresentRegionKHR res; 420 res.rectangleCount = rectangleCount; 421 res.pRectangles = pRectangles; 422 return res; 423} 424 425inline VkConformanceVersionKHR makeConformanceVersionKHR (deUint8 major, deUint8 minor, deUint8 subminor, deUint8 patch) 426{ 427 VkConformanceVersionKHR res; 428 res.major = major; 429 res.minor = minor; 430 res.subminor = subminor; 431 res.patch = patch; 432 return res; 433} 434 435inline VkIndirectCommandsTokenNVX makeIndirectCommandsTokenNVX (VkIndirectCommandsTokenTypeNVX tokenType, VkBuffer buffer, VkDeviceSize offset) 436{ 437 VkIndirectCommandsTokenNVX res; 438 res.tokenType = tokenType; 439 res.buffer = buffer; 440 res.offset = offset; 441 return res; 442} 443 444inline VkIndirectCommandsLayoutTokenNVX makeIndirectCommandsLayoutTokenNVX (VkIndirectCommandsTokenTypeNVX tokenType, deUint32 bindingUnit, deUint32 dynamicCount, deUint32 divisor) 445{ 446 VkIndirectCommandsLayoutTokenNVX res; 447 res.tokenType = tokenType; 448 res.bindingUnit = bindingUnit; 449 res.dynamicCount = dynamicCount; 450 res.divisor = divisor; 451 return res; 452} 453 454inline VkObjectTableEntryNVX makeObjectTableEntryNVX (VkObjectEntryTypeNVX type, VkObjectEntryUsageFlagsNVX flags) 455{ 456 VkObjectTableEntryNVX res; 457 res.type = type; 458 res.flags = flags; 459 return res; 460} 461 462inline VkObjectTablePipelineEntryNVX makeObjectTablePipelineEntryNVX (VkObjectEntryTypeNVX type, VkObjectEntryUsageFlagsNVX flags, VkPipeline pipeline) 463{ 464 VkObjectTablePipelineEntryNVX res; 465 res.type = type; 466 res.flags = flags; 467 res.pipeline = pipeline; 468 return res; 469} 470 471inline VkObjectTableDescriptorSetEntryNVX makeObjectTableDescriptorSetEntryNVX (VkObjectEntryTypeNVX type, VkObjectEntryUsageFlagsNVX flags, VkPipelineLayout pipelineLayout, VkDescriptorSet descriptorSet) 472{ 473 VkObjectTableDescriptorSetEntryNVX res; 474 res.type = type; 475 res.flags = flags; 476 res.pipelineLayout = pipelineLayout; 477 res.descriptorSet = descriptorSet; 478 return res; 479} 480 481inline VkObjectTableVertexBufferEntryNVX makeObjectTableVertexBufferEntryNVX (VkObjectEntryTypeNVX type, VkObjectEntryUsageFlagsNVX flags, VkBuffer buffer) 482{ 483 VkObjectTableVertexBufferEntryNVX res; 484 res.type = type; 485 res.flags = flags; 486 res.buffer = buffer; 487 return res; 488} 489 490inline VkObjectTableIndexBufferEntryNVX makeObjectTableIndexBufferEntryNVX (VkObjectEntryTypeNVX type, VkObjectEntryUsageFlagsNVX flags, VkBuffer buffer, VkIndexType indexType) 491{ 492 VkObjectTableIndexBufferEntryNVX res; 493 res.type = type; 494 res.flags = flags; 495 res.buffer = buffer; 496 res.indexType = indexType; 497 return res; 498} 499 500inline VkObjectTablePushConstantEntryNVX makeObjectTablePushConstantEntryNVX (VkObjectEntryTypeNVX type, VkObjectEntryUsageFlagsNVX flags, VkPipelineLayout pipelineLayout, VkShaderStageFlags stageFlags) 501{ 502 VkObjectTablePushConstantEntryNVX res; 503 res.type = type; 504 res.flags = flags; 505 res.pipelineLayout = pipelineLayout; 506 res.stageFlags = stageFlags; 507 return res; 508} 509 510inline VkViewportWScalingNV makeViewportWScalingNV (float xcoeff, float ycoeff) 511{ 512 VkViewportWScalingNV res; 513 res.xcoeff = xcoeff; 514 res.ycoeff = ycoeff; 515 return res; 516} 517 518inline VkRefreshCycleDurationGOOGLE makeRefreshCycleDurationGOOGLE (deUint64 refreshDuration) 519{ 520 VkRefreshCycleDurationGOOGLE res; 521 res.refreshDuration = refreshDuration; 522 return res; 523} 524 525inline VkPastPresentationTimingGOOGLE makePastPresentationTimingGOOGLE (deUint32 presentID, deUint64 desiredPresentTime, deUint64 actualPresentTime, deUint64 earliestPresentTime, deUint64 presentMargin) 526{ 527 VkPastPresentationTimingGOOGLE res; 528 res.presentID = presentID; 529 res.desiredPresentTime = desiredPresentTime; 530 res.actualPresentTime = actualPresentTime; 531 res.earliestPresentTime = earliestPresentTime; 532 res.presentMargin = presentMargin; 533 return res; 534} 535 536inline VkPresentTimeGOOGLE makePresentTimeGOOGLE (deUint32 presentID, deUint64 desiredPresentTime) 537{ 538 VkPresentTimeGOOGLE res; 539 res.presentID = presentID; 540 res.desiredPresentTime = desiredPresentTime; 541 return res; 542} 543 544inline VkViewportSwizzleNV makeViewportSwizzleNV (VkViewportCoordinateSwizzleNV x, VkViewportCoordinateSwizzleNV y, VkViewportCoordinateSwizzleNV z, VkViewportCoordinateSwizzleNV w) 545{ 546 VkViewportSwizzleNV res; 547 res.x = x; 548 res.y = y; 549 res.z = z; 550 res.w = w; 551 return res; 552} 553 554inline VkXYColorEXT makeXYColorEXT (float x, float y) 555{ 556 VkXYColorEXT res; 557 res.x = x; 558 res.y = y; 559 return res; 560} 561 562inline VkSampleLocationEXT makeSampleLocationEXT (float x, float y) 563{ 564 VkSampleLocationEXT res; 565 res.x = x; 566 res.y = y; 567 return res; 568} 569 570inline VkVertexInputBindingDivisorDescriptionEXT makeVertexInputBindingDivisorDescriptionEXT (deUint32 binding, deUint32 divisor) 571{ 572 VkVertexInputBindingDivisorDescriptionEXT res; 573 res.binding = binding; 574 res.divisor = divisor; 575 return res; 576} 577