blob: d7748ce12b5f2033319ea90fafa0662aa165799e [file] [log] [blame]
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001//
2// File: vulkan.h
3//
4/*
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06005** Copyright (c) 2014-2015 The Khronos Group Inc.
Courtney Goeltzenleuchter89e99e62015-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 Goeltzenleuchter2040b432015-04-09 11:52:55 -060033#include "vk_platform.h"
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060034
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -060035// Vulkan API version supported by this file
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -060036#define VK_API_VERSION VK_MAKE_VERSION(0, 80, 0)
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060037
38#ifdef __cplusplus
39extern "C"
40{
41#endif // __cplusplus
42
43/*
44***************************************************************************************************
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -060045* Core Vulkan API
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060046***************************************************************************************************
47*/
48
49#ifdef __cplusplus
50 #define VK_DEFINE_HANDLE(_obj) struct _obj##_T {char _dummy;}; typedef _obj##_T* _obj;
51 #define VK_DEFINE_SUBCLASS_HANDLE(_obj, _base) struct _obj##_T : public _base##_T {}; typedef _obj##_T* _obj;
52#else // __cplusplus
53 #define VK_DEFINE_HANDLE(_obj) typedef void* _obj;
54 #define VK_DEFINE_SUBCLASS_HANDLE(_obj, _base) typedef void* _obj;
55#endif // __cplusplus
56
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -060057VK_DEFINE_HANDLE(VkInstance)
Tony Barbour8205d902015-04-16 15:59:00 -060058VK_DEFINE_HANDLE(VkPhysicalDevice)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -060059VK_DEFINE_HANDLE(VkBaseObject)
60VK_DEFINE_SUBCLASS_HANDLE(VkDevice, VkBaseObject)
61VK_DEFINE_SUBCLASS_HANDLE(VkQueue, VkBaseObject)
Tony Barbour8205d902015-04-16 15:59:00 -060062VK_DEFINE_SUBCLASS_HANDLE(VkDeviceMemory, VkBaseObject)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -060063VK_DEFINE_SUBCLASS_HANDLE(VkObject, VkBaseObject)
64VK_DEFINE_SUBCLASS_HANDLE(VkBuffer, VkObject)
65VK_DEFINE_SUBCLASS_HANDLE(VkBufferView, VkObject)
66VK_DEFINE_SUBCLASS_HANDLE(VkImage, VkObject)
67VK_DEFINE_SUBCLASS_HANDLE(VkImageView, VkObject)
68VK_DEFINE_SUBCLASS_HANDLE(VkColorAttachmentView, VkObject)
69VK_DEFINE_SUBCLASS_HANDLE(VkDepthStencilView, VkObject)
70VK_DEFINE_SUBCLASS_HANDLE(VkShader, VkObject)
71VK_DEFINE_SUBCLASS_HANDLE(VkPipeline, VkObject)
72VK_DEFINE_SUBCLASS_HANDLE(VkSampler, VkObject)
73VK_DEFINE_SUBCLASS_HANDLE(VkDescriptorSet, VkObject)
74VK_DEFINE_SUBCLASS_HANDLE(VkDescriptorSetLayout, VkObject)
75VK_DEFINE_SUBCLASS_HANDLE(VkDescriptorSetLayoutChain, VkObject)
76VK_DEFINE_SUBCLASS_HANDLE(VkDescriptorPool, VkObject)
77VK_DEFINE_SUBCLASS_HANDLE(VkDynamicStateObject, VkObject)
Courtney Goeltzenleuchterfcf855f2015-04-10 16:24:50 -060078VK_DEFINE_SUBCLASS_HANDLE(VkDynamicVpState, VkDynamicStateObject)
79VK_DEFINE_SUBCLASS_HANDLE(VkDynamicRsState, VkDynamicStateObject)
80VK_DEFINE_SUBCLASS_HANDLE(VkDynamicCbState, VkDynamicStateObject)
81VK_DEFINE_SUBCLASS_HANDLE(VkDynamicDsState, VkDynamicStateObject)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -060082VK_DEFINE_SUBCLASS_HANDLE(VkCmdBuffer, VkObject)
83VK_DEFINE_SUBCLASS_HANDLE(VkFence, VkObject)
84VK_DEFINE_SUBCLASS_HANDLE(VkSemaphore, VkObject)
85VK_DEFINE_SUBCLASS_HANDLE(VkEvent, VkObject)
86VK_DEFINE_SUBCLASS_HANDLE(VkQueryPool, VkObject)
87VK_DEFINE_SUBCLASS_HANDLE(VkFramebuffer, VkObject)
88VK_DEFINE_SUBCLASS_HANDLE(VkRenderPass, VkObject)
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060089
Tony Barbour8205d902015-04-16 15:59:00 -060090#define VK_MAX_PHYSICAL_DEVICE_NAME 256
Jon Ashburneb2728b2015-04-10 14:33:07 -060091#define VK_MAX_EXTENSION_NAME 256
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060092
93#define VK_LOD_CLAMP_NONE MAX_FLOAT
94#define VK_LAST_MIP_OR_SLICE 0xffffffff
95
Tony Barbour8205d902015-04-16 15:59:00 -060096#define VK_WHOLE_SIZE UINT64_MAX
97
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060098#define VK_TRUE 1
99#define VK_FALSE 0
100
101#define VK_NULL_HANDLE 0
102
103// This macro defines INT_MAX in enumerations to force compilers to use 32 bits
104// to represent them. This may or may not be necessary on some compilers. The
105// option to compile it out may allow compilers that warn about missing enumerants
106// in switch statements to be silenced.
Tony Barbour8205d902015-04-16 15:59:00 -0600107// Using this macro is not needed for flag bit enums because those aren't used
108// as storage type anywhere.
109#define VK_MAX_ENUM(Prefix) VK_##Prefix##_MAX_ENUM = 0x7FFFFFFF
110
111// This macro defines the BEGIN_RANGE, END_RANGE, NUM, and MAX_ENUM constants for
112// the enumerations.
113#define VK_ENUM_RANGE(Prefix, First, Last) \
114 VK_##Prefix##_BEGIN_RANGE = VK_##Prefix##_##First, \
115 VK_##Prefix##_END_RANGE = VK_##Prefix##_##Last, \
116 VK_NUM_##Prefix = (VK_##Prefix##_END_RANGE - VK_##Prefix##_BEGIN_RANGE + 1), \
117 VK_MAX_ENUM(Prefix)
118
119// This is a helper macro to define the value of flag bit enum values.
120#define VK_BIT(bit) (1 << (bit))
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600121
122// ------------------------------------------------------------------------------------------------
123// Enumerations
124
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600125typedef enum VkMemoryPriority_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600126{
Tony Barbour8205d902015-04-16 15:59:00 -0600127 VK_MEMORY_PRIORITY_UNUSED = 0x00000000,
128 VK_MEMORY_PRIORITY_VERY_LOW = 0x00000001,
129 VK_MEMORY_PRIORITY_LOW = 0x00000002,
130 VK_MEMORY_PRIORITY_NORMAL = 0x00000003,
131 VK_MEMORY_PRIORITY_HIGH = 0x00000004,
132 VK_MEMORY_PRIORITY_VERY_HIGH = 0x00000005,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600133
Tony Barbour8205d902015-04-16 15:59:00 -0600134 VK_ENUM_RANGE(MEMORY_PRIORITY, UNUSED, VERY_HIGH)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600135} VkMemoryPriority;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600136
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600137typedef enum VkImageLayout_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600138{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600139 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
140 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access
141 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write
142 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write
143 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access
144 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access
145 VK_IMAGE_LAYOUT_CLEAR_OPTIMAL = 0x00000006, // Optimal layout when image is used only for clear operations
146 VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000007, // Optimal layout when image is used only as source of transfer operations
147 VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000008, // Optimal layout when image is used only as destination of transfer operations
Tony Barbour8205d902015-04-16 15:59:00 -0600148
149 VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600150} VkImageLayout;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600151
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600152typedef enum VkPipeEvent_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600153{
Tony Barbour8205d902015-04-16 15:59:00 -0600154 VK_PIPE_EVENT_TOP_OF_PIPE = 0x00000001, // Set event before the device starts processing subsequent command
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600155 VK_PIPE_EVENT_VERTEX_PROCESSING_COMPLETE = 0x00000002, // Set event when all pending vertex processing is complete
156 VK_PIPE_EVENT_LOCAL_FRAGMENT_PROCESSING_COMPLETE = 0x00000003, // Set event when all pending fragment shader executions are complete, within each fragment location
157 VK_PIPE_EVENT_FRAGMENT_PROCESSING_COMPLETE = 0x00000004, // Set event when all pending fragment shader executions are complete
158 VK_PIPE_EVENT_GRAPHICS_PIPELINE_COMPLETE = 0x00000005, // Set event when all pending graphics operations are complete
159 VK_PIPE_EVENT_COMPUTE_PIPELINE_COMPLETE = 0x00000006, // Set event when all pending compute operations are complete
160 VK_PIPE_EVENT_TRANSFER_COMPLETE = 0x00000007, // Set event when all pending transfer operations are complete
Tony Barbour8205d902015-04-16 15:59:00 -0600161 VK_PIPE_EVENT_COMMANDS_COMPLETE = 0x00000008, // Set event when all pending work is complete
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600162
Tony Barbour8205d902015-04-16 15:59:00 -0600163 VK_ENUM_RANGE(PIPE_EVENT, TOP_OF_PIPE, COMMANDS_COMPLETE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600164} VkPipeEvent;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600165
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600166typedef enum VkWaitEvent_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600167{
Tony Barbour8205d902015-04-16 15:59:00 -0600168 VK_WAIT_EVENT_TOP_OF_PIPE = 0x00000001, // Wait event before the device starts processing subsequent commands
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600169 VK_WAIT_EVENT_BEFORE_RASTERIZATION = 0x00000002, // Wait event before rasterizing subsequent primitives
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600170
Tony Barbour8205d902015-04-16 15:59:00 -0600171 VK_ENUM_RANGE(WAIT_EVENT, TOP_OF_PIPE, BEFORE_RASTERIZATION)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600172} VkWaitEvent;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600173
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600174typedef enum VkAttachmentLoadOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600175{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600176 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
177 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
178 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600179
Tony Barbour8205d902015-04-16 15:59:00 -0600180 VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600181} VkAttachmentLoadOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600182
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600183typedef enum VkAttachmentStoreOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600184{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600185 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
186 VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001,
187 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600188
Tony Barbour8205d902015-04-16 15:59:00 -0600189 VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600190} VkAttachmentStoreOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600191
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600192typedef enum VkImageType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600193{
Tony Barbour8205d902015-04-16 15:59:00 -0600194 VK_IMAGE_TYPE_1D = 0x00000000,
195 VK_IMAGE_TYPE_2D = 0x00000001,
196 VK_IMAGE_TYPE_3D = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600197
Tony Barbour8205d902015-04-16 15:59:00 -0600198 VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600199} VkImageType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600200
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600201typedef enum VkImageTiling_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600202{
Tony Barbour8205d902015-04-16 15:59:00 -0600203 VK_IMAGE_TILING_LINEAR = 0x00000000,
204 VK_IMAGE_TILING_OPTIMAL = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600205
Tony Barbour8205d902015-04-16 15:59:00 -0600206 VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600207} VkImageTiling;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600208
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600209typedef enum VkImageViewType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600210{
Tony Barbour8205d902015-04-16 15:59:00 -0600211 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
212 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
213 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
214 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600215
Tony Barbour8205d902015-04-16 15:59:00 -0600216 VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600217} VkImageViewType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600218
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600219typedef enum VkImageAspect_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600220{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600221 VK_IMAGE_ASPECT_COLOR = 0x00000000,
222 VK_IMAGE_ASPECT_DEPTH = 0x00000001,
223 VK_IMAGE_ASPECT_STENCIL = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600224
Tony Barbour8205d902015-04-16 15:59:00 -0600225 VK_ENUM_RANGE(IMAGE_ASPECT, COLOR, STENCIL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600226} VkImageAspect;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600227
Tony Barbour8205d902015-04-16 15:59:00 -0600228typedef enum VkBufferViewType_
229{
230 VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
231 VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
232
233 VK_ENUM_RANGE(BUFFER_VIEW_TYPE, RAW, FORMATTED)
234} VkBufferViewType;
235
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600236typedef enum VkChannelSwizzle_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600237{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600238 VK_CHANNEL_SWIZZLE_ZERO = 0x00000000,
239 VK_CHANNEL_SWIZZLE_ONE = 0x00000001,
240 VK_CHANNEL_SWIZZLE_R = 0x00000002,
241 VK_CHANNEL_SWIZZLE_G = 0x00000003,
242 VK_CHANNEL_SWIZZLE_B = 0x00000004,
243 VK_CHANNEL_SWIZZLE_A = 0x00000005,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600244
Tony Barbour8205d902015-04-16 15:59:00 -0600245 VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600246} VkChannelSwizzle;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600247
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600248typedef enum VkDescriptorType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600249{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600250 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -0600251 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
252 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
253 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
254 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
255 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600256 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -0600257 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600258 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -0600259 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600260
Tony Barbour8205d902015-04-16 15:59:00 -0600261 VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600262} VkDescriptorType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600263
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600264typedef enum VkDescriptorPoolUsage_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600265{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600266 VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000,
267 VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600268
Tony Barbour8205d902015-04-16 15:59:00 -0600269 VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600270} VkDescriptorPoolUsage;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600271
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600272typedef enum VkDescriptorUpdateMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600273{
Tony Barbour8205d902015-04-16 15:59:00 -0600274 VK_DESCRIPTOR_UPDATE_MODE_COPY = 0x00000000,
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600275 VK_DESCRIPTOR_UPDATE_MODE_FASTEST = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600276
Tony Barbour8205d902015-04-16 15:59:00 -0600277 VK_ENUM_RANGE(DESCRIPTOR_UPDATE_MODE, COPY, FASTEST)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600278} VkDescriptorUpdateMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600279
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600280typedef enum VkDescriptorSetUsage_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600281{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600282 VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000,
283 VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600284
Tony Barbour8205d902015-04-16 15:59:00 -0600285 VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600286} VkDescriptorSetUsage;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600287
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600288typedef enum VkQueryType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600289{
Tony Barbour8205d902015-04-16 15:59:00 -0600290 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
291 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600292
Tony Barbour8205d902015-04-16 15:59:00 -0600293 VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600294} VkQueryType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600295
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600296typedef enum VkTimestampType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600297{
Tony Barbour8205d902015-04-16 15:59:00 -0600298 VK_TIMESTAMP_TYPE_TOP = 0x00000000,
299 VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600300
Tony Barbour8205d902015-04-16 15:59:00 -0600301 VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600302} VkTimestampType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600303
Tony Barbour8205d902015-04-16 15:59:00 -0600304typedef enum VkBorderColor_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600305{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600306 VK_BORDER_COLOR_OPAQUE_WHITE = 0x00000000,
307 VK_BORDER_COLOR_TRANSPARENT_BLACK = 0x00000001,
308 VK_BORDER_COLOR_OPAQUE_BLACK = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600309
Tony Barbour8205d902015-04-16 15:59:00 -0600310 VK_ENUM_RANGE(BORDER_COLOR, OPAQUE_WHITE, OPAQUE_BLACK)
311} VkBorderColor;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600312
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600313typedef enum VkPipelineBindPoint_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600314{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600315 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000,
316 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600317
Tony Barbour8205d902015-04-16 15:59:00 -0600318 VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600319} VkPipelineBindPoint;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600320
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600321typedef enum VkStateBindPoint_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600322{
Tony Barbour8205d902015-04-16 15:59:00 -0600323 VK_STATE_BIND_POINT_VIEWPORT = 0x00000000,
324 VK_STATE_BIND_POINT_RASTER = 0x00000001,
325 VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002,
326 VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600327
Tony Barbour8205d902015-04-16 15:59:00 -0600328 VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600329} VkStateBindPoint;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600330
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600331typedef enum VkPrimitiveTopology_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600332{
Tony Barbour8205d902015-04-16 15:59:00 -0600333 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
334 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
335 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
336 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
337 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
338 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
339 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ = 0x00000006,
340 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ = 0x00000007,
341 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ = 0x00000008,
342 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ = 0x00000009,
343 VK_PRIMITIVE_TOPOLOGY_PATCH = 0x0000000a,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600344
Tony Barbour8205d902015-04-16 15:59:00 -0600345 VK_ENUM_RANGE(PRIMITIVE_TOPOLOGY, POINT_LIST, PATCH)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600346} VkPrimitiveTopology;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600347
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600348typedef enum VkIndexType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600349{
Tony Barbour8205d902015-04-16 15:59:00 -0600350 VK_INDEX_TYPE_UINT8 = 0x00000000,
351 VK_INDEX_TYPE_UINT16 = 0x00000001,
352 VK_INDEX_TYPE_UINT32 = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600353
Tony Barbour8205d902015-04-16 15:59:00 -0600354 VK_ENUM_RANGE(INDEX_TYPE, UINT8, UINT32)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600355} VkIndexType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600356
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600357typedef enum VkTexFilter_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600358{
Tony Barbour8205d902015-04-16 15:59:00 -0600359 VK_TEX_FILTER_NEAREST = 0x00000000,
360 VK_TEX_FILTER_LINEAR = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600361
Tony Barbour8205d902015-04-16 15:59:00 -0600362 VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600363} VkTexFilter;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600364
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600365typedef enum VkTexMipmapMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600366{
Tony Barbour8205d902015-04-16 15:59:00 -0600367 VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level
368 VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level
369 VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600370
Tony Barbour8205d902015-04-16 15:59:00 -0600371 VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600372} VkTexMipmapMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600373
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600374typedef enum VkTexAddress_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600375{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600376 VK_TEX_ADDRESS_WRAP = 0x00000000,
377 VK_TEX_ADDRESS_MIRROR = 0x00000001,
378 VK_TEX_ADDRESS_CLAMP = 0x00000002,
379 VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
380 VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600381
Tony Barbour8205d902015-04-16 15:59:00 -0600382 VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600383} VkTexAddress;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600384
Tony Barbour8205d902015-04-16 15:59:00 -0600385typedef enum VkCompareOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600386{
Tony Barbour8205d902015-04-16 15:59:00 -0600387 VK_COMPARE_OP_NEVER = 0x00000000,
388 VK_COMPARE_OP_LESS = 0x00000001,
389 VK_COMPARE_OP_EQUAL = 0x00000002,
390 VK_COMPARE_OP_LESS_EQUAL = 0x00000003,
391 VK_COMPARE_OP_GREATER = 0x00000004,
392 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
393 VK_COMPARE_OP_GREATER_EQUAL = 0x00000006,
394 VK_COMPARE_OP_ALWAYS = 0x00000007,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600395
Tony Barbour8205d902015-04-16 15:59:00 -0600396 VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS)
397} VkCompareOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600398
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600399typedef enum VkFillMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600400{
Tony Barbour8205d902015-04-16 15:59:00 -0600401 VK_FILL_MODE_POINTS = 0x00000000,
402 VK_FILL_MODE_WIREFRAME = 0x00000001,
403 VK_FILL_MODE_SOLID = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600404
Tony Barbour8205d902015-04-16 15:59:00 -0600405 VK_ENUM_RANGE(FILL_MODE, POINTS, SOLID)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600406} VkFillMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600407
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600408typedef enum VkCullMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600409{
Tony Barbour8205d902015-04-16 15:59:00 -0600410 VK_CULL_MODE_NONE = 0x00000000,
411 VK_CULL_MODE_FRONT = 0x00000001,
412 VK_CULL_MODE_BACK = 0x00000002,
413 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600414
Tony Barbour8205d902015-04-16 15:59:00 -0600415 VK_ENUM_RANGE(CULL_MODE, NONE, FRONT_AND_BACK)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600416} VkCullMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600417
Tony Barbour8205d902015-04-16 15:59:00 -0600418typedef enum VkFrontFace_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600419{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600420 VK_FRONT_FACE_CCW = 0x00000000,
421 VK_FRONT_FACE_CW = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600422
Tony Barbour8205d902015-04-16 15:59:00 -0600423 VK_ENUM_RANGE(FRONT_FACE, CCW, CW)
424} VkFrontFace;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600425
Tony Barbour8205d902015-04-16 15:59:00 -0600426typedef enum VkProvokingVertex_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600427{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600428 VK_PROVOKING_VERTEX_FIRST = 0x00000000,
429 VK_PROVOKING_VERTEX_LAST = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600430
Tony Barbour8205d902015-04-16 15:59:00 -0600431 VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST)
432} VkProvokingVertex;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600433
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600434typedef enum VkCoordinateOrigin_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600435{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600436 VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
437 VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600438
Tony Barbour8205d902015-04-16 15:59:00 -0600439 VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600440} VkCoordinateOrigin;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600441
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600442typedef enum VkDepthMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600443{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600444 VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000,
445 VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600446
Tony Barbour8205d902015-04-16 15:59:00 -0600447 VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600448} VkDepthMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600449
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600450typedef enum VkBlend_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600451{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600452 VK_BLEND_ZERO = 0x00000000,
453 VK_BLEND_ONE = 0x00000001,
454 VK_BLEND_SRC_COLOR = 0x00000002,
455 VK_BLEND_ONE_MINUS_SRC_COLOR = 0x00000003,
456 VK_BLEND_DEST_COLOR = 0x00000004,
457 VK_BLEND_ONE_MINUS_DEST_COLOR = 0x00000005,
458 VK_BLEND_SRC_ALPHA = 0x00000006,
459 VK_BLEND_ONE_MINUS_SRC_ALPHA = 0x00000007,
460 VK_BLEND_DEST_ALPHA = 0x00000008,
461 VK_BLEND_ONE_MINUS_DEST_ALPHA = 0x00000009,
462 VK_BLEND_CONSTANT_COLOR = 0x0000000a,
463 VK_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
464 VK_BLEND_CONSTANT_ALPHA = 0x0000000c,
465 VK_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
466 VK_BLEND_SRC_ALPHA_SATURATE = 0x0000000e,
467 VK_BLEND_SRC1_COLOR = 0x0000000f,
468 VK_BLEND_ONE_MINUS_SRC1_COLOR = 0x00000010,
469 VK_BLEND_SRC1_ALPHA = 0x00000011,
470 VK_BLEND_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600471
Tony Barbour8205d902015-04-16 15:59:00 -0600472 VK_ENUM_RANGE(BLEND, ZERO, ONE_MINUS_SRC1_ALPHA)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600473} VkBlend;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600474
Tony Barbour8205d902015-04-16 15:59:00 -0600475typedef enum VkBlendOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600476{
Tony Barbour8205d902015-04-16 15:59:00 -0600477 VK_BLEND_OP_ADD = 0x00000000,
478 VK_BLEND_OP_SUBTRACT = 0x00000001,
479 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
480 VK_BLEND_OP_MIN = 0x00000003,
481 VK_BLEND_OP_MAX = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600482
Tony Barbour8205d902015-04-16 15:59:00 -0600483 VK_ENUM_RANGE(BLEND_OP, ADD, MAX)
484} VkBlendOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600485
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600486typedef enum VkStencilOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600487{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600488 VK_STENCIL_OP_KEEP = 0x00000000,
489 VK_STENCIL_OP_ZERO = 0x00000001,
490 VK_STENCIL_OP_REPLACE = 0x00000002,
491 VK_STENCIL_OP_INC_CLAMP = 0x00000003,
492 VK_STENCIL_OP_DEC_CLAMP = 0x00000004,
493 VK_STENCIL_OP_INVERT = 0x00000005,
494 VK_STENCIL_OP_INC_WRAP = 0x00000006,
495 VK_STENCIL_OP_DEC_WRAP = 0x00000007,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600496
Tony Barbour8205d902015-04-16 15:59:00 -0600497 VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600498} VkStencilOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600499
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600500typedef enum VkLogicOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600501{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600502 VK_LOGIC_OP_COPY = 0x00000000,
503 VK_LOGIC_OP_CLEAR = 0x00000001,
504 VK_LOGIC_OP_AND = 0x00000002,
505 VK_LOGIC_OP_AND_REVERSE = 0x00000003,
506 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
507 VK_LOGIC_OP_NOOP = 0x00000005,
508 VK_LOGIC_OP_XOR = 0x00000006,
509 VK_LOGIC_OP_OR = 0x00000007,
510 VK_LOGIC_OP_NOR = 0x00000008,
511 VK_LOGIC_OP_EQUIV = 0x00000009,
512 VK_LOGIC_OP_INVERT = 0x0000000a,
513 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
514 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
515 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
516 VK_LOGIC_OP_NAND = 0x0000000e,
517 VK_LOGIC_OP_SET = 0x0000000f,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600518
Tony Barbour8205d902015-04-16 15:59:00 -0600519 VK_ENUM_RANGE(LOGIC_OP, COPY, SET)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600520} VkLogicOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600521
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600522typedef enum VkSystemAllocType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600523{
Tony Barbour8205d902015-04-16 15:59:00 -0600524 VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000,
525 VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001,
526 VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002,
527 VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003,
528 VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600529
Tony Barbour8205d902015-04-16 15:59:00 -0600530 VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600531} VkSystemAllocType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600532
Tony Barbour8205d902015-04-16 15:59:00 -0600533typedef enum VkPhysicalDeviceType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600534{
Tony Barbour8205d902015-04-16 15:59:00 -0600535 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
536 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
537 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
538 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
539 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600540
Tony Barbour8205d902015-04-16 15:59:00 -0600541 VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU)
542} VkPhysicalDeviceType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600543
Tony Barbour8205d902015-04-16 15:59:00 -0600544typedef enum VkPhysicalDeviceInfoType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600545{
Tony Barbour8205d902015-04-16 15:59:00 -0600546 // Info type for vkGetPhysicalDeviceInfo()
547 VK_PHYSICAL_DEVICE_INFO_TYPE_PROPERTIES = 0x00000000,
548 VK_PHYSICAL_DEVICE_INFO_TYPE_PERFORMANCE = 0x00000001,
549 VK_PHYSICAL_DEVICE_INFO_TYPE_QUEUE_PROPERTIES = 0x00000002,
550 VK_PHYSICAL_DEVICE_INFO_TYPE_MEMORY_PROPERTIES = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600551
Tony Barbour8205d902015-04-16 15:59:00 -0600552 VK_ENUM_RANGE(PHYSICAL_DEVICE_INFO_TYPE, PROPERTIES, MEMORY_PROPERTIES)
553} VkPhysicalDeviceInfoType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600554
Jon Ashburneb2728b2015-04-10 14:33:07 -0600555typedef enum VkExtensionInfoType_
556{
557 // Info type for vkGetGlobalExtensionInfo() and vkGetPhysicalDeviceExtensionInfo()
558 VK_EXTENSION_INFO_TYPE_COUNT = 0x00000000,
559 VK_EXTENSION_INFO_TYPE_PROPERTIES = 0x00000001,
560
561 //VK_ENUM_RANGE(EXTENSION_INFO_TYPE, COUNT, PROPERTIES)
562} VkExtensionInfoType;
563
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600564typedef enum VkFormatInfoType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600565{
566 // Info type for vkGetFormatInfo()
Tony Barbour8205d902015-04-16 15:59:00 -0600567 VK_FORMAT_INFO_TYPE_PROPERTIES = 0x00000000,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600568
Tony Barbour8205d902015-04-16 15:59:00 -0600569 VK_ENUM_RANGE(FORMAT_INFO_TYPE, PROPERTIES, PROPERTIES)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600570} VkFormatInfoType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600571
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600572typedef enum VkSubresourceInfoType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600573{
574 // Info type for vkGetImageSubresourceInfo()
Tony Barbour8205d902015-04-16 15:59:00 -0600575 VK_SUBRESOURCE_INFO_TYPE_LAYOUT = 0x00000000,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600576
Tony Barbour8205d902015-04-16 15:59:00 -0600577 VK_ENUM_RANGE(SUBRESOURCE_INFO_TYPE, LAYOUT, LAYOUT)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600578} VkSubresourceInfoType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600579
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600580typedef enum VkObjectInfoType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600581{
582 // Info type for vkGetObjectInfo()
Tony Barbour8205d902015-04-16 15:59:00 -0600583 VK_OBJECT_INFO_TYPE_MEMORY_ALLOCATION_COUNT = 0x00000000,
584 VK_OBJECT_INFO_TYPE_MEMORY_REQUIREMENTS = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600585
Tony Barbour8205d902015-04-16 15:59:00 -0600586 VK_ENUM_RANGE(OBJECT_INFO_TYPE, MEMORY_ALLOCATION_COUNT, MEMORY_REQUIREMENTS)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600587} VkObjectInfoType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600588
Tony Barbour8205d902015-04-16 15:59:00 -0600589typedef enum VkVertexInputStepRate_
590{
591 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
592 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
593 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
594
595 VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW)
596} VkVertexInputStepRate;
597
598// ------------------------------------------------------------------------------------------------
599// Vulkan format definitions
600typedef enum VkFormat_
601{
602 VK_FORMAT_UNDEFINED = 0x00000000,
603 VK_FORMAT_R4G4_UNORM = 0x00000001,
604 VK_FORMAT_R4G4_USCALED = 0x00000002,
605 VK_FORMAT_R4G4B4A4_UNORM = 0x00000003,
606 VK_FORMAT_R4G4B4A4_USCALED = 0x00000004,
607 VK_FORMAT_R5G6B5_UNORM = 0x00000005,
608 VK_FORMAT_R5G6B5_USCALED = 0x00000006,
609 VK_FORMAT_R5G5B5A1_UNORM = 0x00000007,
610 VK_FORMAT_R5G5B5A1_USCALED = 0x00000008,
611 VK_FORMAT_R8_UNORM = 0x00000009,
612 VK_FORMAT_R8_SNORM = 0x0000000A,
613 VK_FORMAT_R8_USCALED = 0x0000000B,
614 VK_FORMAT_R8_SSCALED = 0x0000000C,
615 VK_FORMAT_R8_UINT = 0x0000000D,
616 VK_FORMAT_R8_SINT = 0x0000000E,
617 VK_FORMAT_R8_SRGB = 0x0000000F,
618 VK_FORMAT_R8G8_UNORM = 0x00000010,
619 VK_FORMAT_R8G8_SNORM = 0x00000011,
620 VK_FORMAT_R8G8_USCALED = 0x00000012,
621 VK_FORMAT_R8G8_SSCALED = 0x00000013,
622 VK_FORMAT_R8G8_UINT = 0x00000014,
623 VK_FORMAT_R8G8_SINT = 0x00000015,
624 VK_FORMAT_R8G8_SRGB = 0x00000016,
625 VK_FORMAT_R8G8B8_UNORM = 0x00000017,
626 VK_FORMAT_R8G8B8_SNORM = 0x00000018,
627 VK_FORMAT_R8G8B8_USCALED = 0x00000019,
628 VK_FORMAT_R8G8B8_SSCALED = 0x0000001A,
629 VK_FORMAT_R8G8B8_UINT = 0x0000001B,
630 VK_FORMAT_R8G8B8_SINT = 0x0000001C,
631 VK_FORMAT_R8G8B8_SRGB = 0x0000001D,
632 VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E,
633 VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F,
634 VK_FORMAT_R8G8B8A8_USCALED = 0x00000020,
635 VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021,
636 VK_FORMAT_R8G8B8A8_UINT = 0x00000022,
637 VK_FORMAT_R8G8B8A8_SINT = 0x00000023,
638 VK_FORMAT_R8G8B8A8_SRGB = 0x00000024,
639 VK_FORMAT_R10G10B10A2_UNORM = 0x00000025,
640 VK_FORMAT_R10G10B10A2_SNORM = 0x00000026,
641 VK_FORMAT_R10G10B10A2_USCALED = 0x00000027,
642 VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028,
643 VK_FORMAT_R10G10B10A2_UINT = 0x00000029,
644 VK_FORMAT_R10G10B10A2_SINT = 0x0000002A,
645 VK_FORMAT_R16_UNORM = 0x0000002B,
646 VK_FORMAT_R16_SNORM = 0x0000002C,
647 VK_FORMAT_R16_USCALED = 0x0000002D,
648 VK_FORMAT_R16_SSCALED = 0x0000002E,
649 VK_FORMAT_R16_UINT = 0x0000002F,
650 VK_FORMAT_R16_SINT = 0x00000030,
651 VK_FORMAT_R16_SFLOAT = 0x00000031,
652 VK_FORMAT_R16G16_UNORM = 0x00000032,
653 VK_FORMAT_R16G16_SNORM = 0x00000033,
654 VK_FORMAT_R16G16_USCALED = 0x00000034,
655 VK_FORMAT_R16G16_SSCALED = 0x00000035,
656 VK_FORMAT_R16G16_UINT = 0x00000036,
657 VK_FORMAT_R16G16_SINT = 0x00000037,
658 VK_FORMAT_R16G16_SFLOAT = 0x00000038,
659 VK_FORMAT_R16G16B16_UNORM = 0x00000039,
660 VK_FORMAT_R16G16B16_SNORM = 0x0000003A,
661 VK_FORMAT_R16G16B16_USCALED = 0x0000003B,
662 VK_FORMAT_R16G16B16_SSCALED = 0x0000003C,
663 VK_FORMAT_R16G16B16_UINT = 0x0000003D,
664 VK_FORMAT_R16G16B16_SINT = 0x0000003E,
665 VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F,
666 VK_FORMAT_R16G16B16A16_UNORM = 0x00000040,
667 VK_FORMAT_R16G16B16A16_SNORM = 0x00000041,
668 VK_FORMAT_R16G16B16A16_USCALED = 0x00000042,
669 VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043,
670 VK_FORMAT_R16G16B16A16_UINT = 0x00000044,
671 VK_FORMAT_R16G16B16A16_SINT = 0x00000045,
672 VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046,
673 VK_FORMAT_R32_UINT = 0x00000047,
674 VK_FORMAT_R32_SINT = 0x00000048,
675 VK_FORMAT_R32_SFLOAT = 0x00000049,
676 VK_FORMAT_R32G32_UINT = 0x0000004A,
677 VK_FORMAT_R32G32_SINT = 0x0000004B,
678 VK_FORMAT_R32G32_SFLOAT = 0x0000004C,
679 VK_FORMAT_R32G32B32_UINT = 0x0000004D,
680 VK_FORMAT_R32G32B32_SINT = 0x0000004E,
681 VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F,
682 VK_FORMAT_R32G32B32A32_UINT = 0x00000050,
683 VK_FORMAT_R32G32B32A32_SINT = 0x00000051,
684 VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052,
685 VK_FORMAT_R64_SFLOAT = 0x00000053,
686 VK_FORMAT_R64G64_SFLOAT = 0x00000054,
687 VK_FORMAT_R64G64B64_SFLOAT = 0x00000055,
688 VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056,
689 VK_FORMAT_R11G11B10_UFLOAT = 0x00000057,
690 VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058,
691 VK_FORMAT_D16_UNORM = 0x00000059,
692 VK_FORMAT_D24_UNORM = 0x0000005A,
693 VK_FORMAT_D32_SFLOAT = 0x0000005B,
694 VK_FORMAT_S8_UINT = 0x0000005C,
695 VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D,
696 VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E,
697 VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F,
698 VK_FORMAT_BC1_RGB_UNORM = 0x00000060,
699 VK_FORMAT_BC1_RGB_SRGB = 0x00000061,
700 VK_FORMAT_BC1_RGBA_UNORM = 0x00000062,
701 VK_FORMAT_BC1_RGBA_SRGB = 0x00000063,
702 VK_FORMAT_BC2_UNORM = 0x00000064,
703 VK_FORMAT_BC2_SRGB = 0x00000065,
704 VK_FORMAT_BC3_UNORM = 0x00000066,
705 VK_FORMAT_BC3_SRGB = 0x00000067,
706 VK_FORMAT_BC4_UNORM = 0x00000068,
707 VK_FORMAT_BC4_SNORM = 0x00000069,
708 VK_FORMAT_BC5_UNORM = 0x0000006A,
709 VK_FORMAT_BC5_SNORM = 0x0000006B,
710 VK_FORMAT_BC6H_UFLOAT = 0x0000006C,
711 VK_FORMAT_BC6H_SFLOAT = 0x0000006D,
712 VK_FORMAT_BC7_UNORM = 0x0000006E,
713 VK_FORMAT_BC7_SRGB = 0x0000006F,
714 VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070,
715 VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071,
716 VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072,
717 VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073,
718 VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074,
719 VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075,
720 VK_FORMAT_EAC_R11_UNORM = 0x00000076,
721 VK_FORMAT_EAC_R11_SNORM = 0x00000077,
722 VK_FORMAT_EAC_R11G11_UNORM = 0x00000078,
723 VK_FORMAT_EAC_R11G11_SNORM = 0x00000079,
724 VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A,
725 VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B,
726 VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C,
727 VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D,
728 VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E,
729 VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F,
730 VK_FORMAT_ASTC_6x5_UNORM = 0x00000080,
731 VK_FORMAT_ASTC_6x5_SRGB = 0x00000081,
732 VK_FORMAT_ASTC_6x6_UNORM = 0x00000082,
733 VK_FORMAT_ASTC_6x6_SRGB = 0x00000083,
734 VK_FORMAT_ASTC_8x5_UNORM = 0x00000084,
735 VK_FORMAT_ASTC_8x5_SRGB = 0x00000085,
736 VK_FORMAT_ASTC_8x6_UNORM = 0x00000086,
737 VK_FORMAT_ASTC_8x6_SRGB = 0x00000087,
738 VK_FORMAT_ASTC_8x8_UNORM = 0x00000088,
739 VK_FORMAT_ASTC_8x8_SRGB = 0x00000089,
740 VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A,
741 VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B,
742 VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C,
743 VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D,
744 VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E,
745 VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F,
746 VK_FORMAT_ASTC_10x10_UNORM = 0x00000090,
747 VK_FORMAT_ASTC_10x10_SRGB = 0x00000091,
748 VK_FORMAT_ASTC_12x10_UNORM = 0x00000092,
749 VK_FORMAT_ASTC_12x10_SRGB = 0x00000093,
750 VK_FORMAT_ASTC_12x12_UNORM = 0x00000094,
751 VK_FORMAT_ASTC_12x12_SRGB = 0x00000095,
752 VK_FORMAT_B4G4R4A4_UNORM = 0x00000096,
753 VK_FORMAT_B5G5R5A1_UNORM = 0x00000097,
754 VK_FORMAT_B5G6R5_UNORM = 0x00000098,
755 VK_FORMAT_B5G6R5_USCALED = 0x00000099,
756 VK_FORMAT_B8G8R8_UNORM = 0x0000009A,
757 VK_FORMAT_B8G8R8_SNORM = 0x0000009B,
758 VK_FORMAT_B8G8R8_USCALED = 0x0000009C,
759 VK_FORMAT_B8G8R8_SSCALED = 0x0000009D,
760 VK_FORMAT_B8G8R8_UINT = 0x0000009E,
761 VK_FORMAT_B8G8R8_SINT = 0x0000009F,
762 VK_FORMAT_B8G8R8_SRGB = 0x000000A0,
763 VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1,
764 VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2,
765 VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3,
766 VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4,
767 VK_FORMAT_B8G8R8A8_UINT = 0x000000A5,
768 VK_FORMAT_B8G8R8A8_SINT = 0x000000A6,
769 VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7,
770 VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8,
771 VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9,
772 VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA,
773 VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB,
774 VK_FORMAT_B10G10R10A2_UINT = 0x000000AC,
775 VK_FORMAT_B10G10R10A2_SINT = 0x000000AD,
776
777 VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT)
778} VkFormat;
779
780// Shader stage enumerant
781typedef enum VkShaderStage_
782{
783 VK_SHADER_STAGE_VERTEX = 0,
784 VK_SHADER_STAGE_TESS_CONTROL = 1,
785 VK_SHADER_STAGE_TESS_EVALUATION = 2,
786 VK_SHADER_STAGE_GEOMETRY = 3,
787 VK_SHADER_STAGE_FRAGMENT = 4,
788 VK_SHADER_STAGE_COMPUTE = 5,
789
790 VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE)
791} VkShaderStage;
792
793// Structure type enumerant
794typedef enum VkStructureType_
795{
796 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
797 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
798 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
799 VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO = 3,
800 VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO = 4,
801 VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO = 5,
802 VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO = 6,
803 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 7,
804 VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 8,
805 VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 9,
806 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 10,
807 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 11,
808 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 12,
809 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 13,
810 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 14,
811 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 15,
812 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 16,
813 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 17,
814 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 18,
815 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 19,
816 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 20,
817 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 21,
818 VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO = 22,
819 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 23,
820 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 24,
821 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 25,
822 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO = 26,
823 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 27,
824 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 28,
825 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 29,
826 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 30,
827 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 31,
828 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 32,
829 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 33,
830 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 34,
831 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 35,
832 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 36,
833 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
834 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 38,
835 VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO = 39,
836 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 40,
837 VK_STRUCTURE_TYPE_LAYER_CREATE_INFO = 41,
838 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 42,
839 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 43,
840 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 44,
841 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 45,
842 VK_STRUCTURE_TYPE_UPDATE_SAMPLERS = 46,
843 VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES = 47,
844 VK_STRUCTURE_TYPE_UPDATE_IMAGES = 48,
845 VK_STRUCTURE_TYPE_UPDATE_BUFFERS = 49,
846 VK_STRUCTURE_TYPE_UPDATE_AS_COPY = 50,
847 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 51,
848
849 VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, INSTANCE_CREATE_INFO)
850} VkStructureType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600851
852// ------------------------------------------------------------------------------------------------
853// Error and return codes
854
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600855typedef enum VkResult_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600856{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600857 // Return codes for successful operation execution (> = 0)
858 VK_SUCCESS = 0x0000000,
859 VK_UNSUPPORTED = 0x0000001,
860 VK_NOT_READY = 0x0000002,
861 VK_TIMEOUT = 0x0000003,
862 VK_EVENT_SET = 0x0000004,
863 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600864
865 // Error codes (negative values)
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600866 VK_ERROR_UNKNOWN = -(0x00000001),
867 VK_ERROR_UNAVAILABLE = -(0x00000002),
868 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
Tony Barbour8205d902015-04-16 15:59:00 -0600869 VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004),
870 VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005),
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600871 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
872 VK_ERROR_DEVICE_LOST = -(0x00000007),
873 VK_ERROR_INVALID_POINTER = -(0x00000008),
874 VK_ERROR_INVALID_VALUE = -(0x00000009),
875 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
876 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
877 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
878 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
879 VK_ERROR_INVALID_FLAGS = -(0x0000000E),
880 VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F),
881 VK_ERROR_INVALID_FORMAT = -(0x00000010),
882 VK_ERROR_INVALID_IMAGE = -(0x00000011),
883 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012),
884 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013),
885 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014),
886 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015),
887 VK_ERROR_BAD_SHADER_CODE = -(0x00000016),
888 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017),
889 VK_ERROR_TOO_MANY_MEMORY_REFERENCES = -(0x00000018),
890 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
891 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
892 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
893 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
894 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
895 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
896 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
897 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
898 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
899 VK_ERROR_NOT_SHAREABLE = -(0x00000022),
Tony Barbour8205d902015-04-16 15:59:00 -0600900
901 VK_MAX_ENUM(RESULT)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600902} VkResult;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600903
904// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600905// Flags
906
907// Device creation flags
Tony Barbour8205d902015-04-16 15:59:00 -0600908typedef VkFlags VkDeviceCreateFlags;
909typedef enum VkDeviceCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600910{
Tony Barbour8205d902015-04-16 15:59:00 -0600911 VK_DEVICE_CREATE_VALIDATION_BIT = VK_BIT(0),
912 VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT = VK_BIT(1),
913} VkDeviceCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600914
915// Queue capabilities
Tony Barbour8205d902015-04-16 15:59:00 -0600916typedef VkFlags VkQueueFlags;
917typedef enum VkQueueFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600918{
Tony Barbour8205d902015-04-16 15:59:00 -0600919 VK_QUEUE_GRAPHICS_BIT = VK_BIT(0), // Queue supports graphics operations
920 VK_QUEUE_COMPUTE_BIT = VK_BIT(1), // Queue supports compute operations
921 VK_QUEUE_DMA_BIT = VK_BIT(2), // Queue supports DMA operations
922 VK_QUEUE_MEMMGR_BIT = VK_BIT(3), // Queue supports memory management operations
923 VK_QUEUE_EXTENDED_BIT = VK_BIT(30), // Extended queue
924} VkQueueFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600925
Tony Barbour8205d902015-04-16 15:59:00 -0600926// Memory properties passed into vkAllocMemory().
927typedef VkFlags VkMemoryPropertyFlags;
928typedef enum VkMemoryPropertyFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600929{
Tony Barbour8205d902015-04-16 15:59:00 -0600930 VK_MEMORY_PROPERTY_DEVICE_ONLY = 0, // If otherwise stated, then allocate memory on device
931 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = VK_BIT(0), // Memory should be mappable by host
932 VK_MEMORY_PROPERTY_HOST_DEVICE_COHERENT_BIT = VK_BIT(1), // Memory should be coherent between host and device accesses
933 VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = VK_BIT(2), // Memory should not be cached by the host
934 VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = VK_BIT(3), // Memory should support host write combining
935 VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL = VK_BIT(4), // If set, prefer host access
936 VK_MEMORY_PROPERTY_SHAREABLE_BIT = VK_BIT(5),
937} VkMemoryPropertyFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600938
Tony Barbour8205d902015-04-16 15:59:00 -0600939// Memory output flags passed to resource transition commands
940typedef VkFlags VkMemoryOutputFlags;
941typedef enum VkMemoryOutputFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600942{
Tony Barbour8205d902015-04-16 15:59:00 -0600943 VK_MEMORY_OUTPUT_CPU_WRITE_BIT = VK_BIT(0), // Controls output coherency of CPU writes
944 VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes
945 VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes
946 VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes
947 VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations
948} VkMemoryOutputFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600949
Tony Barbour8205d902015-04-16 15:59:00 -0600950// Memory input flags passed to resource transition commands
951typedef VkFlags VkMemoryInputFlags;
952typedef enum VkMemoryInputFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600953{
Tony Barbour8205d902015-04-16 15:59:00 -0600954 VK_MEMORY_INPUT_CPU_READ_BIT = VK_BIT(0), // Controls input coherency of CPU reads
955 VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads
956 VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches
957 VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches
958 VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads
959 VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads
960 VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads
961 VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads
962 VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(8), // Controls input coherency of transfer operations
963} VkMemoryInputFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600964
Tony Barbour8205d902015-04-16 15:59:00 -0600965// Buffer usage flags
966typedef VkFlags VkBufferUsageFlags;
967typedef enum VkBufferUsageFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600968{
Tony Barbour8205d902015-04-16 15:59:00 -0600969 VK_BUFFER_USAGE_GENERAL = 0, // No special usage
970 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
971 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
972 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(2), // Can be used as TBO
973 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(3), // Can be used as IBO
974 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = VK_BIT(4), // Can be used as UBO
975 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = VK_BIT(5), // Can be used as SSBO
976 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = VK_BIT(6), // Can be used as source of fixed function index fetch (index buffer)
977 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = VK_BIT(7), // Can be used as source of fixed function vertex fetch (VBO)
978 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = VK_BIT(8), // Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
979} VkBufferUsageFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600980
Tony Barbour8205d902015-04-16 15:59:00 -0600981// Buffer creation flags
982typedef VkFlags VkBufferCreateFlags;
983typedef enum VkBufferCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600984{
Tony Barbour8205d902015-04-16 15:59:00 -0600985 VK_BUFFER_CREATE_SHAREABLE_BIT = VK_BIT(0), // Buffer should be shareable
986 VK_BUFFER_CREATE_SPARSE_BIT = VK_BIT(1), // Buffer should support sparse backing
987} VkBufferCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600988
Tony Barbour8205d902015-04-16 15:59:00 -0600989// Shader stage flags
990typedef VkFlags VkShaderStageFlags;
991typedef enum VkShaderStageFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600992{
Tony Barbour8205d902015-04-16 15:59:00 -0600993 VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0),
994 VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1),
995 VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2),
996 VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3),
997 VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4),
998 VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5),
999
1000 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1001} VkShaderStageFlagBits;
1002
1003// Image usage flags
1004typedef VkFlags VkImageUsageFlags;
1005typedef enum VkImageUsageFlagBits_
1006{
1007 VK_IMAGE_USAGE_GENERAL = 0, // No special usage
1008 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
1009 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
1010 VK_IMAGE_USAGE_SAMPLED_BIT = VK_BIT(2), // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1011 VK_IMAGE_USAGE_STORAGE_BIT = VK_BIT(3), // Can be used as storage image (STORAGE_IMAGE descriptor type)
1012 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = VK_BIT(4), // Can be used as framebuffer color attachment
1013 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = VK_BIT(5), // Can be used as framebuffer depth/stencil attachment
1014 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = VK_BIT(6), // Image data not needed outside of rendering
1015} VkImageUsageFlagBits;
1016
1017// Image creation flags
1018typedef VkFlags VkImageCreateFlags;
1019typedef enum VkImageCreateFlagBits_
1020{
1021 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = VK_BIT(0),
1022 VK_IMAGE_CREATE_CLONEABLE_BIT = VK_BIT(1),
1023 VK_IMAGE_CREATE_SHAREABLE_BIT = VK_BIT(2), // Image should be shareable
1024 VK_IMAGE_CREATE_SPARSE_BIT = VK_BIT(3), // Image should support sparse backing
1025 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = VK_BIT(4), // Allows image views to have different format than the base image
1026 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = VK_BIT(5), // Allows creating image views with cube type from the created image
1027} VkImageCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001028
1029// Depth-stencil view creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001030typedef VkFlags VkDepthStencilViewCreateFlags;
1031typedef enum VkDepthStencilViewCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001032{
Tony Barbour8205d902015-04-16 15:59:00 -06001033 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_DEPTH_BIT = VK_BIT(0),
1034 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = VK_BIT(1),
1035} VkDepthStencilViewCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001036
1037// Pipeline creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001038typedef VkFlags VkPipelineCreateFlags;
1039typedef enum VkPipelineCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001040{
Tony Barbour8205d902015-04-16 15:59:00 -06001041 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0),
1042 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1),
1043} VkPipelineCreateFlagBits;
1044
1045// Channel flags
1046typedef VkFlags VkChannelFlags;
1047typedef enum VkChannelFlagBits_
1048{
1049 VK_CHANNEL_R_BIT = VK_BIT(0),
1050 VK_CHANNEL_G_BIT = VK_BIT(1),
1051 VK_CHANNEL_B_BIT = VK_BIT(2),
1052 VK_CHANNEL_A_BIT = VK_BIT(3),
1053} VkChannelFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001054
1055// Fence creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001056typedef VkFlags VkFenceCreateFlags;
1057typedef enum VkFenceCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001058{
Tony Barbour8205d902015-04-16 15:59:00 -06001059 VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0),
1060} VkFenceCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001061
1062// Semaphore creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001063typedef VkFlags VkSemaphoreCreateFlags;
1064typedef enum VkSemaphoreCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001065{
Tony Barbour8205d902015-04-16 15:59:00 -06001066 VK_SEMAPHORE_CREATE_SHAREABLE_BIT = VK_BIT(0),
1067} VkSemaphoreCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001068
1069// Format capability flags
Tony Barbour8205d902015-04-16 15:59:00 -06001070typedef VkFlags VkFormatFeatureFlags;
1071typedef enum VkFormatFeatureFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001072{
Tony Barbour8205d902015-04-16 15:59:00 -06001073 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1074 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1075 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images
1076 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs)
1077 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs)
1078 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers
1079 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs)
1080 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images
1081 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images
1082 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images
1083 VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits
1084} VkFormatFeatureFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001085
Tony Barbour8205d902015-04-16 15:59:00 -06001086// Query control flags
1087typedef VkFlags VkQueryControlFlags;
1088typedef enum VkQueryControlFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001089{
Tony Barbour8205d902015-04-16 15:59:00 -06001090 VK_QUERY_CONTROL_CONSERVATIVE_BIT = VK_BIT(0), // Allow conservative results to be collected by the query
1091} VkQueryControlFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001092
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06001093// Query result flags
Tony Barbour8205d902015-04-16 15:59:00 -06001094typedef VkFlags VkQueryResultFlags;
1095typedef enum VkQueryResultFlagBits_
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06001096{
Tony Barbour8205d902015-04-16 15:59:00 -06001097 VK_QUERY_RESULT_32_BIT = 0, // Results of the queries are written to the destination buffer as 32-bit values
1098 VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values
1099 // VK_QUERY_RESULT_NO_WAIT_BIT = 0, // Results of the queries aren't waited on before proceeding with the result copy
1100 VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy
1101 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written
1102 VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available
1103} VkQueryResultFlagBits;
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06001104
Tony Barbour8205d902015-04-16 15:59:00 -06001105// Physical device compatibility flags
1106typedef VkFlags VkPhysicalDeviceCompatibilityFlags;
1107typedef enum VkPhysicalDeviceCompatibilityFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001108{
Tony Barbour8205d902015-04-16 15:59:00 -06001109 VK_PHYSICAL_DEVICE_COMPATIBILITY_FEATURES_BIT = VK_BIT(0),
1110 VK_PHYSICAL_DEVICE_COMPATIBILITY_IQ_MATCH_BIT = VK_BIT(1),
1111 VK_PHYSICAL_DEVICE_COMPATIBILITY_PEER_TRANSFER_BIT = VK_BIT(2),
1112 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_MEMORY_BIT = VK_BIT(3),
1113 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_SYNC_BIT = VK_BIT(4),
1114 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_DEVICE0_DISPLAY_BIT = VK_BIT(5),
1115 VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_DEVICE1_DISPLAY_BIT = VK_BIT(6),
1116} VkPhysicalDeviceCompatibilityFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001117
Tony Barbour8205d902015-04-16 15:59:00 -06001118// Shader creation flags
1119typedef VkFlags VkShaderCreateFlags;
1120
1121// Event creation flags
1122typedef VkFlags VkEventCreateFlags;
1123
1124// Command buffer creation flags
1125typedef VkFlags VkCmdBufferCreateFlags;
1126
1127// Command buffer optimization flags
1128typedef VkFlags VkCmdBufferOptimizeFlags;
1129typedef enum VkCmdBufferOptimizeFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001130{
Tony Barbour8205d902015-04-16 15:59:00 -06001131 VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0),
1132 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1),
1133 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2),
1134 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3),
1135} VkCmdBufferOptimizeFlagBits;
1136
1137// Memory mapping flags
1138typedef VkFlags VkMemoryMapFlags;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001139
1140// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001141// Vulkan structures
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001142
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001143typedef struct VkOffset2D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001144{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001145 int32_t x;
1146 int32_t y;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001147} VkOffset2D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001148
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001149typedef struct VkOffset3D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001150{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001151 int32_t x;
1152 int32_t y;
1153 int32_t z;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001154} VkOffset3D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001155
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001156typedef struct VkExtent2D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001157{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001158 int32_t width;
1159 int32_t height;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001160} VkExtent2D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001161
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001162typedef struct VkExtent3D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001163{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001164 int32_t width;
1165 int32_t height;
1166 int32_t depth;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001167} VkExtent3D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001168
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001169typedef struct VkViewport_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001170{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001171 float originX;
1172 float originY;
1173 float width;
1174 float height;
1175 float minDepth;
1176 float maxDepth;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001177} VkViewport;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001178
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001179typedef struct VkRect_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001180{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001181 VkOffset2D offset;
1182 VkExtent2D extent;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001183} VkRect;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001184
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001185typedef struct VkChannelMapping_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001186{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001187 VkChannelSwizzle r;
1188 VkChannelSwizzle g;
1189 VkChannelSwizzle b;
1190 VkChannelSwizzle a;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001191} VkChannelMapping;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001192
Tony Barbour8205d902015-04-16 15:59:00 -06001193typedef struct VkPhysicalDeviceProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001194{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001195 uint32_t apiVersion;
1196 uint32_t driverVersion;
1197 uint32_t vendorId;
1198 uint32_t deviceId;
Tony Barbour8205d902015-04-16 15:59:00 -06001199 VkPhysicalDeviceType deviceType;
1200 char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
1201 VkDeviceSize maxInlineMemoryUpdateSize;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001202 uint32_t maxBoundDescriptorSets;
1203 uint32_t maxThreadGroupSize;
1204 uint64_t timestampFrequency;
1205 bool32_t multiColorAttachmentClears;
1206 uint32_t maxDescriptorSets; // at least 2?
1207 uint32_t maxViewports; // at least 16?
1208 uint32_t maxColorAttachments; // at least 8?
Tony Barbour8205d902015-04-16 15:59:00 -06001209} VkPhysicalDeviceProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001210
Tony Barbour8205d902015-04-16 15:59:00 -06001211typedef struct VkPhysicalDevicePerformance_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001212{
Tony Barbour8205d902015-04-16 15:59:00 -06001213 float maxDeviceClock;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001214 float aluPerClock;
1215 float texPerClock;
1216 float primsPerClock;
1217 float pixelsPerClock;
Tony Barbour8205d902015-04-16 15:59:00 -06001218} VkPhysicalDevicePerformance;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001219
Tony Barbour8205d902015-04-16 15:59:00 -06001220typedef struct VkPhysicalDeviceCompatibilityInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001221{
Tony Barbour8205d902015-04-16 15:59:00 -06001222 VkPhysicalDeviceCompatibilityFlags compatibilityFlags;
1223} VkPhysicalDeviceCompatibilityInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001224
Jon Ashburneb2728b2015-04-10 14:33:07 -06001225typedef struct VkExtensionProperties_
1226{
1227 char extName[VK_MAX_EXTENSION_NAME]; // extension name
1228 uint32_t version; // version of the extension specification
1229} VkExtensionProperties;
1230
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001231typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001232{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001233 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001234 const void* pNext; // Next structure in chain
1235 const char* pAppName;
1236 uint32_t appVersion;
1237 const char* pEngineName;
1238 uint32_t engineVersion;
1239 uint32_t apiVersion;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001240} VkApplicationInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001241
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001242typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001243 void* pUserData,
1244 size_t size,
1245 size_t alignment,
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001246 VkSystemAllocType allocType);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001247
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001248typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001249 void* pUserData,
1250 void* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001251
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001252typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001253{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001254 void* pUserData;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001255 PFN_vkAllocFunction pfnAlloc;
1256 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001257} VkAllocCallbacks;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001258
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001259typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001260{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001261 uint32_t queueNodeIndex;
1262 uint32_t queueCount;
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001263} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001264
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001265typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001266{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001267 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001268 const void* pNext; // Pointer to next structure
1269 uint32_t queueRecordCount;
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001270 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001271 uint32_t extensionCount;
1272 const char*const* ppEnabledExtensionNames;
Tony Barbour8205d902015-04-16 15:59:00 -06001273 VkDeviceCreateFlags flags; // Device creation flags
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001274} VkDeviceCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001275
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001276typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001277{
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001278 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001279 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001280 const VkApplicationInfo* pAppInfo;
1281 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001282 uint32_t extensionCount;
1283 const char*const* ppEnabledExtensionNames; // layer or extension name to be enabled
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001284} VkInstanceCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001285
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001286// can be added to VkDeviceCreateInfo or VkInstanceCreateInfo via pNext
1287typedef struct _VkLayerCreateInfo
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001288{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001289 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_LAYER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001290 const void* pNext; // Pointer to next structure
1291 uint32_t layerCount;
1292 const char *const* ppActiveLayerNames; // layer name from the layer's vkEnumerateLayers())
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001293} VkLayerCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001294
Tony Barbour8205d902015-04-16 15:59:00 -06001295typedef struct VkPhysicalDeviceQueueProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001296{
Tony Barbour8205d902015-04-16 15:59:00 -06001297 VkQueueFlags queueFlags; // Queue flags
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001298 uint32_t queueCount;
1299 uint32_t maxAtomicCounters;
1300 bool32_t supportsTimestamps;
1301 uint32_t maxMemReferences; // Tells how many memory references can be active for the given queue
Tony Barbour8205d902015-04-16 15:59:00 -06001302} VkPhysicalDeviceQueueProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001303
Tony Barbour8205d902015-04-16 15:59:00 -06001304typedef struct VkPhysicalDeviceMemoryProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001305{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001306 bool32_t supportsMigration;
1307 bool32_t supportsPinning;
Tony Barbour8205d902015-04-16 15:59:00 -06001308} VkPhysicalDeviceMemoryProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001309
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001310typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001311{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001312 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001313 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001314 VkDeviceSize allocationSize; // Size of memory allocation
1315 VkMemoryPropertyFlags memProps; // Memory property flags
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001316 VkMemoryPriority memPriority;
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001317} VkMemoryAllocInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001318
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001319typedef struct VkMemoryOpenInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001320{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001321 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001322 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001323 VkDeviceMemory sharedMem;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001324} VkMemoryOpenInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001325
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001326typedef struct VkPeerMemoryOpenInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001327{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001328 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001329 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001330 VkDeviceMemory originalMem;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001331} VkPeerMemoryOpenInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001332
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001333typedef struct VkMemoryRequirements_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001334{
Tony Barbour8205d902015-04-16 15:59:00 -06001335 VkDeviceSize size; // Specified in bytes
1336 VkDeviceSize alignment; // Specified in bytes
1337 VkDeviceSize granularity; // Granularity on which vkBindObjectMemoryRange can bind sub-ranges of memory specified in bytes (usually the page size)
Jeremy Hayesd02809a2015-04-15 14:17:56 -06001338 VkMemoryPropertyFlags memPropsAllowed; // Allowed memory property flags
1339 VkMemoryPropertyFlags memPropsRequired; // Required memory property flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001340} VkMemoryRequirements;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001341
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001342typedef struct VkFormatProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001343{
Tony Barbour8205d902015-04-16 15:59:00 -06001344 VkFormatFeatureFlags linearTilingFeatures; // Format features in case of linear tiling
1345 VkFormatFeatureFlags optimalTilingFeatures; // Format features in case of optimal tiling
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001346} VkFormatProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001347
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001348typedef struct VkBufferViewAttachInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001349{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001350 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001351 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001352 VkBufferView view;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001353} VkBufferViewAttachInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001354
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001355typedef struct VkImageViewAttachInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001356{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001357 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001358 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001359 VkImageView view;
1360 VkImageLayout layout;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001361} VkImageViewAttachInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001362
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001363typedef struct VkUpdateSamplers_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001364{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001365 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLERS
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001366 const void* pNext; // Pointer to next structure
1367 uint32_t binding; // Binding of the sampler (array)
1368 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1369 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001370 const VkSampler* pSamplers;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001371} VkUpdateSamplers;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001372
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001373typedef struct VkSamplerImageViewInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001374{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001375 VkSampler sampler;
1376 const VkImageViewAttachInfo* pImageView;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001377} VkSamplerImageViewInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001378
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001379typedef struct VkUpdateSamplerTextures_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001380{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001381 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001382 const void* pNext; // Pointer to next structure
1383 uint32_t binding; // Binding of the combined texture sampler (array)
1384 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1385 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001386 const VkSamplerImageViewInfo* pSamplerImageViews;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001387} VkUpdateSamplerTextures;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001388
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001389typedef struct VkUpdateImages_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001390{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001391 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_IMAGES
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001392 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001393 VkDescriptorType descriptorType;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001394 uint32_t binding; // Binding of the image (array)
1395 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1396 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001397 const VkImageViewAttachInfo* pImageViews;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001398} VkUpdateImages;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001399
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001400typedef struct VkUpdateBuffers_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001401{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001402 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_BUFFERS
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001403 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001404 VkDescriptorType descriptorType;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001405 uint32_t binding; // Binding of the buffer (array)
1406 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1407 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001408 const VkBufferViewAttachInfo* pBufferViews;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001409} VkUpdateBuffers;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001410
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001411typedef struct VkUpdateAsCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001412{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001413 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_AS_COPY
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001414 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001415 VkDescriptorType descriptorType;
1416 VkDescriptorSet descriptorSet;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001417 uint32_t binding;
1418 uint32_t arrayElement;
1419 uint32_t count;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001420} VkUpdateAsCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001421
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001422typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001423{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001424 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001425 const void* pNext; // Pointer to next structure.
Tony Barbour8205d902015-04-16 15:59:00 -06001426 VkDeviceSize size; // Specified in bytes
1427 VkBufferUsageFlags usage; // Buffer usage flags
1428 VkBufferCreateFlags flags; // Buffer creation flags
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001429} VkBufferCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001430
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001431typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001432{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001433 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001434 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001435 VkBuffer buffer;
1436 VkBufferViewType viewType;
1437 VkFormat format; // Optionally specifies format of elements
Tony Barbour8205d902015-04-16 15:59:00 -06001438 VkDeviceSize offset; // Specified in bytes
1439 VkDeviceSize range; // View size specified in bytes
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001440} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001441
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001442typedef struct VkImageSubresource_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001443{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001444 VkImageAspect aspect;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001445 uint32_t mipLevel;
1446 uint32_t arraySlice;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001447} VkImageSubresource;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001448
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001449typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001450{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001451 VkImageAspect aspect;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001452 uint32_t baseMipLevel;
1453 uint32_t mipLevels;
1454 uint32_t baseArraySlice;
1455 uint32_t arraySize;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001456} VkImageSubresourceRange;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001457
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001458typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001459{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001460 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001461 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001462
Tony Barbour8205d902015-04-16 15:59:00 -06001463 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1464 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001465} VkMemoryBarrier;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001466
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001467typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001468{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001469 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001470 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001471
Tony Barbour8205d902015-04-16 15:59:00 -06001472 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1473 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001474
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001475 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001476
Tony Barbour8205d902015-04-16 15:59:00 -06001477 VkDeviceSize offset; // Offset within the buffer to sync
1478 VkDeviceSize size; // Amount of bytes to sync
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001479} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001480
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001481typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001482{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001483 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001484 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001485
Tony Barbour8205d902015-04-16 15:59:00 -06001486 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1487 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001488
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001489 VkImageLayout oldLayout; // Current layout of the image
1490 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001491
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001492 VkImage image; // Image to sync
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001493
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001494 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001495} VkImageMemoryBarrier;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001496
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001497typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001498{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001499 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001500 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001501 VkImageType imageType;
1502 VkFormat format;
1503 VkExtent3D extent;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001504 uint32_t mipLevels;
1505 uint32_t arraySize;
1506 uint32_t samples;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001507 VkImageTiling tiling;
Tony Barbour8205d902015-04-16 15:59:00 -06001508 VkImageUsageFlags usage; // Image usage flags
1509 VkImageCreateFlags flags; // Image creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001510} VkImageCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001511
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001512typedef struct VkPeerImageOpenInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001513{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001514 VkImage originalImage;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001515} VkPeerImageOpenInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001516
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001517typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001518{
Tony Barbour8205d902015-04-16 15:59:00 -06001519 VkDeviceSize offset; // Specified in bytes
1520 VkDeviceSize size; // Specified in bytes
1521 VkDeviceSize rowPitch; // Specified in bytes
1522 VkDeviceSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001523} VkSubresourceLayout;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001524
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001525typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001526{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001527 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001528 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001529 VkImage image;
1530 VkImageViewType viewType;
1531 VkFormat format;
1532 VkChannelMapping channels;
1533 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001534 float minLod;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001535} VkImageViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001536
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001537typedef struct VkColorAttachmentViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001538{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001539 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001540 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001541 VkImage image;
1542 VkFormat format;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001543 uint32_t mipLevel;
1544 uint32_t baseArraySlice;
1545 uint32_t arraySize;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001546 VkImage msaaResolveImage;
1547 VkImageSubresourceRange msaaResolveSubResource;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001548} VkColorAttachmentViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001549
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001550typedef struct VkDepthStencilViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001551{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001552 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001553 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001554 VkImage image;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001555 uint32_t mipLevel;
1556 uint32_t baseArraySlice;
1557 uint32_t arraySize;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001558 VkImage msaaResolveImage;
1559 VkImageSubresourceRange msaaResolveSubResource;
Tony Barbour8205d902015-04-16 15:59:00 -06001560 VkDepthStencilViewCreateFlags flags; // Depth stencil attachment view flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001561} VkDepthStencilViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001562
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001563typedef struct VkColorAttachmentBindInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001564{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001565 VkColorAttachmentView view;
1566 VkImageLayout layout;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001567} VkColorAttachmentBindInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001568
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001569typedef struct VkDepthStencilBindInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001570{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001571 VkDepthStencilView view;
1572 VkImageLayout layout;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001573} VkDepthStencilBindInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001574
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001575typedef struct VkBufferCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001576{
Tony Barbour8205d902015-04-16 15:59:00 -06001577 VkDeviceSize srcOffset; // Specified in bytes
1578 VkDeviceSize destOffset; // Specified in bytes
1579 VkDeviceSize copySize; // Specified in bytes
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001580} VkBufferCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001581
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001582typedef struct VkImageMemoryBindInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001583{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001584 VkImageSubresource subresource;
1585 VkOffset3D offset;
1586 VkExtent3D extent;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001587} VkImageMemoryBindInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001588
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001589typedef struct VkImageCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001590{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001591 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001592 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001593 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001594 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1595 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001596} VkImageCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001597
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001598typedef struct VkImageBlit_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001599{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001600 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001601 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1602 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001603 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001604 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1605 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001606} VkImageBlit;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001607
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001608typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001609{
Tony Barbour8205d902015-04-16 15:59:00 -06001610 VkDeviceSize bufferOffset; // Specified in bytes
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001611 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001612 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1613 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001614} VkBufferImageCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001615
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001616typedef struct VkImageResolve_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001617{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001618 VkImageSubresource srcSubresource;
Tony Barboure9f99942015-04-13 13:11:12 -06001619 VkOffset3D srcOffset;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001620 VkImageSubresource destSubresource;
Tony Barboure9f99942015-04-13 13:11:12 -06001621 VkOffset3D destOffset;
1622 VkExtent3D extent;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001623} VkImageResolve;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001624
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001625typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001626{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001627 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001628 const void* pNext; // Pointer to next structure
1629 size_t codeSize; // Specified in bytes
1630 const void* pCode;
Tony Barbour8205d902015-04-16 15:59:00 -06001631 VkShaderCreateFlags flags; // Reserved
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001632} VkShaderCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001633
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001634typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001635{
Tony Barbour8205d902015-04-16 15:59:00 -06001636 VkDescriptorType descriptorType; // Type of the descriptors in this binding
1637 uint32_t count; // Number of descriptors in this binding
1638 VkShaderStageFlags stageFlags; // Shader stages this binding is visible to
1639 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 Goeltzenleuchter382489d2015-04-10 08:34:15 -06001640} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001641
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001642typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001643{
Tony Barbour8205d902015-04-16 15:59:00 -06001644 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
1645 const void* pNext; // Pointer to next structure
1646 uint32_t count; // Number of bindings in the descriptor set layout
1647 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001648} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001649
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001650typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001651{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001652 VkDescriptorType type;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001653 uint32_t count;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001654} VkDescriptorTypeCount;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001655
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001656typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001657{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001658 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001659 const void* pNext; // Pointer to next structure
1660 uint32_t count;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001661 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001662} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001663
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001664typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001665{
1666 uint32_t bufferId;
1667 size_t bufferSize;
1668 const void* pBufferData;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001669} VkLinkConstBuffer;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001670
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001671typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001672{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001673 uint32_t constantId; // The SpecConstant ID specified in the BIL
1674 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001675} VkSpecializationMapEntry;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001676
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001677typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001678{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001679 uint32_t mapEntryCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001680 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001681 const void* pData;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001682} VkSpecializationInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001683
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001684typedef struct VkPipelineShader_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001685{
Tony Barbour8205d902015-04-16 15:59:00 -06001686 VkShaderStage stage;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001687 VkShader shader;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001688 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001689 const VkLinkConstBuffer* pLinkConstBufferInfo;
1690 const VkSpecializationInfo* pSpecializationInfo;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001691} VkPipelineShader;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001692
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001693typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001694{
Tony Barbour8205d902015-04-16 15:59:00 -06001695 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
1696 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001697 VkPipelineShader cs;
Tony Barbour8205d902015-04-16 15:59:00 -06001698 VkPipelineCreateFlags flags; // Pipeline creation flags
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001699 VkDescriptorSetLayoutChain setLayoutChain;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001700 uint32_t localSizeX;
1701 uint32_t localSizeY;
1702 uint32_t localSizeZ;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001703
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001704} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001705
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001706typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001707{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001708 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001709 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001710
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001711 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001712} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001713
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001714typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001715{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001716 uint32_t location; // location of the shader vertex attrib
1717 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001718
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001719 VkFormat format; // format of source data
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001720
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001721 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001722} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001723
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001724typedef struct VkPipelineVertexInputCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001725{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001726 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001727 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001728
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001729 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001730 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001731
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001732 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001733 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001734} VkPipelineVertexInputCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001735
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001736typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001737{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001738 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001739 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001740 VkPrimitiveTopology topology;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001741 bool32_t disableVertexReuse; // optional
1742 bool32_t primitiveRestartEnable;
1743 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001744} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001745
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001746typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001747{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001748 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001749 const void* pNext; // Pointer to next structure
1750 uint32_t patchControlPoints;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001751} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001752
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001753typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001754{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001755 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001756 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001757 uint32_t viewportCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001758 VkCoordinateOrigin clipOrigin; // optional (GL45)
1759 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001760} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001761
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001762typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001763{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001764 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001765 const void* pNext; // Pointer to next structure
1766 bool32_t depthClipEnable;
1767 bool32_t rasterizerDiscardEnable;
1768 bool32_t programPointSize; // optional (GL45)
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001769 VkCoordinateOrigin pointOrigin; // optional (GL45)
Tony Barbour8205d902015-04-16 15:59:00 -06001770 VkProvokingVertex provokingVertex; // optional (GL45)
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001771 VkFillMode fillMode; // optional (GL45)
1772 VkCullMode cullMode;
Tony Barbour8205d902015-04-16 15:59:00 -06001773 VkFrontFace frontFace;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001774} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001775
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001776typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001777{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001778 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001779 const void* pNext; // Pointer to next structure
1780 uint32_t samples;
1781 bool32_t multisampleEnable; // optional (GL45)
1782 bool32_t sampleShadingEnable; // optional (GL45)
1783 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001784 VkSampleMask sampleMask;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001785} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001786
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001787typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001788{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001789 bool32_t blendEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001790 VkFormat format;
1791 VkBlend srcBlendColor;
1792 VkBlend destBlendColor;
Tony Barbour8205d902015-04-16 15:59:00 -06001793 VkBlendOp blendOpColor;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001794 VkBlend srcBlendAlpha;
1795 VkBlend destBlendAlpha;
Tony Barbour8205d902015-04-16 15:59:00 -06001796 VkBlendOp blendOpAlpha;
1797 VkChannelFlags channelWriteMask;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001798} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001799
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001800typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001801{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001802 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001803 const void* pNext; // Pointer to next structure
1804 bool32_t alphaToCoverageEnable;
1805 bool32_t logicOpEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001806 VkLogicOp logicOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001807 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001808 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001809} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001810
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001811typedef struct VkStencilOpState_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001812{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001813 VkStencilOp stencilFailOp;
1814 VkStencilOp stencilPassOp;
1815 VkStencilOp stencilDepthFailOp;
Tony Barbour8205d902015-04-16 15:59:00 -06001816 VkCompareOp stencilCompareOp;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001817} VkStencilOpState;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001818
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001819typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001820{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001821 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001822 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001823 VkFormat format;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001824 bool32_t depthTestEnable;
1825 bool32_t depthWriteEnable;
Tony Barbour8205d902015-04-16 15:59:00 -06001826 VkCompareOp depthCompareOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001827 bool32_t depthBoundsEnable; // optional (depth_bounds_test)
1828 bool32_t stencilTestEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001829 VkStencilOpState front;
1830 VkStencilOpState back;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001831} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001832
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001833typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001834{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001835 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001836 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001837 VkPipelineShader shader;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001838} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001839
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001840typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001841{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001842 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001843 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001844 VkPipelineCreateFlags flags; // Pipeline creation flags
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001845 VkDescriptorSetLayoutChain pSetLayoutChain;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001846} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001847
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001848typedef struct VkSamplerCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001849{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001850 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001851 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001852 VkTexFilter magFilter; // Filter mode for magnification
1853 VkTexFilter minFilter; // Filter mode for minifiation
1854 VkTexMipmapMode mipMode; // Mipmap selection mode
1855 VkTexAddress addressU;
1856 VkTexAddress addressV;
1857 VkTexAddress addressW;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001858 float mipLodBias;
1859 uint32_t maxAnisotropy;
Tony Barbour8205d902015-04-16 15:59:00 -06001860 VkCompareOp compareOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001861 float minLod;
1862 float maxLod;
Tony Barbour8205d902015-04-16 15:59:00 -06001863 VkBorderColor borderColor;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001864} VkSamplerCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001865
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001866typedef struct VkDynamicVpStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001867{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001868 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001869 const void* pNext; // Pointer to next structure
1870 uint32_t viewportAndScissorCount; // number of entries in pViewports and pScissors
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001871 const VkViewport* pViewports;
1872 const VkRect* pScissors;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001873} VkDynamicVpStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001874
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001875typedef struct VkDynamicRsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001876{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001877 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001878 const void* pNext; // Pointer to next structure
1879 float depthBias;
1880 float depthBiasClamp;
1881 float slopeScaledDepthBias;
1882 float pointSize; // optional (GL45) - Size of points
1883 float pointFadeThreshold; // optional (GL45) - Size of point fade threshold
1884 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001885} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001886
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001887typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001888{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001889 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001890 const void* pNext; // Pointer to next structure
1891 float blendConst[4];
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001892} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001893
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001894typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001895{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001896 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001897 const void* pNext; // Pointer to next structure
1898 float minDepth; // optional (depth_bounds_test)
1899 float maxDepth; // optional (depth_bounds_test)
1900 uint32_t stencilReadMask;
1901 uint32_t stencilWriteMask;
1902 uint32_t stencilFrontRef;
1903 uint32_t stencilBackRef;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001904} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001905
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001906typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001907{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001908 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001909 const void* pNext; // Pointer to next structure
1910 uint32_t queueNodeIndex;
Tony Barbour8205d902015-04-16 15:59:00 -06001911 VkCmdBufferCreateFlags flags; // Command buffer creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001912} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001913
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001914typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001915{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001916 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001917 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001918
Tony Barbour8205d902015-04-16 15:59:00 -06001919 VkCmdBufferOptimizeFlags flags; // Command buffer optimization flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001920} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001921
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001922typedef struct VkRenderPassBegin_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001923{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001924 VkRenderPass renderPass;
1925 VkFramebuffer framebuffer;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001926} VkRenderPassBegin;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001927
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001928typedef struct VkCmdBufferGraphicsBeginInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001929{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001930 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001931 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001932
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001933 VkRenderPassBegin renderPassContinue; // Only needed when a render pass is split across two command buffers
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001934} VkCmdBufferGraphicsBeginInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001935
1936// Union allowing specification of floating point or raw color data. Actual value selected is based on image being cleared.
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001937typedef union VkClearColorValue_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001938{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001939 float floatColor[4];
1940 uint32_t rawColor[4];
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001941} VkClearColorValue;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001942
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001943typedef struct VkClearColor_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001944{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001945 VkClearColorValue color;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001946 bool32_t useRawValue;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001947} VkClearColor;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001948
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001949typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001950{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001951 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001952 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001953
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001954 VkRect renderArea;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001955 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001956 VkExtent2D extent;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001957 uint32_t sampleCount;
1958 uint32_t layers;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001959 const VkFormat* pColorFormats;
1960 const VkImageLayout* pColorLayouts;
1961 const VkAttachmentLoadOp* pColorLoadOps;
1962 const VkAttachmentStoreOp* pColorStoreOps;
1963 const VkClearColor* pColorLoadClearValues;
1964 VkFormat depthStencilFormat;
1965 VkImageLayout depthStencilLayout;
1966 VkAttachmentLoadOp depthLoadOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001967 float depthLoadClearValue;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001968 VkAttachmentStoreOp depthStoreOp;
1969 VkAttachmentLoadOp stencilLoadOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001970 uint32_t stencilLoadClearValue;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001971 VkAttachmentStoreOp stencilStoreOp;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001972} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001973
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001974typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001975{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001976 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001977 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001978 VkEventCreateFlags flags; // Event creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001979} VkEventCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001980
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001981typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001982{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001983 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001984 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001985 VkFenceCreateFlags flags; // Fence creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001986} VkFenceCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001987
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001988typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001989{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001990 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001991 const void* pNext; // Pointer to next structure
1992 uint32_t initialCount;
Tony Barbour8205d902015-04-16 15:59:00 -06001993 VkSemaphoreCreateFlags flags; // Semaphore creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001994} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001995
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001996typedef struct VkSemaphoreOpenInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001997{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001998 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001999 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002000 VkSemaphore sharedSemaphore;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002001} VkSemaphoreOpenInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002002
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002003typedef struct VkPipelineStatisticsData_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002004{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002005 uint64_t fsInvocations; // Fragment shader invocations
2006 uint64_t cPrimitives; // Clipper primitives
2007 uint64_t cInvocations; // Clipper invocations
2008 uint64_t vsInvocations; // Vertex shader invocations
2009 uint64_t gsInvocations; // Geometry shader invocations
2010 uint64_t gsPrimitives; // Geometry shader primitives
2011 uint64_t iaPrimitives; // Input primitives
2012 uint64_t iaVertices; // Input vertices
2013 uint64_t tcsInvocations; // Tessellation control shader invocations
2014 uint64_t tesInvocations; // Tessellation evaluation shader invocations
2015 uint64_t csInvocations; // Compute shader invocations
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002016} VkPipelineStatisticsData;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002017
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002018typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002019{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002020 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002021 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002022 VkQueryType queryType;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002023 uint32_t slots;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002024} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002025
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002026typedef struct VkFramebufferCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002027{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002028 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002029 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002030
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002031 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002032 const VkColorAttachmentBindInfo* pColorAttachments;
2033 const VkDepthStencilBindInfo* pDepthStencilAttachment;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002034
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002035 uint32_t sampleCount;
2036 uint32_t width;
2037 uint32_t height;
2038 uint32_t layers;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002039} VkFramebufferCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002040
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002041typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002042{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002043 uint32_t vertexCount;
2044 uint32_t instanceCount;
2045 uint32_t firstVertex;
2046 uint32_t firstInstance;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002047} VkDrawIndirectCmd;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002048
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002049typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002050{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002051 uint32_t indexCount;
2052 uint32_t instanceCount;
2053 uint32_t firstIndex;
2054 int32_t vertexOffset;
2055 uint32_t firstInstance;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002056} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002057
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002058typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002059{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002060 uint32_t x;
2061 uint32_t y;
2062 uint32_t z;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002063} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002064
2065// ------------------------------------------------------------------------------------------------
2066// API functions
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002067typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2068typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
Tony Barbour8205d902015-04-16 15:59:00 -06002069typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
2070typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceInfo)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceInfoType infoType, size_t* pDataSize, void* pData);
2071typedef void * (VKAPI *PFN_vkGetProcAddr)(VkPhysicalDevice physicalDevice, const char * pName);
2072typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002073typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Jon Ashburneb2728b2015-04-10 14:33:07 -06002074typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionInfo)(VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
Tony Barbour8205d902015-04-16 15:59:00 -06002075typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionInfo)(VkPhysicalDevice gpu, VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
2076typedef VkResult (VKAPI *PFN_vkGetExtensionSupport)(VkPhysicalDevice physicalDevice, const char* pExtName);
2077typedef VkResult (VKAPI *PFN_vkEnumerateLayers)(VkPhysicalDevice physicalDevice, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002078typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2079typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
Tony Barbour8205d902015-04-16 15:59:00 -06002080typedef VkResult (VKAPI *PFN_vkQueueAddMemReferences)(VkQueue queue, uint32_t count, const VkDeviceMemory* pMems);
2081typedef VkResult (VKAPI *PFN_vkQueueRemoveMemReferences)(VkQueue queue, uint32_t count, const VkDeviceMemory* pMems);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002082typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2083typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
Tony Barbour8205d902015-04-16 15:59:00 -06002084typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
2085typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDeviceMemory mem);
2086typedef VkResult (VKAPI *PFN_vkSetMemoryPriority)(VkDeviceMemory mem, VkMemoryPriority priority);
2087typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDeviceMemory mem, VkFlags flags, void** ppData);
2088typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDeviceMemory mem);
2089typedef VkResult (VKAPI *PFN_vkPinSystemMemory)(VkDevice device, const void* pSysMem, size_t memSize, VkDeviceMemory* pMem);
2090typedef VkResult (VKAPI *PFN_vkGetMultiDeviceCompatibility)(VkPhysicalDevice physicalDevice0, VkPhysicalDevice physicalDevice1, VkPhysicalDeviceCompatibilityInfo* pInfo);
2091typedef VkResult (VKAPI *PFN_vkOpenSharedMemory)(VkDevice device, const VkMemoryOpenInfo* pOpenInfo, VkDeviceMemory* pMem);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002092typedef VkResult (VKAPI *PFN_vkOpenSharedSemaphore)(VkDevice device, const VkSemaphoreOpenInfo* pOpenInfo, VkSemaphore* pSemaphore);
Tony Barbour8205d902015-04-16 15:59:00 -06002093typedef VkResult (VKAPI *PFN_vkOpenPeerMemory)(VkDevice device, const VkPeerMemoryOpenInfo* pOpenInfo, VkDeviceMemory* pMem);
2094typedef VkResult (VKAPI *PFN_vkOpenPeerImage)(VkDevice device, const VkPeerImageOpenInfo* pOpenInfo, VkImage* pImage, VkDeviceMemory* pMem);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002095typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkObject object);
2096typedef VkResult (VKAPI *PFN_vkGetObjectInfo)(VkBaseObject object, VkObjectInfoType infoType, size_t* pDataSize, void* pData);
Tony Barbour8205d902015-04-16 15:59:00 -06002097typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemory)(VkQueue queue, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset);
2098typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemoryRange)(VkQueue queue, VkObject object, uint32_t allocationIdx, VkDeviceSize rangeOffset,VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset);
2099typedef VkResult (VKAPI *PFN_vkQueueBindImageMemoryRange)(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002100typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
2101typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, VkFence* pFences);
2102typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkFence fence);
2103typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout);
2104typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2105typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2106typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2107typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
2108typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkEvent event);
2109typedef VkResult (VKAPI *PFN_vkSetEvent)(VkEvent event);
2110typedef VkResult (VKAPI *PFN_vkResetEvent)(VkEvent event);
2111typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
Tony Barbour8205d902015-04-16 15:59:00 -06002112typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002113typedef VkResult (VKAPI *PFN_vkGetFormatInfo)(VkDevice device, VkFormat format, VkFormatInfoType infoType, size_t* pDataSize, void* pData);
2114typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2115typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2116typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
2117typedef VkResult (VKAPI *PFN_vkGetImageSubresourceInfo)(VkImage image, const VkImageSubresource* pSubresource, VkSubresourceInfoType infoType, size_t* pDataSize, void* pData);
2118typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
2119typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView);
2120typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView);
2121typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
2122typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipeline)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2123typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelineDerivative)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline basePipeline, VkPipeline* pPipeline);
2124typedef VkResult (VKAPI *PFN_vkCreateComputePipeline)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2125typedef VkResult (VKAPI *PFN_vkStorePipeline)(VkPipeline pipeline, size_t* pDataSize, void* pData);
2126typedef VkResult (VKAPI *PFN_vkLoadPipeline)(VkDevice device, size_t dataSize, const void* pData, VkPipeline* pPipeline);
2127typedef VkResult (VKAPI *PFN_vkLoadPipelineDerivative)(VkDevice device, size_t dataSize, const void* pData, VkPipeline basePipeline, VkPipeline* pPipeline);
2128typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2129typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
2130typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayoutChain)(VkDevice device, uint32_t setLayoutArrayCount, const VkDescriptorSetLayout* pSetLayoutArray, VkDescriptorSetLayoutChain* pLayoutChain);
2131typedef VkResult (VKAPI *PFN_vkBeginDescriptorPoolUpdate)(VkDevice device, VkDescriptorUpdateMode updateMode);
2132typedef VkResult (VKAPI *PFN_vkEndDescriptorPoolUpdate)(VkDevice device, VkCmdBuffer cmd);
2133typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
2134typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDescriptorPool descriptorPool);
2135typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002136typedef void (VKAPI *PFN_vkClearDescriptorSets)(VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
Tony Barbour8205d902015-04-16 15:59:00 -06002137typedef void (VKAPI *PFN_vkUpdateDescriptors)(VkDescriptorSet descriptorSet, uint32_t updateCount, const void** ppUpdateArray);
Courtney Goeltzenleuchterfcf855f2015-04-10 16:24:50 -06002138typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2139typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2140typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2141typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002142typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2143typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2144typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2145typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002146typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2147typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
Chia-I Wu6097f3a2015-04-17 02:00:54 +08002148typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData);
Tony Barbour8205d902015-04-16 15:59:00 -06002149typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
2150typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002151typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2152typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
Tony Barbour8205d902015-04-16 15:59:00 -06002153typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
2154typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002155typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
Tony Barbour8205d902015-04-16 15:59:00 -06002156typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002157typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2158typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
2159typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions);
2160typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2161typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2162typedef void (VKAPI *PFN_vkCmdCloneImageData)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout);
Tony Barbour8205d902015-04-16 15:59:00 -06002163typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
2164typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002165typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, VkClearColor color, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
2166typedef void (VKAPI *PFN_vkCmdClearDepthStencil)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Tony Barbour11f74372015-04-13 15:02:52 -06002167typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002168typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
2169typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
Tony Barbour8205d902015-04-16 15:59:00 -06002170typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, VkWaitEvent waitEvent, uint32_t eventCount, const VkEvent* pEvents, uint32_t memBarrierCount, const void** ppMemBarriers);
2171typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, VkWaitEvent waitEvent, uint32_t pipeEventCount, const VkPipeEvent* pPipeEvents, uint32_t memBarrierCount, const void** ppMemBarriers);
2172typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002173typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2174typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
Tony Barbour8205d902015-04-16 15:59:00 -06002175typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
2176typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkFlags flags);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002177typedef void (VKAPI *PFN_vkCmdInitAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, const uint32_t* pData);
Tony Barbour8205d902015-04-16 15:59:00 -06002178typedef void (VKAPI *PFN_vkCmdLoadAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer srcBuffer, VkDeviceSize srcOffset);
2179typedef void (VKAPI *PFN_vkCmdSaveAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer destBuffer, VkDeviceSize destOffset);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002180typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2181typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002182typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin);
2183typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer, VkRenderPass renderPass);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002184
2185#ifdef VK_PROTOTYPES
2186
Tony Barbour8205d902015-04-16 15:59:00 -06002187// Device initialization
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002188
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002189VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002190 const VkInstanceCreateInfo* pCreateInfo,
2191 VkInstance* pInstance);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002192
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002193VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002194 VkInstance instance);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002195
Jon Ashburn07b309a2015-04-15 11:31:12 -06002196VkResult VKAPI vkEnumeratePhysicalDevices(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002197 VkInstance instance,
Jon Ashburn07b309a2015-04-15 11:31:12 -06002198 uint32_t* pPhysicalDeviceCount,
Tony Barbour8205d902015-04-16 15:59:00 -06002199 VkPhysicalDevice* pPhysicalDevices);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002200
Tony Barbour8205d902015-04-16 15:59:00 -06002201VkResult VKAPI vkGetPhysicalDeviceInfo(
2202 VkPhysicalDevice physicalDevice,
2203 VkPhysicalDeviceInfoType infoType,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002204 size_t* pDataSize,
2205 void* pData);
2206
2207void * VKAPI vkGetProcAddr(
Tony Barbour8205d902015-04-16 15:59:00 -06002208 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002209 const char* pName);
2210
2211// Device functions
2212
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002213VkResult VKAPI vkCreateDevice(
Tony Barbour8205d902015-04-16 15:59:00 -06002214 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002215 const VkDeviceCreateInfo* pCreateInfo,
2216 VkDevice* pDevice);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002217
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002218VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002219 VkDevice device);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002220
2221// Extension discovery functions
Jon Ashburneb2728b2015-04-10 14:33:07 -06002222VkResult VKAPI vkGetGlobalExtensionInfo(
2223 VkExtensionInfoType infoType,
2224 uint32_t extensionIndex,
2225 size_t* pDataSize,
2226 void* pData);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002227
Tobin Ehlis0ef6ec52015-04-16 12:51:37 -06002228VkResult VKAPI vkGetPhysicalDeviceExtensionInfo(
Tony Barbour8205d902015-04-16 15:59:00 -06002229 VkPhysicalDevice gpu,
Tobin Ehlis0ef6ec52015-04-16 12:51:37 -06002230 VkExtensionInfoType infoType,
2231 uint32_t extensionIndex,
2232 size_t* pDataSize,
2233 void* pData);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002234
2235// Layer discovery functions
2236
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002237VkResult VKAPI vkEnumerateLayers(
Tony Barbour8205d902015-04-16 15:59:00 -06002238 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002239 size_t maxLayerCount,
2240 size_t maxStringSize,
2241 size_t* pOutLayerCount,
2242 char* const* pOutLayers,
2243 void* pReserved);
2244
2245// Queue functions
2246
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002247VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002248 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002249 uint32_t queueNodeIndex,
2250 uint32_t queueIndex,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002251 VkQueue* pQueue);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002252
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002253VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002254 VkQueue queue,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002255 uint32_t cmdBufferCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002256 const VkCmdBuffer* pCmdBuffers,
2257 VkFence fence);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002258
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002259VkResult VKAPI vkQueueAddMemReferences(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002260 VkQueue queue,
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002261 uint32_t count,
Tony Barbour8205d902015-04-16 15:59:00 -06002262 const VkDeviceMemory* pMems);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002263
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002264VkResult VKAPI vkQueueRemoveMemReferences(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002265 VkQueue queue,
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002266 uint32_t count,
Tony Barbour8205d902015-04-16 15:59:00 -06002267 const VkDeviceMemory* pMems);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002268
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002269VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002270 VkQueue queue);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002271
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002272VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002273 VkDevice device);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002274
2275// Memory functions
2276
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002277VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002278 VkDevice device,
2279 const VkMemoryAllocInfo* pAllocInfo,
Tony Barbour8205d902015-04-16 15:59:00 -06002280 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002281
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002282VkResult VKAPI vkFreeMemory(
Tony Barbour8205d902015-04-16 15:59:00 -06002283 VkDeviceMemory mem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002284
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002285VkResult VKAPI vkSetMemoryPriority(
Tony Barbour8205d902015-04-16 15:59:00 -06002286 VkDeviceMemory mem,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002287 VkMemoryPriority priority);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002288
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002289VkResult VKAPI vkMapMemory(
Tony Barbour8205d902015-04-16 15:59:00 -06002290 VkDeviceMemory mem,
2291 VkMemoryMapFlags flags,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002292 void** ppData);
2293
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002294VkResult VKAPI vkUnmapMemory(
Tony Barbour8205d902015-04-16 15:59:00 -06002295 VkDeviceMemory mem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002296
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002297VkResult VKAPI vkPinSystemMemory(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002298 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002299 const void* pSysMem,
2300 size_t memSize,
Tony Barbour8205d902015-04-16 15:59:00 -06002301 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002302
2303// Multi-device functions
2304
Tony Barbour8205d902015-04-16 15:59:00 -06002305VkResult VKAPI vkGetMultiDeviceCompatibility(
2306 VkPhysicalDevice physicalDevice0,
2307 VkPhysicalDevice physicalDevice1,
2308 VkPhysicalDeviceCompatibilityInfo* pInfo);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002309
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002310VkResult VKAPI vkOpenSharedMemory(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002311 VkDevice device,
2312 const VkMemoryOpenInfo* pOpenInfo,
Tony Barbour8205d902015-04-16 15:59:00 -06002313 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002314
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002315VkResult VKAPI vkOpenSharedSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002316 VkDevice device,
2317 const VkSemaphoreOpenInfo* pOpenInfo,
2318 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002319
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002320VkResult VKAPI vkOpenPeerMemory(
2321 VkDevice device,
2322 const VkPeerMemoryOpenInfo* pOpenInfo,
Tony Barbour8205d902015-04-16 15:59:00 -06002323 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002324
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002325VkResult VKAPI vkOpenPeerImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002326 VkDevice device,
2327 const VkPeerImageOpenInfo* pOpenInfo,
2328 VkImage* pImage,
Tony Barbour8205d902015-04-16 15:59:00 -06002329 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002330
2331// Generic API object functions
2332
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002333VkResult VKAPI vkDestroyObject(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002334 VkObject object);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002335
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002336VkResult VKAPI vkGetObjectInfo(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002337 VkBaseObject object,
2338 VkObjectInfoType infoType,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002339 size_t* pDataSize,
2340 void* pData);
2341
Mark Lobodzinskicf26e072015-04-16 11:44:05 -05002342// Memory namagement API functions
2343
2344VkResult VKAPI vkQueueBindObjectMemory(
2345 VkQueue queue,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002346 VkObject object,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002347 uint32_t allocationIdx,
Tony Barbour8205d902015-04-16 15:59:00 -06002348 VkDeviceMemory mem,
2349 VkDeviceSize memOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002350
Mark Lobodzinskicf26e072015-04-16 11:44:05 -05002351VkResult VKAPI vkQueueBindObjectMemoryRange(
2352 VkQueue queue,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002353 VkObject object,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002354 uint32_t allocationIdx,
Tony Barbour8205d902015-04-16 15:59:00 -06002355 VkDeviceSize rangeOffset,
2356 VkDeviceSize rangeSize,
2357 VkDeviceMemory mem,
2358 VkDeviceSize memOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002359
Mark Lobodzinskicf26e072015-04-16 11:44:05 -05002360VkResult VKAPI vkQueueBindImageMemoryRange(
2361 VkQueue queue,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002362 VkImage image,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002363 uint32_t allocationIdx,
Jeremy Hayes47536532015-04-15 15:20:03 -06002364 const VkImageMemoryBindInfo* pBindInfo,
Tony Barbour8205d902015-04-16 15:59:00 -06002365 VkDeviceMemory mem,
2366 VkDeviceSize memOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002367
2368// Fence functions
2369
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002370VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002371 VkDevice device,
2372 const VkFenceCreateInfo* pCreateInfo,
2373 VkFence* pFence);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002374
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002375VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002376 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002377 uint32_t fenceCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002378 VkFence* pFences);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002379
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002380VkResult VKAPI vkGetFenceStatus(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002381 VkFence fence);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002382
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002383VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002384 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002385 uint32_t fenceCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002386 const VkFence* pFences,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002387 bool32_t waitAll,
2388 uint64_t timeout); // timeout in nanoseconds
2389
2390// Queue semaphore functions
2391
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002392VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002393 VkDevice device,
2394 const VkSemaphoreCreateInfo* pCreateInfo,
2395 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002396
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002397VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002398 VkQueue queue,
2399 VkSemaphore semaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002400
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002401VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002402 VkQueue queue,
2403 VkSemaphore semaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002404
2405// Event functions
2406
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002407VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002408 VkDevice device,
2409 const VkEventCreateInfo* pCreateInfo,
2410 VkEvent* pEvent);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002411
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002412VkResult VKAPI vkGetEventStatus(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002413 VkEvent event);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002414
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002415VkResult VKAPI vkSetEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002416 VkEvent event);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002417
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002418VkResult VKAPI vkResetEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002419 VkEvent event);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002420
2421// Query functions
2422
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002423VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002424 VkDevice device,
2425 const VkQueryPoolCreateInfo* pCreateInfo,
2426 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002427
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002428VkResult VKAPI vkGetQueryPoolResults(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002429 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002430 uint32_t startQuery,
2431 uint32_t queryCount,
2432 size_t* pDataSize,
Tony Barbour8205d902015-04-16 15:59:00 -06002433 void* pData,
2434 VkQueryResultFlags flags);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002435
2436// Format capabilities
2437
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002438VkResult VKAPI vkGetFormatInfo(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002439 VkDevice device,
2440 VkFormat format,
2441 VkFormatInfoType infoType,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002442 size_t* pDataSize,
2443 void* pData);
2444
2445// Buffer functions
2446
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002447VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002448 VkDevice device,
2449 const VkBufferCreateInfo* pCreateInfo,
2450 VkBuffer* pBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002451
2452// Buffer view functions
2453
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002454VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002455 VkDevice device,
2456 const VkBufferViewCreateInfo* pCreateInfo,
2457 VkBufferView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002458
2459// Image functions
2460
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002461VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002462 VkDevice device,
2463 const VkImageCreateInfo* pCreateInfo,
2464 VkImage* pImage);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002465
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002466VkResult VKAPI vkGetImageSubresourceInfo(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002467 VkImage image,
2468 const VkImageSubresource* pSubresource,
2469 VkSubresourceInfoType infoType,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002470 size_t* pDataSize,
2471 void* pData);
2472
2473// Image view functions
2474
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002475VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002476 VkDevice device,
2477 const VkImageViewCreateInfo* pCreateInfo,
2478 VkImageView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002479
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002480VkResult VKAPI vkCreateColorAttachmentView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002481 VkDevice device,
2482 const VkColorAttachmentViewCreateInfo* pCreateInfo,
2483 VkColorAttachmentView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002484
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002485VkResult VKAPI vkCreateDepthStencilView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002486 VkDevice device,
2487 const VkDepthStencilViewCreateInfo* pCreateInfo,
2488 VkDepthStencilView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002489
2490// Shader functions
2491
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002492VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002493 VkDevice device,
2494 const VkShaderCreateInfo* pCreateInfo,
2495 VkShader* pShader);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002496
2497// Pipeline functions
2498
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002499VkResult VKAPI vkCreateGraphicsPipeline(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002500 VkDevice device,
2501 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2502 VkPipeline* pPipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002503
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002504VkResult VKAPI vkCreateGraphicsPipelineDerivative(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002505 VkDevice device,
2506 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2507 VkPipeline basePipeline,
2508 VkPipeline* pPipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002509
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002510VkResult VKAPI vkCreateComputePipeline(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002511 VkDevice device,
2512 const VkComputePipelineCreateInfo* pCreateInfo,
2513 VkPipeline* pPipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002514
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002515VkResult VKAPI vkStorePipeline(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002516 VkPipeline pipeline,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002517 size_t* pDataSize,
2518 void* pData);
2519
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002520VkResult VKAPI vkLoadPipeline(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002521 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002522 size_t dataSize,
2523 const void* pData,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002524 VkPipeline* pPipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002525
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002526VkResult VKAPI vkLoadPipelineDerivative(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002527 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002528 size_t dataSize,
2529 const void* pData,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002530 VkPipeline basePipeline,
2531 VkPipeline* pPipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002532
2533// Sampler functions
2534
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002535VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002536 VkDevice device,
2537 const VkSamplerCreateInfo* pCreateInfo,
2538 VkSampler* pSampler);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002539
2540// Descriptor set functions
2541
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002542VkResult VKAPI vkCreateDescriptorSetLayout(
2543 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002544 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2545 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002546
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002547VkResult VKAPI vkCreateDescriptorSetLayoutChain(
2548 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002549 uint32_t setLayoutArrayCount,
2550 const VkDescriptorSetLayout* pSetLayoutArray,
2551 VkDescriptorSetLayoutChain* pLayoutChain);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002552
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002553VkResult VKAPI vkBeginDescriptorPoolUpdate(
2554 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002555 VkDescriptorUpdateMode updateMode);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002556
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002557VkResult VKAPI vkEndDescriptorPoolUpdate(
2558 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002559 VkCmdBuffer cmd);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002560
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002561VkResult VKAPI vkCreateDescriptorPool(
2562 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002563 VkDescriptorPoolUsage poolUsage,
2564 uint32_t maxSets,
2565 const VkDescriptorPoolCreateInfo* pCreateInfo,
2566 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002567
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002568VkResult VKAPI vkResetDescriptorPool(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002569 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002570
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002571VkResult VKAPI vkAllocDescriptorSets(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002572 VkDescriptorPool descriptorPool,
2573 VkDescriptorSetUsage setUsage,
2574 uint32_t count,
2575 const VkDescriptorSetLayout* pSetLayouts,
2576 VkDescriptorSet* pDescriptorSets,
2577 uint32_t* pCount);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002578
2579void VKAPI vkClearDescriptorSets(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002580 VkDescriptorPool descriptorPool,
2581 uint32_t count,
2582 const VkDescriptorSet* pDescriptorSets);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002583
2584void VKAPI vkUpdateDescriptors(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002585 VkDescriptorSet descriptorSet,
2586 uint32_t updateCount,
Tony Barbour8205d902015-04-16 15:59:00 -06002587 const void** ppUpdateArray);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002588
2589// State object functions
2590
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002591VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002592 VkDevice device,
2593 const VkDynamicVpStateCreateInfo* pCreateInfo,
2594 VkDynamicVpState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002595
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002596VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002597 VkDevice device,
2598 const VkDynamicRsStateCreateInfo* pCreateInfo,
2599 VkDynamicRsState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002600
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002601VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002602 VkDevice device,
2603 const VkDynamicCbStateCreateInfo* pCreateInfo,
2604 VkDynamicCbState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002605
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002606VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002607 VkDevice device,
2608 const VkDynamicDsStateCreateInfo* pCreateInfo,
2609 VkDynamicDsState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002610
2611// Command buffer functions
2612
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002613VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002614 VkDevice device,
2615 const VkCmdBufferCreateInfo* pCreateInfo,
2616 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002617
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002618VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002619 VkCmdBuffer cmdBuffer,
2620 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002621
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002622VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002623 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002624
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002625VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002626 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002627
2628// Command buffer building functions
2629
2630void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002631 VkCmdBuffer cmdBuffer,
2632 VkPipelineBindPoint pipelineBindPoint,
2633 VkPipeline pipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002634
2635void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002636 VkCmdBuffer cmdBuffer,
2637 VkStateBindPoint stateBindPoint,
2638 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002639
2640void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002641 VkCmdBuffer cmdBuffer,
2642 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002643 uint32_t layoutChainSlot,
2644 uint32_t count,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002645 const VkDescriptorSet* pDescriptorSets,
Tony Barbour8205d902015-04-16 15:59:00 -06002646 const uint32_t * pUserData);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002647
2648void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002649 VkCmdBuffer cmdBuffer,
2650 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002651 VkDeviceSize offset,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002652 VkIndexType indexType);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002653
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002654void VKAPI vkCmdBindVertexBuffers(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002655 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002656 uint32_t startBinding,
2657 uint32_t bindingCount,
2658 const VkBuffer* pBuffers,
Tony Barbour8205d902015-04-16 15:59:00 -06002659 const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002660
2661void VKAPI vkCmdDraw(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002662 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002663 uint32_t firstVertex,
2664 uint32_t vertexCount,
2665 uint32_t firstInstance,
2666 uint32_t instanceCount);
2667
2668void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002669 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002670 uint32_t firstIndex,
2671 uint32_t indexCount,
2672 int32_t vertexOffset,
2673 uint32_t firstInstance,
2674 uint32_t instanceCount);
2675
2676void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002677 VkCmdBuffer cmdBuffer,
2678 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002679 VkDeviceSize offset,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002680 uint32_t count,
2681 uint32_t stride);
2682
2683void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002684 VkCmdBuffer cmdBuffer,
2685 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002686 VkDeviceSize offset,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002687 uint32_t count,
2688 uint32_t stride);
2689
2690void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002691 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002692 uint32_t x,
2693 uint32_t y,
2694 uint32_t z);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002695
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002696void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002697 VkCmdBuffer cmdBuffer,
2698 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002699 VkDeviceSize offset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002700
2701void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002702 VkCmdBuffer cmdBuffer,
2703 VkBuffer srcBuffer,
2704 VkBuffer destBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002705 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002706 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002707
2708void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002709 VkCmdBuffer cmdBuffer,
2710 VkImage srcImage,
2711 VkImageLayout srcImageLayout,
2712 VkImage destImage,
2713 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002714 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002715 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002716
2717void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002718 VkCmdBuffer cmdBuffer,
2719 VkImage srcImage,
2720 VkImageLayout srcImageLayout,
2721 VkImage destImage,
2722 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002723 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002724 const VkImageBlit* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002725
2726void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002727 VkCmdBuffer cmdBuffer,
2728 VkBuffer srcBuffer,
2729 VkImage destImage,
2730 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002731 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002732 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002733
2734void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002735 VkCmdBuffer cmdBuffer,
2736 VkImage srcImage,
2737 VkImageLayout srcImageLayout,
2738 VkBuffer destBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002739 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002740 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002741
2742void VKAPI vkCmdCloneImageData(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002743 VkCmdBuffer cmdBuffer,
2744 VkImage srcImage,
2745 VkImageLayout srcImageLayout,
2746 VkImage destImage,
2747 VkImageLayout destImageLayout);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002748
2749void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002750 VkCmdBuffer cmdBuffer,
2751 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002752 VkDeviceSize destOffset,
2753 VkDeviceSize dataSize,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002754 const uint32_t* pData);
2755
2756void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002757 VkCmdBuffer cmdBuffer,
2758 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002759 VkDeviceSize destOffset,
2760 VkDeviceSize fillSize,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002761 uint32_t data);
2762
2763void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002764 VkCmdBuffer cmdBuffer,
2765 VkImage image,
2766 VkImageLayout imageLayout,
2767 VkClearColor color,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002768 uint32_t rangeCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002769 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002770
2771void VKAPI vkCmdClearDepthStencil(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002772 VkCmdBuffer cmdBuffer,
2773 VkImage image,
2774 VkImageLayout imageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002775 float depth,
2776 uint32_t stencil,
2777 uint32_t rangeCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002778 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002779
2780void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002781 VkCmdBuffer cmdBuffer,
2782 VkImage srcImage,
2783 VkImageLayout srcImageLayout,
2784 VkImage destImage,
2785 VkImageLayout destImageLayout,
Tony Barbour11f74372015-04-13 15:02:52 -06002786 uint32_t regionCount,
2787 const VkImageResolve* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002788
2789void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002790 VkCmdBuffer cmdBuffer,
2791 VkEvent event,
2792 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002793
2794void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002795 VkCmdBuffer cmdBuffer,
2796 VkEvent event,
2797 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002798
2799void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002800 VkCmdBuffer cmdBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002801 VkWaitEvent waitEvent,
2802 uint32_t eventCount,
2803 const VkEvent* pEvents,
2804 uint32_t memBarrierCount,
2805 const void** ppMemBarriers);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002806
2807void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002808 VkCmdBuffer cmdBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002809 VkWaitEvent waitEvent,
2810 uint32_t pipeEventCount,
2811 const VkPipeEvent* pPipeEvents,
2812 uint32_t memBarrierCount,
2813 const void** ppMemBarriers);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002814
2815void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002816 VkCmdBuffer cmdBuffer,
2817 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002818 uint32_t slot,
Tony Barbour8205d902015-04-16 15:59:00 -06002819 VkQueryControlFlags flags);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002820
2821void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002822 VkCmdBuffer cmdBuffer,
2823 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002824 uint32_t slot);
2825
2826void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002827 VkCmdBuffer cmdBuffer,
2828 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002829 uint32_t startQuery,
2830 uint32_t queryCount);
2831
2832void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002833 VkCmdBuffer cmdBuffer,
2834 VkTimestampType timestampType,
2835 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002836 VkDeviceSize destOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002837
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06002838void VKAPI vkCmdCopyQueryPoolResults(
2839 VkCmdBuffer cmdBuffer,
2840 VkQueryPool queryPool,
2841 uint32_t startQuery,
2842 uint32_t queryCount,
2843 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002844 VkDeviceSize destOffset,
2845 VkDeviceSize destStride,
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06002846 VkFlags flags); // VkQueryResultFlags
2847
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002848void VKAPI vkCmdInitAtomicCounters(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002849 VkCmdBuffer cmdBuffer,
2850 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002851 uint32_t startCounter,
2852 uint32_t counterCount,
2853 const uint32_t* pData);
2854
2855void VKAPI vkCmdLoadAtomicCounters(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002856 VkCmdBuffer cmdBuffer,
2857 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002858 uint32_t startCounter,
2859 uint32_t counterCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002860 VkBuffer srcBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002861 VkDeviceSize srcOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002862
2863void VKAPI vkCmdSaveAtomicCounters(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002864 VkCmdBuffer cmdBuffer,
2865 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002866 uint32_t startCounter,
2867 uint32_t counterCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002868 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002869 VkDeviceSize destOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002870
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002871VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002872 VkDevice device,
2873 const VkFramebufferCreateInfo* pCreateInfo,
2874 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002875
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002876VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002877 VkDevice device,
2878 const VkRenderPassCreateInfo* pCreateInfo,
2879 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002880
2881void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002882 VkCmdBuffer cmdBuffer,
2883 const VkRenderPassBegin* pRenderPassBegin);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002884
2885void VKAPI vkCmdEndRenderPass(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002886 VkCmdBuffer cmdBuffer,
2887 VkRenderPass renderPass);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002888
2889#endif // VK_PROTOTYPES
2890
2891#ifdef __cplusplus
2892} // extern "C"
2893#endif // __cplusplus
2894
2895#endif // __VULKAN_H__