vsg  1.1.0
VulkanSceneGraph library
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 
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;
61 
63 {
64  VkStructureType sType;
65  const void* pNext;
66  uint32_t attachment;
67  VkImageLayout layout;
68  VkImageAspectFlags aspectMask;
70 
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;
87 
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;
101 
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;
116 
117 #endif
118 
120 //
121 // Definitions not provided prior to 1.1.216
122 //
123 
124 #if VK_HEADER_VERSION < 216
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 
134 {
135  VkStructureType sType;
136  void* pNext;
137  VkBool32 fragmentShaderBarycentric;
139 #endif
140 
142 //
143 // Definitions not provided prior to 1.1.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 
159  VkStructureType sType;
160  void* pNext;
161  VkBool32 taskShader;
162  VkBool32 meshShader;
163  VkBool32 multiviewMeshShader;
164  VkBool32 primitiveFragmentShadingRateMeshShader;
165  VkBool32 meshShaderQueries;
167 
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;
200 
202  uint32_t groupCountX;
203  uint32_t groupCountY;
204  uint32_t groupCountZ;
206 
207 typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksEXT)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
208 typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectEXT)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
209 typedef 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 
218 typedef uint64_t VkDeviceAddress;
219 
220 # define VK_KHR_shader_float_controls 1
221 # define VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION 1
222 # define VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME "VK_KHR_shader_float_controls"
224 {
225  VkStructureType sType;
226  void* pNext;
227  VkBool32 separateDenormSettings;
228  VkBool32 separateRoundingModeSettings;
229  VkBool32 shaderSignedZeroInfNanPreserveFloat16;
230  VkBool32 shaderSignedZeroInfNanPreserveFloat32;
231  VkBool32 shaderSignedZeroInfNanPreserveFloat64;
232  VkBool32 shaderDenormPreserveFloat16;
233  VkBool32 shaderDenormPreserveFloat32;
234  VkBool32 shaderDenormPreserveFloat64;
235  VkBool32 shaderDenormFlushToZeroFloat16;
236  VkBool32 shaderDenormFlushToZeroFloat32;
237  VkBool32 shaderDenormFlushToZeroFloat64;
238  VkBool32 shaderRoundingModeRTEFloat16;
239  VkBool32 shaderRoundingModeRTEFloat32;
240  VkBool32 shaderRoundingModeRTEFloat64;
241  VkBool32 shaderRoundingModeRTZFloat16;
242  VkBool32 shaderRoundingModeRTZFloat32;
243  VkBool32 shaderRoundingModeRTZFloat64;
245 
246 #endif
247 
249 //
250 // Definitions not provided prior to 1.1.106
251 //
252 #if VK_HEADER_VERSION < 106
253 
254 # define VK_EXT_buffer_device_address 1
255 # define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2
256 # define VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_EXT_buffer_device_address"
258 {
259  VkStructureType sType;
260  void* pNext;
261  VkBool32 bufferDeviceAddress;
262  VkBool32 bufferDeviceAddressCaptureReplay;
263  VkBool32 bufferDeviceAddressMultiDevice;
265 #endif
266 
268 //
269 // Definitions not provided prior to 1.2.131
270 //
271 #if VK_HEADER_VERSION < 121
272 
273 #define VK_EXT_host_query_reset 1
274 #define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1
275 #define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset"
277  VkStructureType sType;
278  void* pNext;
279  VkBool32 hostQueryReset;
281 
282 typedef void (VKAPI_PTR *PFN_vkResetQueryPoolEXT)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
283 #endif
284 
286 //
287 // Definitions not provided prior to 1.2.131
288 //
289 #if VK_HEADER_VERSION < 131
290 
291 # define VK_API_VERSION_1_2 VK_MAKE_VERSION(1, 2, 0)
292 
293 # define VK_KHR_depth_stencil_resolve 1
294 # define VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION 1
295 # define VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME "VK_KHR_depth_stencil_resolve"
296 
297 # define VK_KHR_buffer_device_address 1
298 # define VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 1
299 # define VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_KHR_buffer_device_address"
300 
301 # define VK_KHR_spirv_1_4 1
302 # define VK_KHR_SPIRV_1_4_SPEC_VERSION 1
303 # define VK_KHR_SPIRV_1_4_EXTENSION_NAME "VK_KHR_spirv_1_4"
304 
305 # define VK_ERROR_UNKNOWN VkResult(-13)
306 
307 # define VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT VkBufferUsageFlagBits(0x00020000)
308 
309 # define VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO VkStructureType(1000244001)
310 # define VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2 VkStructureType(1000109000)
311 # define VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 VkStructureType(1000109001)
312 # define VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2 VkStructureType(1000109002)
313 # define VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2 VkStructureType(1000109003)
314 # define VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2 VkStructureType(1000109004)
315 # define VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE VkStructureType(1000199001)
316 # define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES VkStructureType(1000199000)
317 # define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES VkStructureType(1000257000)
318 
319 typedef enum VkResolveModeFlagBits
320 {
321  VK_RESOLVE_MODE_NONE = 0,
322  VK_RESOLVE_MODE_SAMPLE_ZERO_BIT = 0x00000001,
323  VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002,
324  VK_RESOLVE_MODE_MIN_BIT = 0x00000004,
325  VK_RESOLVE_MODE_MAX_BIT = 0x00000008,
326  VK_RESOLVE_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
327 } VkResolveModeFlagBits;
328 typedef VkFlags VkResolveModeFlags;
329 
331 {
332  VkStructureType sType;
333  const void* pNext;
334  VkAttachmentDescriptionFlags flags;
335  VkFormat format;
336  VkSampleCountFlagBits samples;
337  VkAttachmentLoadOp loadOp;
338  VkAttachmentStoreOp storeOp;
339  VkAttachmentLoadOp stencilLoadOp;
340  VkAttachmentStoreOp stencilStoreOp;
341  VkImageLayout initialLayout;
342  VkImageLayout finalLayout;
344 
346 {
347  VkStructureType sType;
348  const void* pNext;
349  uint32_t attachment;
350  VkImageLayout layout;
351  VkImageAspectFlags aspectMask;
353 
354 typedef struct VkSubpassDescription2
355 {
356  VkStructureType sType;
357  const void* pNext;
358  VkSubpassDescriptionFlags flags;
359  VkPipelineBindPoint pipelineBindPoint;
360  uint32_t viewMask;
361  uint32_t inputAttachmentCount;
362  const VkAttachmentReference2* pInputAttachments;
363  uint32_t colorAttachmentCount;
364  const VkAttachmentReference2* pColorAttachments;
365  const VkAttachmentReference2* pResolveAttachments;
366  const VkAttachmentReference2* pDepthStencilAttachment;
367  uint32_t preserveAttachmentCount;
368  const uint32_t* pPreserveAttachments;
370 
371 typedef struct VkSubpassDependency2
372 {
373  VkStructureType sType;
374  const void* pNext;
375  uint32_t srcSubpass;
376  uint32_t dstSubpass;
377  VkPipelineStageFlags srcStageMask;
378  VkPipelineStageFlags dstStageMask;
379  VkAccessFlags srcAccessMask;
380  VkAccessFlags dstAccessMask;
381  VkDependencyFlags dependencyFlags;
382  int32_t viewOffset;
384 
386 {
387  VkStructureType sType;
388  const void* pNext;
389  VkRenderPassCreateFlags flags;
390  uint32_t attachmentCount;
391  const VkAttachmentDescription2* pAttachments;
392  uint32_t subpassCount;
393  const VkSubpassDescription2* pSubpasses;
394  uint32_t dependencyCount;
395  const VkSubpassDependency2* pDependencies;
396  uint32_t correlatedViewMaskCount;
397  const uint32_t* pCorrelatedViewMasks;
399 
401 {
402  VkStructureType sType;
403  const void* pNext;
404  VkResolveModeFlagBits depthResolveMode;
405  VkResolveModeFlagBits stencilResolveMode;
406  const VkAttachmentReference2* pDepthStencilResolveAttachment;
408 
409 # if 1
411 {
412  VkStructureType sType;
413  void* pNext;
414  VkResolveModeFlags supportedDepthResolveModes;
415  VkResolveModeFlags supportedStencilResolveModes;
416  VkBool32 independentResolveNone;
417  VkBool32 independentResolve;
419 # endif
420 
422 {
423  VkStructureType sType;
424  const void* pNext;
425  VkBuffer buffer;
427 
428 #endif
429 
431 //
432 // Definitions not provided prior to 1.2.135
433 //
434 #if VK_HEADER_VERSION < 135
435 
436 # define VK_SHADER_UNUSED_KHR (~0U)
437 
438 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR)
439 
440 typedef VkFlags VkBuildAccelerationStructureFlagsKHR;
441 typedef VkFlags VkGeometryFlagsKHR;
442 
443 typedef enum VkGeometryTypeKHR
444 { // 135
445  VK_GEOMETRY_TYPE_TRIANGLES_KHR = 0,
446  VK_GEOMETRY_TYPE_AABBS_KHR = 1,
447  VK_GEOMETRY_TYPE_INSTANCES_KHR = 2,
448 } VkGeometryTypeKHR;
449 
451 { // 135
452  VkStructureType sType;
453  const void* pNext;
454  uint32_t accelerationStructureCount;
455  const VkAccelerationStructureKHR* pAccelerationStructures;
457 
458 typedef enum VkGeometryFlagBitsKHR
459 {
460  VK_GEOMETRY_OPAQUE_BIT_KHR = 0x00000001,
461  VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 0x00000002,
462  VK_GEOMETRY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
463 } VkGeometryFlagBitsKHR;
464 
465 typedef enum VkGeometryInstanceFlagBitsKHR
466 {
467  VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001,
468  VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = 0x00000002,
469  VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004,
470  VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008,
471  VK_GEOMETRY_INSTANCE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
472 } VkGeometryInstanceFlagBitsKHR;
473 
474 typedef enum VkBuildAccelerationStructureFlagBitsKHR
475 {
476  VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001,
477  VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002,
478  VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004,
479  VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008,
480  VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010,
481  VK_BUILD_ACCELERATION_STRUCTURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
482 } VkBuildAccelerationStructureFlagBitsKHR;
483 
484 typedef enum VkAccelerationStructureTypeKHR
485 {
486  VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0,
487  VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1,
488  VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2,
489  VK_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
490 } VkAccelerationStructureTypeKHR;
491 
492 typedef enum VkRayTracingShaderGroupTypeKHR
493 {
494  VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0,
495  VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1,
496  VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2,
497  VK_RAY_TRACING_SHADER_GROUP_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
498 } VkRayTracingShaderGroupTypeKHR;
499 
500 #define VK_KHR_shader_non_semantic_info 1
501 #define VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION 1
502 #define VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME "VK_KHR_shader_non_semantic_info"
503 
504 #endif
505 
507 //
508 // Definitions not provided prior to 1.2.162
509 //
510 #if VK_HEADER_VERSION < 162
511 
512 # define VK_KHR_ray_tracing_pipeline 1
513 # define VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION 1
514 # define VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME "VK_KHR_ray_tracing_pipeline"
515 
516 # define VK_KHR_acceleration_structure 1
517 # define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 11
518 # define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure"
519 # define VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME "VK_KHR_deferred_host_operations"
520 
521 typedef VkFlags VkAccelerationStructureCreateFlagsKHR;
522 
523 # define VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR VkDescriptorType(1000150000)
524 # define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR VkStructureType(1000347001)
525 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR VkStructureType(1000150004)
526 # define VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR VkStructureType(1000150007)
527 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR VkStructureType(1000150006)
528 # define VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR VkStructureType(1000150015)
529 # define VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR VkStructureType(1000150016)
530 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR VkStructureType(1000150002)
531 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR VkStructureType(1000150020)
532 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR VkStructureType(1000150000)
533 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR VkStructureType(1000150017)
534 # define VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR VkStructureType(1000150005)
535 # define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR VkStructureType(1000150013)
536 # define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR VkStructureType(1000347000)
537 
538 # define VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR VkBufferUsageFlagBits(0x00100000)
539 # define VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR VkBufferUsageFlagBits(0x00000400)
540 # define VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR VkBufferUsageFlagBits(0x00080000)
541 
542 # define VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR VkPipelineBindPoint(1000165000)
543 # define VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR VkPipelineStageFlagBits(0x02000000)
544 
545 # define VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR VkAccessFlagBits(0x00200000)
546 # define VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR VkAccessFlagBits(0x00400000)
547 
548 # define VK_SHADER_STAGE_RAYGEN_BIT_KHR VkShaderStageFlagBits(0x00000100)
549 # define VK_SHADER_STAGE_ANY_HIT_BIT_KHR VkShaderStageFlagBits(0x00000200)
550 # define VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR VkShaderStageFlagBits(0x00000400)
551 # define VK_SHADER_STAGE_MISS_BIT_KHR VkShaderStageFlagBits(0x00000800)
552 # define VK_SHADER_STAGE_INTERSECTION_BIT_KHR VkShaderStageFlagBits(0x00001000)
553 # define VK_SHADER_STAGE_CALLABLE_BIT_KHR VkShaderStageFlagBits(0x00002000)
554 
555 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR)
556 
557 typedef enum VkBuildAccelerationStructureModeKHR
558 {
559  VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0,
560  VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1,
561  VK_BUILD_ACCELERATION_STRUCTURE_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
562 } VkBuildAccelerationStructureModeKHR;
563 
564 typedef enum VkAccelerationStructureBuildTypeKHR
565 {
566  VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0,
567  VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1,
568  VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2,
569  VK_ACCELERATION_STRUCTURE_BUILD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
570 } VkAccelerationStructureBuildTypeKHR;
571 
573 {
574  VkStructureType sType;
575  void* pNext;
576  VkBool32 rayTracingPipeline;
577  VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay;
578  VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed;
579  VkBool32 rayTracingPipelineTraceRaysIndirect;
580  VkBool32 rayTraversalPrimitiveCulling;
582 
584 {
585  VkStructureType sType;
586  void* pNext;
587  VkBool32 accelerationStructure;
588  VkBool32 accelerationStructureCaptureReplay;
589  VkBool32 accelerationStructureIndirectBuild;
590  VkBool32 accelerationStructureHostCommands;
591  VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind;
593 
595 {
596  VkStructureType sType;
597  void* pNext;
598  uint32_t shaderGroupHandleSize;
599  uint32_t maxRayRecursionDepth;
600  uint32_t maxShaderGroupStride;
601  uint32_t shaderGroupBaseAlignment;
602  uint32_t shaderGroupHandleCaptureReplaySize;
603  uint32_t maxRayDispatchInvocationCount;
604  uint32_t shaderGroupHandleAlignment;
605  uint32_t maxRayHitAttributeSize;
607 
609 {
610  VkDeviceAddress deviceAddress;
611  void* hostAddress;
613 
615 {
616  VkDeviceAddress deviceAddress;
617  const void* hostAddress;
619 
621 {
622  uint32_t primitiveCount;
623  uint32_t primitiveOffset;
624  uint32_t firstVertex;
625  uint32_t transformOffset;
627 
629 {
630  VkStructureType sType;
631  const void* pNext;
632  VkFormat vertexFormat;
634  VkDeviceSize vertexStride;
635  uint32_t maxVertex;
636  VkIndexType indexType;
638  VkDeviceOrHostAddressConstKHR transformData;
640 
642 {
643  VkStructureType sType;
644  const void* pNext;
646  VkDeviceSize stride;
648 
650 {
651  VkStructureType sType;
652  const void* pNext;
653  VkBool32 arrayOfPointers;
656 
658 {
663 
665 {
666  VkStructureType sType;
667  const void* pNext;
668  VkGeometryTypeKHR geometryType;
670  VkGeometryFlagsKHR flags;
672 
674 {
675  VkStructureType sType;
676  const void* pNext;
677  VkAccelerationStructureCreateFlagsKHR createFlags;
678  VkBuffer buffer;
679  VkDeviceSize offset;
680  VkDeviceSize size;
681  VkAccelerationStructureTypeKHR type;
682  VkDeviceAddress deviceAddress;
684 
686 {
687  VkStructureType sType;
688  const void* pNext;
689  VkAccelerationStructureTypeKHR type;
690  VkBuildAccelerationStructureFlagsKHR flags;
691  VkBuildAccelerationStructureModeKHR mode;
692  VkAccelerationStructureKHR srcAccelerationStructure;
693  VkAccelerationStructureKHR dstAccelerationStructure;
694  uint32_t geometryCount;
695  const VkAccelerationStructureGeometryKHR* pGeometries;
696  const VkAccelerationStructureGeometryKHR* const* ppGeometries;
697  VkDeviceOrHostAddressKHR scratchData;
699 
701 {
702  VkDeviceAddress deviceAddress;
703  VkDeviceSize stride;
704  VkDeviceSize size;
706 
708 {
709  VkStructureType sType;
710  const void* pNext;
711  uint32_t libraryCount;
712  const VkPipeline* pLibraries;
714 
716 {
717  VkStructureType sType;
718  const void* pNext;
719  uint32_t maxPipelineRayPayloadSize;
720  uint32_t maxPipelineRayHitAttributeSize;
722 
724 {
725  VkStructureType sType;
726  const void* pNext;
727  VkAccelerationStructureKHR accelerationStructure;
729 
731 {
732  VkStructureType sType;
733  const void* pNext;
734  VkDeviceSize accelerationStructureSize;
735  VkDeviceSize updateScratchSize;
736  VkDeviceSize buildScratchSize;
738 
740 {
741  VkStructureType sType;
742  const void* pNext;
743  VkRayTracingShaderGroupTypeKHR type;
744  uint32_t generalShader;
745  uint32_t closestHitShader;
746  uint32_t anyHitShader;
747  uint32_t intersectionShader;
748  const void* pShaderGroupCaptureReplayHandle;
750 
752 {
753  VkStructureType sType;
754  const void* pNext;
755  VkPipelineCreateFlags flags;
756  uint32_t stageCount;
757  const VkPipelineShaderStageCreateInfo* pStages;
758  uint32_t groupCount;
760  uint32_t maxPipelineRayRecursionDepth;
761  const VkPipelineLibraryCreateInfoKHR* pLibraryInfo;
762  const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface;
763  const VkPipelineDynamicStateCreateInfo* pDynamicState;
764  VkPipelineLayout layout;
765  VkPipeline basePipelineHandle;
766  int32_t basePipelineIndex;
768 
769 typedef VkResult(VKAPI_PTR* PFN_vkCreateAccelerationStructureKHR)(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure);
770 typedef void(VKAPI_PTR* PFN_vkDestroyAccelerationStructureKHR)(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator);
771 
772 typedef void(VKAPI_PTR* PFN_vkCmdBuildAccelerationStructuresKHR)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos);
773 
774 typedef VkDeviceAddress(VKAPI_PTR* PFN_vkGetAccelerationStructureDeviceAddressKHR)(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
775 
776 typedef void(VKAPI_PTR* PFN_vkGetAccelerationStructureBuildSizesKHR)(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo);
777 
778 typedef VkResult(VKAPI_PTR* PFN_vkCreateRayTracingPipelinesKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
779 
780 typedef VkResult(VKAPI_PTR* PFN_vkGetRayTracingShaderGroupHandlesKHR)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);
781 
782 typedef 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);
783 
784 #endif
785 
786 //
787 // Provide *_Compatibility function definitions to workaround different function definitions across different vulkan_core.h versions.
788 //
789 typedef VkResult(VKAPI_PTR* PFN_vkCreateRenderPass2KHR_Compatibility)(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
790 typedef VkDeviceAddress(VKAPI_PTR* PFN_vkGetBufferDeviceAddressKHR_Compatibility)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo);
791 
792 //
793 // Definitions not provided prior to 1.3.211
794 //
795 #if VK_HEADER_VERSION < 211
796 typedef enum VkInstanceCreateFlagBits {
797  VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR = 0x00000001,
798  VK_INSTANCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
799 } VkInstanceCreateFlagBits;
800 typedef VkFlags VkInstanceCreateFlags;
801 
802 #define VK_KHR_portability_enumeration 1
803 #define VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION 1
804 #define VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME "VK_KHR_portability_enumeration"
805 
806 #endif
807 
808 //
809 // Provide VK_KHR_portability_subset from vulkan_beta.h
810 //
811 #ifndef VK_KHR_portability_subset
812 #define VK_KHR_portability_subset 1
813 #define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1
814 #define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
816  VkStructureType sType;
817  void* pNext;
818  VkBool32 constantAlphaColorBlendFactors;
819  VkBool32 events;
820  VkBool32 imageViewFormatReinterpretation;
821  VkBool32 imageViewFormatSwizzle;
822  VkBool32 imageView2DOn3DImage;
823  VkBool32 multisampleArrayImage;
824  VkBool32 mutableComparisonSamplers;
825  VkBool32 pointPolygons;
826  VkBool32 samplerMipLodBias;
827  VkBool32 separateStencilMaskRef;
828  VkBool32 shaderSampleRateInterpolationFunctions;
829  VkBool32 tessellationIsolines;
830  VkBool32 tessellationPointMode;
831  VkBool32 triangleFans;
832  VkBool32 vertexAttributeAccessBeyondStride;
834 
836  VkStructureType sType;
837  void* pNext;
838  uint32_t minVertexInputBindingStrideAlignment;
840 #endif
841 
842 #ifndef VK_EXT_debug_utils
843 #define VK_EXT_debug_utils 1
844 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT)
845 #define VK_EXT_DEBUG_UTILS_SPEC_VERSION 2
846 #define VK_EXT_DEBUG_UTILS_EXTENSION_NAME "VK_EXT_debug_utils"
847 typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT;
848 
849 typedef enum VkDebugUtilsMessageSeverityFlagBitsEXT {
850  VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001,
851  VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010,
852  VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100,
853  VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000,
854  VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
855 } VkDebugUtilsMessageSeverityFlagBitsEXT;
856 
857 typedef enum VkDebugUtilsMessageTypeFlagBitsEXT {
858  VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001,
859  VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002,
860  VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004,
861  VK_DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 0x00000008,
862  VK_DEBUG_UTILS_MESSAGE_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
863 } VkDebugUtilsMessageTypeFlagBitsEXT;
864 typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT;
865 typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT;
866 typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT;
867 typedef struct VkDebugUtilsLabelEXT {
868  VkStructureType sType;
869  const void* pNext;
870  const char* pLabelName;
871  float color[4];
873 
875  VkStructureType sType;
876  const void* pNext;
877  VkObjectType objectType;
878  uint64_t objectHandle;
879  const char* pObjectName;
881 
883  VkStructureType sType;
884  const void* pNext;
885  VkDebugUtilsMessengerCallbackDataFlagsEXT flags;
886  const char* pMessageIdName;
887  int32_t messageIdNumber;
888  const char* pMessage;
889  uint32_t queueLabelCount;
890  const VkDebugUtilsLabelEXT* pQueueLabels;
891  uint32_t cmdBufLabelCount;
892  const VkDebugUtilsLabelEXT* pCmdBufLabels;
893  uint32_t objectCount;
894  const VkDebugUtilsObjectNameInfoEXT* pObjects;
896 
897 typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)(
898  VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
899  VkDebugUtilsMessageTypeFlagsEXT messageTypes,
900  const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData,
901  void* pUserData);
902 
904  VkStructureType sType;
905  const void* pNext;
906  VkDebugUtilsMessengerCreateFlagsEXT flags;
907  VkDebugUtilsMessageSeverityFlagsEXT messageSeverity;
908  VkDebugUtilsMessageTypeFlagsEXT messageType;
909  PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback;
910  void* pUserData;
912 
914  VkStructureType sType;
915  const void* pNext;
916  VkObjectType objectType;
917  uint64_t objectHandle;
918  uint64_t tagName;
919  size_t tagSize;
920  const void* pTag;
922 #endif
Definition: vulkan.h:674
Definition: vulkan.h:665
Definition: vulkan.h:48
Definition: vulkan.h:331
Definition: vulkan.h:63
Definition: vulkan.h:346
Definition: vulkan.h:422
Definition: vulkan.h:867
Definition: vulkan.h:882
Definition: vulkan.h:903
Definition: vulkan.h:874
Definition: vulkan.h:913
Definition: vulkan.h:201
Definition: vulkan.h:708
Definition: vulkan.h:752
Definition: vulkan.h:740
Definition: vulkan.h:103
Definition: vulkan.h:386
Definition: vulkan.h:701
Definition: vulkan.h:89
Definition: vulkan.h:372
Definition: vulkan.h:72
Definition: vulkan.h:355
Definition: vulkan.h:615
Definition: vulkan.h:609