blob: 650d348b9d184f9bd85df6244d0e06360082a7c7 [file] [log] [blame]
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001//
2// File: vulkan.h
3//
4/*
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06005** Copyright (c) 2014-2015 The Khronos Group Inc.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06006**
7** Permission is hereby granted, free of charge, to any person obtaining a
8** copy of this software and/or associated documentation files (the
9** "Materials"), to deal in the Materials without restriction, including
10** without limitation the rights to use, copy, modify, merge, publish,
11** distribute, sublicense, and/or sell copies of the Materials, and to
12** permit persons to whom the Materials are furnished to do so, subject to
13** the following conditions:
14**
15** The above copyright notice and this permission notice shall be included
16** in all copies or substantial portions of the Materials.
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
25*/
26
27#ifndef __VULKAN_H__
28#define __VULKAN_H__
29
30#define VK_MAKE_VERSION(major, minor, patch) \
31 ((major << 22) | (minor << 12) | patch)
32
Courtney Goeltzenleuchterb0cedb82015-04-09 11:52:55 -060033#include "vk_platform.h"
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060034
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060035// Vulkan API version supported by this file
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -060036#define VK_API_VERSION VK_MAKE_VERSION(0, 91, 0)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060037
38#ifdef __cplusplus
39extern "C"
40{
41#endif // __cplusplus
42
43/*
44***************************************************************************************************
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060045* Core Vulkan API
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060046***************************************************************************************************
47*/
48
Mike Stroyanb050c682015-04-17 12:36:38 -060049#if defined (__cplusplus) && (VK_UINTPTRLEAST64_MAX == UINTPTR_MAX)
50 #define VK_TYPE_SAFE_COMPATIBLE_HANDLES 1
51#endif
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060052
Mike Stroyanb050c682015-04-17 12:36:38 -060053#if defined(VK_TYPE_SAFE_COMPATIBLE_HANDLES) && !defined(VK_DISABLE_TYPE_SAFE_HANDLES)
54 #define VK_DEFINE_PTR_HANDLE(_obj) struct _obj##_T { char _dummy; }; typedef _obj##_T* _obj;
55 #define VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base) struct _obj##_T : public _base##_T {}; typedef _obj##_T* _obj;
56
57 #define VK_DEFINE_BASE_HANDLE(_obj) VK_DEFINE_PTR_HANDLE(_obj)
58 #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base)
59 #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base)
60#else
61 #define VK_DEFINE_BASE_HANDLE(_obj) typedef VkUintPtrLeast64 _obj;
62 #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) typedef uintptr_t _obj;
63 #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) typedef VkUintPtrLeast64 _obj;
64#endif
65
66VK_DEFINE_BASE_HANDLE(VkObject)
67
68VK_DEFINE_DISP_SUBCLASS_HANDLE(VkInstance, VkObject)
69VK_DEFINE_DISP_SUBCLASS_HANDLE(VkPhysicalDevice, VkObject)
70VK_DEFINE_DISP_SUBCLASS_HANDLE(VkDevice, VkObject)
71VK_DEFINE_DISP_SUBCLASS_HANDLE(VkQueue, VkObject)
72VK_DEFINE_DISP_SUBCLASS_HANDLE(VkCmdBuffer, VkObject)
73
74VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkNonDispatchable, VkObject)
75VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDeviceMemory, VkNonDispatchable)
76VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkBuffer, VkNonDispatchable)
77VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkBufferView, VkNonDispatchable)
78VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkImage, VkNonDispatchable)
79VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkImageView, VkNonDispatchable)
80VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkColorAttachmentView, VkNonDispatchable)
81VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDepthStencilView, VkNonDispatchable)
82VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShader, VkNonDispatchable)
83VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipeline, VkNonDispatchable)
84VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipelineLayout, VkNonDispatchable)
85VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkSampler, VkNonDispatchable)
86VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorSet, VkNonDispatchable)
87VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorSetLayout, VkNonDispatchable)
88VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorPool, VkNonDispatchable)
89VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicStateObject, VkNonDispatchable)
90VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicVpState, VkDynamicStateObject)
91VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicRsState, VkDynamicStateObject)
92VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicCbState, VkDynamicStateObject)
93VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicDsState, VkDynamicStateObject)
94VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkFence, VkNonDispatchable)
95VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkSemaphore, VkNonDispatchable)
96VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkEvent, VkNonDispatchable)
97VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkQueryPool, VkNonDispatchable)
98VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkFramebuffer, VkNonDispatchable)
99VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkRenderPass, VkNonDispatchable)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600100
Tony Barbourd1c35722015-04-16 15:59:00 -0600101#define VK_MAX_PHYSICAL_DEVICE_NAME 256
Mike Stroyanb050c682015-04-17 12:36:38 -0600102#define VK_MAX_EXTENSION_NAME 256
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600103
104#define VK_LOD_CLAMP_NONE MAX_FLOAT
105#define VK_LAST_MIP_OR_SLICE 0xffffffff
106
Tony Barbourd1c35722015-04-16 15:59:00 -0600107#define VK_WHOLE_SIZE UINT64_MAX
108
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600109#define VK_TRUE 1
110#define VK_FALSE 0
111
112#define VK_NULL_HANDLE 0
113
114// This macro defines INT_MAX in enumerations to force compilers to use 32 bits
115// to represent them. This may or may not be necessary on some compilers. The
116// option to compile it out may allow compilers that warn about missing enumerants
117// in switch statements to be silenced.
Tony Barbourd1c35722015-04-16 15:59:00 -0600118// Using this macro is not needed for flag bit enums because those aren't used
119// as storage type anywhere.
120#define VK_MAX_ENUM(Prefix) VK_##Prefix##_MAX_ENUM = 0x7FFFFFFF
121
122// This macro defines the BEGIN_RANGE, END_RANGE, NUM, and MAX_ENUM constants for
123// the enumerations.
124#define VK_ENUM_RANGE(Prefix, First, Last) \
125 VK_##Prefix##_BEGIN_RANGE = VK_##Prefix##_##First, \
126 VK_##Prefix##_END_RANGE = VK_##Prefix##_##Last, \
127 VK_NUM_##Prefix = (VK_##Prefix##_END_RANGE - VK_##Prefix##_BEGIN_RANGE + 1), \
128 VK_MAX_ENUM(Prefix)
129
130// This is a helper macro to define the value of flag bit enum values.
131#define VK_BIT(bit) (1 << (bit))
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600132
133// ------------------------------------------------------------------------------------------------
134// Enumerations
135
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600136typedef enum VkMemoryPriority_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600137{
Tony Barbourd1c35722015-04-16 15:59:00 -0600138 VK_MEMORY_PRIORITY_UNUSED = 0x00000000,
139 VK_MEMORY_PRIORITY_VERY_LOW = 0x00000001,
140 VK_MEMORY_PRIORITY_LOW = 0x00000002,
141 VK_MEMORY_PRIORITY_NORMAL = 0x00000003,
142 VK_MEMORY_PRIORITY_HIGH = 0x00000004,
143 VK_MEMORY_PRIORITY_VERY_HIGH = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600144
Tony Barbourd1c35722015-04-16 15:59:00 -0600145 VK_ENUM_RANGE(MEMORY_PRIORITY, UNUSED, VERY_HIGH)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600146} VkMemoryPriority;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600147
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600148typedef enum VkImageLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600149{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600150 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
151 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access
152 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write
153 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write
154 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access
155 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access
156 VK_IMAGE_LAYOUT_CLEAR_OPTIMAL = 0x00000006, // Optimal layout when image is used only for clear operations
157 VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000007, // Optimal layout when image is used only as source of transfer operations
158 VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000008, // Optimal layout when image is used only as destination of transfer operations
Tony Barbour71a85122015-04-16 19:09:28 -0600159
Tony Barbourd1c35722015-04-16 15:59:00 -0600160 VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600161} VkImageLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600162
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600163typedef enum VkPipeEvent_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600164{
Tony Barbourd1c35722015-04-16 15:59:00 -0600165 VK_PIPE_EVENT_TOP_OF_PIPE = 0x00000001, // Set event before the device starts processing subsequent command
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600166 VK_PIPE_EVENT_VERTEX_PROCESSING_COMPLETE = 0x00000002, // Set event when all pending vertex processing is complete
167 VK_PIPE_EVENT_LOCAL_FRAGMENT_PROCESSING_COMPLETE = 0x00000003, // Set event when all pending fragment shader executions are complete, within each fragment location
168 VK_PIPE_EVENT_FRAGMENT_PROCESSING_COMPLETE = 0x00000004, // Set event when all pending fragment shader executions are complete
169 VK_PIPE_EVENT_GRAPHICS_PIPELINE_COMPLETE = 0x00000005, // Set event when all pending graphics operations are complete
170 VK_PIPE_EVENT_COMPUTE_PIPELINE_COMPLETE = 0x00000006, // Set event when all pending compute operations are complete
171 VK_PIPE_EVENT_TRANSFER_COMPLETE = 0x00000007, // Set event when all pending transfer operations are complete
Tony Barbourd1c35722015-04-16 15:59:00 -0600172 VK_PIPE_EVENT_COMMANDS_COMPLETE = 0x00000008, // Set event when all pending work is complete
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600173
Tony Barbourd1c35722015-04-16 15:59:00 -0600174 VK_ENUM_RANGE(PIPE_EVENT, TOP_OF_PIPE, COMMANDS_COMPLETE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600175} VkPipeEvent;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600176
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600177typedef enum VkWaitEvent_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600178{
Tony Barbourd1c35722015-04-16 15:59:00 -0600179 VK_WAIT_EVENT_TOP_OF_PIPE = 0x00000001, // Wait event before the device starts processing subsequent commands
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600180 VK_WAIT_EVENT_BEFORE_RASTERIZATION = 0x00000002, // Wait event before rasterizing subsequent primitives
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600181
Tony Barbourd1c35722015-04-16 15:59:00 -0600182 VK_ENUM_RANGE(WAIT_EVENT, TOP_OF_PIPE, BEFORE_RASTERIZATION)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600183} VkWaitEvent;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600184
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600185typedef enum VkAttachmentLoadOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600186{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600187 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
188 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
189 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600190
Tony Barbourd1c35722015-04-16 15:59:00 -0600191 VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600192} VkAttachmentLoadOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600193
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600194typedef enum VkAttachmentStoreOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600195{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600196 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
197 VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001,
198 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600199
Tony Barbourd1c35722015-04-16 15:59:00 -0600200 VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600201} VkAttachmentStoreOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600202
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600203typedef enum VkImageType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600204{
Tony Barbourd1c35722015-04-16 15:59:00 -0600205 VK_IMAGE_TYPE_1D = 0x00000000,
206 VK_IMAGE_TYPE_2D = 0x00000001,
207 VK_IMAGE_TYPE_3D = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600208
Tony Barbourd1c35722015-04-16 15:59:00 -0600209 VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600210} VkImageType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600211
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600212typedef enum VkImageTiling_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600213{
Tony Barbourd1c35722015-04-16 15:59:00 -0600214 VK_IMAGE_TILING_LINEAR = 0x00000000,
215 VK_IMAGE_TILING_OPTIMAL = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600216
Tony Barbourd1c35722015-04-16 15:59:00 -0600217 VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600218} VkImageTiling;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600219
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600220typedef enum VkImageViewType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600221{
Tony Barbourd1c35722015-04-16 15:59:00 -0600222 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
223 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
224 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
225 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600226
Tony Barbourd1c35722015-04-16 15:59:00 -0600227 VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600228} VkImageViewType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600229
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600230typedef enum VkImageAspect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600231{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600232 VK_IMAGE_ASPECT_COLOR = 0x00000000,
233 VK_IMAGE_ASPECT_DEPTH = 0x00000001,
234 VK_IMAGE_ASPECT_STENCIL = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600235
Tony Barbourd1c35722015-04-16 15:59:00 -0600236 VK_ENUM_RANGE(IMAGE_ASPECT, COLOR, STENCIL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600237} VkImageAspect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600238
Tony Barbourd1c35722015-04-16 15:59:00 -0600239typedef enum VkBufferViewType_
240{
241 VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
242 VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
243
244 VK_ENUM_RANGE(BUFFER_VIEW_TYPE, RAW, FORMATTED)
245} VkBufferViewType;
246
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600247typedef enum VkChannelSwizzle_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600248{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600249 VK_CHANNEL_SWIZZLE_ZERO = 0x00000000,
250 VK_CHANNEL_SWIZZLE_ONE = 0x00000001,
251 VK_CHANNEL_SWIZZLE_R = 0x00000002,
252 VK_CHANNEL_SWIZZLE_G = 0x00000003,
253 VK_CHANNEL_SWIZZLE_B = 0x00000004,
254 VK_CHANNEL_SWIZZLE_A = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600255
Tony Barbourd1c35722015-04-16 15:59:00 -0600256 VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600257} VkChannelSwizzle;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600258
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600259typedef enum VkDescriptorType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600260{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600261 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600262 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
263 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
264 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
265 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
266 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600267 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600268 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600269 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600270 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600271
Tony Barbourd1c35722015-04-16 15:59:00 -0600272 VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600273} VkDescriptorType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600274
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600275typedef enum VkDescriptorPoolUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600276{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600277 VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000,
278 VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600279
Tony Barbourd1c35722015-04-16 15:59:00 -0600280 VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600281} VkDescriptorPoolUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600282
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600283typedef enum VkDescriptorUpdateMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600284{
Tony Barbourd1c35722015-04-16 15:59:00 -0600285 VK_DESCRIPTOR_UPDATE_MODE_COPY = 0x00000000,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600286 VK_DESCRIPTOR_UPDATE_MODE_FASTEST = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600287
Tony Barbourd1c35722015-04-16 15:59:00 -0600288 VK_ENUM_RANGE(DESCRIPTOR_UPDATE_MODE, COPY, FASTEST)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600289} VkDescriptorUpdateMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600290
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600291typedef enum VkDescriptorSetUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600292{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600293 VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000,
294 VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600295
Tony Barbourd1c35722015-04-16 15:59:00 -0600296 VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600297} VkDescriptorSetUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600298
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600299typedef enum VkQueryType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600300{
Tony Barbourd1c35722015-04-16 15:59:00 -0600301 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -0600302 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, // Optional
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600303
Tony Barbourd1c35722015-04-16 15:59:00 -0600304 VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600305} VkQueryType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600306
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600307typedef enum VkTimestampType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600308{
Tony Barbourd1c35722015-04-16 15:59:00 -0600309 VK_TIMESTAMP_TYPE_TOP = 0x00000000,
310 VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600311
Tony Barbourd1c35722015-04-16 15:59:00 -0600312 VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600313} VkTimestampType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600314
Tony Barbourd1c35722015-04-16 15:59:00 -0600315typedef enum VkBorderColor_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600316{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600317 VK_BORDER_COLOR_OPAQUE_WHITE = 0x00000000,
318 VK_BORDER_COLOR_TRANSPARENT_BLACK = 0x00000001,
319 VK_BORDER_COLOR_OPAQUE_BLACK = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600320
Tony Barbourd1c35722015-04-16 15:59:00 -0600321 VK_ENUM_RANGE(BORDER_COLOR, OPAQUE_WHITE, OPAQUE_BLACK)
322} VkBorderColor;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600323
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600324typedef enum VkPipelineBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600325{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600326 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000,
327 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600328
Tony Barbourd1c35722015-04-16 15:59:00 -0600329 VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600330} VkPipelineBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600331
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600332typedef enum VkStateBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600333{
Tony Barbourd1c35722015-04-16 15:59:00 -0600334 VK_STATE_BIND_POINT_VIEWPORT = 0x00000000,
335 VK_STATE_BIND_POINT_RASTER = 0x00000001,
336 VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002,
337 VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600338
Tony Barbourd1c35722015-04-16 15:59:00 -0600339 VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600340} VkStateBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600341
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600342typedef enum VkPrimitiveTopology_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600343{
Tony Barbourd1c35722015-04-16 15:59:00 -0600344 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
345 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
346 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
347 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
348 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
349 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
350 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ = 0x00000006,
351 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ = 0x00000007,
352 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ = 0x00000008,
353 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ = 0x00000009,
354 VK_PRIMITIVE_TOPOLOGY_PATCH = 0x0000000a,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600355
Tony Barbourd1c35722015-04-16 15:59:00 -0600356 VK_ENUM_RANGE(PRIMITIVE_TOPOLOGY, POINT_LIST, PATCH)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600357} VkPrimitiveTopology;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600358
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600359typedef enum VkIndexType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600360{
Tony Barbourd1c35722015-04-16 15:59:00 -0600361 VK_INDEX_TYPE_UINT8 = 0x00000000,
362 VK_INDEX_TYPE_UINT16 = 0x00000001,
363 VK_INDEX_TYPE_UINT32 = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600364
Tony Barbourd1c35722015-04-16 15:59:00 -0600365 VK_ENUM_RANGE(INDEX_TYPE, UINT8, UINT32)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600366} VkIndexType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600367
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600368typedef enum VkTexFilter_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600369{
Tony Barbourd1c35722015-04-16 15:59:00 -0600370 VK_TEX_FILTER_NEAREST = 0x00000000,
371 VK_TEX_FILTER_LINEAR = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600372
Tony Barbourd1c35722015-04-16 15:59:00 -0600373 VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600374} VkTexFilter;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600375
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600376typedef enum VkTexMipmapMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600377{
Tony Barbourd1c35722015-04-16 15:59:00 -0600378 VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level
379 VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level
380 VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600381
Tony Barbourd1c35722015-04-16 15:59:00 -0600382 VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600383} VkTexMipmapMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600384
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600385typedef enum VkTexAddress_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600386{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600387 VK_TEX_ADDRESS_WRAP = 0x00000000,
388 VK_TEX_ADDRESS_MIRROR = 0x00000001,
389 VK_TEX_ADDRESS_CLAMP = 0x00000002,
390 VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
391 VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600392
Tony Barbourd1c35722015-04-16 15:59:00 -0600393 VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600394} VkTexAddress;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600395
Tony Barbourd1c35722015-04-16 15:59:00 -0600396typedef enum VkCompareOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600397{
Tony Barbourd1c35722015-04-16 15:59:00 -0600398 VK_COMPARE_OP_NEVER = 0x00000000,
399 VK_COMPARE_OP_LESS = 0x00000001,
400 VK_COMPARE_OP_EQUAL = 0x00000002,
401 VK_COMPARE_OP_LESS_EQUAL = 0x00000003,
402 VK_COMPARE_OP_GREATER = 0x00000004,
403 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
404 VK_COMPARE_OP_GREATER_EQUAL = 0x00000006,
405 VK_COMPARE_OP_ALWAYS = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600406
Tony Barbourd1c35722015-04-16 15:59:00 -0600407 VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS)
408} VkCompareOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600409
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600410typedef enum VkFillMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600411{
Tony Barbourd1c35722015-04-16 15:59:00 -0600412 VK_FILL_MODE_POINTS = 0x00000000,
413 VK_FILL_MODE_WIREFRAME = 0x00000001,
414 VK_FILL_MODE_SOLID = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600415
Tony Barbourd1c35722015-04-16 15:59:00 -0600416 VK_ENUM_RANGE(FILL_MODE, POINTS, SOLID)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600417} VkFillMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600418
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600419typedef enum VkCullMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600420{
Tony Barbourd1c35722015-04-16 15:59:00 -0600421 VK_CULL_MODE_NONE = 0x00000000,
422 VK_CULL_MODE_FRONT = 0x00000001,
423 VK_CULL_MODE_BACK = 0x00000002,
424 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600425
Tony Barbourd1c35722015-04-16 15:59:00 -0600426 VK_ENUM_RANGE(CULL_MODE, NONE, FRONT_AND_BACK)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600427} VkCullMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600428
Tony Barbourd1c35722015-04-16 15:59:00 -0600429typedef enum VkFrontFace_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600430{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600431 VK_FRONT_FACE_CCW = 0x00000000,
432 VK_FRONT_FACE_CW = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600433
Tony Barbourd1c35722015-04-16 15:59:00 -0600434 VK_ENUM_RANGE(FRONT_FACE, CCW, CW)
435} VkFrontFace;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600436
Tony Barbourd1c35722015-04-16 15:59:00 -0600437typedef enum VkProvokingVertex_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600438{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600439 VK_PROVOKING_VERTEX_FIRST = 0x00000000,
440 VK_PROVOKING_VERTEX_LAST = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600441
Tony Barbourd1c35722015-04-16 15:59:00 -0600442 VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST)
443} VkProvokingVertex;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600444
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600445typedef enum VkCoordinateOrigin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600446{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600447 VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
448 VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600449
Tony Barbourd1c35722015-04-16 15:59:00 -0600450 VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600451} VkCoordinateOrigin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600452
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600453typedef enum VkDepthMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600454{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600455 VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000,
456 VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600457
Tony Barbourd1c35722015-04-16 15:59:00 -0600458 VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600459} VkDepthMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600460
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600461typedef enum VkBlend_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600462{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600463 VK_BLEND_ZERO = 0x00000000,
464 VK_BLEND_ONE = 0x00000001,
465 VK_BLEND_SRC_COLOR = 0x00000002,
466 VK_BLEND_ONE_MINUS_SRC_COLOR = 0x00000003,
467 VK_BLEND_DEST_COLOR = 0x00000004,
468 VK_BLEND_ONE_MINUS_DEST_COLOR = 0x00000005,
469 VK_BLEND_SRC_ALPHA = 0x00000006,
470 VK_BLEND_ONE_MINUS_SRC_ALPHA = 0x00000007,
471 VK_BLEND_DEST_ALPHA = 0x00000008,
472 VK_BLEND_ONE_MINUS_DEST_ALPHA = 0x00000009,
473 VK_BLEND_CONSTANT_COLOR = 0x0000000a,
474 VK_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
475 VK_BLEND_CONSTANT_ALPHA = 0x0000000c,
476 VK_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
477 VK_BLEND_SRC_ALPHA_SATURATE = 0x0000000e,
478 VK_BLEND_SRC1_COLOR = 0x0000000f,
479 VK_BLEND_ONE_MINUS_SRC1_COLOR = 0x00000010,
480 VK_BLEND_SRC1_ALPHA = 0x00000011,
481 VK_BLEND_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600482
Tony Barbourd1c35722015-04-16 15:59:00 -0600483 VK_ENUM_RANGE(BLEND, ZERO, ONE_MINUS_SRC1_ALPHA)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600484} VkBlend;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600485
Tony Barbourd1c35722015-04-16 15:59:00 -0600486typedef enum VkBlendOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600487{
Tony Barbourd1c35722015-04-16 15:59:00 -0600488 VK_BLEND_OP_ADD = 0x00000000,
489 VK_BLEND_OP_SUBTRACT = 0x00000001,
490 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
491 VK_BLEND_OP_MIN = 0x00000003,
492 VK_BLEND_OP_MAX = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600493
Tony Barbourd1c35722015-04-16 15:59:00 -0600494 VK_ENUM_RANGE(BLEND_OP, ADD, MAX)
495} VkBlendOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600496
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600497typedef enum VkStencilOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600498{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600499 VK_STENCIL_OP_KEEP = 0x00000000,
500 VK_STENCIL_OP_ZERO = 0x00000001,
501 VK_STENCIL_OP_REPLACE = 0x00000002,
502 VK_STENCIL_OP_INC_CLAMP = 0x00000003,
503 VK_STENCIL_OP_DEC_CLAMP = 0x00000004,
504 VK_STENCIL_OP_INVERT = 0x00000005,
505 VK_STENCIL_OP_INC_WRAP = 0x00000006,
506 VK_STENCIL_OP_DEC_WRAP = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600507
Tony Barbourd1c35722015-04-16 15:59:00 -0600508 VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600509} VkStencilOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600510
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600511typedef enum VkLogicOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600512{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600513 VK_LOGIC_OP_COPY = 0x00000000,
514 VK_LOGIC_OP_CLEAR = 0x00000001,
515 VK_LOGIC_OP_AND = 0x00000002,
516 VK_LOGIC_OP_AND_REVERSE = 0x00000003,
517 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
518 VK_LOGIC_OP_NOOP = 0x00000005,
519 VK_LOGIC_OP_XOR = 0x00000006,
520 VK_LOGIC_OP_OR = 0x00000007,
521 VK_LOGIC_OP_NOR = 0x00000008,
522 VK_LOGIC_OP_EQUIV = 0x00000009,
523 VK_LOGIC_OP_INVERT = 0x0000000a,
524 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
525 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
526 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
527 VK_LOGIC_OP_NAND = 0x0000000e,
528 VK_LOGIC_OP_SET = 0x0000000f,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600529
Tony Barbourd1c35722015-04-16 15:59:00 -0600530 VK_ENUM_RANGE(LOGIC_OP, COPY, SET)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600531} VkLogicOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600532
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600533typedef enum VkSystemAllocType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600534{
Tony Barbourd1c35722015-04-16 15:59:00 -0600535 VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000,
536 VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001,
537 VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002,
538 VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003,
539 VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600540
Tony Barbourd1c35722015-04-16 15:59:00 -0600541 VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600542} VkSystemAllocType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600543
Tony Barbourd1c35722015-04-16 15:59:00 -0600544typedef enum VkPhysicalDeviceType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600545{
Tony Barbourd1c35722015-04-16 15:59:00 -0600546 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
547 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
548 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
549 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
550 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600551
Tony Barbourd1c35722015-04-16 15:59:00 -0600552 VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU)
553} VkPhysicalDeviceType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600554
Tony Barbourd1c35722015-04-16 15:59:00 -0600555typedef enum VkPhysicalDeviceInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600556{
Tony Barbourd1c35722015-04-16 15:59:00 -0600557 // Info type for vkGetPhysicalDeviceInfo()
558 VK_PHYSICAL_DEVICE_INFO_TYPE_PROPERTIES = 0x00000000,
559 VK_PHYSICAL_DEVICE_INFO_TYPE_PERFORMANCE = 0x00000001,
560 VK_PHYSICAL_DEVICE_INFO_TYPE_QUEUE_PROPERTIES = 0x00000002,
561 VK_PHYSICAL_DEVICE_INFO_TYPE_MEMORY_PROPERTIES = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600562
Tony Barbourd1c35722015-04-16 15:59:00 -0600563 VK_ENUM_RANGE(PHYSICAL_DEVICE_INFO_TYPE, PROPERTIES, MEMORY_PROPERTIES)
564} VkPhysicalDeviceInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600565
Jon Ashburn9fd4cc42015-04-10 14:33:07 -0600566typedef enum VkExtensionInfoType_
567{
568 // Info type for vkGetGlobalExtensionInfo() and vkGetPhysicalDeviceExtensionInfo()
569 VK_EXTENSION_INFO_TYPE_COUNT = 0x00000000,
570 VK_EXTENSION_INFO_TYPE_PROPERTIES = 0x00000001,
571
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -0600572 VK_ENUM_RANGE(EXTENSION_INFO_TYPE, COUNT, PROPERTIES)
Jon Ashburn9fd4cc42015-04-10 14:33:07 -0600573} VkExtensionInfoType;
574
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600575typedef enum VkFormatInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600576{
577 // Info type for vkGetFormatInfo()
Tony Barbourd1c35722015-04-16 15:59:00 -0600578 VK_FORMAT_INFO_TYPE_PROPERTIES = 0x00000000,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600579
Tony Barbourd1c35722015-04-16 15:59:00 -0600580 VK_ENUM_RANGE(FORMAT_INFO_TYPE, PROPERTIES, PROPERTIES)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600581} VkFormatInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600582
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600583typedef enum VkSubresourceInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600584{
585 // Info type for vkGetImageSubresourceInfo()
Tony Barbourd1c35722015-04-16 15:59:00 -0600586 VK_SUBRESOURCE_INFO_TYPE_LAYOUT = 0x00000000,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600587
Tony Barbourd1c35722015-04-16 15:59:00 -0600588 VK_ENUM_RANGE(SUBRESOURCE_INFO_TYPE, LAYOUT, LAYOUT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600589} VkSubresourceInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600590
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600591typedef enum VkObjectInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600592{
593 // Info type for vkGetObjectInfo()
Tony Barbourd1c35722015-04-16 15:59:00 -0600594 VK_OBJECT_INFO_TYPE_MEMORY_ALLOCATION_COUNT = 0x00000000,
595 VK_OBJECT_INFO_TYPE_MEMORY_REQUIREMENTS = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600596
Tony Barbourd1c35722015-04-16 15:59:00 -0600597 VK_ENUM_RANGE(OBJECT_INFO_TYPE, MEMORY_ALLOCATION_COUNT, MEMORY_REQUIREMENTS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600598} VkObjectInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600599
Tony Barbourd1c35722015-04-16 15:59:00 -0600600typedef enum VkVertexInputStepRate_
601{
602 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
603 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
604 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
605
606 VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW)
607} VkVertexInputStepRate;
608
Tony Barbourd1c35722015-04-16 15:59:00 -0600609// Vulkan format definitions
610typedef enum VkFormat_
611{
612 VK_FORMAT_UNDEFINED = 0x00000000,
613 VK_FORMAT_R4G4_UNORM = 0x00000001,
614 VK_FORMAT_R4G4_USCALED = 0x00000002,
615 VK_FORMAT_R4G4B4A4_UNORM = 0x00000003,
616 VK_FORMAT_R4G4B4A4_USCALED = 0x00000004,
617 VK_FORMAT_R5G6B5_UNORM = 0x00000005,
618 VK_FORMAT_R5G6B5_USCALED = 0x00000006,
619 VK_FORMAT_R5G5B5A1_UNORM = 0x00000007,
620 VK_FORMAT_R5G5B5A1_USCALED = 0x00000008,
621 VK_FORMAT_R8_UNORM = 0x00000009,
622 VK_FORMAT_R8_SNORM = 0x0000000A,
623 VK_FORMAT_R8_USCALED = 0x0000000B,
624 VK_FORMAT_R8_SSCALED = 0x0000000C,
625 VK_FORMAT_R8_UINT = 0x0000000D,
626 VK_FORMAT_R8_SINT = 0x0000000E,
627 VK_FORMAT_R8_SRGB = 0x0000000F,
628 VK_FORMAT_R8G8_UNORM = 0x00000010,
629 VK_FORMAT_R8G8_SNORM = 0x00000011,
630 VK_FORMAT_R8G8_USCALED = 0x00000012,
631 VK_FORMAT_R8G8_SSCALED = 0x00000013,
632 VK_FORMAT_R8G8_UINT = 0x00000014,
633 VK_FORMAT_R8G8_SINT = 0x00000015,
634 VK_FORMAT_R8G8_SRGB = 0x00000016,
635 VK_FORMAT_R8G8B8_UNORM = 0x00000017,
636 VK_FORMAT_R8G8B8_SNORM = 0x00000018,
637 VK_FORMAT_R8G8B8_USCALED = 0x00000019,
638 VK_FORMAT_R8G8B8_SSCALED = 0x0000001A,
639 VK_FORMAT_R8G8B8_UINT = 0x0000001B,
640 VK_FORMAT_R8G8B8_SINT = 0x0000001C,
641 VK_FORMAT_R8G8B8_SRGB = 0x0000001D,
642 VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E,
643 VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F,
644 VK_FORMAT_R8G8B8A8_USCALED = 0x00000020,
645 VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021,
646 VK_FORMAT_R8G8B8A8_UINT = 0x00000022,
647 VK_FORMAT_R8G8B8A8_SINT = 0x00000023,
648 VK_FORMAT_R8G8B8A8_SRGB = 0x00000024,
649 VK_FORMAT_R10G10B10A2_UNORM = 0x00000025,
650 VK_FORMAT_R10G10B10A2_SNORM = 0x00000026,
651 VK_FORMAT_R10G10B10A2_USCALED = 0x00000027,
652 VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028,
653 VK_FORMAT_R10G10B10A2_UINT = 0x00000029,
654 VK_FORMAT_R10G10B10A2_SINT = 0x0000002A,
655 VK_FORMAT_R16_UNORM = 0x0000002B,
656 VK_FORMAT_R16_SNORM = 0x0000002C,
657 VK_FORMAT_R16_USCALED = 0x0000002D,
658 VK_FORMAT_R16_SSCALED = 0x0000002E,
659 VK_FORMAT_R16_UINT = 0x0000002F,
660 VK_FORMAT_R16_SINT = 0x00000030,
661 VK_FORMAT_R16_SFLOAT = 0x00000031,
662 VK_FORMAT_R16G16_UNORM = 0x00000032,
663 VK_FORMAT_R16G16_SNORM = 0x00000033,
664 VK_FORMAT_R16G16_USCALED = 0x00000034,
665 VK_FORMAT_R16G16_SSCALED = 0x00000035,
666 VK_FORMAT_R16G16_UINT = 0x00000036,
667 VK_FORMAT_R16G16_SINT = 0x00000037,
668 VK_FORMAT_R16G16_SFLOAT = 0x00000038,
669 VK_FORMAT_R16G16B16_UNORM = 0x00000039,
670 VK_FORMAT_R16G16B16_SNORM = 0x0000003A,
671 VK_FORMAT_R16G16B16_USCALED = 0x0000003B,
672 VK_FORMAT_R16G16B16_SSCALED = 0x0000003C,
673 VK_FORMAT_R16G16B16_UINT = 0x0000003D,
674 VK_FORMAT_R16G16B16_SINT = 0x0000003E,
675 VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F,
676 VK_FORMAT_R16G16B16A16_UNORM = 0x00000040,
677 VK_FORMAT_R16G16B16A16_SNORM = 0x00000041,
678 VK_FORMAT_R16G16B16A16_USCALED = 0x00000042,
679 VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043,
680 VK_FORMAT_R16G16B16A16_UINT = 0x00000044,
681 VK_FORMAT_R16G16B16A16_SINT = 0x00000045,
682 VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046,
683 VK_FORMAT_R32_UINT = 0x00000047,
684 VK_FORMAT_R32_SINT = 0x00000048,
685 VK_FORMAT_R32_SFLOAT = 0x00000049,
686 VK_FORMAT_R32G32_UINT = 0x0000004A,
687 VK_FORMAT_R32G32_SINT = 0x0000004B,
688 VK_FORMAT_R32G32_SFLOAT = 0x0000004C,
689 VK_FORMAT_R32G32B32_UINT = 0x0000004D,
690 VK_FORMAT_R32G32B32_SINT = 0x0000004E,
691 VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F,
692 VK_FORMAT_R32G32B32A32_UINT = 0x00000050,
693 VK_FORMAT_R32G32B32A32_SINT = 0x00000051,
694 VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052,
695 VK_FORMAT_R64_SFLOAT = 0x00000053,
696 VK_FORMAT_R64G64_SFLOAT = 0x00000054,
697 VK_FORMAT_R64G64B64_SFLOAT = 0x00000055,
698 VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056,
699 VK_FORMAT_R11G11B10_UFLOAT = 0x00000057,
700 VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058,
701 VK_FORMAT_D16_UNORM = 0x00000059,
702 VK_FORMAT_D24_UNORM = 0x0000005A,
703 VK_FORMAT_D32_SFLOAT = 0x0000005B,
704 VK_FORMAT_S8_UINT = 0x0000005C,
705 VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D,
706 VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E,
707 VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F,
708 VK_FORMAT_BC1_RGB_UNORM = 0x00000060,
709 VK_FORMAT_BC1_RGB_SRGB = 0x00000061,
710 VK_FORMAT_BC1_RGBA_UNORM = 0x00000062,
711 VK_FORMAT_BC1_RGBA_SRGB = 0x00000063,
712 VK_FORMAT_BC2_UNORM = 0x00000064,
713 VK_FORMAT_BC2_SRGB = 0x00000065,
714 VK_FORMAT_BC3_UNORM = 0x00000066,
715 VK_FORMAT_BC3_SRGB = 0x00000067,
716 VK_FORMAT_BC4_UNORM = 0x00000068,
717 VK_FORMAT_BC4_SNORM = 0x00000069,
718 VK_FORMAT_BC5_UNORM = 0x0000006A,
719 VK_FORMAT_BC5_SNORM = 0x0000006B,
720 VK_FORMAT_BC6H_UFLOAT = 0x0000006C,
721 VK_FORMAT_BC6H_SFLOAT = 0x0000006D,
722 VK_FORMAT_BC7_UNORM = 0x0000006E,
723 VK_FORMAT_BC7_SRGB = 0x0000006F,
724 VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070,
725 VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071,
726 VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072,
727 VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073,
728 VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074,
729 VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075,
730 VK_FORMAT_EAC_R11_UNORM = 0x00000076,
731 VK_FORMAT_EAC_R11_SNORM = 0x00000077,
732 VK_FORMAT_EAC_R11G11_UNORM = 0x00000078,
733 VK_FORMAT_EAC_R11G11_SNORM = 0x00000079,
734 VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A,
735 VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B,
736 VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C,
737 VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D,
738 VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E,
739 VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F,
740 VK_FORMAT_ASTC_6x5_UNORM = 0x00000080,
741 VK_FORMAT_ASTC_6x5_SRGB = 0x00000081,
742 VK_FORMAT_ASTC_6x6_UNORM = 0x00000082,
743 VK_FORMAT_ASTC_6x6_SRGB = 0x00000083,
744 VK_FORMAT_ASTC_8x5_UNORM = 0x00000084,
745 VK_FORMAT_ASTC_8x5_SRGB = 0x00000085,
746 VK_FORMAT_ASTC_8x6_UNORM = 0x00000086,
747 VK_FORMAT_ASTC_8x6_SRGB = 0x00000087,
748 VK_FORMAT_ASTC_8x8_UNORM = 0x00000088,
749 VK_FORMAT_ASTC_8x8_SRGB = 0x00000089,
750 VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A,
751 VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B,
752 VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C,
753 VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D,
754 VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E,
755 VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F,
756 VK_FORMAT_ASTC_10x10_UNORM = 0x00000090,
757 VK_FORMAT_ASTC_10x10_SRGB = 0x00000091,
758 VK_FORMAT_ASTC_12x10_UNORM = 0x00000092,
759 VK_FORMAT_ASTC_12x10_SRGB = 0x00000093,
760 VK_FORMAT_ASTC_12x12_UNORM = 0x00000094,
761 VK_FORMAT_ASTC_12x12_SRGB = 0x00000095,
762 VK_FORMAT_B4G4R4A4_UNORM = 0x00000096,
763 VK_FORMAT_B5G5R5A1_UNORM = 0x00000097,
764 VK_FORMAT_B5G6R5_UNORM = 0x00000098,
765 VK_FORMAT_B5G6R5_USCALED = 0x00000099,
766 VK_FORMAT_B8G8R8_UNORM = 0x0000009A,
767 VK_FORMAT_B8G8R8_SNORM = 0x0000009B,
768 VK_FORMAT_B8G8R8_USCALED = 0x0000009C,
769 VK_FORMAT_B8G8R8_SSCALED = 0x0000009D,
770 VK_FORMAT_B8G8R8_UINT = 0x0000009E,
771 VK_FORMAT_B8G8R8_SINT = 0x0000009F,
772 VK_FORMAT_B8G8R8_SRGB = 0x000000A0,
773 VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1,
774 VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2,
775 VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3,
776 VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4,
777 VK_FORMAT_B8G8R8A8_UINT = 0x000000A5,
778 VK_FORMAT_B8G8R8A8_SINT = 0x000000A6,
779 VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7,
780 VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8,
781 VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9,
782 VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA,
783 VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB,
784 VK_FORMAT_B10G10R10A2_UINT = 0x000000AC,
785 VK_FORMAT_B10G10R10A2_SINT = 0x000000AD,
786
787 VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT)
788} VkFormat;
789
790// Shader stage enumerant
791typedef enum VkShaderStage_
792{
793 VK_SHADER_STAGE_VERTEX = 0,
794 VK_SHADER_STAGE_TESS_CONTROL = 1,
795 VK_SHADER_STAGE_TESS_EVALUATION = 2,
796 VK_SHADER_STAGE_GEOMETRY = 3,
797 VK_SHADER_STAGE_FRAGMENT = 4,
798 VK_SHADER_STAGE_COMPUTE = 5,
799
800 VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE)
801} VkShaderStage;
802
803// Structure type enumerant
804typedef enum VkStructureType_
805{
806 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
807 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
808 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
809 VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO = 3,
810 VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO = 4,
811 VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO = 5,
812 VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO = 6,
813 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 7,
814 VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 8,
815 VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 9,
816 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 10,
817 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 11,
818 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 12,
819 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 13,
820 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 14,
821 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 15,
822 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 16,
823 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 17,
824 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 18,
825 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 19,
826 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 20,
827 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 21,
828 VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO = 22,
829 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 23,
830 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 24,
831 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 25,
832 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO = 26,
833 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 27,
834 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 28,
835 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 29,
836 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 30,
837 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 31,
838 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 32,
839 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 33,
840 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 34,
841 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 35,
842 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 36,
843 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
844 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 38,
845 VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO = 39,
846 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 40,
847 VK_STRUCTURE_TYPE_LAYER_CREATE_INFO = 41,
848 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 42,
849 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 43,
850 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 44,
851 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 45,
852 VK_STRUCTURE_TYPE_UPDATE_SAMPLERS = 46,
853 VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES = 47,
854 VK_STRUCTURE_TYPE_UPDATE_IMAGES = 48,
855 VK_STRUCTURE_TYPE_UPDATE_BUFFERS = 49,
856 VK_STRUCTURE_TYPE_UPDATE_AS_COPY = 50,
857 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 51,
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500858 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 52,
Tony Barbourd1c35722015-04-16 15:59:00 -0600859
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500860 VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, PIPELINE_LAYOUT_CREATE_INFO)
Tony Barbourd1c35722015-04-16 15:59:00 -0600861} VkStructureType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600862
Mike Stroyanb050c682015-04-17 12:36:38 -0600863// Object type enumerant
864typedef enum VkObjectType_
865{
866 VK_OBJECT_TYPE_INSTANCE = 0,
867 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1,
868 VK_OBJECT_TYPE_DEVICE = 2,
869 VK_OBJECT_TYPE_QUEUE = 3,
870 VK_OBJECT_TYPE_COMMAND_BUFFER = 4,
871 VK_OBJECT_TYPE_DEVICE_MEMORY = 5,
872 VK_OBJECT_TYPE_BUFFER = 6,
873 VK_OBJECT_TYPE_BUFFER_VIEW = 7,
874 VK_OBJECT_TYPE_IMAGE = 8,
875 VK_OBJECT_TYPE_IMAGE_VIEW = 9,
876 VK_OBJECT_TYPE_COLOR_ATTACHMENT_VIEW = 10,
877 VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW = 11,
878 VK_OBJECT_TYPE_SHADER = 12,
879 VK_OBJECT_TYPE_PIPELINE = 13,
880 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 14,
881 VK_OBJECT_TYPE_SAMPLER = 15,
882 VK_OBJECT_TYPE_DESCRIPTOR_SET = 16,
883 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 17,
884 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 18,
885 VK_OBJECT_TYPE_DYNAMIC_VP_STATE = 19,
886 VK_OBJECT_TYPE_DYNAMIC_RS_STATE = 20,
887 VK_OBJECT_TYPE_DYNAMIC_CB_STATE = 21,
888 VK_OBJECT_TYPE_DYNAMIC_DS_STATE = 22,
889 VK_OBJECT_TYPE_FENCE = 23,
890 VK_OBJECT_TYPE_SEMAPHORE = 24,
891 VK_OBJECT_TYPE_EVENT = 25,
892 VK_OBJECT_TYPE_QUERY_POOL = 26,
893 VK_OBJECT_TYPE_FRAMEBUFFER = 27,
894 VK_OBJECT_TYPE_RENDER_PASS = 28,
895
896 // Valid ranges for core Vulkan:
897 VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE,
898 VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_RENDER_PASS,
899 VK_NUM_OBJECT_TYPE = (VK_OBJECT_TYPE_END_RANGE - VK_OBJECT_TYPE_BEGIN_RANGE + 1),
900 VK_MAX_ENUM(VkObjectType)
901} VkObjectType;
902
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600903// ------------------------------------------------------------------------------------------------
904// Error and return codes
905
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600906typedef enum VkResult_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600907{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600908 // Return codes for successful operation execution (> = 0)
909 VK_SUCCESS = 0x0000000,
910 VK_UNSUPPORTED = 0x0000001,
911 VK_NOT_READY = 0x0000002,
912 VK_TIMEOUT = 0x0000003,
913 VK_EVENT_SET = 0x0000004,
914 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600915
916 // Error codes (negative values)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600917 VK_ERROR_UNKNOWN = -(0x00000001),
918 VK_ERROR_UNAVAILABLE = -(0x00000002),
919 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
Tony Barbourd1c35722015-04-16 15:59:00 -0600920 VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004),
921 VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005),
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600922 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
923 VK_ERROR_DEVICE_LOST = -(0x00000007),
924 VK_ERROR_INVALID_POINTER = -(0x00000008),
925 VK_ERROR_INVALID_VALUE = -(0x00000009),
926 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
927 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
928 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
929 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
930 VK_ERROR_INVALID_FLAGS = -(0x0000000E),
931 VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F),
932 VK_ERROR_INVALID_FORMAT = -(0x00000010),
933 VK_ERROR_INVALID_IMAGE = -(0x00000011),
934 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012),
935 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013),
936 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014),
937 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015),
938 VK_ERROR_BAD_SHADER_CODE = -(0x00000016),
939 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017),
940 VK_ERROR_TOO_MANY_MEMORY_REFERENCES = -(0x00000018),
941 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
942 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
943 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
944 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
945 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
946 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
947 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
948 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
949 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
950 VK_ERROR_NOT_SHAREABLE = -(0x00000022),
Tony Barbourd1c35722015-04-16 15:59:00 -0600951
952 VK_MAX_ENUM(RESULT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600953} VkResult;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600954
955// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600956// Flags
957
958// Device creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -0600959typedef VkFlags VkDeviceCreateFlags;
960typedef enum VkDeviceCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600961{
Tony Barbourd1c35722015-04-16 15:59:00 -0600962 VK_DEVICE_CREATE_VALIDATION_BIT = VK_BIT(0),
963 VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT = VK_BIT(1),
964} VkDeviceCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600965
966// Queue capabilities
Tony Barbourd1c35722015-04-16 15:59:00 -0600967typedef VkFlags VkQueueFlags;
968typedef enum VkQueueFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600969{
Tony Barbourd1c35722015-04-16 15:59:00 -0600970 VK_QUEUE_GRAPHICS_BIT = VK_BIT(0), // Queue supports graphics operations
971 VK_QUEUE_COMPUTE_BIT = VK_BIT(1), // Queue supports compute operations
972 VK_QUEUE_DMA_BIT = VK_BIT(2), // Queue supports DMA operations
973 VK_QUEUE_MEMMGR_BIT = VK_BIT(3), // Queue supports memory management operations
974 VK_QUEUE_EXTENDED_BIT = VK_BIT(30), // Extended queue
975} VkQueueFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600976
Tony Barbourd1c35722015-04-16 15:59:00 -0600977// Memory properties passed into vkAllocMemory().
978typedef VkFlags VkMemoryPropertyFlags;
979typedef enum VkMemoryPropertyFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600980{
Tony Barbourd1c35722015-04-16 15:59:00 -0600981 VK_MEMORY_PROPERTY_DEVICE_ONLY = 0, // If otherwise stated, then allocate memory on device
982 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = VK_BIT(0), // Memory should be mappable by host
983 VK_MEMORY_PROPERTY_HOST_DEVICE_COHERENT_BIT = VK_BIT(1), // Memory should be coherent between host and device accesses
984 VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = VK_BIT(2), // Memory should not be cached by the host
985 VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = VK_BIT(3), // Memory should support host write combining
986 VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL = VK_BIT(4), // If set, prefer host access
987 VK_MEMORY_PROPERTY_SHAREABLE_BIT = VK_BIT(5),
988} VkMemoryPropertyFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600989
Tony Barbourd1c35722015-04-16 15:59:00 -0600990// Memory output flags passed to resource transition commands
991typedef VkFlags VkMemoryOutputFlags;
992typedef enum VkMemoryOutputFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600993{
Tony Barbourd1c35722015-04-16 15:59:00 -0600994 VK_MEMORY_OUTPUT_CPU_WRITE_BIT = VK_BIT(0), // Controls output coherency of CPU writes
995 VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes
996 VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes
997 VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes
998 VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations
999} VkMemoryOutputFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001000
Tony Barbourd1c35722015-04-16 15:59:00 -06001001// Memory input flags passed to resource transition commands
1002typedef VkFlags VkMemoryInputFlags;
1003typedef enum VkMemoryInputFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001004{
Tony Barbourd1c35722015-04-16 15:59:00 -06001005 VK_MEMORY_INPUT_CPU_READ_BIT = VK_BIT(0), // Controls input coherency of CPU reads
1006 VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads
1007 VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches
1008 VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches
1009 VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads
1010 VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads
1011 VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads
1012 VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads
1013 VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(8), // Controls input coherency of transfer operations
1014} VkMemoryInputFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001015
Tony Barbourd1c35722015-04-16 15:59:00 -06001016// Buffer usage flags
1017typedef VkFlags VkBufferUsageFlags;
1018typedef enum VkBufferUsageFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001019{
Tony Barbourd1c35722015-04-16 15:59:00 -06001020 VK_BUFFER_USAGE_GENERAL = 0, // No special usage
1021 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
1022 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
1023 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(2), // Can be used as TBO
1024 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(3), // Can be used as IBO
1025 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = VK_BIT(4), // Can be used as UBO
1026 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = VK_BIT(5), // Can be used as SSBO
1027 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = VK_BIT(6), // Can be used as source of fixed function index fetch (index buffer)
1028 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = VK_BIT(7), // Can be used as source of fixed function vertex fetch (VBO)
1029 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = VK_BIT(8), // Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1030} VkBufferUsageFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001031
Tony Barbourd1c35722015-04-16 15:59:00 -06001032// Buffer creation flags
1033typedef VkFlags VkBufferCreateFlags;
1034typedef enum VkBufferCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001035{
Tony Barbourd1c35722015-04-16 15:59:00 -06001036 VK_BUFFER_CREATE_SHAREABLE_BIT = VK_BIT(0), // Buffer should be shareable
1037 VK_BUFFER_CREATE_SPARSE_BIT = VK_BIT(1), // Buffer should support sparse backing
1038} VkBufferCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001039
Tony Barbourd1c35722015-04-16 15:59:00 -06001040// Shader stage flags
1041typedef VkFlags VkShaderStageFlags;
1042typedef enum VkShaderStageFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001043{
Tony Barbourd1c35722015-04-16 15:59:00 -06001044 VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0),
1045 VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1),
1046 VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2),
1047 VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3),
1048 VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4),
1049 VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5),
1050
1051 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1052} VkShaderStageFlagBits;
1053
1054// Image usage flags
1055typedef VkFlags VkImageUsageFlags;
1056typedef enum VkImageUsageFlagBits_
1057{
1058 VK_IMAGE_USAGE_GENERAL = 0, // No special usage
1059 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
1060 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
1061 VK_IMAGE_USAGE_SAMPLED_BIT = VK_BIT(2), // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1062 VK_IMAGE_USAGE_STORAGE_BIT = VK_BIT(3), // Can be used as storage image (STORAGE_IMAGE descriptor type)
1063 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = VK_BIT(4), // Can be used as framebuffer color attachment
1064 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = VK_BIT(5), // Can be used as framebuffer depth/stencil attachment
1065 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = VK_BIT(6), // Image data not needed outside of rendering
1066} VkImageUsageFlagBits;
1067
1068// Image creation flags
1069typedef VkFlags VkImageCreateFlags;
1070typedef enum VkImageCreateFlagBits_
1071{
1072 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = VK_BIT(0),
1073 VK_IMAGE_CREATE_CLONEABLE_BIT = VK_BIT(1),
1074 VK_IMAGE_CREATE_SHAREABLE_BIT = VK_BIT(2), // Image should be shareable
1075 VK_IMAGE_CREATE_SPARSE_BIT = VK_BIT(3), // Image should support sparse backing
1076 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = VK_BIT(4), // Allows image views to have different format than the base image
1077 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = VK_BIT(5), // Allows creating image views with cube type from the created image
1078} VkImageCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001079
1080// Depth-stencil view creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001081typedef VkFlags VkDepthStencilViewCreateFlags;
1082typedef enum VkDepthStencilViewCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001083{
Tony Barbourd1c35722015-04-16 15:59:00 -06001084 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_DEPTH_BIT = VK_BIT(0),
1085 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = VK_BIT(1),
1086} VkDepthStencilViewCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001087
1088// Pipeline creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001089typedef VkFlags VkPipelineCreateFlags;
1090typedef enum VkPipelineCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001091{
Tony Barbourd1c35722015-04-16 15:59:00 -06001092 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0),
1093 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1),
1094} VkPipelineCreateFlagBits;
1095
1096// Channel flags
1097typedef VkFlags VkChannelFlags;
1098typedef enum VkChannelFlagBits_
1099{
1100 VK_CHANNEL_R_BIT = VK_BIT(0),
1101 VK_CHANNEL_G_BIT = VK_BIT(1),
1102 VK_CHANNEL_B_BIT = VK_BIT(2),
1103 VK_CHANNEL_A_BIT = VK_BIT(3),
1104} VkChannelFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001105
1106// Fence creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001107typedef VkFlags VkFenceCreateFlags;
1108typedef enum VkFenceCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001109{
Tony Barbourd1c35722015-04-16 15:59:00 -06001110 VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0),
1111} VkFenceCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001112
1113// Semaphore creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001114typedef VkFlags VkSemaphoreCreateFlags;
1115typedef enum VkSemaphoreCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001116{
Tony Barbourd1c35722015-04-16 15:59:00 -06001117 VK_SEMAPHORE_CREATE_SHAREABLE_BIT = VK_BIT(0),
1118} VkSemaphoreCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001119
1120// Format capability flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001121typedef VkFlags VkFormatFeatureFlags;
1122typedef enum VkFormatFeatureFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001123{
Tony Barbourd1c35722015-04-16 15:59:00 -06001124 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1125 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1126 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images
1127 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs)
1128 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs)
1129 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers
1130 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs)
1131 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images
1132 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images
1133 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images
1134 VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits
1135} VkFormatFeatureFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001136
Tony Barbourd1c35722015-04-16 15:59:00 -06001137// Query control flags
1138typedef VkFlags VkQueryControlFlags;
1139typedef enum VkQueryControlFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001140{
Tony Barbourd1c35722015-04-16 15:59:00 -06001141 VK_QUERY_CONTROL_CONSERVATIVE_BIT = VK_BIT(0), // Allow conservative results to be collected by the query
1142} VkQueryControlFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001143
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001144// Query result flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001145typedef VkFlags VkQueryResultFlags;
1146typedef enum VkQueryResultFlagBits_
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001147{
Tony Barbourd1c35722015-04-16 15:59:00 -06001148 VK_QUERY_RESULT_32_BIT = 0, // Results of the queries are written to the destination buffer as 32-bit values
1149 VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values
Courtney Goeltzenleuchter3b6dfc12015-04-16 21:44:35 -06001150 // TODO: need to resolve removal of this enum. see bug 13466 for details
Tony Barbourd1c35722015-04-16 15:59:00 -06001151 // VK_QUERY_RESULT_NO_WAIT_BIT = 0, // Results of the queries aren't waited on before proceeding with the result copy
1152 VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy
1153 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written
1154 VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available
1155} VkQueryResultFlagBits;
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001156
Tony Barbourd1c35722015-04-16 15:59:00 -06001157// Physical device compatibility flags
1158typedef VkFlags VkPhysicalDeviceCompatibilityFlags;
1159typedef enum VkPhysicalDeviceCompatibilityFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001160{
Tony Barbourd1c35722015-04-16 15:59:00 -06001161 VK_PHYSICAL_DEVICE_COMPATIBILITY_FEATURES_BIT = VK_BIT(0),
1162 VK_PHYSICAL_DEVICE_COMPATIBILITY_IQ_MATCH_BIT = VK_BIT(1),
1163 VK_PHYSICAL_DEVICE_COMPATIBILITY_PEER_TRANSFER_BIT = VK_BIT(2),
1164 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_MEMORY_BIT = VK_BIT(3),
1165 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_SYNC_BIT = VK_BIT(4),
1166 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_DEVICE0_DISPLAY_BIT = VK_BIT(5),
1167 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_DEVICE1_DISPLAY_BIT = VK_BIT(6),
1168} VkPhysicalDeviceCompatibilityFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001169
Tony Barbourd1c35722015-04-16 15:59:00 -06001170// Shader creation flags
1171typedef VkFlags VkShaderCreateFlags;
1172
1173// Event creation flags
1174typedef VkFlags VkEventCreateFlags;
1175
1176// Command buffer creation flags
1177typedef VkFlags VkCmdBufferCreateFlags;
1178
1179// Command buffer optimization flags
1180typedef VkFlags VkCmdBufferOptimizeFlags;
1181typedef enum VkCmdBufferOptimizeFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001182{
Tony Barbourd1c35722015-04-16 15:59:00 -06001183 VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0),
1184 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1),
1185 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2),
1186 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3),
1187} VkCmdBufferOptimizeFlagBits;
1188
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06001189// Pipeline statistics flags
1190typedef VkFlags VkQueryPipelineStatisticFlags;
1191typedef enum VkQueryPipelineStatisticFlagBits_ {
1192 VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = VK_BIT(0), // Optional
1193 VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = VK_BIT(1), // Optional
1194 VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = VK_BIT(2), // Optional
1195 VK_QUERY_PIPELINE_STATISTIC_GS_INVOCATIONS_BIT = VK_BIT(3), // Optional
1196 VK_QUERY_PIPELINE_STATISTIC_GS_PRIMITIVES_BIT = VK_BIT(4), // Optional
1197 VK_QUERY_PIPELINE_STATISTIC_C_INVOCATIONS_BIT = VK_BIT(5), // Optional
1198 VK_QUERY_PIPELINE_STATISTIC_C_PRIMITIVES_BIT = VK_BIT(6), // Optional
1199 VK_QUERY_PIPELINE_STATISTIC_FS_INVOCATIONS_BIT = VK_BIT(7), // Optional
1200 VK_QUERY_PIPELINE_STATISTIC_TCS_PATCHES_BIT = VK_BIT(8), // Optional
1201 VK_QUERY_PIPELINE_STATISTIC_TES_INVOCATIONS_BIT = VK_BIT(9), // Optional
1202 VK_QUERY_PIPELINE_STATISTIC_CS_INVOCATIONS_BIT = VK_BIT(10), // Optional
1203} VkQueryPipelineStatisticFlagBits;
1204
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06001205// Memory mapping flags
1206typedef VkFlags VkMemoryMapFlags;
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06001207
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001208// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001209// Vulkan structures
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001210
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001211typedef struct VkOffset2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001212{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001213 int32_t x;
1214 int32_t y;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001215} VkOffset2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001216
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001217typedef struct VkOffset3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001218{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001219 int32_t x;
1220 int32_t y;
1221 int32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001222} VkOffset3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001223
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001224typedef struct VkExtent2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001225{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001226 int32_t width;
1227 int32_t height;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001228} VkExtent2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001229
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001230typedef struct VkExtent3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001231{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001232 int32_t width;
1233 int32_t height;
1234 int32_t depth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001235} VkExtent3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001236
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001237typedef struct VkViewport_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001238{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001239 float originX;
1240 float originY;
1241 float width;
1242 float height;
1243 float minDepth;
1244 float maxDepth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001245} VkViewport;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001246
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001247typedef struct VkRect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001248{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001249 VkOffset2D offset;
1250 VkExtent2D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001251} VkRect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001252
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001253typedef struct VkChannelMapping_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001254{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001255 VkChannelSwizzle r;
1256 VkChannelSwizzle g;
1257 VkChannelSwizzle b;
1258 VkChannelSwizzle a;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001259} VkChannelMapping;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001260
Tony Barbourd1c35722015-04-16 15:59:00 -06001261typedef struct VkPhysicalDeviceProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001262{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001263 uint32_t apiVersion;
1264 uint32_t driverVersion;
1265 uint32_t vendorId;
1266 uint32_t deviceId;
Tony Barbourd1c35722015-04-16 15:59:00 -06001267 VkPhysicalDeviceType deviceType;
1268 char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
1269 VkDeviceSize maxInlineMemoryUpdateSize;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001270 uint32_t maxBoundDescriptorSets;
1271 uint32_t maxThreadGroupSize;
1272 uint64_t timestampFrequency;
1273 bool32_t multiColorAttachmentClears;
1274 uint32_t maxDescriptorSets; // at least 2?
1275 uint32_t maxViewports; // at least 16?
1276 uint32_t maxColorAttachments; // at least 8?
Tony Barbourd1c35722015-04-16 15:59:00 -06001277} VkPhysicalDeviceProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001278
Tony Barbourd1c35722015-04-16 15:59:00 -06001279typedef struct VkPhysicalDevicePerformance_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001280{
Tony Barbourd1c35722015-04-16 15:59:00 -06001281 float maxDeviceClock;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001282 float aluPerClock;
1283 float texPerClock;
1284 float primsPerClock;
1285 float pixelsPerClock;
Tony Barbourd1c35722015-04-16 15:59:00 -06001286} VkPhysicalDevicePerformance;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001287
Tony Barbourd1c35722015-04-16 15:59:00 -06001288typedef struct VkPhysicalDeviceCompatibilityInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001289{
Tony Barbourd1c35722015-04-16 15:59:00 -06001290 VkPhysicalDeviceCompatibilityFlags compatibilityFlags;
1291} VkPhysicalDeviceCompatibilityInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001292
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001293typedef struct VkExtensionProperties_
1294{
1295 char extName[VK_MAX_EXTENSION_NAME]; // extension name
1296 uint32_t version; // version of the extension specification
1297} VkExtensionProperties;
1298
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001299typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001300{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001301 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001302 const void* pNext; // Next structure in chain
1303 const char* pAppName;
1304 uint32_t appVersion;
1305 const char* pEngineName;
1306 uint32_t engineVersion;
1307 uint32_t apiVersion;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001308} VkApplicationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001309
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001310typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001311 void* pUserData,
1312 size_t size,
1313 size_t alignment,
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001314 VkSystemAllocType allocType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001315
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001316typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001317 void* pUserData,
1318 void* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001319
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001320typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001321{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001322 void* pUserData;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001323 PFN_vkAllocFunction pfnAlloc;
1324 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001325} VkAllocCallbacks;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001326
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001327typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001328{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001329 uint32_t queueNodeIndex;
1330 uint32_t queueCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001331} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001332
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001333typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001334{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001335 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001336 const void* pNext; // Pointer to next structure
1337 uint32_t queueRecordCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001338 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001339 uint32_t extensionCount;
1340 const char*const* ppEnabledExtensionNames;
Tony Barbourd1c35722015-04-16 15:59:00 -06001341 VkDeviceCreateFlags flags; // Device creation flags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001342} VkDeviceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001343
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001344typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001345{
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001346 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001347 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001348 const VkApplicationInfo* pAppInfo;
1349 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001350 uint32_t extensionCount;
1351 const char*const* ppEnabledExtensionNames; // layer or extension name to be enabled
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001352} VkInstanceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001353
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001354// can be added to VkDeviceCreateInfo via pNext
Mike Stroyanb050c682015-04-17 12:36:38 -06001355typedef struct VkLayerCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001356{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001357 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_LAYER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001358 const void* pNext; // Pointer to next structure
1359 uint32_t layerCount;
1360 const char *const* ppActiveLayerNames; // layer name from the layer's vkEnumerateLayers())
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001361} VkLayerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001362
Tony Barbourd1c35722015-04-16 15:59:00 -06001363typedef struct VkPhysicalDeviceQueueProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001364{
Tony Barbourd1c35722015-04-16 15:59:00 -06001365 VkQueueFlags queueFlags; // Queue flags
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001366 uint32_t queueCount;
1367 uint32_t maxAtomicCounters;
1368 bool32_t supportsTimestamps;
1369 uint32_t maxMemReferences; // Tells how many memory references can be active for the given queue
Tony Barbourd1c35722015-04-16 15:59:00 -06001370} VkPhysicalDeviceQueueProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001371
Tony Barbourd1c35722015-04-16 15:59:00 -06001372typedef struct VkPhysicalDeviceMemoryProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001373{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001374 bool32_t supportsMigration;
1375 bool32_t supportsPinning;
Tony Barbourd1c35722015-04-16 15:59:00 -06001376} VkPhysicalDeviceMemoryProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001377
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001378typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001379{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001380 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001381 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001382 VkDeviceSize allocationSize; // Size of memory allocation
1383 VkMemoryPropertyFlags memProps; // Memory property flags
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001384 VkMemoryPriority memPriority;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001385} VkMemoryAllocInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001386
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001387typedef struct VkMemoryOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001388{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001389 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001390 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001391 VkDeviceMemory sharedMem;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001392} VkMemoryOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001393
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001394typedef struct VkPeerMemoryOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001395{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001396 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001397 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001398 VkDeviceMemory originalMem;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001399} VkPeerMemoryOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001400
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001401typedef struct VkMemoryRequirements_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001402{
Tony Barbourd1c35722015-04-16 15:59:00 -06001403 VkDeviceSize size; // Specified in bytes
1404 VkDeviceSize alignment; // Specified in bytes
Tony Barbour71a85122015-04-16 19:09:28 -06001405 VkDeviceSize granularity; // Granularity on which vkQueueBindObjectMemoryRange can bind sub-ranges of memory specified in bytes (usually the page size)
Jeremy Hayes38ce2b12015-04-15 14:17:56 -06001406 VkMemoryPropertyFlags memPropsAllowed; // Allowed memory property flags
1407 VkMemoryPropertyFlags memPropsRequired; // Required memory property flags
Mike Stroyanb050c682015-04-17 12:36:38 -06001408
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001409} VkMemoryRequirements;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001410
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001411typedef struct VkFormatProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001412{
Tony Barbourd1c35722015-04-16 15:59:00 -06001413 VkFormatFeatureFlags linearTilingFeatures; // Format features in case of linear tiling
1414 VkFormatFeatureFlags optimalTilingFeatures; // Format features in case of optimal tiling
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001415} VkFormatProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001416
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001417typedef struct VkBufferViewAttachInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001418{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001419 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001420 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001421 VkBufferView view;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001422} VkBufferViewAttachInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001423
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001424typedef struct VkImageViewAttachInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001425{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001426 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001427 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001428 VkImageView view;
1429 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001430} VkImageViewAttachInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001431
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001432typedef struct VkUpdateSamplers_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001433{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001434 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLERS
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001435 const void* pNext; // Pointer to next structure
1436 uint32_t binding; // Binding of the sampler (array)
1437 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1438 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001439 const VkSampler* pSamplers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001440} VkUpdateSamplers;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001441
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001442typedef struct VkSamplerImageViewInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001443{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001444 VkSampler sampler;
1445 const VkImageViewAttachInfo* pImageView;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001446} VkSamplerImageViewInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001447
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001448typedef struct VkUpdateSamplerTextures_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001449{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001450 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001451 const void* pNext; // Pointer to next structure
1452 uint32_t binding; // Binding of the combined texture sampler (array)
1453 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1454 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001455 const VkSamplerImageViewInfo* pSamplerImageViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001456} VkUpdateSamplerTextures;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001457
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001458typedef struct VkUpdateImages_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001459{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001460 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_IMAGES
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001461 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001462 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001463 uint32_t binding; // Binding of the image (array)
1464 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1465 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001466 const VkImageViewAttachInfo* pImageViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001467} VkUpdateImages;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001468
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001469typedef struct VkUpdateBuffers_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001470{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001471 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_BUFFERS
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001472 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001473 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001474 uint32_t binding; // Binding of the buffer (array)
1475 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1476 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001477 const VkBufferViewAttachInfo* pBufferViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001478} VkUpdateBuffers;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001479
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001480typedef struct VkUpdateAsCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001481{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001482 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_AS_COPY
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001483 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001484 VkDescriptorType descriptorType;
1485 VkDescriptorSet descriptorSet;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001486 uint32_t binding;
1487 uint32_t arrayElement;
1488 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001489} VkUpdateAsCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001490
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001491typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001492{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001493 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001494 const void* pNext; // Pointer to next structure.
Tony Barbourd1c35722015-04-16 15:59:00 -06001495 VkDeviceSize size; // Specified in bytes
1496 VkBufferUsageFlags usage; // Buffer usage flags
1497 VkBufferCreateFlags flags; // Buffer creation flags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001498} VkBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001499
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001500typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001501{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001502 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001503 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001504 VkBuffer buffer;
1505 VkBufferViewType viewType;
1506 VkFormat format; // Optionally specifies format of elements
Tony Barbourd1c35722015-04-16 15:59:00 -06001507 VkDeviceSize offset; // Specified in bytes
1508 VkDeviceSize range; // View size specified in bytes
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001509} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001510
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001511typedef struct VkImageSubresource_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001512{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001513 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001514 uint32_t mipLevel;
1515 uint32_t arraySlice;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001516} VkImageSubresource;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001517
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001518typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001519{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001520 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001521 uint32_t baseMipLevel;
1522 uint32_t mipLevels;
1523 uint32_t baseArraySlice;
1524 uint32_t arraySize;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001525} VkImageSubresourceRange;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001526
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001527typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001528{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001529 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001530 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001531
Tony Barbourd1c35722015-04-16 15:59:00 -06001532 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1533 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001534} VkMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001535
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001536typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001537{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001538 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001539 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001540
Tony Barbourd1c35722015-04-16 15:59:00 -06001541 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1542 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001543
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001544 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001545
Tony Barbourd1c35722015-04-16 15:59:00 -06001546 VkDeviceSize offset; // Offset within the buffer to sync
1547 VkDeviceSize size; // Amount of bytes to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001548} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001549
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001550typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001551{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001552 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001553 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001554
Tony Barbourd1c35722015-04-16 15:59:00 -06001555 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1556 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001557
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001558 VkImageLayout oldLayout; // Current layout of the image
1559 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001560
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001561 VkImage image; // Image to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001562
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001563 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001564} VkImageMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001565
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001566typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001567{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001568 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001569 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001570 VkImageType imageType;
1571 VkFormat format;
1572 VkExtent3D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001573 uint32_t mipLevels;
1574 uint32_t arraySize;
1575 uint32_t samples;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001576 VkImageTiling tiling;
Tony Barbourd1c35722015-04-16 15:59:00 -06001577 VkImageUsageFlags usage; // Image usage flags
1578 VkImageCreateFlags flags; // Image creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001579} VkImageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001580
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001581typedef struct VkPeerImageOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001582{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001583 VkImage originalImage;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001584} VkPeerImageOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001585
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001586typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001587{
Tony Barbourd1c35722015-04-16 15:59:00 -06001588 VkDeviceSize offset; // Specified in bytes
1589 VkDeviceSize size; // Specified in bytes
1590 VkDeviceSize rowPitch; // Specified in bytes
1591 VkDeviceSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001592} VkSubresourceLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001593
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001594typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001595{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001596 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001597 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001598 VkImage image;
1599 VkImageViewType viewType;
1600 VkFormat format;
1601 VkChannelMapping channels;
1602 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001603 float minLod;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001604} VkImageViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001605
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001606typedef struct VkColorAttachmentViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001607{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001608 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001609 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001610 VkImage image;
1611 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001612 uint32_t mipLevel;
1613 uint32_t baseArraySlice;
1614 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001615 VkImage msaaResolveImage;
1616 VkImageSubresourceRange msaaResolveSubResource;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001617} VkColorAttachmentViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001618
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001619typedef struct VkDepthStencilViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001620{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001621 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001622 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001623 VkImage image;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001624 uint32_t mipLevel;
1625 uint32_t baseArraySlice;
1626 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001627 VkImage msaaResolveImage;
1628 VkImageSubresourceRange msaaResolveSubResource;
Tony Barbourd1c35722015-04-16 15:59:00 -06001629 VkDepthStencilViewCreateFlags flags; // Depth stencil attachment view flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001630} VkDepthStencilViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001631
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001632typedef struct VkColorAttachmentBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001633{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001634 VkColorAttachmentView view;
1635 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001636} VkColorAttachmentBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001637
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001638typedef struct VkDepthStencilBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001639{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001640 VkDepthStencilView view;
1641 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001642} VkDepthStencilBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001643
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001644typedef struct VkBufferCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001645{
Tony Barbourd1c35722015-04-16 15:59:00 -06001646 VkDeviceSize srcOffset; // Specified in bytes
1647 VkDeviceSize destOffset; // Specified in bytes
1648 VkDeviceSize copySize; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001649} VkBufferCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001650
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001651typedef struct VkImageMemoryBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001652{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001653 VkImageSubresource subresource;
1654 VkOffset3D offset;
1655 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001656} VkImageMemoryBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001657
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001658typedef struct VkImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001659{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001660 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001661 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001662 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001663 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1664 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001665} VkImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001666
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001667typedef struct VkImageBlit_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001668{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001669 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001670 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1671 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001672 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001673 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1674 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001675} VkImageBlit;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001676
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001677typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001678{
Tony Barbourd1c35722015-04-16 15:59:00 -06001679 VkDeviceSize bufferOffset; // Specified in bytes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001680 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001681 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1682 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001683} VkBufferImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001684
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001685typedef struct VkImageResolve_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001686{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001687 VkImageSubresource srcSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001688 VkOffset3D srcOffset;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001689 VkImageSubresource destSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001690 VkOffset3D destOffset;
1691 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001692} VkImageResolve;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001693
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001694typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001695{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001696 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001697 const void* pNext; // Pointer to next structure
1698 size_t codeSize; // Specified in bytes
1699 const void* pCode;
Tony Barbourd1c35722015-04-16 15:59:00 -06001700 VkShaderCreateFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001701} VkShaderCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001702
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001703typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001704{
Tony Barbourd1c35722015-04-16 15:59:00 -06001705 VkDescriptorType descriptorType; // Type of the descriptors in this binding
1706 uint32_t count; // Number of descriptors in this binding
1707 VkShaderStageFlags stageFlags; // Shader stages this binding is visible to
1708 const VkSampler* pImmutableSamplers; // Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001709} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001710
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001711typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001712{
Tony Barbourd1c35722015-04-16 15:59:00 -06001713 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
1714 const void* pNext; // Pointer to next structure
1715 uint32_t count; // Number of bindings in the descriptor set layout
1716 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001717} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001718
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001719typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001720{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001721 VkDescriptorType type;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001722 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001723} VkDescriptorTypeCount;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001724
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001725typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001726{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001727 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001728 const void* pNext; // Pointer to next structure
1729 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001730 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001731} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001732
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001733typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001734{
1735 uint32_t bufferId;
1736 size_t bufferSize;
1737 const void* pBufferData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001738} VkLinkConstBuffer;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001739
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001740typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001741{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001742 uint32_t constantId; // The SpecConstant ID specified in the BIL
1743 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001744} VkSpecializationMapEntry;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001745
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001746typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001747{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001748 uint32_t mapEntryCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001749 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001750 const void* pData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001751} VkSpecializationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001752
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001753typedef struct VkPipelineShader_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001754{
Tony Barbourd1c35722015-04-16 15:59:00 -06001755 VkShaderStage stage;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001756 VkShader shader;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001757 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001758 const VkLinkConstBuffer* pLinkConstBufferInfo;
1759 const VkSpecializationInfo* pSpecializationInfo;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001760} VkPipelineShader;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001761
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001762typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001763{
Tony Barbourd1c35722015-04-16 15:59:00 -06001764 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
1765 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001766 VkPipelineShader cs;
Tony Barbourd1c35722015-04-16 15:59:00 -06001767 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001768 VkPipelineLayout layout; // Interface layout of the pipeline
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001769} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001770
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001771typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001772{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001773 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001774 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001775
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001776 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001777} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001778
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001779typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001780{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001781 uint32_t location; // location of the shader vertex attrib
1782 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001783
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001784 VkFormat format; // format of source data
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001785
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001786 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001787} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001788
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001789typedef struct VkPipelineVertexInputCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001790{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001791 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001792 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001793
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001794 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001795 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001796
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001797 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001798 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001799} VkPipelineVertexInputCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001800
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001801typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001802{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001803 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001804 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001805 VkPrimitiveTopology topology;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001806 bool32_t disableVertexReuse; // optional
1807 bool32_t primitiveRestartEnable;
1808 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001809} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001810
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001811typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001812{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001813 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001814 const void* pNext; // Pointer to next structure
1815 uint32_t patchControlPoints;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001816} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001817
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001818typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001819{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001820 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001821 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001822 uint32_t viewportCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001823 VkCoordinateOrigin clipOrigin; // optional (GL45)
1824 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001825} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001826
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001827typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001828{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001829 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001830 const void* pNext; // Pointer to next structure
1831 bool32_t depthClipEnable;
1832 bool32_t rasterizerDiscardEnable;
1833 bool32_t programPointSize; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001834 VkCoordinateOrigin pointOrigin; // optional (GL45)
Tony Barbourd1c35722015-04-16 15:59:00 -06001835 VkProvokingVertex provokingVertex; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001836 VkFillMode fillMode; // optional (GL45)
1837 VkCullMode cullMode;
Tony Barbourd1c35722015-04-16 15:59:00 -06001838 VkFrontFace frontFace;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001839} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001840
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001841typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001842{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001843 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001844 const void* pNext; // Pointer to next structure
1845 uint32_t samples;
1846 bool32_t multisampleEnable; // optional (GL45)
1847 bool32_t sampleShadingEnable; // optional (GL45)
1848 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001849 VkSampleMask sampleMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001850} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001851
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001852typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001853{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001854 bool32_t blendEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001855 VkFormat format;
1856 VkBlend srcBlendColor;
1857 VkBlend destBlendColor;
Tony Barbourd1c35722015-04-16 15:59:00 -06001858 VkBlendOp blendOpColor;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001859 VkBlend srcBlendAlpha;
1860 VkBlend destBlendAlpha;
Tony Barbourd1c35722015-04-16 15:59:00 -06001861 VkBlendOp blendOpAlpha;
1862 VkChannelFlags channelWriteMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001863} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001864
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001865typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001866{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001867 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001868 const void* pNext; // Pointer to next structure
1869 bool32_t alphaToCoverageEnable;
1870 bool32_t logicOpEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001871 VkLogicOp logicOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001872 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001873 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001874} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001875
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001876typedef struct VkStencilOpState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001877{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001878 VkStencilOp stencilFailOp;
1879 VkStencilOp stencilPassOp;
1880 VkStencilOp stencilDepthFailOp;
Tony Barbourd1c35722015-04-16 15:59:00 -06001881 VkCompareOp stencilCompareOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001882} VkStencilOpState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001883
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001884typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001885{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001886 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001887 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001888 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001889 bool32_t depthTestEnable;
1890 bool32_t depthWriteEnable;
Tony Barbourd1c35722015-04-16 15:59:00 -06001891 VkCompareOp depthCompareOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001892 bool32_t depthBoundsEnable; // optional (depth_bounds_test)
1893 bool32_t stencilTestEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001894 VkStencilOpState front;
1895 VkStencilOpState back;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001896} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001897
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001898typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001899{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001900 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001901 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001902 VkPipelineShader shader;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001903} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001904
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001905typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001906{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001907 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001908 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001909 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001910 VkPipelineLayout layout; // Interface layout of the pipeline
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001911} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001912
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001913typedef struct VkPipelineLayoutCreateInfo_
1914{
1915 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
1916 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06001917
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001918 uint32_t descriptorSetCount; // Number of descriptor sets interfaced by the pipeline
1919 const VkDescriptorSetLayout* pSetLayouts; // Array of <setCount> number of descriptor set layout objects defining the layout of the
1920} VkPipelineLayoutCreateInfo;
1921
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001922typedef struct VkSamplerCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001923{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001924 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001925 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001926 VkTexFilter magFilter; // Filter mode for magnification
1927 VkTexFilter minFilter; // Filter mode for minifiation
1928 VkTexMipmapMode mipMode; // Mipmap selection mode
1929 VkTexAddress addressU;
1930 VkTexAddress addressV;
1931 VkTexAddress addressW;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001932 float mipLodBias;
1933 uint32_t maxAnisotropy;
Tony Barbourd1c35722015-04-16 15:59:00 -06001934 VkCompareOp compareOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001935 float minLod;
1936 float maxLod;
Tony Barbourd1c35722015-04-16 15:59:00 -06001937 VkBorderColor borderColor;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001938} VkSamplerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001939
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001940typedef struct VkDynamicVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001941{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001942 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001943 const void* pNext; // Pointer to next structure
1944 uint32_t viewportAndScissorCount; // number of entries in pViewports and pScissors
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001945 const VkViewport* pViewports;
1946 const VkRect* pScissors;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001947} VkDynamicVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001948
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001949typedef struct VkDynamicRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001950{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001951 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001952 const void* pNext; // Pointer to next structure
1953 float depthBias;
1954 float depthBiasClamp;
1955 float slopeScaledDepthBias;
1956 float pointSize; // optional (GL45) - Size of points
1957 float pointFadeThreshold; // optional (GL45) - Size of point fade threshold
1958 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001959} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001960
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001961typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001962{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001963 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001964 const void* pNext; // Pointer to next structure
1965 float blendConst[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001966} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001967
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001968typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001969{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001970 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001971 const void* pNext; // Pointer to next structure
1972 float minDepth; // optional (depth_bounds_test)
1973 float maxDepth; // optional (depth_bounds_test)
1974 uint32_t stencilReadMask;
1975 uint32_t stencilWriteMask;
1976 uint32_t stencilFrontRef;
1977 uint32_t stencilBackRef;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001978} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001979
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001980typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001981{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001982 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001983 const void* pNext; // Pointer to next structure
1984 uint32_t queueNodeIndex;
Tony Barbourd1c35722015-04-16 15:59:00 -06001985 VkCmdBufferCreateFlags flags; // Command buffer creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001986} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001987
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001988typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001989{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001990 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001991 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001992
Tony Barbourd1c35722015-04-16 15:59:00 -06001993 VkCmdBufferOptimizeFlags flags; // Command buffer optimization flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001994} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001995
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001996typedef struct VkRenderPassBegin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001997{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001998 VkRenderPass renderPass;
1999 VkFramebuffer framebuffer;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002000} VkRenderPassBegin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002001
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002002typedef struct VkCmdBufferGraphicsBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002003{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002004 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002005 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002006
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002007 VkRenderPassBegin renderPassContinue; // Only needed when a render pass is split across two command buffers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002008} VkCmdBufferGraphicsBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002009
2010// Union allowing specification of floating point or raw color data. Actual value selected is based on image being cleared.
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002011typedef union VkClearColorValue_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002012{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002013 float floatColor[4];
2014 uint32_t rawColor[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002015} VkClearColorValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002016
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002017typedef struct VkClearColor_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002018{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002019 VkClearColorValue color;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002020 bool32_t useRawValue;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002021} VkClearColor;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002022
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002023typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002024{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002025 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002026 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002027
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002028 VkRect renderArea;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002029 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002030 VkExtent2D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002031 uint32_t sampleCount;
2032 uint32_t layers;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002033 const VkFormat* pColorFormats;
2034 const VkImageLayout* pColorLayouts;
2035 const VkAttachmentLoadOp* pColorLoadOps;
2036 const VkAttachmentStoreOp* pColorStoreOps;
2037 const VkClearColor* pColorLoadClearValues;
2038 VkFormat depthStencilFormat;
2039 VkImageLayout depthStencilLayout;
2040 VkAttachmentLoadOp depthLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002041 float depthLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002042 VkAttachmentStoreOp depthStoreOp;
2043 VkAttachmentLoadOp stencilLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002044 uint32_t stencilLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002045 VkAttachmentStoreOp stencilStoreOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002046} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002047
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002048typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002049{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002050 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002051 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002052 VkEventCreateFlags flags; // Event creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002053} VkEventCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002054
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002055typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002056{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002057 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002058 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002059 VkFenceCreateFlags flags; // Fence creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002060} VkFenceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002061
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002062typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002063{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002064 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002065 const void* pNext; // Pointer to next structure
2066 uint32_t initialCount;
Tony Barbourd1c35722015-04-16 15:59:00 -06002067 VkSemaphoreCreateFlags flags; // Semaphore creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002068} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002069
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002070typedef struct VkSemaphoreOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002071{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002072 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002073 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002074 VkSemaphore sharedSemaphore;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002075} VkSemaphoreOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002076
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002077typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002078{
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06002079 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
2080 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002081 VkQueryType queryType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002082 uint32_t slots;
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06002083 VkQueryPipelineStatisticFlags pipelineStatistics; // Optional
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002084} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002085
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002086typedef struct VkFramebufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002087{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002088 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002089 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002090
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002091 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002092 const VkColorAttachmentBindInfo* pColorAttachments;
2093 const VkDepthStencilBindInfo* pDepthStencilAttachment;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002094
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002095 uint32_t sampleCount;
2096 uint32_t width;
2097 uint32_t height;
2098 uint32_t layers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002099} VkFramebufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002100
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002101typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002102{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002103 uint32_t vertexCount;
2104 uint32_t instanceCount;
2105 uint32_t firstVertex;
2106 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002107} VkDrawIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002108
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002109typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002110{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002111 uint32_t indexCount;
2112 uint32_t instanceCount;
2113 uint32_t firstIndex;
2114 int32_t vertexOffset;
2115 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002116} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002117
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002118typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002119{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002120 uint32_t x;
2121 uint32_t y;
2122 uint32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002123} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002124
2125// ------------------------------------------------------------------------------------------------
2126// API functions
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002127typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2128typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
Tony Barbourd1c35722015-04-16 15:59:00 -06002129typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
2130typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceInfo)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceInfoType infoType, size_t* pDataSize, void* pData);
2131typedef void * (VKAPI *PFN_vkGetProcAddr)(VkPhysicalDevice physicalDevice, const char * pName);
2132typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002133typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06002134typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionInfo)(VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -06002135typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionInfo)(VkPhysicalDevice physicalDevice, VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterd9dc0c72015-04-20 11:04:54 -06002136typedef VkResult (VKAPI *PFN_vkEnumerateLayers)(VkPhysicalDevice physicalDevice, size_t maxStringSize, size_t* pLayerCount, char* const* pOutLayers, void* pReserved);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002137typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2138typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
Tony Barbourd1c35722015-04-16 15:59:00 -06002139typedef VkResult (VKAPI *PFN_vkQueueAddMemReferences)(VkQueue queue, uint32_t count, const VkDeviceMemory* pMems);
2140typedef VkResult (VKAPI *PFN_vkQueueRemoveMemReferences)(VkQueue queue, uint32_t count, const VkDeviceMemory* pMems);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002141typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2142typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
Tony Barbourd1c35722015-04-16 15:59:00 -06002143typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
Mike Stroyanb050c682015-04-17 12:36:38 -06002144typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem);
2145typedef VkResult (VKAPI *PFN_vkSetMemoryPriority)(VkDevice device, VkDeviceMemory mem, VkMemoryPriority priority);
2146typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
2147typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
2148typedef VkResult (VKAPI *PFN_vkFlushMappedMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size);
Tony Barbourd1c35722015-04-16 15:59:00 -06002149typedef VkResult (VKAPI *PFN_vkPinSystemMemory)(VkDevice device, const void* pSysMem, size_t memSize, VkDeviceMemory* pMem);
2150typedef VkResult (VKAPI *PFN_vkGetMultiDeviceCompatibility)(VkPhysicalDevice physicalDevice0, VkPhysicalDevice physicalDevice1, VkPhysicalDeviceCompatibilityInfo* pInfo);
2151typedef VkResult (VKAPI *PFN_vkOpenSharedMemory)(VkDevice device, const VkMemoryOpenInfo* pOpenInfo, VkDeviceMemory* pMem);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002152typedef VkResult (VKAPI *PFN_vkOpenSharedSemaphore)(VkDevice device, const VkSemaphoreOpenInfo* pOpenInfo, VkSemaphore* pSemaphore);
Tony Barbourd1c35722015-04-16 15:59:00 -06002153typedef VkResult (VKAPI *PFN_vkOpenPeerMemory)(VkDevice device, const VkPeerMemoryOpenInfo* pOpenInfo, VkDeviceMemory* pMem);
2154typedef VkResult (VKAPI *PFN_vkOpenPeerImage)(VkDevice device, const VkPeerImageOpenInfo* pOpenInfo, VkImage* pImage, VkDeviceMemory* pMem);
Mike Stroyanb050c682015-04-17 12:36:38 -06002155typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkDevice device, VkObjectType objType, VkObject object);
2156typedef VkResult (VKAPI *PFN_vkGetObjectInfo)(VkDevice device, VkObjectType objType, VkObject object, VkObjectInfoType infoType, size_t* pDataSize, void* pData);
2157typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemory)(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset);
2158typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemoryRange)(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset);
Tony Barbourd1c35722015-04-16 15:59:00 -06002159typedef VkResult (VKAPI *PFN_vkQueueBindImageMemoryRange)(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002160typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
2161typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, VkFence* pFences);
Mike Stroyanb050c682015-04-17 12:36:38 -06002162typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002163typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout);
2164typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2165typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2166typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2167typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
Mike Stroyanb050c682015-04-17 12:36:38 -06002168typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
2169typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event);
2170typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002171typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
Mike Stroyanb050c682015-04-17 12:36:38 -06002172typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002173typedef VkResult (VKAPI *PFN_vkGetFormatInfo)(VkDevice device, VkFormat format, VkFormatInfoType infoType, size_t* pDataSize, void* pData);
2174typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2175typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2176typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
Mike Stroyanb050c682015-04-17 12:36:38 -06002177typedef VkResult (VKAPI *PFN_vkGetImageSubresourceInfo)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceInfoType infoType, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002178typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
2179typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView);
2180typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView);
2181typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
2182typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipeline)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2183typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelineDerivative)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline basePipeline, VkPipeline* pPipeline);
2184typedef VkResult (VKAPI *PFN_vkCreateComputePipeline)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
Mike Stroyanb050c682015-04-17 12:36:38 -06002185typedef VkResult (VKAPI *PFN_vkStorePipeline)(VkDevice device, VkPipeline pipeline, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002186typedef VkResult (VKAPI *PFN_vkLoadPipeline)(VkDevice device, size_t dataSize, const void* pData, VkPipeline* pPipeline);
2187typedef VkResult (VKAPI *PFN_vkLoadPipelineDerivative)(VkDevice device, size_t dataSize, const void* pData, VkPipeline basePipeline, VkPipeline* pPipeline);
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002188typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002189typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2190typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002191typedef VkResult (VKAPI *PFN_vkBeginDescriptorPoolUpdate)(VkDevice device, VkDescriptorUpdateMode updateMode);
2192typedef VkResult (VKAPI *PFN_vkEndDescriptorPoolUpdate)(VkDevice device, VkCmdBuffer cmd);
2193typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
Mike Stroyanb050c682015-04-17 12:36:38 -06002194typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
2195typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
2196typedef void (VKAPI *PFN_vkClearDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
2197typedef void (VKAPI *PFN_vkUpdateDescriptors)(VkDevice device, VkDescriptorSet descriptorSet, uint32_t updateCount, const void** ppUpdateArray);
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06002198typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2199typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2200typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2201typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002202typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2203typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2204typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2205typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002206typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2207typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
Cody Northropd4c1a502015-04-16 13:41:56 -06002208typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
Tony Barbourd1c35722015-04-16 15:59:00 -06002209typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
2210typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002211typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2212typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
Tony Barbourd1c35722015-04-16 15:59:00 -06002213typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
2214typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002215typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
Tony Barbourd1c35722015-04-16 15:59:00 -06002216typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002217typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2218typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
2219typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions);
2220typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2221typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2222typedef void (VKAPI *PFN_vkCmdCloneImageData)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout);
Tony Barbourd1c35722015-04-16 15:59:00 -06002223typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
2224typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -06002225typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColor* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002226typedef void (VKAPI *PFN_vkCmdClearDepthStencil)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Tony Barbour6865d4a2015-04-13 15:02:52 -06002227typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002228typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
2229typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
Tony Barbourd1c35722015-04-16 15:59:00 -06002230typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, VkWaitEvent waitEvent, uint32_t eventCount, const VkEvent* pEvents, uint32_t memBarrierCount, const void** ppMemBarriers);
2231typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, VkWaitEvent waitEvent, uint32_t pipeEventCount, const VkPipeEvent* pPipeEvents, uint32_t memBarrierCount, const void** ppMemBarriers);
2232typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002233typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2234typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
Tony Barbourd1c35722015-04-16 15:59:00 -06002235typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
Tony Barbour71a85122015-04-16 19:09:28 -06002236typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002237typedef void (VKAPI *PFN_vkCmdInitAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, const uint32_t* pData);
Tony Barbourd1c35722015-04-16 15:59:00 -06002238typedef void (VKAPI *PFN_vkCmdLoadAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer srcBuffer, VkDeviceSize srcOffset);
2239typedef void (VKAPI *PFN_vkCmdSaveAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer destBuffer, VkDeviceSize destOffset);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002240typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2241typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002242typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin);
2243typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer, VkRenderPass renderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002244
2245#ifdef VK_PROTOTYPES
2246
Tony Barbourd1c35722015-04-16 15:59:00 -06002247// Device initialization
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002248
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002249VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002250 const VkInstanceCreateInfo* pCreateInfo,
2251 VkInstance* pInstance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002252
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002253VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002254 VkInstance instance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002255
Jon Ashburn83a64252015-04-15 11:31:12 -06002256VkResult VKAPI vkEnumeratePhysicalDevices(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002257 VkInstance instance,
Jon Ashburn83a64252015-04-15 11:31:12 -06002258 uint32_t* pPhysicalDeviceCount,
Tony Barbourd1c35722015-04-16 15:59:00 -06002259 VkPhysicalDevice* pPhysicalDevices);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002260
Tony Barbourd1c35722015-04-16 15:59:00 -06002261VkResult VKAPI vkGetPhysicalDeviceInfo(
2262 VkPhysicalDevice physicalDevice,
2263 VkPhysicalDeviceInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002264 size_t* pDataSize,
2265 void* pData);
2266
2267void * VKAPI vkGetProcAddr(
Tony Barbourd1c35722015-04-16 15:59:00 -06002268 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002269 const char* pName);
2270
2271// Device functions
2272
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002273VkResult VKAPI vkCreateDevice(
Tony Barbourd1c35722015-04-16 15:59:00 -06002274 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002275 const VkDeviceCreateInfo* pCreateInfo,
2276 VkDevice* pDevice);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002277
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002278VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002279 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002280
2281// Extension discovery functions
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -06002282
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06002283VkResult VKAPI vkGetGlobalExtensionInfo(
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06002284 VkExtensionInfoType infoType,
2285 uint32_t extensionIndex,
2286 size_t* pDataSize,
2287 void* pData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002288
Tobin Ehlis01939012015-04-16 12:51:37 -06002289VkResult VKAPI vkGetPhysicalDeviceExtensionInfo(
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06002290 VkPhysicalDevice physicalDevice,
2291 VkExtensionInfoType infoType,
2292 uint32_t extensionIndex,
2293 size_t* pDataSize,
2294 void* pData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002295
2296// Layer discovery functions
2297
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002298VkResult VKAPI vkEnumerateLayers(
Tony Barbourd1c35722015-04-16 15:59:00 -06002299 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002300 size_t maxStringSize,
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06002301 size_t* pLayerCount,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002302 char* const* pOutLayers,
2303 void* pReserved);
2304
2305// Queue functions
2306
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002307VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002308 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002309 uint32_t queueNodeIndex,
2310 uint32_t queueIndex,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002311 VkQueue* pQueue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002312
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002313VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002314 VkQueue queue,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002315 uint32_t cmdBufferCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002316 const VkCmdBuffer* pCmdBuffers,
2317 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002318
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002319VkResult VKAPI vkQueueAddMemReferences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002320 VkQueue queue,
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002321 uint32_t count,
Tony Barbour71a85122015-04-16 19:09:28 -06002322 const VkDeviceMemory* pMems);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002323
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002324VkResult VKAPI vkQueueRemoveMemReferences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002325 VkQueue queue,
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002326 uint32_t count,
Tony Barbour71a85122015-04-16 19:09:28 -06002327 const VkDeviceMemory* pMems);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002328
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002329VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002330 VkQueue queue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002331
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002332VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002333 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002334
2335// Memory functions
2336
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002337VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002338 VkDevice device,
2339 const VkMemoryAllocInfo* pAllocInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002340 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002341
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002342VkResult VKAPI vkFreeMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002343 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002344 VkDeviceMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002345
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002346VkResult VKAPI vkSetMemoryPriority(
Mike Stroyanb050c682015-04-17 12:36:38 -06002347 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002348 VkDeviceMemory mem,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002349 VkMemoryPriority priority);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002350
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002351VkResult VKAPI vkMapMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002352 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002353 VkDeviceMemory mem,
Tony Barbour71a85122015-04-16 19:09:28 -06002354 VkDeviceSize offset,
2355 VkDeviceSize size,
Tony Barbourd1c35722015-04-16 15:59:00 -06002356 VkMemoryMapFlags flags,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002357 void** ppData);
2358
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002359VkResult VKAPI vkUnmapMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002360 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002361 VkDeviceMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002362
Tony Barbourb1250542015-04-16 19:23:13 -06002363VkResult VKAPI vkFlushMappedMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002364 VkDevice device,
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06002365 VkDeviceMemory mem,
2366 VkDeviceSize offset,
2367 VkDeviceSize size);
Tony Barbourb1250542015-04-16 19:23:13 -06002368
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002369VkResult VKAPI vkPinSystemMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002370 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002371 const void* pSysMem,
2372 size_t memSize,
Tony Barbourd1c35722015-04-16 15:59:00 -06002373 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002374
2375// Multi-device functions
2376
Tony Barbourd1c35722015-04-16 15:59:00 -06002377VkResult VKAPI vkGetMultiDeviceCompatibility(
2378 VkPhysicalDevice physicalDevice0,
2379 VkPhysicalDevice physicalDevice1,
2380 VkPhysicalDeviceCompatibilityInfo* pInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002381
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002382VkResult VKAPI vkOpenSharedMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002383 VkDevice device,
2384 const VkMemoryOpenInfo* pOpenInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002385 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002386
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002387VkResult VKAPI vkOpenSharedSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002388 VkDevice device,
2389 const VkSemaphoreOpenInfo* pOpenInfo,
2390 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002391
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002392VkResult VKAPI vkOpenPeerMemory(
2393 VkDevice device,
2394 const VkPeerMemoryOpenInfo* pOpenInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002395 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002396
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002397VkResult VKAPI vkOpenPeerImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002398 VkDevice device,
2399 const VkPeerImageOpenInfo* pOpenInfo,
2400 VkImage* pImage,
Tony Barbourd1c35722015-04-16 15:59:00 -06002401 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002402
2403// Generic API object functions
2404
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002405VkResult VKAPI vkDestroyObject(
Mike Stroyanb050c682015-04-17 12:36:38 -06002406 VkDevice device,
2407 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002408 VkObject object);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002409
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002410VkResult VKAPI vkGetObjectInfo(
Mike Stroyanb050c682015-04-17 12:36:38 -06002411 VkDevice device,
2412 VkObjectType objType,
2413 VkObject object,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002414 VkObjectInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002415 size_t* pDataSize,
2416 void* pData);
2417
Tony Barbour71a85122015-04-16 19:09:28 -06002418// Memory management API functions
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002419
2420VkResult VKAPI vkQueueBindObjectMemory(
2421 VkQueue queue,
Mike Stroyanb050c682015-04-17 12:36:38 -06002422 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002423 VkObject object,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002424 uint32_t allocationIdx,
Tony Barbourd1c35722015-04-16 15:59:00 -06002425 VkDeviceMemory mem,
2426 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002427
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002428VkResult VKAPI vkQueueBindObjectMemoryRange(
2429 VkQueue queue,
Mike Stroyanb050c682015-04-17 12:36:38 -06002430 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002431 VkObject object,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002432 uint32_t allocationIdx,
Tony Barbourd1c35722015-04-16 15:59:00 -06002433 VkDeviceSize rangeOffset,
2434 VkDeviceSize rangeSize,
2435 VkDeviceMemory mem,
2436 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002437
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002438VkResult VKAPI vkQueueBindImageMemoryRange(
2439 VkQueue queue,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002440 VkImage image,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002441 uint32_t allocationIdx,
Jeremy Hayesaf0d72c2015-04-15 15:20:03 -06002442 const VkImageMemoryBindInfo* pBindInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002443 VkDeviceMemory mem,
2444 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002445
2446// Fence functions
2447
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002448VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002449 VkDevice device,
2450 const VkFenceCreateInfo* pCreateInfo,
2451 VkFence* pFence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002452
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002453VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002454 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002455 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002456 VkFence* pFences);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002457
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002458VkResult VKAPI vkGetFenceStatus(
Mike Stroyanb050c682015-04-17 12:36:38 -06002459 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002460 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002461
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002462VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002463 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002464 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002465 const VkFence* pFences,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002466 bool32_t waitAll,
2467 uint64_t timeout); // timeout in nanoseconds
2468
2469// Queue semaphore functions
2470
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002471VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002472 VkDevice device,
2473 const VkSemaphoreCreateInfo* pCreateInfo,
2474 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002475
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002476VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002477 VkQueue queue,
2478 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002479
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002480VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002481 VkQueue queue,
2482 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002483
2484// Event functions
2485
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002486VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002487 VkDevice device,
2488 const VkEventCreateInfo* pCreateInfo,
2489 VkEvent* pEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002490
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002491VkResult VKAPI vkGetEventStatus(
Mike Stroyanb050c682015-04-17 12:36:38 -06002492 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002493 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002494
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002495VkResult VKAPI vkSetEvent(
Mike Stroyanb050c682015-04-17 12:36:38 -06002496 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002497 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002498
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002499VkResult VKAPI vkResetEvent(
Mike Stroyanb050c682015-04-17 12:36:38 -06002500 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002501 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002502
2503// Query functions
2504
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002505VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002506 VkDevice device,
2507 const VkQueryPoolCreateInfo* pCreateInfo,
2508 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002509
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002510VkResult VKAPI vkGetQueryPoolResults(
Mike Stroyanb050c682015-04-17 12:36:38 -06002511 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002512 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002513 uint32_t startQuery,
2514 uint32_t queryCount,
2515 size_t* pDataSize,
Tony Barbourd1c35722015-04-16 15:59:00 -06002516 void* pData,
2517 VkQueryResultFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002518
2519// Format capabilities
2520
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002521VkResult VKAPI vkGetFormatInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002522 VkDevice device,
2523 VkFormat format,
2524 VkFormatInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002525 size_t* pDataSize,
2526 void* pData);
2527
2528// Buffer functions
2529
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002530VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002531 VkDevice device,
2532 const VkBufferCreateInfo* pCreateInfo,
2533 VkBuffer* pBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002534
2535// Buffer view functions
2536
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002537VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002538 VkDevice device,
2539 const VkBufferViewCreateInfo* pCreateInfo,
2540 VkBufferView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002541
2542// Image functions
2543
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002544VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002545 VkDevice device,
2546 const VkImageCreateInfo* pCreateInfo,
2547 VkImage* pImage);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002548
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002549VkResult VKAPI vkGetImageSubresourceInfo(
Mike Stroyanb050c682015-04-17 12:36:38 -06002550 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002551 VkImage image,
2552 const VkImageSubresource* pSubresource,
2553 VkSubresourceInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002554 size_t* pDataSize,
2555 void* pData);
2556
2557// Image view functions
2558
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002559VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002560 VkDevice device,
2561 const VkImageViewCreateInfo* pCreateInfo,
2562 VkImageView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002563
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002564VkResult VKAPI vkCreateColorAttachmentView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002565 VkDevice device,
2566 const VkColorAttachmentViewCreateInfo* pCreateInfo,
2567 VkColorAttachmentView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002568
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002569VkResult VKAPI vkCreateDepthStencilView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002570 VkDevice device,
2571 const VkDepthStencilViewCreateInfo* pCreateInfo,
2572 VkDepthStencilView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002573
2574// Shader functions
2575
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002576VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002577 VkDevice device,
2578 const VkShaderCreateInfo* pCreateInfo,
2579 VkShader* pShader);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002580
2581// Pipeline functions
2582
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002583VkResult VKAPI vkCreateGraphicsPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002584 VkDevice device,
2585 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2586 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002587
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002588VkResult VKAPI vkCreateGraphicsPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002589 VkDevice device,
2590 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2591 VkPipeline basePipeline,
2592 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002593
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002594VkResult VKAPI vkCreateComputePipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002595 VkDevice device,
2596 const VkComputePipelineCreateInfo* pCreateInfo,
2597 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002598
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002599VkResult VKAPI vkStorePipeline(
Mike Stroyanb050c682015-04-17 12:36:38 -06002600 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002601 VkPipeline pipeline,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002602 size_t* pDataSize,
2603 void* pData);
2604
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002605VkResult VKAPI vkLoadPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002606 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002607 size_t dataSize,
2608 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002609 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002610
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002611VkResult VKAPI vkLoadPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002612 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002613 size_t dataSize,
2614 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002615 VkPipeline basePipeline,
2616 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002617
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002618// Pipeline layout functions
2619
2620VkResult VKAPI vkCreatePipelineLayout(
2621 VkDevice device,
2622 const VkPipelineLayoutCreateInfo* pCreateInfo,
2623 VkPipelineLayout* pPipelineLayout);
2624
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002625// Sampler functions
2626
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002627VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002628 VkDevice device,
2629 const VkSamplerCreateInfo* pCreateInfo,
2630 VkSampler* pSampler);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002631
2632// Descriptor set functions
2633
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002634VkResult VKAPI vkCreateDescriptorSetLayout(
2635 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002636 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2637 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002638
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002639VkResult VKAPI vkBeginDescriptorPoolUpdate(
2640 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002641 VkDescriptorUpdateMode updateMode);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002642
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002643VkResult VKAPI vkEndDescriptorPoolUpdate(
2644 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002645 VkCmdBuffer cmd);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002646
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002647VkResult VKAPI vkCreateDescriptorPool(
2648 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002649 VkDescriptorPoolUsage poolUsage,
2650 uint32_t maxSets,
2651 const VkDescriptorPoolCreateInfo* pCreateInfo,
2652 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002653
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002654VkResult VKAPI vkResetDescriptorPool(
Mike Stroyanb050c682015-04-17 12:36:38 -06002655 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002656 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002657
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002658VkResult VKAPI vkAllocDescriptorSets(
Mike Stroyanb050c682015-04-17 12:36:38 -06002659 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002660 VkDescriptorPool descriptorPool,
2661 VkDescriptorSetUsage setUsage,
2662 uint32_t count,
2663 const VkDescriptorSetLayout* pSetLayouts,
2664 VkDescriptorSet* pDescriptorSets,
2665 uint32_t* pCount);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002666
2667void VKAPI vkClearDescriptorSets(
Mike Stroyanb050c682015-04-17 12:36:38 -06002668 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002669 VkDescriptorPool descriptorPool,
2670 uint32_t count,
2671 const VkDescriptorSet* pDescriptorSets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002672
2673void VKAPI vkUpdateDescriptors(
Mike Stroyanb050c682015-04-17 12:36:38 -06002674 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002675 VkDescriptorSet descriptorSet,
2676 uint32_t updateCount,
Tony Barbourd1c35722015-04-16 15:59:00 -06002677 const void** ppUpdateArray);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002678
2679// State object functions
2680
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002681VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002682 VkDevice device,
2683 const VkDynamicVpStateCreateInfo* pCreateInfo,
2684 VkDynamicVpState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002685
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002686VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002687 VkDevice device,
2688 const VkDynamicRsStateCreateInfo* pCreateInfo,
2689 VkDynamicRsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002690
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002691VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002692 VkDevice device,
2693 const VkDynamicCbStateCreateInfo* pCreateInfo,
2694 VkDynamicCbState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002695
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002696VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002697 VkDevice device,
2698 const VkDynamicDsStateCreateInfo* pCreateInfo,
2699 VkDynamicDsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002700
2701// Command buffer functions
2702
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002703VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002704 VkDevice device,
2705 const VkCmdBufferCreateInfo* pCreateInfo,
2706 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002707
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002708VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002709 VkCmdBuffer cmdBuffer,
2710 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002711
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002712VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002713 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002714
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002715VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002716 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002717
2718// Command buffer building functions
2719
2720void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002721 VkCmdBuffer cmdBuffer,
2722 VkPipelineBindPoint pipelineBindPoint,
2723 VkPipeline pipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002724
2725void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002726 VkCmdBuffer cmdBuffer,
2727 VkStateBindPoint stateBindPoint,
2728 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002729
2730void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002731 VkCmdBuffer cmdBuffer,
2732 VkPipelineBindPoint pipelineBindPoint,
Cody Northropd4c1a502015-04-16 13:41:56 -06002733 uint32_t firstSet,
2734 uint32_t setCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002735 const VkDescriptorSet* pDescriptorSets,
Cody Northropd4c1a502015-04-16 13:41:56 -06002736 uint32_t dynamicOffsetCount,
2737 const uint32_t* pDynamicOffsets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002738
2739void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002740 VkCmdBuffer cmdBuffer,
2741 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002742 VkDeviceSize offset,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002743 VkIndexType indexType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002744
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002745void VKAPI vkCmdBindVertexBuffers(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002746 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002747 uint32_t startBinding,
2748 uint32_t bindingCount,
2749 const VkBuffer* pBuffers,
Tony Barbourd1c35722015-04-16 15:59:00 -06002750 const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002751
2752void VKAPI vkCmdDraw(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002753 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002754 uint32_t firstVertex,
2755 uint32_t vertexCount,
2756 uint32_t firstInstance,
2757 uint32_t instanceCount);
2758
2759void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002760 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002761 uint32_t firstIndex,
2762 uint32_t indexCount,
2763 int32_t vertexOffset,
2764 uint32_t firstInstance,
2765 uint32_t instanceCount);
2766
2767void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002768 VkCmdBuffer cmdBuffer,
2769 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002770 VkDeviceSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002771 uint32_t count,
2772 uint32_t stride);
2773
2774void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002775 VkCmdBuffer cmdBuffer,
2776 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002777 VkDeviceSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002778 uint32_t count,
2779 uint32_t stride);
2780
2781void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002782 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002783 uint32_t x,
2784 uint32_t y,
2785 uint32_t z);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002786
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002787void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002788 VkCmdBuffer cmdBuffer,
2789 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002790 VkDeviceSize offset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002791
2792void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002793 VkCmdBuffer cmdBuffer,
2794 VkBuffer srcBuffer,
2795 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002796 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002797 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002798
2799void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002800 VkCmdBuffer cmdBuffer,
2801 VkImage srcImage,
2802 VkImageLayout srcImageLayout,
2803 VkImage destImage,
2804 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002805 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002806 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002807
2808void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002809 VkCmdBuffer cmdBuffer,
2810 VkImage srcImage,
2811 VkImageLayout srcImageLayout,
2812 VkImage destImage,
2813 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002814 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002815 const VkImageBlit* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002816
2817void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002818 VkCmdBuffer cmdBuffer,
2819 VkBuffer srcBuffer,
2820 VkImage destImage,
2821 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002822 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002823 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002824
2825void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002826 VkCmdBuffer cmdBuffer,
2827 VkImage srcImage,
2828 VkImageLayout srcImageLayout,
2829 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002830 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002831 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002832
2833void VKAPI vkCmdCloneImageData(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002834 VkCmdBuffer cmdBuffer,
2835 VkImage srcImage,
2836 VkImageLayout srcImageLayout,
2837 VkImage destImage,
2838 VkImageLayout destImageLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002839
2840void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002841 VkCmdBuffer cmdBuffer,
2842 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002843 VkDeviceSize destOffset,
2844 VkDeviceSize dataSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002845 const uint32_t* pData);
2846
2847void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002848 VkCmdBuffer cmdBuffer,
2849 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002850 VkDeviceSize destOffset,
2851 VkDeviceSize fillSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002852 uint32_t data);
2853
2854void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002855 VkCmdBuffer cmdBuffer,
2856 VkImage image,
2857 VkImageLayout imageLayout,
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -06002858 const VkClearColor* pColor,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002859 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002860 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002861
2862void VKAPI vkCmdClearDepthStencil(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002863 VkCmdBuffer cmdBuffer,
2864 VkImage image,
2865 VkImageLayout imageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002866 float depth,
2867 uint32_t stencil,
2868 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002869 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002870
2871void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002872 VkCmdBuffer cmdBuffer,
2873 VkImage srcImage,
2874 VkImageLayout srcImageLayout,
2875 VkImage destImage,
2876 VkImageLayout destImageLayout,
Tony Barbour6865d4a2015-04-13 15:02:52 -06002877 uint32_t regionCount,
2878 const VkImageResolve* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002879
2880void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002881 VkCmdBuffer cmdBuffer,
2882 VkEvent event,
2883 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002884
2885void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002886 VkCmdBuffer cmdBuffer,
2887 VkEvent event,
2888 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002889
2890void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002891 VkCmdBuffer cmdBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002892 VkWaitEvent waitEvent,
2893 uint32_t eventCount,
2894 const VkEvent* pEvents,
2895 uint32_t memBarrierCount,
2896 const void** ppMemBarriers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002897
2898void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002899 VkCmdBuffer cmdBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002900 VkWaitEvent waitEvent,
2901 uint32_t pipeEventCount,
2902 const VkPipeEvent* pPipeEvents,
2903 uint32_t memBarrierCount,
2904 const void** ppMemBarriers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002905
2906void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002907 VkCmdBuffer cmdBuffer,
2908 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002909 uint32_t slot,
Tony Barbourd1c35722015-04-16 15:59:00 -06002910 VkQueryControlFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002911
2912void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002913 VkCmdBuffer cmdBuffer,
2914 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002915 uint32_t slot);
2916
2917void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002918 VkCmdBuffer cmdBuffer,
2919 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002920 uint32_t startQuery,
2921 uint32_t queryCount);
2922
2923void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002924 VkCmdBuffer cmdBuffer,
2925 VkTimestampType timestampType,
2926 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002927 VkDeviceSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002928
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06002929void VKAPI vkCmdCopyQueryPoolResults(
2930 VkCmdBuffer cmdBuffer,
2931 VkQueryPool queryPool,
2932 uint32_t startQuery,
2933 uint32_t queryCount,
2934 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002935 VkDeviceSize destOffset,
2936 VkDeviceSize destStride,
Tony Barbour71a85122015-04-16 19:09:28 -06002937 VkQueryResultFlags flags);
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06002938
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002939void VKAPI vkCmdInitAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002940 VkCmdBuffer cmdBuffer,
2941 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002942 uint32_t startCounter,
2943 uint32_t counterCount,
2944 const uint32_t* pData);
2945
2946void VKAPI vkCmdLoadAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002947 VkCmdBuffer cmdBuffer,
2948 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002949 uint32_t startCounter,
2950 uint32_t counterCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002951 VkBuffer srcBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002952 VkDeviceSize srcOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002953
2954void VKAPI vkCmdSaveAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002955 VkCmdBuffer cmdBuffer,
2956 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002957 uint32_t startCounter,
2958 uint32_t counterCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002959 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002960 VkDeviceSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002961
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002962VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002963 VkDevice device,
2964 const VkFramebufferCreateInfo* pCreateInfo,
2965 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002966
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002967VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002968 VkDevice device,
2969 const VkRenderPassCreateInfo* pCreateInfo,
2970 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002971
2972void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002973 VkCmdBuffer cmdBuffer,
2974 const VkRenderPassBegin* pRenderPassBegin);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002975
2976void VKAPI vkCmdEndRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002977 VkCmdBuffer cmdBuffer,
2978 VkRenderPass renderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002979
2980#endif // VK_PROTOTYPES
2981
2982#ifdef __cplusplus
2983} // extern "C"
2984#endif // __cplusplus
2985
2986#endif // __VULKAN_H__