565f49ffadfa0856a3eb238b433f6994f2c6ba96
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / framework / vulkan / generated / vulkan / vkTypeUtil.inl
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
7 inline 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
15 inline 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
24 inline 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
32 inline 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
41 inline 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
53 inline 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
63 inline 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
75 inline 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
84 inline 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
93 inline 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
102 inline 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
111 inline 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
121 inline 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
132 inline 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
143 inline 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
152 inline 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
163 inline 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
172 inline 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
181 inline 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
190 inline VkDescriptorSetLayoutBinding makeDescriptorSetLayoutBinding (uint32_t binding, VkDescriptorType descriptorType, uint32_t descriptorCount, VkShaderStageFlags stageFlags, const VkSampler* pImmutableSamplers)
191 {
192         VkDescriptorSetLayoutBinding res;
193         res.binding                             = binding;
194         res.descriptorType              = descriptorType;
195         res.descriptorCount             = descriptorCount;
196         res.stageFlags                  = stageFlags;
197         res.pImmutableSamplers  = pImmutableSamplers;
198         return res;
199 }
200
201 inline VkDescriptorPoolSize makeDescriptorPoolSize (VkDescriptorType type, uint32_t descriptorCount)
202 {
203         VkDescriptorPoolSize res;
204         res.type                        = type;
205         res.descriptorCount     = descriptorCount;
206         return res;
207 }
208
209 inline VkSpecializationMapEntry makeSpecializationMapEntry (uint32_t constantID, uint32_t offset, size_t size)
210 {
211         VkSpecializationMapEntry res;
212         res.constantID  = constantID;
213         res.offset              = offset;
214         res.size                = size;
215         return res;
216 }
217
218 inline VkSpecializationInfo makeSpecializationInfo (uint32_t mapEntryCount, const VkSpecializationMapEntry* pMapEntries, size_t dataSize, const void* pData)
219 {
220         VkSpecializationInfo res;
221         res.mapEntryCount       = mapEntryCount;
222         res.pMapEntries         = pMapEntries;
223         res.dataSize            = dataSize;
224         res.pData                       = pData;
225         return res;
226 }
227
228 inline VkVertexInputBindingDescription makeVertexInputBindingDescription (uint32_t binding, uint32_t stride, VkVertexInputRate inputRate)
229 {
230         VkVertexInputBindingDescription res;
231         res.binding             = binding;
232         res.stride              = stride;
233         res.inputRate   = inputRate;
234         return res;
235 }
236
237 inline VkVertexInputAttributeDescription makeVertexInputAttributeDescription (uint32_t location, uint32_t binding, VkFormat format, uint32_t offset)
238 {
239         VkVertexInputAttributeDescription res;
240         res.location    = location;
241         res.binding             = binding;
242         res.format              = format;
243         res.offset              = offset;
244         return res;
245 }
246
247 inline VkPipelineColorBlendAttachmentState makePipelineColorBlendAttachmentState (VkBool32 blendEnable, VkBlendFactor srcColorBlendFactor, VkBlendFactor dstColorBlendFactor, VkBlendOp colorBlendOp, VkBlendFactor srcAlphaBlendFactor, VkBlendFactor dstAlphaBlendFactor, VkBlendOp alphaBlendOp, VkColorComponentFlags colorWriteMask)
248 {
249         VkPipelineColorBlendAttachmentState res;
250         res.blendEnable                 = blendEnable;
251         res.srcColorBlendFactor = srcColorBlendFactor;
252         res.dstColorBlendFactor = dstColorBlendFactor;
253         res.colorBlendOp                = colorBlendOp;
254         res.srcAlphaBlendFactor = srcAlphaBlendFactor;
255         res.dstAlphaBlendFactor = dstAlphaBlendFactor;
256         res.alphaBlendOp                = alphaBlendOp;
257         res.colorWriteMask              = colorWriteMask;
258         return res;
259 }
260
261 inline VkStencilOpState makeStencilOpState (VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, uint32_t compareMask, uint32_t writeMask, uint32_t reference)
262 {
263         VkStencilOpState res;
264         res.failOp              = failOp;
265         res.passOp              = passOp;
266         res.depthFailOp = depthFailOp;
267         res.compareOp   = compareOp;
268         res.compareMask = compareMask;
269         res.writeMask   = writeMask;
270         res.reference   = reference;
271         return res;
272 }
273
274 inline VkPushConstantRange makePushConstantRange (VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size)
275 {
276         VkPushConstantRange res;
277         res.stageFlags  = stageFlags;
278         res.offset              = offset;
279         res.size                = size;
280         return res;
281 }
282
283 inline VkClearDepthStencilValue makeClearDepthStencilValue (float depth, uint32_t stencil)
284 {
285         VkClearDepthStencilValue res;
286         res.depth       = depth;
287         res.stencil     = stencil;
288         return res;
289 }
290
291 inline VkAttachmentDescription makeAttachmentDescription (VkAttachmentDescriptionFlags flags, VkFormat format, VkSampleCountFlagBits samples, VkAttachmentLoadOp loadOp, VkAttachmentStoreOp storeOp, VkAttachmentLoadOp stencilLoadOp, VkAttachmentStoreOp stencilStoreOp, VkImageLayout initialLayout, VkImageLayout finalLayout)
292 {
293         VkAttachmentDescription res;
294         res.flags                       = flags;
295         res.format                      = format;
296         res.samples                     = samples;
297         res.loadOp                      = loadOp;
298         res.storeOp                     = storeOp;
299         res.stencilLoadOp       = stencilLoadOp;
300         res.stencilStoreOp      = stencilStoreOp;
301         res.initialLayout       = initialLayout;
302         res.finalLayout         = finalLayout;
303         return res;
304 }
305
306 inline VkAttachmentReference makeAttachmentReference (uint32_t attachment, VkImageLayout layout)
307 {
308         VkAttachmentReference res;
309         res.attachment  = attachment;
310         res.layout              = layout;
311         return res;
312 }
313
314 inline 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)
315 {
316         VkSubpassDescription res;
317         res.flags                                       = flags;
318         res.pipelineBindPoint           = pipelineBindPoint;
319         res.inputAttachmentCount        = inputAttachmentCount;
320         res.pInputAttachments           = pInputAttachments;
321         res.colorAttachmentCount        = colorAttachmentCount;
322         res.pColorAttachments           = pColorAttachments;
323         res.pResolveAttachments         = pResolveAttachments;
324         res.pDepthStencilAttachment     = pDepthStencilAttachment;
325         res.preserveAttachmentCount     = preserveAttachmentCount;
326         res.pPreserveAttachments        = pPreserveAttachments;
327         return res;
328 }
329
330 inline VkSubpassDependency makeSubpassDependency (uint32_t srcSubpass, uint32_t dstSubpass, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask, VkDependencyFlags dependencyFlags)
331 {
332         VkSubpassDependency res;
333         res.srcSubpass          = srcSubpass;
334         res.dstSubpass          = dstSubpass;
335         res.srcStageMask        = srcStageMask;
336         res.dstStageMask        = dstStageMask;
337         res.srcAccessMask       = srcAccessMask;
338         res.dstAccessMask       = dstAccessMask;
339         res.dependencyFlags     = dependencyFlags;
340         return res;
341 }
342
343 inline VkDrawIndirectCommand makeDrawIndirectCommand (uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
344 {
345         VkDrawIndirectCommand res;
346         res.vertexCount         = vertexCount;
347         res.instanceCount       = instanceCount;
348         res.firstVertex         = firstVertex;
349         res.firstInstance       = firstInstance;
350         return res;
351 }
352
353 inline VkDrawIndexedIndirectCommand makeDrawIndexedIndirectCommand (uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance)
354 {
355         VkDrawIndexedIndirectCommand res;
356         res.indexCount          = indexCount;
357         res.instanceCount       = instanceCount;
358         res.firstIndex          = firstIndex;
359         res.vertexOffset        = vertexOffset;
360         res.firstInstance       = firstInstance;
361         return res;
362 }
363
364 inline VkDispatchIndirectCommand makeDispatchIndirectCommand (uint32_t x, uint32_t y, uint32_t z)
365 {
366         VkDispatchIndirectCommand res;
367         res.x   = x;
368         res.y   = y;
369         res.z   = z;
370         return res;
371 }
372
373 inline VkMultiDrawInfoEXT makeMultiDrawInfoEXT (uint32_t firstVertex, uint32_t vertexCount)
374 {
375         VkMultiDrawInfoEXT res;
376         res.firstVertex = firstVertex;
377         res.vertexCount = vertexCount;
378         return res;
379 }
380
381 inline VkMultiDrawIndexedInfoEXT makeMultiDrawIndexedInfoEXT (uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset)
382 {
383         VkMultiDrawIndexedInfoEXT res;
384         res.firstIndex          = firstIndex;
385         res.indexCount          = indexCount;
386         res.vertexOffset        = vertexOffset;
387         return res;
388 }
389
390 inline VkDisplayPlanePropertiesKHR makeDisplayPlanePropertiesKHR (VkDisplayKHR currentDisplay, uint32_t currentStackIndex)
391 {
392         VkDisplayPlanePropertiesKHR res;
393         res.currentDisplay              = currentDisplay;
394         res.currentStackIndex   = currentStackIndex;
395         return res;
396 }
397
398 inline VkSurfaceFormatKHR makeSurfaceFormatKHR (VkFormat format, VkColorSpaceKHR colorSpace)
399 {
400         VkSurfaceFormatKHR res;
401         res.format              = format;
402         res.colorSpace  = colorSpace;
403         return res;
404 }
405
406 inline VkBindShaderGroupIndirectCommandNV makeBindShaderGroupIndirectCommandNV (uint32_t groupIndex)
407 {
408         VkBindShaderGroupIndirectCommandNV res;
409         res.groupIndex  = groupIndex;
410         return res;
411 }
412
413 inline VkBindIndexBufferIndirectCommandNV makeBindIndexBufferIndirectCommandNV (VkDeviceAddress bufferAddress, uint32_t size, VkIndexType indexType)
414 {
415         VkBindIndexBufferIndirectCommandNV res;
416         res.bufferAddress       = bufferAddress;
417         res.size                        = size;
418         res.indexType           = indexType;
419         return res;
420 }
421
422 inline VkBindVertexBufferIndirectCommandNV makeBindVertexBufferIndirectCommandNV (VkDeviceAddress bufferAddress, uint32_t size, uint32_t stride)
423 {
424         VkBindVertexBufferIndirectCommandNV res;
425         res.bufferAddress       = bufferAddress;
426         res.size                        = size;
427         res.stride                      = stride;
428         return res;
429 }
430
431 inline VkSetStateFlagsIndirectCommandNV makeSetStateFlagsIndirectCommandNV (uint32_t data)
432 {
433         VkSetStateFlagsIndirectCommandNV res;
434         res.data        = data;
435         return res;
436 }
437
438 inline VkIndirectCommandsStreamNV makeIndirectCommandsStreamNV (VkBuffer buffer, VkDeviceSize offset)
439 {
440         VkIndirectCommandsStreamNV res;
441         res.buffer      = buffer;
442         res.offset      = offset;
443         return res;
444 }
445
446 inline VkConformanceVersion makeConformanceVersion (uint8_t major, uint8_t minor, uint8_t subminor, uint8_t patch)
447 {
448         VkConformanceVersion res;
449         res.major               = major;
450         res.minor               = minor;
451         res.subminor    = subminor;
452         res.patch               = patch;
453         return res;
454 }
455
456 inline VkPresentRegionKHR makePresentRegionKHR (uint32_t rectangleCount, const VkRectLayerKHR* pRectangles)
457 {
458         VkPresentRegionKHR res;
459         res.rectangleCount      = rectangleCount;
460         res.pRectangles         = pRectangles;
461         return res;
462 }
463
464 inline VkExternalMemoryProperties makeExternalMemoryProperties (VkExternalMemoryFeatureFlags externalMemoryFeatures, VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes, VkExternalMemoryHandleTypeFlags compatibleHandleTypes)
465 {
466         VkExternalMemoryProperties res;
467         res.externalMemoryFeatures                      = externalMemoryFeatures;
468         res.exportFromImportedHandleTypes       = exportFromImportedHandleTypes;
469         res.compatibleHandleTypes                       = compatibleHandleTypes;
470         return res;
471 }
472
473 inline VkDescriptorUpdateTemplateEntry makeDescriptorUpdateTemplateEntry (uint32_t dstBinding, uint32_t dstArrayElement, uint32_t descriptorCount, VkDescriptorType descriptorType, size_t offset, size_t stride)
474 {
475         VkDescriptorUpdateTemplateEntry res;
476         res.dstBinding          = dstBinding;
477         res.dstArrayElement     = dstArrayElement;
478         res.descriptorCount     = descriptorCount;
479         res.descriptorType      = descriptorType;
480         res.offset                      = offset;
481         res.stride                      = stride;
482         return res;
483 }
484
485 inline VkXYColorEXT makeXYColorEXT (float x, float y)
486 {
487         VkXYColorEXT res;
488         res.x   = x;
489         res.y   = y;
490         return res;
491 }
492
493 inline VkRefreshCycleDurationGOOGLE makeRefreshCycleDurationGOOGLE (uint64_t refreshDuration)
494 {
495         VkRefreshCycleDurationGOOGLE res;
496         res.refreshDuration     = refreshDuration;
497         return res;
498 }
499
500 inline VkPastPresentationTimingGOOGLE makePastPresentationTimingGOOGLE (uint32_t presentID, uint64_t desiredPresentTime, uint64_t actualPresentTime, uint64_t earliestPresentTime, uint64_t presentMargin)
501 {
502         VkPastPresentationTimingGOOGLE res;
503         res.presentID                   = presentID;
504         res.desiredPresentTime  = desiredPresentTime;
505         res.actualPresentTime   = actualPresentTime;
506         res.earliestPresentTime = earliestPresentTime;
507         res.presentMargin               = presentMargin;
508         return res;
509 }
510
511 inline VkPresentTimeGOOGLE makePresentTimeGOOGLE (uint32_t presentID, uint64_t desiredPresentTime)
512 {
513         VkPresentTimeGOOGLE res;
514         res.presentID                   = presentID;
515         res.desiredPresentTime  = desiredPresentTime;
516         return res;
517 }
518
519 inline VkViewportWScalingNV makeViewportWScalingNV (float xcoeff, float ycoeff)
520 {
521         VkViewportWScalingNV res;
522         res.xcoeff      = xcoeff;
523         res.ycoeff      = ycoeff;
524         return res;
525 }
526
527 inline VkViewportSwizzleNV makeViewportSwizzleNV (VkViewportCoordinateSwizzleNV x, VkViewportCoordinateSwizzleNV y, VkViewportCoordinateSwizzleNV z, VkViewportCoordinateSwizzleNV w)
528 {
529         VkViewportSwizzleNV res;
530         res.x   = x;
531         res.y   = y;
532         res.z   = z;
533         res.w   = w;
534         return res;
535 }
536
537 inline VkInputAttachmentAspectReference makeInputAttachmentAspectReference (uint32_t subpass, uint32_t inputAttachmentIndex, VkImageAspectFlags aspectMask)
538 {
539         VkInputAttachmentAspectReference res;
540         res.subpass                                     = subpass;
541         res.inputAttachmentIndex        = inputAttachmentIndex;
542         res.aspectMask                          = aspectMask;
543         return res;
544 }
545
546 inline VkSampleLocationEXT makeSampleLocationEXT (float x, float y)
547 {
548         VkSampleLocationEXT res;
549         res.x   = x;
550         res.y   = y;
551         return res;
552 }
553
554 inline VkShaderResourceUsageAMD makeShaderResourceUsageAMD (uint32_t numUsedVgprs, uint32_t numUsedSgprs, uint32_t ldsSizePerLocalWorkGroup, size_t ldsUsageSizeInBytes, size_t scratchMemUsageInBytes)
555 {
556         VkShaderResourceUsageAMD res;
557         res.numUsedVgprs                                = numUsedVgprs;
558         res.numUsedSgprs                                = numUsedSgprs;
559         res.ldsSizePerLocalWorkGroup    = ldsSizePerLocalWorkGroup;
560         res.ldsUsageSizeInBytes                 = ldsUsageSizeInBytes;
561         res.scratchMemUsageInBytes              = scratchMemUsageInBytes;
562         return res;
563 }
564
565 inline VkVertexInputBindingDivisorDescriptionEXT makeVertexInputBindingDivisorDescriptionEXT (uint32_t binding, uint32_t divisor)
566 {
567         VkVertexInputBindingDivisorDescriptionEXT res;
568         res.binding     = binding;
569         res.divisor     = divisor;
570         return res;
571 }
572
573 inline VkShadingRatePaletteNV makeShadingRatePaletteNV (uint32_t shadingRatePaletteEntryCount, const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries)
574 {
575         VkShadingRatePaletteNV res;
576         res.shadingRatePaletteEntryCount        = shadingRatePaletteEntryCount;
577         res.pShadingRatePaletteEntries          = pShadingRatePaletteEntries;
578         return res;
579 }
580
581 inline VkCoarseSampleLocationNV makeCoarseSampleLocationNV (uint32_t pixelX, uint32_t pixelY, uint32_t sample)
582 {
583         VkCoarseSampleLocationNV res;
584         res.pixelX      = pixelX;
585         res.pixelY      = pixelY;
586         res.sample      = sample;
587         return res;
588 }
589
590 inline VkCoarseSampleOrderCustomNV makeCoarseSampleOrderCustomNV (VkShadingRatePaletteEntryNV shadingRate, uint32_t sampleCount, uint32_t sampleLocationCount, const VkCoarseSampleLocationNV* pSampleLocations)
591 {
592         VkCoarseSampleOrderCustomNV res;
593         res.shadingRate                 = shadingRate;
594         res.sampleCount                 = sampleCount;
595         res.sampleLocationCount = sampleLocationCount;
596         res.pSampleLocations    = pSampleLocations;
597         return res;
598 }
599
600 inline VkDrawMeshTasksIndirectCommandNV makeDrawMeshTasksIndirectCommandNV (uint32_t taskCount, uint32_t firstTask)
601 {
602         VkDrawMeshTasksIndirectCommandNV res;
603         res.taskCount   = taskCount;
604         res.firstTask   = firstTask;
605         return res;
606 }
607
608 inline VkDrawMeshTasksIndirectCommandEXT makeDrawMeshTasksIndirectCommandEXT (uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
609 {
610         VkDrawMeshTasksIndirectCommandEXT res;
611         res.groupCountX = groupCountX;
612         res.groupCountY = groupCountY;
613         res.groupCountZ = groupCountZ;
614         return res;
615 }
616
617 inline VkStridedDeviceAddressRegionKHR makeStridedDeviceAddressRegionKHR (VkDeviceAddress deviceAddress, VkDeviceSize stride, VkDeviceSize size)
618 {
619         VkStridedDeviceAddressRegionKHR res;
620         res.deviceAddress       = deviceAddress;
621         res.stride                      = stride;
622         res.size                        = size;
623         return res;
624 }
625
626 inline VkTraceRaysIndirectCommandKHR makeTraceRaysIndirectCommandKHR (uint32_t width, uint32_t height, uint32_t depth)
627 {
628         VkTraceRaysIndirectCommandKHR res;
629         res.width       = width;
630         res.height      = height;
631         res.depth       = depth;
632         return res;
633 }
634
635 inline 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)
636 {
637         VkTraceRaysIndirectCommand2KHR res;
638         res.raygenShaderRecordAddress                   = raygenShaderRecordAddress;
639         res.raygenShaderRecordSize                              = raygenShaderRecordSize;
640         res.missShaderBindingTableAddress               = missShaderBindingTableAddress;
641         res.missShaderBindingTableSize                  = missShaderBindingTableSize;
642         res.missShaderBindingTableStride                = missShaderBindingTableStride;
643         res.hitShaderBindingTableAddress                = hitShaderBindingTableAddress;
644         res.hitShaderBindingTableSize                   = hitShaderBindingTableSize;
645         res.hitShaderBindingTableStride                 = hitShaderBindingTableStride;
646         res.callableShaderBindingTableAddress   = callableShaderBindingTableAddress;
647         res.callableShaderBindingTableSize              = callableShaderBindingTableSize;
648         res.callableShaderBindingTableStride    = callableShaderBindingTableStride;
649         res.width                                                               = width;
650         res.height                                                              = height;
651         res.depth                                                               = depth;
652         return res;
653 }
654
655 inline VkDrmFormatModifierPropertiesEXT makeDrmFormatModifierPropertiesEXT (uint64_t drmFormatModifier, uint32_t drmFormatModifierPlaneCount, VkFormatFeatureFlags drmFormatModifierTilingFeatures)
656 {
657         VkDrmFormatModifierPropertiesEXT res;
658         res.drmFormatModifier                           = drmFormatModifier;
659         res.drmFormatModifierPlaneCount         = drmFormatModifierPlaneCount;
660         res.drmFormatModifierTilingFeatures     = drmFormatModifierTilingFeatures;
661         return res;
662 }
663
664 inline VkPipelineCreationFeedback makePipelineCreationFeedback (VkPipelineCreationFeedbackFlags flags, uint64_t duration)
665 {
666         VkPipelineCreationFeedback res;
667         res.flags               = flags;
668         res.duration    = duration;
669         return res;
670 }
671
672 inline VkAccelerationStructureBuildRangeInfoKHR makeAccelerationStructureBuildRangeInfoKHR (uint32_t primitiveCount, uint32_t primitiveOffset, uint32_t firstVertex, uint32_t transformOffset)
673 {
674         VkAccelerationStructureBuildRangeInfoKHR res;
675         res.primitiveCount      = primitiveCount;
676         res.primitiveOffset     = primitiveOffset;
677         res.firstVertex         = firstVertex;
678         res.transformOffset     = transformOffset;
679         return res;
680 }
681
682 inline VkAabbPositionsKHR makeAabbPositionsKHR (float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
683 {
684         VkAabbPositionsKHR res;
685         res.minX        = minX;
686         res.minY        = minY;
687         res.minZ        = minZ;
688         res.maxX        = maxX;
689         res.maxY        = maxY;
690         res.maxZ        = maxZ;
691         return res;
692 }
693
694 inline VkMutableDescriptorTypeListVALVE makeMutableDescriptorTypeListVALVE (uint32_t descriptorTypeCount, const VkDescriptorType* pDescriptorTypes)
695 {
696         VkMutableDescriptorTypeListVALVE res;
697         res.descriptorTypeCount = descriptorTypeCount;
698         res.pDescriptorTypes    = pDescriptorTypes;
699         return res;
700 }
701
702 inline VkVideoEncodeH264QpEXT makeVideoEncodeH264QpEXT (int32_t qpI, int32_t qpP, int32_t qpB)
703 {
704         VkVideoEncodeH264QpEXT res;
705         res.qpI = qpI;
706         res.qpP = qpP;
707         res.qpB = qpB;
708         return res;
709 }
710
711 inline VkVideoEncodeH264FrameSizeEXT makeVideoEncodeH264FrameSizeEXT (uint32_t frameISize, uint32_t framePSize, uint32_t frameBSize)
712 {
713         VkVideoEncodeH264FrameSizeEXT res;
714         res.frameISize  = frameISize;
715         res.framePSize  = framePSize;
716         res.frameBSize  = frameBSize;
717         return res;
718 }
719
720 inline VkVideoEncodeH265QpEXT makeVideoEncodeH265QpEXT (int32_t qpI, int32_t qpP, int32_t qpB)
721 {
722         VkVideoEncodeH265QpEXT res;
723         res.qpI = qpI;
724         res.qpP = qpP;
725         res.qpB = qpB;
726         return res;
727 }
728
729 inline VkVideoEncodeH265FrameSizeEXT makeVideoEncodeH265FrameSizeEXT (uint32_t frameISize, uint32_t framePSize, uint32_t frameBSize)
730 {
731         VkVideoEncodeH265FrameSizeEXT res;
732         res.frameISize  = frameISize;
733         res.framePSize  = framePSize;
734         res.frameBSize  = frameBSize;
735         return res;
736 }
737
738 inline 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)
739 {
740         VkSRTDataNV res;
741         res.sx  = sx;
742         res.a   = a;
743         res.b   = b;
744         res.pvx = pvx;
745         res.sy  = sy;
746         res.c   = c;
747         res.pvy = pvy;
748         res.sz  = sz;
749         res.pvz = pvz;
750         res.qx  = qx;
751         res.qy  = qy;
752         res.qz  = qz;
753         res.qw  = qw;
754         res.tx  = tx;
755         res.ty  = ty;
756         res.tz  = tz;
757         return res;
758 }
759
760 inline VkDrmFormatModifierProperties2EXT makeDrmFormatModifierProperties2EXT (uint64_t drmFormatModifier, uint32_t drmFormatModifierPlaneCount, VkFormatFeatureFlags2 drmFormatModifierTilingFeatures)
761 {
762         VkDrmFormatModifierProperties2EXT res;
763         res.drmFormatModifier                           = drmFormatModifier;
764         res.drmFormatModifierPlaneCount         = drmFormatModifierPlaneCount;
765         res.drmFormatModifierTilingFeatures     = drmFormatModifierTilingFeatures;
766         return res;
767 }
768
769 inline VkRenderPassCreationFeedbackInfoEXT makeRenderPassCreationFeedbackInfoEXT (uint32_t postMergeSubpassCount)
770 {
771         VkRenderPassCreationFeedbackInfoEXT res;
772         res.postMergeSubpassCount       = postMergeSubpassCount;
773         return res;
774 }
775
776 inline StdVideoDecodeH264Mvc makeStdVideoDecodeH264Mvc (uint32_t viewId0, uint32_t mvcElementCount, const StdVideoDecodeH264MvcElement* pMvcElements)
777 {
778         StdVideoDecodeH264Mvc res;
779         res.viewId0                     = viewId0;
780         res.mvcElementCount     = mvcElementCount;
781         res.pMvcElements        = pMvcElements;
782         return res;
783 }
784
785 inline 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)
786 {
787         StdVideoEncodeH264WeightTableFlags res;
788         res.luma_weight_l0_flag         = luma_weight_l0_flag;
789         res.chroma_weight_l0_flag       = chroma_weight_l0_flag;
790         res.luma_weight_l1_flag         = luma_weight_l1_flag;
791         res.chroma_weight_l1_flag       = chroma_weight_l1_flag;
792         return res;
793 }
794
795 inline StdVideoEncodeH264RefListModEntry makeStdVideoEncodeH264RefListModEntry (StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc, uint16_t abs_diff_pic_num_minus1, uint16_t long_term_pic_num)
796 {
797         StdVideoEncodeH264RefListModEntry res;
798         res.modification_of_pic_nums_idc        = modification_of_pic_nums_idc;
799         res.abs_diff_pic_num_minus1                     = abs_diff_pic_num_minus1;
800         res.long_term_pic_num                           = long_term_pic_num;
801         return res;
802 }
803
804 inline 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)
805 {
806         StdVideoEncodeH264RefPicMarkingEntry res;
807         res.operation                                           = operation;
808         res.difference_of_pic_nums_minus1       = difference_of_pic_nums_minus1;
809         res.long_term_pic_num                           = long_term_pic_num;
810         res.long_term_frame_idx                         = long_term_frame_idx;
811         res.max_long_term_frame_idx_plus1       = max_long_term_frame_idx_plus1;
812         return res;
813 }
814
815 inline 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)
816 {
817         StdVideoEncodeH265WeightTableFlags res;
818         res.luma_weight_l0_flag         = luma_weight_l0_flag;
819         res.chroma_weight_l0_flag       = chroma_weight_l0_flag;
820         res.luma_weight_l1_flag         = luma_weight_l1_flag;
821         res.chroma_weight_l1_flag       = chroma_weight_l1_flag;
822         return res;
823 }