vsg: include/vsg/vk/vulkan.h Source File

vsg 1.1.13 VulkanSceneGraph library

Loading...
Searching...
No Matches
vulkan.h
1#pragma once
2// clang-format off
3
4/* <editor-fold desc="Apache-2.0 License">
5
6** Copyright (c) 2015-2020 The Khronos Group Inc.
7**
8** SPDX-License-Identifier: Apache-2.0
9
10</editor-fold> */
11
12//
13// Include Vulkan headers that are available in the system.
14//
15#include <vulkan/vulkan.h>
16//
17// Then add definitions not provided by older headers below.
18//
19
20// Workaround for cppcheck
21#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
22 #if (VK_USE_64_BIT_PTR_DEFINES==1)
23 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
24 #else
25 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
26 #endif
27#endif
28
29
31//
32// Definitions not provided prior to 1.1.77
33//
34#if VK_HEADER_VERSION < 77
35# define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing"
36#endif
37
39//
40// Definitions not provided prior to 1.1.82
41//
42#if VK_HEADER_VERSION < 82
43# define VK_KHR_create_renderpass2 1
44# define VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION 1
45# define VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME "VK_KHR_create_renderpass2"
46
47 typedef struct VkAttachmentDescription2KHR
48{
49 VkStructureType sType;
50 const void* pNext;
51 VkAttachmentDescriptionFlags flags;
52 VkFormat format;
53 VkSampleCountFlagBits samples;
54 VkAttachmentLoadOp loadOp;
55 VkAttachmentStoreOp storeOp;
56 VkAttachmentLoadOp stencilLoadOp;
57 VkAttachmentStoreOp stencilStoreOp;
58 VkImageLayout initialLayout;
59 VkImageLayout finalLayout;
60} VkAttachmentDescription2KHR;
61
62 typedef struct VkAttachmentReference2KHR
63{
64 VkStructureType sType;
65 const void* pNext;
66 uint32_t attachment;
67 VkImageLayout layout;
68 VkImageAspectFlags aspectMask;
69} VkAttachmentReference2KHR;
70
71 typedef struct VkSubpassDescription2KHR
72{
73 VkStructureType sType;
74 const void* pNext;
75 VkSubpassDescriptionFlags flags;
76 VkPipelineBindPoint pipelineBindPoint;
77 uint32_t viewMask;
78 uint32_t inputAttachmentCount;
79 const VkAttachmentReference2KHR* pInputAttachments;
80 uint32_t colorAttachmentCount;
81 const VkAttachmentReference2KHR* pColorAttachments;
82 const VkAttachmentReference2KHR* pResolveAttachments;
83 const VkAttachmentReference2KHR* pDepthStencilAttachment;
84 uint32_t preserveAttachmentCount;
85 const uint32_t* pPreserveAttachments;
86} VkSubpassDescription2KHR;
87
88 typedef struct VkSubpassDependency2KHR
89{
90 VkStructureType sType;
91 const void* pNext;
92 uint32_t srcSubpass;
93 uint32_t dstSubpass;
94 VkPipelineStageFlags srcStageMask;
95 VkPipelineStageFlags dstStageMask;
96 VkAccessFlags srcAccessMask;
97 VkAccessFlags dstAccessMask;
98 VkDependencyFlags dependencyFlags;
99 int32_t viewOffset;
100} VkSubpassDependency2KHR;
101
102 typedef struct VkRenderPassCreateInfo2KHR
103{
104 VkStructureType sType;
105 const void* pNext;
106 VkRenderPassCreateFlags flags;
107 uint32_t attachmentCount;
108 const VkAttachmentDescription2KHR* pAttachments;
109 uint32_t subpassCount;
110 const VkSubpassDescription2KHR* pSubpasses;
111 uint32_t dependencyCount;
112 const VkSubpassDependency2KHR* pDependencies;
113 uint32_t correlatedViewMaskCount;
114 const uint32_t* pCorrelatedViewMasks;
115} VkRenderPassCreateInfo2KHR;
116
117#endif
118
120//
121// Definitions not provided prior to 1.3.215
122//
123
124#if VK_HEADER_VERSION < 215
125
126# define VK_KHR_fragment_shader_barycentric 1
127# define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1
128# define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_KHR_fragment_shader_barycentric"
129
130# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR VkStructureType(1000203000)
131# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_EXT VkStructureType(1000203000)
132
133 typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR
134{
135 VkStructureType sType;
136 void* pNext;
137 VkBool32 fragmentShaderBarycentric;
138} VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR;
139#endif
140
142//
143// Definitions not provided prior to 1.3.231
144//
145
146#if VK_HEADER_VERSION < 231
147
148# define VK_EXT_mesh_shader 1
149# define VK_EXT_MESH_SHADER_SPEC_VERSION 1
150# define VK_EXT_MESH_SHADER_EXTENSION_NAME "VK_EXT_mesh_shader"
151
152# define VK_SHADER_STAGE_TASK_BIT_EXT VkShaderStageFlagBits(0x00000040)
153# define VK_SHADER_STAGE_MESH_BIT_EXT VkShaderStageFlagBits(0x00000080)
154
155# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT VkStructureType(1000202000)
156# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT VkStructureType(1000202001)
157
158 typedef struct VkPhysicalDeviceMeshShaderFeaturesEXT {
159 VkStructureType sType;
160 void* pNext;
161 VkBool32 taskShader;
162 VkBool32 meshShader;
163 VkBool32 multiviewMeshShader;
164 VkBool32 primitiveFragmentShadingRateMeshShader;
165 VkBool32 meshShaderQueries;
166} VkPhysicalDeviceMeshShaderFeaturesEXT;
167
168 typedef struct VkPhysicalDeviceMeshShaderPropertiesEXT {
169 VkStructureType sType;
170 void* pNext;
171 uint32_t maxTaskWorkGroupTotalCount;
172 uint32_t maxTaskWorkGroupCount[3];
173 uint32_t maxTaskWorkGroupInvocations;
174 uint32_t maxTaskWorkGroupSize[3];
175 uint32_t maxTaskPayloadSize;
176 uint32_t maxTaskSharedMemorySize;
177 uint32_t maxTaskPayloadAndSharedMemorySize;
178 uint32_t maxMeshWorkGroupTotalCount;
179 uint32_t maxMeshWorkGroupCount[3];
180 uint32_t maxMeshWorkGroupInvocations;
181 uint32_t maxMeshWorkGroupSize[3];
182 uint32_t maxMeshSharedMemorySize;
183 uint32_t maxMeshPayloadAndSharedMemorySize;
184 uint32_t maxMeshOutputMemorySize;
185 uint32_t maxMeshPayloadAndOutputMemorySize;
186 uint32_t maxMeshOutputComponents;
187 uint32_t maxMeshOutputVertices;
188 uint32_t maxMeshOutputPrimitives;
189 uint32_t maxMeshOutputLayers;
190 uint32_t maxMeshMultiviewViewCount;
191 uint32_t meshOutputPerVertexGranularity;
192 uint32_t meshOutputPerPrimitiveGranularity;
193 uint32_t maxPreferredTaskWorkGroupInvocations;
194 uint32_t maxPreferredMeshWorkGroupInvocations;
195 VkBool32 prefersLocalInvocationVertexOutput;
196 VkBool32 prefersLocalInvocationPrimitiveOutput;
197 VkBool32 prefersCompactVertexOutput;
198 VkBool32 prefersCompactPrimitiveOutput;
199} VkPhysicalDeviceMeshShaderPropertiesEXT;
200
201 typedef struct VkDrawMeshTasksIndirectCommandEXT {
202 uint32_t groupCountX;
203 uint32_t groupCountY;
204 uint32_t groupCountZ;
205} VkDrawMeshTasksIndirectCommandEXT;
206
207typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksEXT)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
208typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectEXT)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
209typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectCountEXT)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
210#endif
211
213//
214// Definitions not provided prior to 1.1.97
215//
216#if VK_HEADER_VERSION < 97
217
218typedef uint64_t VkDeviceAddress;
219
220#endif
221
223//
224// Definitions not provided prior to 1.1.96
225//
226#if VK_HEADER_VERSION < 96
227
228typedef uint64_t VkDeviceAddress;
229# define VK_KHR_shader_float_controls 1
230# define VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION 1
231# define VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME "VK_KHR_shader_float_controls"
232 typedef struct VkPhysicalDeviceFloatControlsPropertiesKHR
233{
234 VkStructureType sType;
235 void* pNext;
236 VkBool32 separateDenormSettings;
237 VkBool32 separateRoundingModeSettings;
238 VkBool32 shaderSignedZeroInfNanPreserveFloat16;
239 VkBool32 shaderSignedZeroInfNanPreserveFloat32;
240 VkBool32 shaderSignedZeroInfNanPreserveFloat64;
241 VkBool32 shaderDenormPreserveFloat16;
242 VkBool32 shaderDenormPreserveFloat32;
243 VkBool32 shaderDenormPreserveFloat64;
244 VkBool32 shaderDenormFlushToZeroFloat16;
245 VkBool32 shaderDenormFlushToZeroFloat32;
246 VkBool32 shaderDenormFlushToZeroFloat64;
247 VkBool32 shaderRoundingModeRTEFloat16;
248 VkBool32 shaderRoundingModeRTEFloat32;
249 VkBool32 shaderRoundingModeRTEFloat64;
250 VkBool32 shaderRoundingModeRTZFloat16;
251 VkBool32 shaderRoundingModeRTZFloat32;
252 VkBool32 shaderRoundingModeRTZFloat64;
253} VkPhysicalDeviceFloatControlsPropertiesKHR;
254
255#endif
256
258//
259// Definitions not provided prior to 1.1.106
260//
261#if VK_HEADER_VERSION < 106
262
263# define VK_EXT_buffer_device_address 1
264# define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2
265# define VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_EXT_buffer_device_address"
266 typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT
267{
268 VkStructureType sType;
269 void* pNext;
270 VkBool32 bufferDeviceAddress;
271 VkBool32 bufferDeviceAddressCaptureReplay;
272 VkBool32 bufferDeviceAddressMultiDevice;
273} VkPhysicalDeviceBufferDeviceAddressFeaturesEXT;
274#endif
275
277//
278// Definitions not provided prior to 1.1.106
279//
280#if VK_HEADER_VERSION < 105
281
282#define VK_EXT_host_query_reset 1
283#define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1
284#define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset"
285 typedef struct VkPhysicalDeviceHostQueryResetFeaturesEXT {
286 VkStructureType sType;
287 void* pNext;
288 VkBool32 hostQueryReset;
289} VkPhysicalDeviceHostQueryResetFeaturesEXT;
290
291typedef void (VKAPI_PTR *PFN_vkResetQueryPoolEXT)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
292
293
294
295
296#endif
297
299//
300// Definitions not provided prior to 1.2.131
301//
302#if VK_HEADER_VERSION < 131
303
304# define VK_API_VERSION_1_2 VK_MAKE_VERSION(1, 2, 0)
305
306# define VK_KHR_depth_stencil_resolve 1
307# define VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION 1
308# define VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME "VK_KHR_depth_stencil_resolve"
309
310# define VK_KHR_buffer_device_address 1
311# define VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 1
312# define VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_KHR_buffer_device_address"
313
314# define VK_KHR_spirv_1_4 1
315# define VK_KHR_SPIRV_1_4_SPEC_VERSION 1
316# define VK_KHR_SPIRV_1_4_EXTENSION_NAME "VK_KHR_spirv_1_4"
317
318# define VK_ERROR_UNKNOWN VkResult(-13)
319
320# define VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT VkBufferUsageFlagBits(0x00020000)
321
322# define VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO VkStructureType(1000244001)
323# define VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2 VkStructureType(1000109000)
324# define VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 VkStructureType(1000109001)
325# define VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2 VkStructureType(1000109002)
326# define VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2 VkStructureType(1000109003)
327# define VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2 VkStructureType(1000109004)
328# define VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE VkStructureType(1000199001)
329# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES VkStructureType(1000199000)
330# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES VkStructureType(1000257000)
331
332# define VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT VkMemoryAllocateFlagBits(0x00000002)
333
334typedef enum VkResolveModeFlagBits
335{
336 VK_RESOLVE_MODE_NONE = 0,
337 VK_RESOLVE_MODE_SAMPLE_ZERO_BIT = 0x00000001,
338 VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002,
339 VK_RESOLVE_MODE_MIN_BIT = 0x00000004,
340 VK_RESOLVE_MODE_MAX_BIT = 0x00000008,
341 VK_RESOLVE_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
342} VkResolveModeFlagBits;
343typedef VkFlags VkResolveModeFlags;
344
345typedef enum VkDescriptorBindingFlagBits {
346 VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT = 0x00000001,
347 VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT = 0x00000002,
348 VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT = 0x00000004,
349 VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT = 0x00000008,
350 VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT,
351 VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT,
352 VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT,
353 VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT,
354 VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
355} VkDescriptorBindingFlagBits;
356typedef VkFlags VkDescriptorBindingFlags;
357
358 typedef struct VkAttachmentDescription2
359{
360 VkStructureType sType;
361 const void* pNext;
362 VkAttachmentDescriptionFlags flags;
363 VkFormat format;
364 VkSampleCountFlagBits samples;
365 VkAttachmentLoadOp loadOp;
366 VkAttachmentStoreOp storeOp;
367 VkAttachmentLoadOp stencilLoadOp;
368 VkAttachmentStoreOp stencilStoreOp;
369 VkImageLayout initialLayout;
370 VkImageLayout finalLayout;
371} VkAttachmentDescription2;
372
373 typedef struct VkAttachmentReference2
374{
375 VkStructureType sType;
376 const void* pNext;
377 uint32_t attachment;
378 VkImageLayout layout;
379 VkImageAspectFlags aspectMask;
380} VkAttachmentReference2;
381
382 typedef struct VkSubpassDescription2
383{
384 VkStructureType sType;
385 const void* pNext;
386 VkSubpassDescriptionFlags flags;
387 VkPipelineBindPoint pipelineBindPoint;
388 uint32_t viewMask;
389 uint32_t inputAttachmentCount;
390 const VkAttachmentReference2* pInputAttachments;
391 uint32_t colorAttachmentCount;
392 const VkAttachmentReference2* pColorAttachments;
393 const VkAttachmentReference2* pResolveAttachments;
394 const VkAttachmentReference2* pDepthStencilAttachment;
395 uint32_t preserveAttachmentCount;
396 const uint32_t* pPreserveAttachments;
397} VkSubpassDescription2;
398
399 typedef struct VkSubpassDependency2
400{
401 VkStructureType sType;
402 const void* pNext;
403 uint32_t srcSubpass;
404 uint32_t dstSubpass;
405 VkPipelineStageFlags srcStageMask;
406 VkPipelineStageFlags dstStageMask;
407 VkAccessFlags srcAccessMask;
408 VkAccessFlags dstAccessMask;
409 VkDependencyFlags dependencyFlags;
410 int32_t viewOffset;
411} VkSubpassDependency2;
412
413 typedef struct VkRenderPassCreateInfo2
414{
415 VkStructureType sType;
416 const void* pNext;
417 VkRenderPassCreateFlags flags;
418 uint32_t attachmentCount;
419 const VkAttachmentDescription2* pAttachments;
420 uint32_t subpassCount;
421 const VkSubpassDescription2* pSubpasses;
422 uint32_t dependencyCount;
423 const VkSubpassDependency2* pDependencies;
424 uint32_t correlatedViewMaskCount;
425 const uint32_t* pCorrelatedViewMasks;
426} VkRenderPassCreateInfo2;
427
428 typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfo {
429 VkStructureType sType;
430 const void* pNext;
431 uint32_t bindingCount;
432 const VkDescriptorBindingFlags* pBindingFlags;
433} VkDescriptorSetLayoutBindingFlagsCreateInfo;
434
435 typedef struct VkSubpassDescriptionDepthStencilResolve
436{
437 VkStructureType sType;
438 const void* pNext;
439 VkResolveModeFlagBits depthResolveMode;
440 VkResolveModeFlagBits stencilResolveMode;
441 const VkAttachmentReference2* pDepthStencilResolveAttachment;
442} VkSubpassDescriptionDepthStencilResolve;
443
444# if 1
445 typedef struct VkPhysicalDeviceDepthStencilResolveProperties
446{
447 VkStructureType sType;
448 void* pNext;
449 VkResolveModeFlags supportedDepthResolveModes;
450 VkResolveModeFlags supportedStencilResolveModes;
451 VkBool32 independentResolveNone;
452 VkBool32 independentResolve;
453} VkPhysicalDeviceDepthStencilResolveProperties;
454# endif
455
456 typedef struct VkBufferDeviceAddressInfo
457{
458 VkStructureType sType;
459 const void* pNext;
460 VkBuffer buffer;
461} VkBufferDeviceAddressInfo;
462
463#endif
464
466//
467// Definitions not provided prior to 1.2.135
468//
469#if VK_HEADER_VERSION < 135
470
471# define VK_SHADER_UNUSED_KHR (~0U)
472
473VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR)
474
475typedef VkFlags VkBuildAccelerationStructureFlagsKHR;
476typedef VkFlags VkGeometryFlagsKHR;
477
478typedef enum VkGeometryTypeKHR
479{ // 135
480 VK_GEOMETRY_TYPE_TRIANGLES_KHR = 0,
481 VK_GEOMETRY_TYPE_AABBS_KHR = 1,
482 VK_GEOMETRY_TYPE_INSTANCES_KHR = 2,
483} VkGeometryTypeKHR;
484
485 typedef struct VkWriteDescriptorSetAccelerationStructureKHR
486{ // 135
487 VkStructureType sType;
488 const void* pNext;
489 uint32_t accelerationStructureCount;
490 const VkAccelerationStructureKHR* pAccelerationStructures;
491} VkWriteDescriptorSetAccelerationStructureKHR;
492
493typedef enum VkGeometryFlagBitsKHR
494{
495 VK_GEOMETRY_OPAQUE_BIT_KHR = 0x00000001,
496 VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 0x00000002,
497 VK_GEOMETRY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
498} VkGeometryFlagBitsKHR;
499
500typedef enum VkGeometryInstanceFlagBitsKHR
501{
502 VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001,
503 VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = 0x00000002,
504 VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004,
505 VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008,
506 VK_GEOMETRY_INSTANCE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
507} VkGeometryInstanceFlagBitsKHR;
508
509typedef enum VkBuildAccelerationStructureFlagBitsKHR
510{
511 VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001,
512 VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002,
513 VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004,
514 VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008,
515 VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010,
516 VK_BUILD_ACCELERATION_STRUCTURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
517} VkBuildAccelerationStructureFlagBitsKHR;
518
519typedef enum VkAccelerationStructureTypeKHR
520{
521 VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0,
522 VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1,
523 VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2,
524 VK_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
525} VkAccelerationStructureTypeKHR;
526
527typedef enum VkRayTracingShaderGroupTypeKHR
528{
529 VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0,
530 VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1,
531 VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2,
532 VK_RAY_TRACING_SHADER_GROUP_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
533} VkRayTracingShaderGroupTypeKHR;
534
535#define VK_KHR_shader_non_semantic_info 1
536#define VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION 1
537#define VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME "VK_KHR_shader_non_semantic_info"
538
539#endif
540
542//
543// Definitions not provided prior to 1.2.162
544//
545#if VK_HEADER_VERSION < 162
546
547# define VK_KHR_ray_tracing_pipeline 1
548# define VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION 1
549# define VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME "VK_KHR_ray_tracing_pipeline"
550
551# define VK_KHR_acceleration_structure 1
552# define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 11
553# define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure"
554# define VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME "VK_KHR_deferred_host_operations"
555
556typedef VkFlags VkAccelerationStructureCreateFlagsKHR;
557
558# define VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR VkDescriptorType(1000150000)
559# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR VkStructureType(1000347001)
560# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR VkStructureType(1000150004)
561# define VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR VkStructureType(1000150007)
562# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR VkStructureType(1000150006)
563# define VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR VkStructureType(1000150015)
564# define VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR VkStructureType(1000150016)
565# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR VkStructureType(1000150002)
566# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR VkStructureType(1000150020)
567# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR VkStructureType(1000150000)
568# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR VkStructureType(1000150017)
569# define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR VkStructureType(1000150005)
570# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR VkStructureType(1000150013)
571# define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR VkStructureType(1000347000)
572
573# define VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO VkStructureType(1000161000)
574
575# define VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR VkBufferUsageFlagBits(0x00100000)
576# define VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR VkBufferUsageFlagBits(0x00000400)
577# define VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR VkBufferUsageFlagBits(0x00080000)
578
579# define VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR VkPipelineBindPoint(1000165000)
580# define VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR VkPipelineStageFlagBits(0x02000000)
581
582# define VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR VkAccessFlagBits(0x00200000)
583# define VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR VkAccessFlagBits(0x00400000)
584
585# define VK_SHADER_STAGE_RAYGEN_BIT_KHR VkShaderStageFlagBits(0x00000100)
586# define VK_SHADER_STAGE_ANY_HIT_BIT_KHR VkShaderStageFlagBits(0x00000200)
587# define VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR VkShaderStageFlagBits(0x00000400)
588# define VK_SHADER_STAGE_MISS_BIT_KHR VkShaderStageFlagBits(0x00000800)
589# define VK_SHADER_STAGE_INTERSECTION_BIT_KHR VkShaderStageFlagBits(0x00001000)
590# define VK_SHADER_STAGE_CALLABLE_BIT_KHR VkShaderStageFlagBits(0x00002000)
591
592VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR)
593
594typedef enum VkBuildAccelerationStructureModeKHR
595{
596 VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0,
597 VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1,
598 VK_BUILD_ACCELERATION_STRUCTURE_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
599} VkBuildAccelerationStructureModeKHR;
600
601typedef enum VkAccelerationStructureBuildTypeKHR
602{
603 VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0,
604 VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1,
605 VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2,
606 VK_ACCELERATION_STRUCTURE_BUILD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
607} VkAccelerationStructureBuildTypeKHR;
608
609 typedef struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR
610{
611 VkStructureType sType;
612 void* pNext;
613 VkBool32 rayTracingPipeline;
614 VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay;
615 VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed;
616 VkBool32 rayTracingPipelineTraceRaysIndirect;
617 VkBool32 rayTraversalPrimitiveCulling;
618} VkPhysicalDeviceRayTracingPipelineFeaturesKHR;
619
620 typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR
621{
622 VkStructureType sType;
623 void* pNext;
624 VkBool32 accelerationStructure;
625 VkBool32 accelerationStructureCaptureReplay;
626 VkBool32 accelerationStructureIndirectBuild;
627 VkBool32 accelerationStructureHostCommands;
628 VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind;
629} VkPhysicalDeviceAccelerationStructureFeaturesKHR;
630
631 typedef struct VkPhysicalDeviceRayTracingPipelinePropertiesKHR
632{
633 VkStructureType sType;
634 void* pNext;
635 uint32_t shaderGroupHandleSize;
636 uint32_t maxRayRecursionDepth;
637 uint32_t maxShaderGroupStride;
638 uint32_t shaderGroupBaseAlignment;
639 uint32_t shaderGroupHandleCaptureReplaySize;
640 uint32_t maxRayDispatchInvocationCount;
641 uint32_t shaderGroupHandleAlignment;
642 uint32_t maxRayHitAttributeSize;
643} VkPhysicalDeviceRayTracingPipelinePropertiesKHR;
644
645 typedef union VkDeviceOrHostAddressKHR
646{
647 VkDeviceAddress deviceAddress;
648 void* hostAddress;
649} VkDeviceOrHostAddressKHR;
650
651 typedef union VkDeviceOrHostAddressConstKHR
652{
653 VkDeviceAddress deviceAddress;
654 const void* hostAddress;
655} VkDeviceOrHostAddressConstKHR;
656
657 typedef struct VkAccelerationStructureBuildRangeInfoKHR
658{
659 uint32_t primitiveCount;
660 uint32_t primitiveOffset;
661 uint32_t firstVertex;
662 uint32_t transformOffset;
663} VkAccelerationStructureBuildRangeInfoKHR;
664
665 typedef struct VkAccelerationStructureGeometryTrianglesDataKHR
666{
667 VkStructureType sType;
668 const void* pNext;
669 VkFormat vertexFormat;
670 VkDeviceOrHostAddressConstKHR vertexData;
671 VkDeviceSize vertexStride;
672 uint32_t maxVertex;
673 VkIndexType indexType;
674 VkDeviceOrHostAddressConstKHR indexData;
675 VkDeviceOrHostAddressConstKHR transformData;
676} VkAccelerationStructureGeometryTrianglesDataKHR;
677
678 typedef struct VkAccelerationStructureGeometryAabbsDataKHR
679{
680 VkStructureType sType;
681 const void* pNext;
682 VkDeviceOrHostAddressConstKHR data;
683 VkDeviceSize stride;
684} VkAccelerationStructureGeometryAabbsDataKHR;
685
686 typedef struct VkAccelerationStructureGeometryInstancesDataKHR
687{
688 VkStructureType sType;
689 const void* pNext;
690 VkBool32 arrayOfPointers;
691 VkDeviceOrHostAddressConstKHR data;
692} VkAccelerationStructureGeometryInstancesDataKHR;
693
694 typedef union VkAccelerationStructureGeometryDataKHR
695{
696 VkAccelerationStructureGeometryTrianglesDataKHR triangles;
697 VkAccelerationStructureGeometryAabbsDataKHR aabbs;
698 VkAccelerationStructureGeometryInstancesDataKHR instances;
699} VkAccelerationStructureGeometryDataKHR;
700
701 typedef struct VkAccelerationStructureGeometryKHR
702{
703 VkStructureType sType;
704 const void* pNext;
705 VkGeometryTypeKHR geometryType;
706 VkAccelerationStructureGeometryDataKHR geometry;
707 VkGeometryFlagsKHR flags;
708} VkAccelerationStructureGeometryKHR;
709
710 typedef struct VkAccelerationStructureCreateInfoKHR
711{
712 VkStructureType sType;
713 const void* pNext;
714 VkAccelerationStructureCreateFlagsKHR createFlags;
715 VkBuffer buffer;
716 VkDeviceSize offset;
717 VkDeviceSize size;
718 VkAccelerationStructureTypeKHR type;
719 VkDeviceAddress deviceAddress;
720} VkAccelerationStructureCreateInfoKHR;
721
722 typedef struct VkAccelerationStructureBuildGeometryInfoKHR
723{
724 VkStructureType sType;
725 const void* pNext;
726 VkAccelerationStructureTypeKHR type;
727 VkBuildAccelerationStructureFlagsKHR flags;
728 VkBuildAccelerationStructureModeKHR mode;
729 VkAccelerationStructureKHR srcAccelerationStructure;
730 VkAccelerationStructureKHR dstAccelerationStructure;
731 uint32_t geometryCount;
732 const VkAccelerationStructureGeometryKHR* pGeometries;
733 const VkAccelerationStructureGeometryKHR* const* ppGeometries;
734 VkDeviceOrHostAddressKHR scratchData;
735} VkAccelerationStructureBuildGeometryInfoKHR;
736
737 typedef struct VkStridedDeviceAddressRegionKHR
738{
739 VkDeviceAddress deviceAddress;
740 VkDeviceSize stride;
741 VkDeviceSize size;
742} VkStridedDeviceAddressRegionKHR;
743
744 typedef struct VkPipelineLibraryCreateInfoKHR
745{
746 VkStructureType sType;
747 const void* pNext;
748 uint32_t libraryCount;
749 const VkPipeline* pLibraries;
750} VkPipelineLibraryCreateInfoKHR;
751
752 typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR
753{
754 VkStructureType sType;
755 const void* pNext;
756 uint32_t maxPipelineRayPayloadSize;
757 uint32_t maxPipelineRayHitAttributeSize;
758} VkRayTracingPipelineInterfaceCreateInfoKHR;
759
760 typedef struct VkAccelerationStructureDeviceAddressInfoKHR
761{
762 VkStructureType sType;
763 const void* pNext;
764 VkAccelerationStructureKHR accelerationStructure;
765} VkAccelerationStructureDeviceAddressInfoKHR;
766
767 typedef struct VkAccelerationStructureBuildSizesInfoKHR
768{
769 VkStructureType sType;
770 const void* pNext;
771 VkDeviceSize accelerationStructureSize;
772 VkDeviceSize updateScratchSize;
773 VkDeviceSize buildScratchSize;
774} VkAccelerationStructureBuildSizesInfoKHR;
775
776 typedef struct VkRayTracingShaderGroupCreateInfoKHR
777{
778 VkStructureType sType;
779 const void* pNext;
780 VkRayTracingShaderGroupTypeKHR type;
781 uint32_t generalShader;
782 uint32_t closestHitShader;
783 uint32_t anyHitShader;
784 uint32_t intersectionShader;
785 const void* pShaderGroupCaptureReplayHandle;
786} VkRayTracingShaderGroupCreateInfoKHR;
787
788 typedef struct VkRayTracingPipelineCreateInfoKHR
789{
790 VkStructureType sType;
791 const void* pNext;
792 VkPipelineCreateFlags flags;
793 uint32_t stageCount;
794 const VkPipelineShaderStageCreateInfo* pStages;
795 uint32_t groupCount;
796 const VkRayTracingShaderGroupCreateInfoKHR* pGroups;
797 uint32_t maxPipelineRayRecursionDepth;
798 const VkPipelineLibraryCreateInfoKHR* pLibraryInfo;
799 const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface;
800 const VkPipelineDynamicStateCreateInfo* pDynamicState;
801 VkPipelineLayout layout;
802 VkPipeline basePipelineHandle;
803 int32_t basePipelineIndex;
804} VkRayTracingPipelineCreateInfoKHR;
805
806typedef VkResult(VKAPI_PTR* PFN_vkCreateAccelerationStructureKHR)(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure);
807typedef void(VKAPI_PTR* PFN_vkDestroyAccelerationStructureKHR)(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator);
808
809typedef void(VKAPI_PTR* PFN_vkCmdBuildAccelerationStructuresKHR)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos);
810
811typedef VkDeviceAddress(VKAPI_PTR* PFN_vkGetAccelerationStructureDeviceAddressKHR)(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
812
813typedef void(VKAPI_PTR* PFN_vkGetAccelerationStructureBuildSizesKHR)(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo);
814
815typedef VkResult(VKAPI_PTR* PFN_vkCreateRayTracingPipelinesKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
816
817typedef VkResult(VKAPI_PTR* PFN_vkGetRayTracingShaderGroupHandlesKHR)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);
818
819typedef void(VKAPI_PTR* PFN_vkCmdTraceRaysKHR)(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth);
820
821#endif
822
823//
824// Provide *_Compatibility function definitions to workaround different function definitions across different vulkan_core.h versions.
825//
826typedef VkResult(VKAPI_PTR* PFN_vkCreateRenderPass2KHR_Compatibility)(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
827typedef VkDeviceAddress(VKAPI_PTR* PFN_vkGetBufferDeviceAddressKHR_Compatibility)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo);
828
829//
830// Definitions not provided prior to 1.3.211
831//
832#if VK_HEADER_VERSION < 204
833#define VK_API_VERSION_1_3 VK_MAKE_VERSION(1, 3, 0)
834#endif
835
836#if VK_HEADER_VERSION < 211
837typedef enum VkInstanceCreateFlagBits {
838 VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR = 0x00000001,
839 VK_INSTANCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
840} VkInstanceCreateFlagBits;
841typedef VkFlags VkInstanceCreateFlags;
842
843#define VK_KHR_portability_enumeration 1
844#define VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION 1
845#define VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME "VK_KHR_portability_enumeration"
846#endif
847
848//
849// Provide VK_KHR_portability_subset from vulkan_beta.h
850//
851#ifndef VK_KHR_portability_subset
852#define VK_KHR_portability_subset 1
853#define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1
854#define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
855 typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR {
856 VkStructureType sType;
857 void* pNext;
858 VkBool32 constantAlphaColorBlendFactors;
859 VkBool32 events;
860 VkBool32 imageViewFormatReinterpretation;
861 VkBool32 imageViewFormatSwizzle;
862 VkBool32 imageView2DOn3DImage;
863 VkBool32 multisampleArrayImage;
864 VkBool32 mutableComparisonSamplers;
865 VkBool32 pointPolygons;
866 VkBool32 samplerMipLodBias;
867 VkBool32 separateStencilMaskRef;
868 VkBool32 shaderSampleRateInterpolationFunctions;
869 VkBool32 tessellationIsolines;
870 VkBool32 tessellationPointMode;
871 VkBool32 triangleFans;
872 VkBool32 vertexAttributeAccessBeyondStride;
873} VkPhysicalDevicePortabilitySubsetFeaturesKHR;
874
875 typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
876 VkStructureType sType;
877 void* pNext;
878 uint32_t minVertexInputBindingStrideAlignment;
879} VkPhysicalDevicePortabilitySubsetPropertiesKHR;
880#endif
881
882#ifndef VK_EXT_debug_utils
883#define VK_EXT_debug_utils 1
884VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT)
885#define VK_EXT_DEBUG_UTILS_SPEC_VERSION 2
886#define VK_EXT_DEBUG_UTILS_EXTENSION_NAME "VK_EXT_debug_utils"
887typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT;
888
889typedef enum VkDebugUtilsMessageSeverityFlagBitsEXT {
890 VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001,
891 VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010,
892 VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100,
893 VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000,
894 VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
895} VkDebugUtilsMessageSeverityFlagBitsEXT;
896
897typedef enum VkDebugUtilsMessageTypeFlagBitsEXT {
898 VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001,
899 VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002,
900 VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004,
901 VK_DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 0x00000008,
902 VK_DEBUG_UTILS_MESSAGE_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
903} VkDebugUtilsMessageTypeFlagBitsEXT;
904typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT;
905typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT;
906typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT;
907 typedef struct VkDebugUtilsLabelEXT {
908 VkStructureType sType;
909 const void* pNext;
910 const char* pLabelName;
911 float color[4];
912} VkDebugUtilsLabelEXT;
913
914 typedef struct VkDebugUtilsObjectNameInfoEXT {
915 VkStructureType sType;
916 const void* pNext;
917 VkObjectType objectType;
918 uint64_t objectHandle;
919 const char* pObjectName;
920} VkDebugUtilsObjectNameInfoEXT;
921
922 typedef struct VkDebugUtilsMessengerCallbackDataEXT {
923 VkStructureType sType;
924 const void* pNext;
925 VkDebugUtilsMessengerCallbackDataFlagsEXT flags;
926 const char* pMessageIdName;
927 int32_t messageIdNumber;
928 const char* pMessage;
929 uint32_t queueLabelCount;
930 const VkDebugUtilsLabelEXT* pQueueLabels;
931 uint32_t cmdBufLabelCount;
932 const VkDebugUtilsLabelEXT* pCmdBufLabels;
933 uint32_t objectCount;
934 const VkDebugUtilsObjectNameInfoEXT* pObjects;
935} VkDebugUtilsMessengerCallbackDataEXT;
936
937typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)(
938 VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
939 VkDebugUtilsMessageTypeFlagsEXT messageTypes,
940 const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData,
941 void* pUserData);
942
943 typedef struct VkDebugUtilsMessengerCreateInfoEXT {
944 VkStructureType sType;
945 const void* pNext;
946 VkDebugUtilsMessengerCreateFlagsEXT flags;
947 VkDebugUtilsMessageSeverityFlagsEXT messageSeverity;
948 VkDebugUtilsMessageTypeFlagsEXT messageType;
949 PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback;
950 void* pUserData;
951} VkDebugUtilsMessengerCreateInfoEXT;
952
953 typedef struct VkDebugUtilsObjectTagInfoEXT {
954 VkStructureType sType;
955 const void* pNext;
956 VkObjectType objectType;
957 uint64_t objectHandle;
958 uint64_t tagName;
959 size_t tagSize;
960 const void* pTag;
961} VkDebugUtilsObjectTagInfoEXT;
962#endif
963
965//
966// Definitions not provided prior to 1.1.117
967//
968#if VK_HEADER_VERSION < 117
969
970#define VK_EXT_line_rasterization 1
971#define VK_EXT_LINE_RASTERIZATION_SPEC_VERSION 1
972#define VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME "VK_EXT_line_rasterization"
973
974#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT VkStructureType(1000259000)
975#define VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT VkStructureType(1000259001)
976
977typedef enum VkLineRasterizationModeEXT {
978 VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0,
979 VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1,
980 VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2,
981 VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3,
982 VK_LINE_RASTERIZATION_MODE_BEGIN_RANGE_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT,
983 VK_LINE_RASTERIZATION_MODE_END_RANGE_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT,
984 VK_LINE_RASTERIZATION_MODE_RANGE_SIZE_EXT = (VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT - VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT + 1),
985 VK_LINE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
986} VkLineRasterizationModeEXT;
987 typedef struct VkPhysicalDeviceLineRasterizationFeaturesEXT {
988 VkStructureType sType;
989 void* pNext;
990 VkBool32 rectangularLines;
991 VkBool32 bresenhamLines;
992 VkBool32 smoothLines;
993 VkBool32 stippledRectangularLines;
994 VkBool32 stippledBresenhamLines;
995 VkBool32 stippledSmoothLines;
996} VkPhysicalDeviceLineRasterizationFeaturesEXT;
997
998 typedef struct VkPhysicalDeviceLineRasterizationPropertiesEXT {
999 VkStructureType sType;
1000 void* pNext;
1001 uint32_t lineSubPixelPrecisionBits;
1002} VkPhysicalDeviceLineRasterizationPropertiesEXT;
1003
1004 typedef struct VkPipelineRasterizationLineStateCreateInfoEXT {
1005 VkStructureType sType;
1006 const void* pNext;
1007 VkLineRasterizationModeEXT lineRasterizationMode;
1008 VkBool32 stippledLineEnable;
1009 uint32_t lineStippleFactor;
1010 uint16_t lineStipplePattern;
1011} VkPipelineRasterizationLineStateCreateInfoEXT;
1012
1013typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEXT)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern);
1014
1015#ifndef VK_NO_PROTOTYPES
1016VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEXT(
1017 VkCommandBuffer commandBuffer,
1018 uint32_t lineStippleFactor,
1019 uint16_t lineStipplePattern);
1020#endif
1021
1022
1023#endif
1024
1026//
1027// Definitions not provided prior to 1.1.92
1028//
1029#if VK_HEADER_VERSION < 92
1030
1031#define VK_EXT_calibrated_timestamps 1
1032#define VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1
1033#define VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_EXT_calibrated_timestamps"
1034
1035#define VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT VkStructureType(1000184000)
1036
1037typedef enum VkTimeDomainEXT {
1038 VK_TIME_DOMAIN_DEVICE_EXT = 0,
1039 VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1,
1040 VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2,
1041 VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3,
1042 VK_TIME_DOMAIN_BEGIN_RANGE_EXT = VK_TIME_DOMAIN_DEVICE_EXT,
1043 VK_TIME_DOMAIN_END_RANGE_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT,
1044 VK_TIME_DOMAIN_RANGE_SIZE_EXT = (VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT - VK_TIME_DOMAIN_DEVICE_EXT + 1),
1045 VK_TIME_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF
1046} VkTimeDomainEXT;
1047
1048 typedef struct VkCalibratedTimestampInfoEXT {
1049 VkStructureType sType;
1050 const void* pNext;
1051 VkTimeDomainEXT timeDomain;
1052} VkCalibratedTimestampInfoEXT;
1053
1054
1055typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainEXT* pTimeDomains);
1056typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation);
1057
1058#ifndef VK_NO_PROTOTYPES
1059VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
1060 VkPhysicalDevice physicalDevice,
1061 uint32_t* pTimeDomainCount,
1062 VkTimeDomainEXT* pTimeDomains);
1063
1064VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT(
1065 VkDevice device,
1066 uint32_t timestampCount,
1067 const VkCalibratedTimestampInfoEXT* pTimestampInfos,
1068 uint64_t* pTimestamps,
1069 uint64_t* pMaxDeviation);
1070#endif
1071
1072#endif
1073
1074
1075#if VK_HEADER_VERSION < 148
1076
1077// VK_EXT_extended_dynamic_state is a preprocessor guard. Do not pass it to API calls.
1078#define VK_EXT_extended_dynamic_state 1
1079#define VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION 1
1080#define VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_extended_dynamic_state"
1081 typedef struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT {
1082 VkStructureType sType;
1083 void* pNext;
1084 VkBool32 extendedDynamicState;
1085} VkPhysicalDeviceExtendedDynamicStateFeaturesEXT;
1086
1087typedef void (VKAPI_PTR *PFN_vkCmdSetCullModeEXT)(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode);
1088typedef void (VKAPI_PTR *PFN_vkCmdSetFrontFaceEXT)(VkCommandBuffer commandBuffer, VkFrontFace frontFace);
1089typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveTopologyEXT)(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology);
1090typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWithCountEXT)(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports);
1091typedef void (VKAPI_PTR *PFN_vkCmdSetScissorWithCountEXT)(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
1092typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers2EXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides);
1093typedef void (VKAPI_PTR *PFN_vkCmdSetDepthTestEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable);
1094typedef void (VKAPI_PTR *PFN_vkCmdSetDepthWriteEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable);
1095typedef void (VKAPI_PTR *PFN_vkCmdSetDepthCompareOpEXT)(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp);
1096typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBoundsTestEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable);
1097typedef void (VKAPI_PTR *PFN_vkCmdSetStencilTestEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable);
1098typedef void (VKAPI_PTR *PFN_vkCmdSetStencilOpEXT)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp);
1099
1100#ifndef VK_NO_PROTOTYPES
1101VKAPI_ATTR void VKAPI_CALL vkCmdSetCullModeEXT(
1102 VkCommandBuffer commandBuffer,
1103 VkCullModeFlags cullMode);
1104
1105VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFaceEXT(
1106 VkCommandBuffer commandBuffer,
1107 VkFrontFace frontFace);
1108
1109VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopologyEXT(
1110 VkCommandBuffer commandBuffer,
1111 VkPrimitiveTopology primitiveTopology);
1112
1113VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCountEXT(
1114 VkCommandBuffer commandBuffer,
1115 uint32_t viewportCount,
1116 const VkViewport* pViewports);
1117
1118VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCountEXT(
1119 VkCommandBuffer commandBuffer,
1120 uint32_t scissorCount,
1121 const VkRect2D* pScissors);
1122
1123VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2EXT(
1124 VkCommandBuffer commandBuffer,
1125 uint32_t firstBinding,
1126 uint32_t bindingCount,
1127 const VkBuffer* pBuffers,
1128 const VkDeviceSize* pOffsets,
1129 const VkDeviceSize* pSizes,
1130 const VkDeviceSize* pStrides);
1131
1132VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnableEXT(
1133 VkCommandBuffer commandBuffer,
1134 VkBool32 depthTestEnable);
1135
1136VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnableEXT(
1137 VkCommandBuffer commandBuffer,
1138 VkBool32 depthWriteEnable);
1139
1140VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOpEXT(
1141 VkCommandBuffer commandBuffer,
1142 VkCompareOp depthCompareOp);
1143
1144VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnableEXT(
1145 VkCommandBuffer commandBuffer,
1146 VkBool32 depthBoundsTestEnable);
1147
1148VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnableEXT(
1149 VkCommandBuffer commandBuffer,
1150 VkBool32 stencilTestEnable);
1151
1152VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOpEXT(
1153 VkCommandBuffer commandBuffer,
1154 VkStencilFaceFlags faceMask,
1155 VkStencilOp failOp,
1156 VkStencilOp passOp,
1157 VkStencilOp depthFailOp,
1158 VkCompareOp compareOp);
1159#endif
1160
1161#endif
VkAccelerationStructureBuildGeometryInfoKHR
Definition vulkan.h:723
VkAccelerationStructureBuildRangeInfoKHR
Definition vulkan.h:658
VkAccelerationStructureBuildSizesInfoKHR
Definition vulkan.h:768
VkAccelerationStructureCreateInfoKHR
Definition vulkan.h:711
VkAccelerationStructureDeviceAddressInfoKHR
Definition vulkan.h:761
VkAccelerationStructureGeometryAabbsDataKHR
Definition vulkan.h:679
VkAccelerationStructureGeometryInstancesDataKHR
Definition vulkan.h:687
VkAccelerationStructureGeometryKHR
Definition vulkan.h:702
VkAccelerationStructureGeometryTrianglesDataKHR
Definition vulkan.h:666
VkAttachmentDescription2
Definition vulkan.h:359
VkAttachmentDescription2KHR
Definition vulkan.h:48
VkAttachmentReference2
Definition vulkan.h:374
VkAttachmentReference2KHR
Definition vulkan.h:63
VkBufferDeviceAddressInfo
Definition vulkan.h:457
VkCalibratedTimestampInfoEXT
Definition vulkan.h:1048
VkDebugUtilsLabelEXT
Definition vulkan.h:907
VkDebugUtilsMessengerCallbackDataEXT
Definition vulkan.h:922
VkDebugUtilsMessengerCreateInfoEXT
Definition vulkan.h:943
VkDebugUtilsObjectNameInfoEXT
Definition vulkan.h:914
VkDebugUtilsObjectTagInfoEXT
Definition vulkan.h:953
VkDescriptorSetLayoutBindingFlagsCreateInfo
Definition vulkan.h:428
VkDrawMeshTasksIndirectCommandEXT
Definition vulkan.h:201
VkPhysicalDeviceAccelerationStructureFeaturesKHR
Definition vulkan.h:621
VkPhysicalDeviceBufferDeviceAddressFeaturesEXT
Definition vulkan.h:267
VkPhysicalDeviceDepthStencilResolveProperties
Definition vulkan.h:446
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT
Definition vulkan.h:1081
VkPhysicalDeviceFloatControlsPropertiesKHR
Definition vulkan.h:233
VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR
Definition vulkan.h:134
VkPhysicalDeviceHostQueryResetFeaturesEXT
Definition vulkan.h:285
VkPhysicalDeviceLineRasterizationFeaturesEXT
Definition vulkan.h:987
VkPhysicalDeviceLineRasterizationPropertiesEXT
Definition vulkan.h:998
VkPhysicalDeviceMeshShaderFeaturesEXT
Definition vulkan.h:158
VkPhysicalDeviceMeshShaderPropertiesEXT
Definition vulkan.h:168
VkPhysicalDevicePortabilitySubsetFeaturesKHR
Definition vulkan.h:855
VkPhysicalDevicePortabilitySubsetPropertiesKHR
Definition vulkan.h:875
VkPhysicalDeviceRayTracingPipelineFeaturesKHR
Definition vulkan.h:610
VkPhysicalDeviceRayTracingPipelinePropertiesKHR
Definition vulkan.h:632
VkPipelineLibraryCreateInfoKHR
Definition vulkan.h:745
VkPipelineRasterizationLineStateCreateInfoEXT
Definition vulkan.h:1004
VkRayTracingPipelineCreateInfoKHR
Definition vulkan.h:789
VkRayTracingPipelineInterfaceCreateInfoKHR
Definition vulkan.h:753
VkRayTracingShaderGroupCreateInfoKHR
Definition vulkan.h:777
VkRenderPassCreateInfo2
Definition vulkan.h:414
VkRenderPassCreateInfo2KHR
Definition vulkan.h:103
VkStridedDeviceAddressRegionKHR
Definition vulkan.h:738
VkSubpassDependency2
Definition vulkan.h:400
VkSubpassDependency2KHR
Definition vulkan.h:89
VkSubpassDescription2
Definition vulkan.h:383
VkSubpassDescription2KHR
Definition vulkan.h:72
VkSubpassDescriptionDepthStencilResolve
Definition vulkan.h:436
VkWriteDescriptorSetAccelerationStructureKHR
Definition vulkan.h:486
VkAccelerationStructureGeometryDataKHR
Definition vulkan.h:695
VkDeviceOrHostAddressConstKHR
Definition vulkan.h:652
VkDeviceOrHostAddressKHR
Definition vulkan.h:646