blob: a7a33f7544b45ca13ca68a3267021740af721926 [file] [log] [blame]
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001//
2// File: vulkan.h
3//
4/*
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06005** Copyright (c) 2014-2015 The Khronos Group Inc.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06006**
7** Permission is hereby granted, free of charge, to any person obtaining a
8** copy of this software and/or associated documentation files (the
9** "Materials"), to deal in the Materials without restriction, including
10** without limitation the rights to use, copy, modify, merge, publish,
11** distribute, sublicense, and/or sell copies of the Materials, and to
12** permit persons to whom the Materials are furnished to do so, subject to
13** the following conditions:
14**
15** The above copyright notice and this permission notice shall be included
16** in all copies or substantial portions of the Materials.
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
25*/
26
27#ifndef __VULKAN_H__
28#define __VULKAN_H__
29
30#define VK_MAKE_VERSION(major, minor, patch) \
31 ((major << 22) | (minor << 12) | patch)
32
Courtney Goeltzenleuchterb0cedb82015-04-09 11:52:55 -060033#include "vk_platform.h"
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060034
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060035// Vulkan API version supported by this file
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -060036#define VK_API_VERSION VK_MAKE_VERSION(0, 78, 0)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060037
38#ifdef __cplusplus
39extern "C"
40{
41#endif // __cplusplus
42
43/*
44***************************************************************************************************
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060045* Core Vulkan API
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060046***************************************************************************************************
47*/
48
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 Goeltzenleuchterfb4efc62015-04-10 08:34:15 -060057VK_DEFINE_HANDLE(VkInstance)
58VK_DEFINE_HANDLE(VkPhysicalGpu)
59VK_DEFINE_HANDLE(VkBaseObject)
60VK_DEFINE_SUBCLASS_HANDLE(VkDevice, VkBaseObject)
61VK_DEFINE_SUBCLASS_HANDLE(VkQueue, VkBaseObject)
62VK_DEFINE_SUBCLASS_HANDLE(VkGpuMemory, VkBaseObject)
63VK_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 Goeltzenleuchter502744a2015-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 Goeltzenleuchterfb4efc62015-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 Goeltzenleuchter64d1a712015-04-08 18:04:29 -060089
90#define VK_MAX_PHYSICAL_GPUS 16
91#define VK_MAX_PHYSICAL_GPU_NAME 256
Jon Ashburn9fd4cc42015-04-10 14:33:07 -060092#define VK_MAX_EXTENSION_NAME 256
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060093
94#define VK_LOD_CLAMP_NONE MAX_FLOAT
95#define VK_LAST_MIP_OR_SLICE 0xffffffff
96
97#define VK_TRUE 1
98#define VK_FALSE 0
99
100#define VK_NULL_HANDLE 0
101
102// This macro defines INT_MAX in enumerations to force compilers to use 32 bits
103// to represent them. This may or may not be necessary on some compilers. The
104// option to compile it out may allow compilers that warn about missing enumerants
105// in switch statements to be silenced.
106#define VK_MAX_ENUM(T) T##_MAX_ENUM = 0x7FFFFFFF
107
108// ------------------------------------------------------------------------------------------------
109// Enumerations
110
111
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600112typedef enum VkMemoryPriority_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600113{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600114 VK_MEMORY_PRIORITY_UNUSED = 0x0,
115 VK_MEMORY_PRIORITY_VERY_LOW = 0x1,
116 VK_MEMORY_PRIORITY_LOW = 0x2,
117 VK_MEMORY_PRIORITY_NORMAL = 0x3,
118 VK_MEMORY_PRIORITY_HIGH = 0x4,
119 VK_MEMORY_PRIORITY_VERY_HIGH = 0x5,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600120
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600121 VK_MEMORY_PRIORITY_BEGIN_RANGE = VK_MEMORY_PRIORITY_UNUSED,
122 VK_MEMORY_PRIORITY_END_RANGE = VK_MEMORY_PRIORITY_VERY_HIGH,
123 VK_NUM_MEMORY_PRIORITY = (VK_MEMORY_PRIORITY_END_RANGE - VK_MEMORY_PRIORITY_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600124 VK_MAX_ENUM(VkMemoryPriority)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600125} VkMemoryPriority;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600126
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600127typedef enum VkImageLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600128{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600129 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
130 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access
131 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write
132 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write
133 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access
134 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access
135 VK_IMAGE_LAYOUT_CLEAR_OPTIMAL = 0x00000006, // Optimal layout when image is used only for clear operations
136 VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000007, // Optimal layout when image is used only as source of transfer operations
137 VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000008, // Optimal layout when image is used only as destination of transfer operations
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600138
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600139 VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
140 VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL,
141 VK_NUM_IMAGE_LAYOUT = (VK_IMAGE_LAYOUT_END_RANGE - VK_IMAGE_LAYOUT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600142 VK_MAX_ENUM(VkImageLayout)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600143} VkImageLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600144
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600145typedef enum VkPipeEvent_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600146{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600147 VK_PIPE_EVENT_TOP_OF_PIPE = 0x00000001, // Set event before the GPU starts processing subsequent command
148 VK_PIPE_EVENT_VERTEX_PROCESSING_COMPLETE = 0x00000002, // Set event when all pending vertex processing is complete
149 VK_PIPE_EVENT_LOCAL_FRAGMENT_PROCESSING_COMPLETE = 0x00000003, // Set event when all pending fragment shader executions are complete, within each fragment location
150 VK_PIPE_EVENT_FRAGMENT_PROCESSING_COMPLETE = 0x00000004, // Set event when all pending fragment shader executions are complete
151 VK_PIPE_EVENT_GRAPHICS_PIPELINE_COMPLETE = 0x00000005, // Set event when all pending graphics operations are complete
152 VK_PIPE_EVENT_COMPUTE_PIPELINE_COMPLETE = 0x00000006, // Set event when all pending compute operations are complete
153 VK_PIPE_EVENT_TRANSFER_COMPLETE = 0x00000007, // Set event when all pending transfer operations are complete
154 VK_PIPE_EVENT_GPU_COMMANDS_COMPLETE = 0x00000008, // Set event when all pending GPU work is complete
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600155
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600156 VK_PIPE_EVENT_BEGIN_RANGE = VK_PIPE_EVENT_TOP_OF_PIPE,
157 VK_PIPE_EVENT_END_RANGE = VK_PIPE_EVENT_GPU_COMMANDS_COMPLETE,
158 VK_NUM_PIPE_EVENT = (VK_PIPE_EVENT_END_RANGE - VK_PIPE_EVENT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600159 VK_MAX_ENUM(VkPipeEvent)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600160} VkPipeEvent;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600161
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600162typedef enum VkWaitEvent_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600163{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600164 VK_WAIT_EVENT_TOP_OF_PIPE = 0x00000001, // Wait event before the GPU starts processing subsequent commands
165 VK_WAIT_EVENT_BEFORE_RASTERIZATION = 0x00000002, // Wait event before rasterizing subsequent primitives
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600166
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600167 VK_WAIT_EVENT_BEGIN_RANGE = VK_WAIT_EVENT_TOP_OF_PIPE,
168 VK_WAIT_EVENT_END_RANGE = VK_WAIT_EVENT_BEFORE_RASTERIZATION,
169 VK_NUM_WAIT_EVENT = (VK_WAIT_EVENT_END_RANGE - VK_WAIT_EVENT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600170 VK_MAX_ENUM(VkWaitEvent)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600171} VkWaitEvent;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600172
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600173typedef enum VkMemoryOutputFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600174{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600175 VK_MEMORY_OUTPUT_CPU_WRITE_BIT = 0x00000001, // Controls output coherency of CPU writes
176 VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = 0x00000002, // Controls output coherency of generic shader writes
177 VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = 0x00000004, // Controls output coherency of color attachment writes
178 VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000008, // Controls output coherency of depth/stencil attachment writes
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600179 VK_MEMORY_OUTPUT_TRANSFER_BIT = 0x00000010, // Controls output coherency of transfer operations
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600180 VK_MAX_ENUM(VkMemoryOutputFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600181} VkMemoryOutputFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600182
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600183typedef enum VkMemoryInputFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600184{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600185 VK_MEMORY_INPUT_CPU_READ_BIT = 0x00000001, // Controls input coherency of CPU reads
186 VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = 0x00000002, // Controls input coherency of indirect command reads
187 VK_MEMORY_INPUT_INDEX_FETCH_BIT = 0x00000004, // Controls input coherency of index fetches
188 VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = 0x00000008, // Controls input coherency of vertex attribute fetches
189 VK_MEMORY_INPUT_UNIFORM_READ_BIT = 0x00000010, // Controls input coherency of uniform buffer reads
190 VK_MEMORY_INPUT_SHADER_READ_BIT = 0x00000020, // Controls input coherency of generic shader reads
191 VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = 0x00000040, // Controls input coherency of color attachment reads
192 VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000080, // Controls input coherency of depth/stencil attachment reads
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600193 VK_MEMORY_INPUT_TRANSFER_BIT = 0x00000100, // Controls input coherency of transfer operations
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600194 VK_MAX_ENUM(VkMemoryInputFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600195} VkMemoryInputFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600196
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600197typedef enum VkAttachmentLoadOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600198{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600199 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
200 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
201 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600202
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600203 VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD,
204 VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE,
205 VK_NUM_ATTACHMENT_LOAD_OP = (VK_ATTACHMENT_LOAD_OP_END_RANGE - VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600206 VK_MAX_ENUM(VkAttachmentLoadOp)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600207} VkAttachmentLoadOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600208
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600209typedef enum VkAttachmentStoreOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600210{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600211 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
212 VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001,
213 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600214
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600215 VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE,
216 VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE,
217 VK_NUM_ATTACHMENT_STORE_OP = (VK_ATTACHMENT_STORE_OP_END_RANGE - VK_ATTACHMENT_STORE_OP_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600218 VK_MAX_ENUM(VkAttachmentStoreOp)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600219} VkAttachmentStoreOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600220
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600221typedef enum VkImageType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600222{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600223 VK_IMAGE_1D = 0x00000000,
224 VK_IMAGE_2D = 0x00000001,
225 VK_IMAGE_3D = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600226
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600227 VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_1D,
228 VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_3D,
229 VK_NUM_IMAGE_TYPE = (VK_IMAGE_TYPE_END_RANGE - VK_IMAGE_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600230 VK_MAX_ENUM(VkImageType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600231} VkImageType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600232
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600233typedef enum VkImageTiling_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600234{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600235 VK_LINEAR_TILING = 0x00000000,
236 VK_OPTIMAL_TILING = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600237
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600238 VK_IMAGE_TILING_BEGIN_RANGE = VK_LINEAR_TILING,
239 VK_IMAGE_TILING_END_RANGE = VK_OPTIMAL_TILING,
240 VK_NUM_IMAGE_TILING = (VK_IMAGE_TILING_END_RANGE - VK_IMAGE_TILING_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600241 VK_MAX_ENUM(VkImageTiling)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600242} VkImageTiling;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600243
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600244typedef enum VkImageViewType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600245{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600246 VK_IMAGE_VIEW_1D = 0x00000000,
247 VK_IMAGE_VIEW_2D = 0x00000001,
248 VK_IMAGE_VIEW_3D = 0x00000002,
249 VK_IMAGE_VIEW_CUBE = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600250
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600251 VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_1D,
252 VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_CUBE,
253 VK_NUM_IMAGE_VIEW_TYPE = (VK_IMAGE_VIEW_TYPE_END_RANGE - VK_IMAGE_VIEW_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600254 VK_MAX_ENUM(VkImageViewType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600255} VkImageViewType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600256
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600257typedef enum VkImageAspect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600258{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600259 VK_IMAGE_ASPECT_COLOR = 0x00000000,
260 VK_IMAGE_ASPECT_DEPTH = 0x00000001,
261 VK_IMAGE_ASPECT_STENCIL = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600262
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600263 VK_IMAGE_ASPECT_BEGIN_RANGE = VK_IMAGE_ASPECT_COLOR,
264 VK_IMAGE_ASPECT_END_RANGE = VK_IMAGE_ASPECT_STENCIL,
265 VK_NUM_IMAGE_ASPECT = (VK_IMAGE_ASPECT_END_RANGE - VK_IMAGE_ASPECT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600266 VK_MAX_ENUM(VkImageAspect)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600267} VkImageAspect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600268
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600269typedef enum VkChannelSwizzle_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600270{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600271 VK_CHANNEL_SWIZZLE_ZERO = 0x00000000,
272 VK_CHANNEL_SWIZZLE_ONE = 0x00000001,
273 VK_CHANNEL_SWIZZLE_R = 0x00000002,
274 VK_CHANNEL_SWIZZLE_G = 0x00000003,
275 VK_CHANNEL_SWIZZLE_B = 0x00000004,
276 VK_CHANNEL_SWIZZLE_A = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600277
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600278 VK_CHANNEL_SWIZZLE_BEGIN_RANGE = VK_CHANNEL_SWIZZLE_ZERO,
279 VK_CHANNEL_SWIZZLE_END_RANGE = VK_CHANNEL_SWIZZLE_A,
280 VK_NUM_CHANNEL_SWIZZLE = (VK_CHANNEL_SWIZZLE_END_RANGE - VK_CHANNEL_SWIZZLE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600281 VK_MAX_ENUM(VkChannelSwizzle)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600282} VkChannelSwizzle;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600283
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600284typedef enum VkDescriptorType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600285{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600286 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600287 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
288 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
289 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
290 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
291 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600292 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600293 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600294 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600295 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600296
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600297 VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600298 VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600299 VK_NUM_DESCRIPTOR_TYPE = (VK_DESCRIPTOR_TYPE_END_RANGE - VK_DESCRIPTOR_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600300 VK_MAX_ENUM(VkDescriptorType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600301} VkDescriptorType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600302
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600303typedef enum VkDescriptorPoolUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600304{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600305 VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000,
306 VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600307
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600308 VK_DESCRIPTOR_POOL_USAGE_BEGIN_RANGE = VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT,
309 VK_DESCRIPTOR_POOL_USAGE_END_RANGE = VK_DESCRIPTOR_POOL_USAGE_DYNAMIC,
310 VK_NUM_DESCRIPTOR_POOL_USAGE = (VK_DESCRIPTOR_POOL_USAGE_END_RANGE - VK_DESCRIPTOR_POOL_USAGE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600311 VK_MAX_ENUM(VkDescriptorPoolUsage)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600312} VkDescriptorPoolUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600313
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600314typedef enum VkDescriptorUpdateMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600315{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600316 VK_DESCRIPTOR_UDPATE_MODE_COPY = 0x00000000,
317 VK_DESCRIPTOR_UPDATE_MODE_FASTEST = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600318
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600319 VK_DESCRIPTOR_UPDATE_MODE_BEGIN_RANGE = VK_DESCRIPTOR_UDPATE_MODE_COPY,
320 VK_DESCRIPTOR_UPDATE_MODE_END_RANGE = VK_DESCRIPTOR_UPDATE_MODE_FASTEST,
321 VK_NUM_DESCRIPTOR_UPDATE_MODE = (VK_DESCRIPTOR_UPDATE_MODE_END_RANGE - VK_DESCRIPTOR_UPDATE_MODE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600322 VK_MAX_ENUM(VkDescriptorUpdateMode)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600323} VkDescriptorUpdateMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600324
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600325typedef enum VkDescriptorSetUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600326{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600327 VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000,
328 VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600329
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600330 VK_DESCRIPTOR_SET_USAGE_BEGIN_RANGE = VK_DESCRIPTOR_SET_USAGE_ONE_SHOT,
331 VK_DESCRIPTOR_SET_USAGE_END_RANGE = VK_DESCRIPTOR_SET_USAGE_STATIC,
332 VK_NUM_DESCRIPTOR_SET_USAGE = (VK_DESCRIPTOR_SET_USAGE_END_RANGE - VK_DESCRIPTOR_SET_USAGE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600333 VK_MAX_ENUM(VkDescriptorSetUsage)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600334} VkDescriptorSetUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600335
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600336typedef enum VkQueryType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600337{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600338 VK_QUERY_OCCLUSION = 0x00000000,
339 VK_QUERY_PIPELINE_STATISTICS = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600340
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600341 VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_OCCLUSION,
342 VK_QUERY_TYPE_END_RANGE = VK_QUERY_PIPELINE_STATISTICS,
343 VK_NUM_QUERY_TYPE = (VK_QUERY_TYPE_END_RANGE - VK_QUERY_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600344 VK_MAX_ENUM(VkQueryType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600345} VkQueryType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600346
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600347typedef enum VkTimestampType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600348{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600349 VK_TIMESTAMP_TOP = 0x00000000,
350 VK_TIMESTAMP_BOTTOM = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600351
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600352 VK_TIMESTAMP_TYPE_BEGIN_RANGE = VK_TIMESTAMP_TOP,
353 VK_TIMESTAMP_TYPE_END_RANGE = VK_TIMESTAMP_BOTTOM,
354 VK_NUM_TIMESTAMP_TYPE = (VK_TIMESTAMP_TYPE_END_RANGE - VK_TIMESTAMP_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600355 VK_MAX_ENUM(VkTimestampType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600356} VkTimestampType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600357
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600358typedef enum VkBorderColorType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600359{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600360 VK_BORDER_COLOR_OPAQUE_WHITE = 0x00000000,
361 VK_BORDER_COLOR_TRANSPARENT_BLACK = 0x00000001,
362 VK_BORDER_COLOR_OPAQUE_BLACK = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600363
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600364 VK_BORDER_COLOR_TYPE_BEGIN_RANGE = VK_BORDER_COLOR_OPAQUE_WHITE,
365 VK_BORDER_COLOR_TYPE_END_RANGE = VK_BORDER_COLOR_OPAQUE_BLACK,
366 VK_NUM_BORDER_COLOR_TYPE = (VK_BORDER_COLOR_TYPE_END_RANGE - VK_BORDER_COLOR_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600367 VK_MAX_ENUM(VkBorderColorType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600368} VkBorderColorType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600369
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600370typedef enum VkPipelineBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600371{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600372 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000,
373 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600374
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600375 VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE,
376 VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS,
377 VK_NUM_PIPELINE_BIND_POINT = (VK_PIPELINE_BIND_POINT_END_RANGE - VK_PIPELINE_BIND_POINT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600378 VK_MAX_ENUM(VkPipelineBindPoint)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600379} VkPipelineBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600380
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600381typedef enum VkStateBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600382{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600383 VK_STATE_BIND_VIEWPORT = 0x00000000,
384 VK_STATE_BIND_RASTER = 0x00000001,
385 VK_STATE_BIND_COLOR_BLEND = 0x00000002,
386 VK_STATE_BIND_DEPTH_STENCIL = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600387
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600388 VK_STATE_BIND_POINT_BEGIN_RANGE = VK_STATE_BIND_VIEWPORT,
389 VK_STATE_BIND_POINT_END_RANGE = VK_STATE_BIND_DEPTH_STENCIL,
390 VK_NUM_STATE_BIND_POINT = (VK_STATE_BIND_POINT_END_RANGE - VK_STATE_BIND_POINT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600391 VK_MAX_ENUM(VkStateBindPoint)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600392} VkStateBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600393
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600394typedef enum VkPrimitiveTopology_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600395{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600396 VK_TOPOLOGY_POINT_LIST = 0x00000000,
397 VK_TOPOLOGY_LINE_LIST = 0x00000001,
398 VK_TOPOLOGY_LINE_STRIP = 0x00000002,
399 VK_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
400 VK_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
401 VK_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
402 VK_TOPOLOGY_LINE_LIST_ADJ = 0x00000006,
403 VK_TOPOLOGY_LINE_STRIP_ADJ = 0x00000007,
404 VK_TOPOLOGY_TRIANGLE_LIST_ADJ = 0x00000008,
405 VK_TOPOLOGY_TRIANGLE_STRIP_ADJ = 0x00000009,
406 VK_TOPOLOGY_PATCH = 0x0000000a,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600407
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600408 VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_TOPOLOGY_POINT_LIST,
409 VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_TOPOLOGY_PATCH,
410 VK_NUM_PRIMITIVE_TOPOLOGY = (VK_PRIMITIVE_TOPOLOGY_END_RANGE - VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600411 VK_MAX_ENUM(VkPrimitiveTopology)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600412} VkPrimitiveTopology;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600413
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600414typedef enum VkIndexType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600415{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600416 VK_INDEX_8 = 0x00000000,
417 VK_INDEX_16 = 0x00000001,
418 VK_INDEX_32 = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600419
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600420 VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_8,
421 VK_INDEX_TYPE_END_RANGE = VK_INDEX_32,
422 VK_NUM_INDEX_TYPE = (VK_INDEX_TYPE_END_RANGE - VK_INDEX_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600423 VK_MAX_ENUM(VkIndexType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600424} VkIndexType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600425
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600426typedef enum VkTexFilter_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600427{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600428 VK_TEX_FILTER_NEAREST = 0,
429 VK_TEX_FILTER_LINEAR = 1,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600430
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600431 VK_TEX_FILTER_BEGIN_RANGE = VK_TEX_FILTER_NEAREST,
432 VK_TEX_FILTER_END_RANGE = VK_TEX_FILTER_LINEAR,
433 VK_NUM_TEX_FILTER = (VK_TEX_FILTER_END_RANGE - VK_TEX_FILTER_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600434 VK_MAX_ENUM(VkTexFilter)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600435} VkTexFilter;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600436
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600437typedef enum VkTexMipmapMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600438{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600439 VK_TEX_MIPMAP_BASE = 0, // Always choose base level
440 VK_TEX_MIPMAP_NEAREST = 1, // Choose nearest mip level
441 VK_TEX_MIPMAP_LINEAR = 2, // Linear filter between mip levels
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600442
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600443 VK_TEX_MIPMAP_BEGIN_RANGE = VK_TEX_MIPMAP_BASE,
444 VK_TEX_MIPMAP_END_RANGE = VK_TEX_MIPMAP_LINEAR,
445 VK_NUM_TEX_MIPMAP = (VK_TEX_MIPMAP_END_RANGE - VK_TEX_MIPMAP_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600446 VK_MAX_ENUM(VkTexMipmapMode)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600447} VkTexMipmapMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600448
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600449typedef enum VkTexAddress_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600450{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600451 VK_TEX_ADDRESS_WRAP = 0x00000000,
452 VK_TEX_ADDRESS_MIRROR = 0x00000001,
453 VK_TEX_ADDRESS_CLAMP = 0x00000002,
454 VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
455 VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600456
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600457 VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_WRAP,
458 VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_CLAMP_BORDER,
459 VK_NUM_TEX_ADDRESS = (VK_TEX_ADDRESS_END_RANGE - VK_TEX_ADDRESS_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600460 VK_MAX_ENUM(VkTexAddress)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600461} VkTexAddress;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600462
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600463typedef enum VkCompareFunc_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600464{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600465 VK_COMPARE_NEVER = 0x00000000,
466 VK_COMPARE_LESS = 0x00000001,
467 VK_COMPARE_EQUAL = 0x00000002,
468 VK_COMPARE_LESS_EQUAL = 0x00000003,
469 VK_COMPARE_GREATER = 0x00000004,
470 VK_COMPARE_NOT_EQUAL = 0x00000005,
471 VK_COMPARE_GREATER_EQUAL = 0x00000006,
472 VK_COMPARE_ALWAYS = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600473
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600474 VK_COMPARE_FUNC_BEGIN_RANGE = VK_COMPARE_NEVER,
475 VK_COMPARE_FUNC_END_RANGE = VK_COMPARE_ALWAYS,
476 VK_NUM_COMPARE_FUNC = (VK_COMPARE_FUNC_END_RANGE - VK_COMPARE_FUNC_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600477 VK_MAX_ENUM(VkCompareFunc)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600478} VkCompareFunc;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600479
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600480typedef enum VkFillMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600481{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600482 VK_FILL_POINTS = 0x00000000,
483 VK_FILL_WIREFRAME = 0x00000001,
484 VK_FILL_SOLID = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600485
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600486 VK_FILL_MODE_BEGIN_RANGE = VK_FILL_POINTS,
487 VK_FILL_MODE_END_RANGE = VK_FILL_SOLID,
488 VK_NUM_FILL_MODE = (VK_FILL_MODE_END_RANGE - VK_FILL_MODE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600489 VK_MAX_ENUM(VkFillMode)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600490} VkFillMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600491
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600492typedef enum VkCullMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600493{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600494 VK_CULL_NONE = 0x00000000,
495 VK_CULL_FRONT = 0x00000001,
496 VK_CULL_BACK = 0x00000002,
497 VK_CULL_FRONT_AND_BACK = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600498
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600499 VK_CULL_MODE_BEGIN_RANGE = VK_CULL_NONE,
500 VK_CULL_MODE_END_RANGE = VK_CULL_FRONT_AND_BACK,
501 VK_NUM_CULL_MODE = (VK_CULL_MODE_END_RANGE - VK_CULL_MODE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600502 VK_MAX_ENUM(VkCullMode)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600503} VkCullMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600504
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600505typedef enum VkFaceOrientation_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600506{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600507 VK_FRONT_FACE_CCW = 0x00000000,
508 VK_FRONT_FACE_CW = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600509
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600510 VK_FACE_ORIENTATION_BEGIN_RANGE = VK_FRONT_FACE_CCW,
511 VK_FACE_ORIENTATION_END_RANGE = VK_FRONT_FACE_CW,
512 VK_NUM_FACE_ORIENTATION = (VK_FACE_ORIENTATION_END_RANGE - VK_FACE_ORIENTATION_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600513 VK_MAX_ENUM(VkFaceOrientation)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600514} VkFaceOrientation;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600515
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600516typedef enum VkProvokingVertexConvention_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600517{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600518 VK_PROVOKING_VERTEX_FIRST = 0x00000000,
519 VK_PROVOKING_VERTEX_LAST = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600520
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600521 VK_PROVOKING_VERTEX_BEGIN_RANGE = VK_PROVOKING_VERTEX_FIRST,
522 VK_PROVOKING_VERTEX_END_RANGE = VK_PROVOKING_VERTEX_LAST,
523 VK_NUM_PROVOKING_VERTEX_CONVENTION = (VK_PROVOKING_VERTEX_END_RANGE - VK_PROVOKING_VERTEX_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600524 VK_MAX_ENUM(VkProvokingVertexConvention)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600525} VkProvokingVertexConvention;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600526
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600527typedef enum VkCoordinateOrigin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600528{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600529 VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
530 VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600531
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600532 VK_COORDINATE_ORIGIN_BEGIN_RANGE = VK_COORDINATE_ORIGIN_UPPER_LEFT,
533 VK_COORDINATE_ORIGIN_END_RANGE = VK_COORDINATE_ORIGIN_LOWER_LEFT,
534 VK_NUM_COORDINATE_ORIGIN = (VK_COORDINATE_ORIGIN_END_RANGE - VK_COORDINATE_ORIGIN_END_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600535 VK_MAX_ENUM(VkCoordinateOrigin)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600536} VkCoordinateOrigin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600537
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600538typedef enum VkDepthMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600539{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600540 VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000,
541 VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600542
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600543 VK_DEPTH_MODE_BEGIN_RANGE = VK_DEPTH_MODE_ZERO_TO_ONE,
544 VK_DEPTH_MODE_END_RANGE = VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE,
545 VK_NUM_DEPTH_MODE = (VK_DEPTH_MODE_END_RANGE - VK_DEPTH_MODE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600546 VK_MAX_ENUM(VkDepthMode)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600547} VkDepthMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600548
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600549typedef enum VkBlend_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600550{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600551 VK_BLEND_ZERO = 0x00000000,
552 VK_BLEND_ONE = 0x00000001,
553 VK_BLEND_SRC_COLOR = 0x00000002,
554 VK_BLEND_ONE_MINUS_SRC_COLOR = 0x00000003,
555 VK_BLEND_DEST_COLOR = 0x00000004,
556 VK_BLEND_ONE_MINUS_DEST_COLOR = 0x00000005,
557 VK_BLEND_SRC_ALPHA = 0x00000006,
558 VK_BLEND_ONE_MINUS_SRC_ALPHA = 0x00000007,
559 VK_BLEND_DEST_ALPHA = 0x00000008,
560 VK_BLEND_ONE_MINUS_DEST_ALPHA = 0x00000009,
561 VK_BLEND_CONSTANT_COLOR = 0x0000000a,
562 VK_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
563 VK_BLEND_CONSTANT_ALPHA = 0x0000000c,
564 VK_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
565 VK_BLEND_SRC_ALPHA_SATURATE = 0x0000000e,
566 VK_BLEND_SRC1_COLOR = 0x0000000f,
567 VK_BLEND_ONE_MINUS_SRC1_COLOR = 0x00000010,
568 VK_BLEND_SRC1_ALPHA = 0x00000011,
569 VK_BLEND_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600570
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600571 VK_BLEND_BEGIN_RANGE = VK_BLEND_ZERO,
572 VK_BLEND_END_RANGE = VK_BLEND_ONE_MINUS_SRC1_ALPHA,
573 VK_NUM_BLEND = (VK_BLEND_END_RANGE - VK_BLEND_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600574 VK_MAX_ENUM(VkBlend)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600575} VkBlend;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600576
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600577typedef enum VkBlendFunc_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600578{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600579 VK_BLEND_FUNC_ADD = 0x00000000,
580 VK_BLEND_FUNC_SUBTRACT = 0x00000001,
581 VK_BLEND_FUNC_REVERSE_SUBTRACT = 0x00000002,
582 VK_BLEND_FUNC_MIN = 0x00000003,
583 VK_BLEND_FUNC_MAX = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600584
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600585 VK_BLEND_FUNC_BEGIN_RANGE = VK_BLEND_FUNC_ADD,
586 VK_BLEND_FUNC_END_RANGE = VK_BLEND_FUNC_MAX,
587 VK_NUM_BLEND_FUNC = (VK_BLEND_FUNC_END_RANGE - VK_BLEND_FUNC_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600588 VK_MAX_ENUM(VkBlendFunc)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600589} VkBlendFunc;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600590
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600591typedef enum VkStencilOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600592{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600593 VK_STENCIL_OP_KEEP = 0x00000000,
594 VK_STENCIL_OP_ZERO = 0x00000001,
595 VK_STENCIL_OP_REPLACE = 0x00000002,
596 VK_STENCIL_OP_INC_CLAMP = 0x00000003,
597 VK_STENCIL_OP_DEC_CLAMP = 0x00000004,
598 VK_STENCIL_OP_INVERT = 0x00000005,
599 VK_STENCIL_OP_INC_WRAP = 0x00000006,
600 VK_STENCIL_OP_DEC_WRAP = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600601
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600602 VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP,
603 VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DEC_WRAP,
604 VK_NUM_STENCIL_OP = (VK_STENCIL_OP_END_RANGE - VK_STENCIL_OP_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600605 VK_MAX_ENUM(VkStencilOp)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600606} VkStencilOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600607
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600608typedef enum VkLogicOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600609{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600610 VK_LOGIC_OP_COPY = 0x00000000,
611 VK_LOGIC_OP_CLEAR = 0x00000001,
612 VK_LOGIC_OP_AND = 0x00000002,
613 VK_LOGIC_OP_AND_REVERSE = 0x00000003,
614 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
615 VK_LOGIC_OP_NOOP = 0x00000005,
616 VK_LOGIC_OP_XOR = 0x00000006,
617 VK_LOGIC_OP_OR = 0x00000007,
618 VK_LOGIC_OP_NOR = 0x00000008,
619 VK_LOGIC_OP_EQUIV = 0x00000009,
620 VK_LOGIC_OP_INVERT = 0x0000000a,
621 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
622 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
623 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
624 VK_LOGIC_OP_NAND = 0x0000000e,
625 VK_LOGIC_OP_SET = 0x0000000f,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600626
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600627 VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_COPY,
628 VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET,
629 VK_NUM_LOGIC_OP = (VK_LOGIC_OP_END_RANGE - VK_LOGIC_OP_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600630 VK_MAX_ENUM(VkLogicOp)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600631} VkLogicOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600632
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600633typedef enum VkSystemAllocType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600634{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600635 VK_SYSTEM_ALLOC_API_OBJECT = 0x00000000,
636 VK_SYSTEM_ALLOC_INTERNAL = 0x00000001,
637 VK_SYSTEM_ALLOC_INTERNAL_TEMP = 0x00000002,
638 VK_SYSTEM_ALLOC_INTERNAL_SHADER = 0x00000003,
639 VK_SYSTEM_ALLOC_DEBUG = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600640
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600641 VK_SYSTEM_ALLOC_BEGIN_RANGE = VK_SYSTEM_ALLOC_API_OBJECT,
642 VK_SYSTEM_ALLOC_END_RANGE = VK_SYSTEM_ALLOC_DEBUG,
643 VK_NUM_SYSTEM_ALLOC_TYPE = (VK_SYSTEM_ALLOC_END_RANGE - VK_SYSTEM_ALLOC_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600644 VK_MAX_ENUM(VkSystemAllocType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600645} VkSystemAllocType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600646
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600647typedef enum VkPhysicalGpuType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600648{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600649 VK_GPU_TYPE_OTHER = 0x00000000,
650 VK_GPU_TYPE_INTEGRATED = 0x00000001,
651 VK_GPU_TYPE_DISCRETE = 0x00000002,
652 VK_GPU_TYPE_VIRTUAL = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600653
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600654 VK_PHYSICAL_GPU_TYPE_BEGIN_RANGE = VK_GPU_TYPE_OTHER,
655 VK_PHYSICAL_GPU_TYPE_END_RANGE = VK_GPU_TYPE_VIRTUAL,
656 VK_NUM_PHYSICAL_GPU_TYPE = (VK_PHYSICAL_GPU_TYPE_END_RANGE - VK_PHYSICAL_GPU_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600657 VK_MAX_ENUM(VkPhysicalGpuType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600658} VkPhysicalGpuType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600659
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600660typedef enum VkPhysicalGpuInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600661{
662 // Info type for vkGetGpuInfo()
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600663 VK_INFO_TYPE_PHYSICAL_GPU_PROPERTIES = 0x00000000,
664 VK_INFO_TYPE_PHYSICAL_GPU_PERFORMANCE = 0x00000001,
665 VK_INFO_TYPE_PHYSICAL_GPU_QUEUE_PROPERTIES = 0x00000002,
666 VK_INFO_TYPE_PHYSICAL_GPU_MEMORY_PROPERTIES = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600667
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600668 VK_INFO_TYPE_PHYSICAL_GPU_BEGIN_RANGE = VK_INFO_TYPE_PHYSICAL_GPU_PROPERTIES,
669 VK_INFO_TYPE_PHYSICAL_GPU_END_RANGE = VK_INFO_TYPE_PHYSICAL_GPU_MEMORY_PROPERTIES,
670 VK_NUM_INFO_TYPE_PHYSICAL_GPU = (VK_INFO_TYPE_PHYSICAL_GPU_END_RANGE - VK_INFO_TYPE_PHYSICAL_GPU_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600671 VK_MAX_ENUM(VkPhysicalGpuInfoType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600672} VkPhysicalGpuInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600673
Jon Ashburn9fd4cc42015-04-10 14:33:07 -0600674typedef enum VkExtensionInfoType_
675{
676 // Info type for vkGetGlobalExtensionInfo() and vkGetPhysicalDeviceExtensionInfo()
677 VK_EXTENSION_INFO_TYPE_COUNT = 0x00000000,
678 VK_EXTENSION_INFO_TYPE_PROPERTIES = 0x00000001,
679
680 //VK_ENUM_RANGE(EXTENSION_INFO_TYPE, COUNT, PROPERTIES)
681} VkExtensionInfoType;
682
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600683typedef enum VkFormatInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600684{
685 // Info type for vkGetFormatInfo()
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600686 VK_INFO_TYPE_FORMAT_PROPERTIES = 0x00000000,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600687
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600688 VK_INFO_TYPE_FORMAT_BEGIN_RANGE = VK_INFO_TYPE_FORMAT_PROPERTIES,
689 VK_INFO_TYPE_FORMAT_END_RANGE = VK_INFO_TYPE_FORMAT_PROPERTIES,
690 VK_NUM_INFO_TYPE_FORMAT = (VK_INFO_TYPE_FORMAT_END_RANGE - VK_INFO_TYPE_FORMAT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600691 VK_MAX_ENUM(VkFormatInfoType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600692} VkFormatInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600693
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600694typedef enum VkSubresourceInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600695{
696 // Info type for vkGetImageSubresourceInfo()
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600697 VK_INFO_TYPE_SUBRESOURCE_LAYOUT = 0x00000000,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600698
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600699 VK_INFO_TYPE_SUBRESOURCE_BEGIN_RANGE = VK_INFO_TYPE_SUBRESOURCE_LAYOUT,
700 VK_INFO_TYPE_SUBRESOURCE_END_RANGE = VK_INFO_TYPE_SUBRESOURCE_LAYOUT,
701 VK_NUM_INFO_TYPE_SUBRESOURCE = (VK_INFO_TYPE_SUBRESOURCE_END_RANGE - VK_INFO_TYPE_SUBRESOURCE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600702 VK_MAX_ENUM(VkSubresourceInfoType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600703} VkSubresourceInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600704
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600705typedef enum VkObjectInfoType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600706{
707 // Info type for vkGetObjectInfo()
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600708 VK_INFO_TYPE_MEMORY_ALLOCATION_COUNT = 0x00000000,
709 VK_INFO_TYPE_MEMORY_REQUIREMENTS = 0x00000001,
710 VK_INFO_TYPE_BUFFER_MEMORY_REQUIREMENTS = 0x00000002,
711 VK_INFO_TYPE_IMAGE_MEMORY_REQUIREMENTS = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600712
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600713 VK_INFO_TYPE_BEGIN_RANGE = VK_INFO_TYPE_MEMORY_ALLOCATION_COUNT,
714 VK_INFO_TYPE_END_RANGE = VK_INFO_TYPE_IMAGE_MEMORY_REQUIREMENTS,
715 VK_NUM_INFO_TYPE = (VK_INFO_TYPE_END_RANGE - VK_INFO_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600716 VK_MAX_ENUM(VkObjectInfoType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600717} VkObjectInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600718
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600719typedef enum VkValidationLevel_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600720{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600721 VK_VALIDATION_LEVEL_0 = 0x00000000,
722 VK_VALIDATION_LEVEL_1 = 0x00000001,
723 VK_VALIDATION_LEVEL_2 = 0x00000002,
724 VK_VALIDATION_LEVEL_3 = 0x00000003,
725 VK_VALIDATION_LEVEL_4 = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600726
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600727 VK_VALIDATION_LEVEL_BEGIN_RANGE = VK_VALIDATION_LEVEL_0,
728 VK_VALIDATION_LEVEL_END_RANGE = VK_VALIDATION_LEVEL_4,
729 VK_NUM_VALIDATION_LEVEL = (VK_VALIDATION_LEVEL_END_RANGE - VK_VALIDATION_LEVEL_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600730
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600731 VK_MAX_ENUM(VkValidationLevel)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600732} VkValidationLevel;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600733
734// ------------------------------------------------------------------------------------------------
735// Error and return codes
736
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600737typedef enum VkResult_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600738{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600739 // Return codes for successful operation execution (> = 0)
740 VK_SUCCESS = 0x0000000,
741 VK_UNSUPPORTED = 0x0000001,
742 VK_NOT_READY = 0x0000002,
743 VK_TIMEOUT = 0x0000003,
744 VK_EVENT_SET = 0x0000004,
745 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600746
747 // Error codes (negative values)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600748 VK_ERROR_UNKNOWN = -(0x00000001),
749 VK_ERROR_UNAVAILABLE = -(0x00000002),
750 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
751 VK_ERROR_OUT_OF_MEMORY = -(0x00000004),
752 VK_ERROR_OUT_OF_GPU_MEMORY = -(0x00000005),
753 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
754 VK_ERROR_DEVICE_LOST = -(0x00000007),
755 VK_ERROR_INVALID_POINTER = -(0x00000008),
756 VK_ERROR_INVALID_VALUE = -(0x00000009),
757 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
758 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
759 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
760 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
761 VK_ERROR_INVALID_FLAGS = -(0x0000000E),
762 VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F),
763 VK_ERROR_INVALID_FORMAT = -(0x00000010),
764 VK_ERROR_INVALID_IMAGE = -(0x00000011),
765 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012),
766 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013),
767 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014),
768 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015),
769 VK_ERROR_BAD_SHADER_CODE = -(0x00000016),
770 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017),
771 VK_ERROR_TOO_MANY_MEMORY_REFERENCES = -(0x00000018),
772 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
773 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
774 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
775 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
776 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
777 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
778 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
779 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
780 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
781 VK_ERROR_NOT_SHAREABLE = -(0x00000022),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600782 VK_MAX_ENUM(VkResult)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600783} VkResult;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600784
785// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600786// Vulkan format definitions
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600787
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600788typedef enum VkVertexInputStepRate_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600789{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600790 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
791 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
792 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600793
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600794 VK_VERTEX_INPUT_STEP_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_STEP_RATE_VERTEX,
795 VK_VERTEX_INPUT_STEP_RATE_END_RANGE = VK_VERTEX_INPUT_STEP_RATE_DRAW,
796 VK_NUM_VERTEX_INPUT_STEP_RATE = (VK_VERTEX_INPUT_STEP_RATE_END_RANGE - VK_VERTEX_INPUT_STEP_RATE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600797 VK_MAX_ENUM(VkVertexInputStepRate)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600798} VkVertexInputStepRate;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600799
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600800typedef enum VkFormat_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600801{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600802 VK_FMT_UNDEFINED = 0x00000000,
803 VK_FMT_R4G4_UNORM = 0x00000001,
804 VK_FMT_R4G4_USCALED = 0x00000002,
805 VK_FMT_R4G4B4A4_UNORM = 0x00000003,
806 VK_FMT_R4G4B4A4_USCALED = 0x00000004,
807 VK_FMT_R5G6B5_UNORM = 0x00000005,
808 VK_FMT_R5G6B5_USCALED = 0x00000006,
809 VK_FMT_R5G5B5A1_UNORM = 0x00000007,
810 VK_FMT_R5G5B5A1_USCALED = 0x00000008,
811 VK_FMT_R8_UNORM = 0x00000009,
812 VK_FMT_R8_SNORM = 0x0000000A,
813 VK_FMT_R8_USCALED = 0x0000000B,
814 VK_FMT_R8_SSCALED = 0x0000000C,
815 VK_FMT_R8_UINT = 0x0000000D,
816 VK_FMT_R8_SINT = 0x0000000E,
817 VK_FMT_R8_SRGB = 0x0000000F,
818 VK_FMT_R8G8_UNORM = 0x00000010,
819 VK_FMT_R8G8_SNORM = 0x00000011,
820 VK_FMT_R8G8_USCALED = 0x00000012,
821 VK_FMT_R8G8_SSCALED = 0x00000013,
822 VK_FMT_R8G8_UINT = 0x00000014,
823 VK_FMT_R8G8_SINT = 0x00000015,
824 VK_FMT_R8G8_SRGB = 0x00000016,
825 VK_FMT_R8G8B8_UNORM = 0x00000017,
826 VK_FMT_R8G8B8_SNORM = 0x00000018,
827 VK_FMT_R8G8B8_USCALED = 0x00000019,
828 VK_FMT_R8G8B8_SSCALED = 0x0000001A,
829 VK_FMT_R8G8B8_UINT = 0x0000001B,
830 VK_FMT_R8G8B8_SINT = 0x0000001C,
831 VK_FMT_R8G8B8_SRGB = 0x0000001D,
832 VK_FMT_R8G8B8A8_UNORM = 0x0000001E,
833 VK_FMT_R8G8B8A8_SNORM = 0x0000001F,
834 VK_FMT_R8G8B8A8_USCALED = 0x00000020,
835 VK_FMT_R8G8B8A8_SSCALED = 0x00000021,
836 VK_FMT_R8G8B8A8_UINT = 0x00000022,
837 VK_FMT_R8G8B8A8_SINT = 0x00000023,
838 VK_FMT_R8G8B8A8_SRGB = 0x00000024,
839 VK_FMT_R10G10B10A2_UNORM = 0x00000025,
840 VK_FMT_R10G10B10A2_SNORM = 0x00000026,
841 VK_FMT_R10G10B10A2_USCALED = 0x00000027,
842 VK_FMT_R10G10B10A2_SSCALED = 0x00000028,
843 VK_FMT_R10G10B10A2_UINT = 0x00000029,
844 VK_FMT_R10G10B10A2_SINT = 0x0000002A,
845 VK_FMT_R16_UNORM = 0x0000002B,
846 VK_FMT_R16_SNORM = 0x0000002C,
847 VK_FMT_R16_USCALED = 0x0000002D,
848 VK_FMT_R16_SSCALED = 0x0000002E,
849 VK_FMT_R16_UINT = 0x0000002F,
850 VK_FMT_R16_SINT = 0x00000030,
851 VK_FMT_R16_SFLOAT = 0x00000031,
852 VK_FMT_R16G16_UNORM = 0x00000032,
853 VK_FMT_R16G16_SNORM = 0x00000033,
854 VK_FMT_R16G16_USCALED = 0x00000034,
855 VK_FMT_R16G16_SSCALED = 0x00000035,
856 VK_FMT_R16G16_UINT = 0x00000036,
857 VK_FMT_R16G16_SINT = 0x00000037,
858 VK_FMT_R16G16_SFLOAT = 0x00000038,
859 VK_FMT_R16G16B16_UNORM = 0x00000039,
860 VK_FMT_R16G16B16_SNORM = 0x0000003A,
861 VK_FMT_R16G16B16_USCALED = 0x0000003B,
862 VK_FMT_R16G16B16_SSCALED = 0x0000003C,
863 VK_FMT_R16G16B16_UINT = 0x0000003D,
864 VK_FMT_R16G16B16_SINT = 0x0000003E,
865 VK_FMT_R16G16B16_SFLOAT = 0x0000003F,
866 VK_FMT_R16G16B16A16_UNORM = 0x00000040,
867 VK_FMT_R16G16B16A16_SNORM = 0x00000041,
868 VK_FMT_R16G16B16A16_USCALED = 0x00000042,
869 VK_FMT_R16G16B16A16_SSCALED = 0x00000043,
870 VK_FMT_R16G16B16A16_UINT = 0x00000044,
871 VK_FMT_R16G16B16A16_SINT = 0x00000045,
872 VK_FMT_R16G16B16A16_SFLOAT = 0x00000046,
873 VK_FMT_R32_UINT = 0x00000047,
874 VK_FMT_R32_SINT = 0x00000048,
875 VK_FMT_R32_SFLOAT = 0x00000049,
876 VK_FMT_R32G32_UINT = 0x0000004A,
877 VK_FMT_R32G32_SINT = 0x0000004B,
878 VK_FMT_R32G32_SFLOAT = 0x0000004C,
879 VK_FMT_R32G32B32_UINT = 0x0000004D,
880 VK_FMT_R32G32B32_SINT = 0x0000004E,
881 VK_FMT_R32G32B32_SFLOAT = 0x0000004F,
882 VK_FMT_R32G32B32A32_UINT = 0x00000050,
883 VK_FMT_R32G32B32A32_SINT = 0x00000051,
884 VK_FMT_R32G32B32A32_SFLOAT = 0x00000052,
885 VK_FMT_R64_SFLOAT = 0x00000053,
886 VK_FMT_R64G64_SFLOAT = 0x00000054,
887 VK_FMT_R64G64B64_SFLOAT = 0x00000055,
888 VK_FMT_R64G64B64A64_SFLOAT = 0x00000056,
889 VK_FMT_R11G11B10_UFLOAT = 0x00000057,
890 VK_FMT_R9G9B9E5_UFLOAT = 0x00000058,
891 VK_FMT_D16_UNORM = 0x00000059,
892 VK_FMT_D24_UNORM = 0x0000005A,
893 VK_FMT_D32_SFLOAT = 0x0000005B,
894 VK_FMT_S8_UINT = 0x0000005C,
895 VK_FMT_D16_UNORM_S8_UINT = 0x0000005D,
896 VK_FMT_D24_UNORM_S8_UINT = 0x0000005E,
897 VK_FMT_D32_SFLOAT_S8_UINT = 0x0000005F,
898 VK_FMT_BC1_RGB_UNORM = 0x00000060,
899 VK_FMT_BC1_RGB_SRGB = 0x00000061,
900 VK_FMT_BC1_RGBA_UNORM = 0x00000062,
901 VK_FMT_BC1_RGBA_SRGB = 0x00000063,
902 VK_FMT_BC2_UNORM = 0x00000064,
903 VK_FMT_BC2_SRGB = 0x00000065,
904 VK_FMT_BC3_UNORM = 0x00000066,
905 VK_FMT_BC3_SRGB = 0x00000067,
906 VK_FMT_BC4_UNORM = 0x00000068,
907 VK_FMT_BC4_SNORM = 0x00000069,
908 VK_FMT_BC5_UNORM = 0x0000006A,
909 VK_FMT_BC5_SNORM = 0x0000006B,
910 VK_FMT_BC6H_UFLOAT = 0x0000006C,
911 VK_FMT_BC6H_SFLOAT = 0x0000006D,
912 VK_FMT_BC7_UNORM = 0x0000006E,
913 VK_FMT_BC7_SRGB = 0x0000006F,
914 VK_FMT_ETC2_R8G8B8_UNORM = 0x00000070,
915 VK_FMT_ETC2_R8G8B8_SRGB = 0x00000071,
916 VK_FMT_ETC2_R8G8B8A1_UNORM = 0x00000072,
917 VK_FMT_ETC2_R8G8B8A1_SRGB = 0x00000073,
918 VK_FMT_ETC2_R8G8B8A8_UNORM = 0x00000074,
919 VK_FMT_ETC2_R8G8B8A8_SRGB = 0x00000075,
920 VK_FMT_EAC_R11_UNORM = 0x00000076,
921 VK_FMT_EAC_R11_SNORM = 0x00000077,
922 VK_FMT_EAC_R11G11_UNORM = 0x00000078,
923 VK_FMT_EAC_R11G11_SNORM = 0x00000079,
924 VK_FMT_ASTC_4x4_UNORM = 0x0000007A,
925 VK_FMT_ASTC_4x4_SRGB = 0x0000007B,
926 VK_FMT_ASTC_5x4_UNORM = 0x0000007C,
927 VK_FMT_ASTC_5x4_SRGB = 0x0000007D,
928 VK_FMT_ASTC_5x5_UNORM = 0x0000007E,
929 VK_FMT_ASTC_5x5_SRGB = 0x0000007F,
930 VK_FMT_ASTC_6x5_UNORM = 0x00000080,
931 VK_FMT_ASTC_6x5_SRGB = 0x00000081,
932 VK_FMT_ASTC_6x6_UNORM = 0x00000082,
933 VK_FMT_ASTC_6x6_SRGB = 0x00000083,
934 VK_FMT_ASTC_8x5_UNORM = 0x00000084,
935 VK_FMT_ASTC_8x5_SRGB = 0x00000085,
936 VK_FMT_ASTC_8x6_UNORM = 0x00000086,
937 VK_FMT_ASTC_8x6_SRGB = 0x00000087,
938 VK_FMT_ASTC_8x8_UNORM = 0x00000088,
939 VK_FMT_ASTC_8x8_SRGB = 0x00000089,
940 VK_FMT_ASTC_10x5_UNORM = 0x0000008A,
941 VK_FMT_ASTC_10x5_SRGB = 0x0000008B,
942 VK_FMT_ASTC_10x6_UNORM = 0x0000008C,
943 VK_FMT_ASTC_10x6_SRGB = 0x0000008D,
944 VK_FMT_ASTC_10x8_UNORM = 0x0000008E,
945 VK_FMT_ASTC_10x8_SRGB = 0x0000008F,
946 VK_FMT_ASTC_10x10_UNORM = 0x00000090,
947 VK_FMT_ASTC_10x10_SRGB = 0x00000091,
948 VK_FMT_ASTC_12x10_UNORM = 0x00000092,
949 VK_FMT_ASTC_12x10_SRGB = 0x00000093,
950 VK_FMT_ASTC_12x12_UNORM = 0x00000094,
951 VK_FMT_ASTC_12x12_SRGB = 0x00000095,
952 VK_FMT_B4G4R4A4_UNORM = 0x00000096,
953 VK_FMT_B5G5R5A1_UNORM = 0x00000097,
954 VK_FMT_B5G6R5_UNORM = 0x00000098,
955 VK_FMT_B5G6R5_USCALED = 0x00000099,
956 VK_FMT_B8G8R8_UNORM = 0x0000009A,
957 VK_FMT_B8G8R8_SNORM = 0x0000009B,
958 VK_FMT_B8G8R8_USCALED = 0x0000009C,
959 VK_FMT_B8G8R8_SSCALED = 0x0000009D,
960 VK_FMT_B8G8R8_UINT = 0x0000009E,
961 VK_FMT_B8G8R8_SINT = 0x0000009F,
962 VK_FMT_B8G8R8_SRGB = 0x000000A0,
963 VK_FMT_B8G8R8A8_UNORM = 0x000000A1,
964 VK_FMT_B8G8R8A8_SNORM = 0x000000A2,
965 VK_FMT_B8G8R8A8_USCALED = 0x000000A3,
966 VK_FMT_B8G8R8A8_SSCALED = 0x000000A4,
967 VK_FMT_B8G8R8A8_UINT = 0x000000A5,
968 VK_FMT_B8G8R8A8_SINT = 0x000000A6,
969 VK_FMT_B8G8R8A8_SRGB = 0x000000A7,
970 VK_FMT_B10G10R10A2_UNORM = 0x000000A8,
971 VK_FMT_B10G10R10A2_SNORM = 0x000000A9,
972 VK_FMT_B10G10R10A2_USCALED = 0x000000AA,
973 VK_FMT_B10G10R10A2_SSCALED = 0x000000AB,
974 VK_FMT_B10G10R10A2_UINT = 0x000000AC,
975 VK_FMT_B10G10R10A2_SINT = 0x000000AD,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600976
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600977 VK_FMT_BEGIN_RANGE = VK_FMT_UNDEFINED,
978 VK_FMT_END_RANGE = VK_FMT_B10G10R10A2_SINT,
979 VK_NUM_FMT = (VK_FMT_END_RANGE - VK_FMT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600980 VK_MAX_ENUM(VkFormat)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600981} VkFormat;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600982
983// Shader stage enumerant
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600984typedef enum VkPipelineShaderStage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600985{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600986 VK_SHADER_STAGE_VERTEX = 0,
987 VK_SHADER_STAGE_TESS_CONTROL = 1,
988 VK_SHADER_STAGE_TESS_EVALUATION = 2,
989 VK_SHADER_STAGE_GEOMETRY = 3,
990 VK_SHADER_STAGE_FRAGMENT = 4,
991 VK_SHADER_STAGE_COMPUTE = 5,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600992
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600993 VK_SHADER_STAGE_BEGIN_RANGE = VK_SHADER_STAGE_VERTEX,
994 VK_SHADER_STAGE_END_RANGE = VK_SHADER_STAGE_COMPUTE,
995 VK_NUM_SHADER_STAGE = (VK_SHADER_STAGE_END_RANGE - VK_SHADER_STAGE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600996 VK_MAX_ENUM(VkPipelineShaderStage)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600997} VkPipelineShaderStage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600998
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600999typedef enum VkShaderStageFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001000{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001001 VK_SHADER_STAGE_FLAGS_VERTEX_BIT = 0x00000001,
1002 VK_SHADER_STAGE_FLAGS_TESS_CONTROL_BIT = 0x00000002,
1003 VK_SHADER_STAGE_FLAGS_TESS_EVALUATION_BIT = 0x00000004,
1004 VK_SHADER_STAGE_FLAGS_GEOMETRY_BIT = 0x00000008,
1005 VK_SHADER_STAGE_FLAGS_FRAGMENT_BIT = 0x00000010,
1006 VK_SHADER_STAGE_FLAGS_COMPUTE_BIT = 0x00000020,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001007
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001008 VK_SHADER_STAGE_FLAGS_ALL = 0x7FFFFFFF,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001009 VK_MAX_ENUM(VkShaderStageFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001010} VkShaderStageFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001011
1012// Structure type enumerant
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001013typedef enum VkStructureType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001014{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001015 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
1016 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
1017 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
1018 VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO = 4,
1019 VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO = 5,
1020 VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO = 6,
1021 VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO = 7,
1022 VK_STRUCTURE_TYPE_EVENT_WAIT_INFO = 8,
1023 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 9,
1024 VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 10,
1025 VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 11,
1026 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 12,
1027 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 13,
1028 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 14,
1029 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 15,
1030 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 16,
1031 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 17,
1032 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 18,
1033 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 19,
1034 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 20,
1035 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 21,
1036 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 22,
1037 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 23,
1038 VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO = 24,
1039 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 25,
1040 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 26,
1041 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 27,
1042 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO = 28,
1043 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 29,
1044 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 30,
1045 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 31,
1046 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 32,
1047 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 33,
1048 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 34,
1049 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 35,
1050 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 36,
1051 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 37,
1052 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 38,
1053 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 39,
1054 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 40,
1055 VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO = 41,
1056 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 42,
1057 VK_STRUCTURE_TYPE_LAYER_CREATE_INFO = 43,
1058 VK_STRUCTURE_TYPE_PIPELINE_BARRIER = 44,
1059 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 45,
1060 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 46,
1061 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 47,
1062 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 48,
1063 VK_STRUCTURE_TYPE_UPDATE_SAMPLERS = 49,
1064 VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES = 50,
1065 VK_STRUCTURE_TYPE_UPDATE_IMAGES = 51,
1066 VK_STRUCTURE_TYPE_UPDATE_BUFFERS = 52,
1067 VK_STRUCTURE_TYPE_UPDATE_AS_COPY = 53,
1068 VK_STRUCTURE_TYPE_MEMORY_ALLOC_BUFFER_INFO = 54,
1069 VK_STRUCTURE_TYPE_MEMORY_ALLOC_IMAGE_INFO = 55,
1070 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 56,
1071
1072 VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
1073 VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
1074
1075 VK_NUM_STRUCTURE_TYPE = (VK_STRUCTURE_TYPE_END_RANGE - VK_STRUCTURE_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001076 VK_MAX_ENUM(VkStructureType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001077} VkStructureType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001078
1079// ------------------------------------------------------------------------------------------------
1080// Flags
1081
1082// Device creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001083typedef enum VkDeviceCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001084{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001085 VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001,
1086 VK_DEVICE_CREATE_MGPU_IQ_MATCH_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001087 VK_MAX_ENUM(VkDeviceCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001088} VkDeviceCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001089
1090// Queue capabilities
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001091typedef enum VkQueueFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001092{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001093 VK_QUEUE_GRAPHICS_BIT = 0x00000001, // Queue supports graphics operations
1094 VK_QUEUE_COMPUTE_BIT = 0x00000002, // Queue supports compute operations
1095 VK_QUEUE_DMA_BIT = 0x00000004, // Queue supports DMA operations
1096 VK_QUEUE_EXTENDED_BIT = 0x40000000, // Extended queue
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001097 VK_MAX_ENUM(VkQueueFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001098} VkQueueFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001099
1100// memory properties passed into vkAllocMemory().
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001101typedef enum VkMemoryPropertyFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001102{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001103 VK_MEMORY_PROPERTY_GPU_ONLY = 0x00000000, // If not set, then allocate memory on device (GPU)
1104 VK_MEMORY_PROPERTY_CPU_VISIBLE_BIT = 0x00000001,
1105 VK_MEMORY_PROPERTY_CPU_GPU_COHERENT_BIT = 0x00000002,
1106 VK_MEMORY_PROPERTY_CPU_UNCACHED_BIT = 0x00000004,
1107 VK_MEMORY_PROPERTY_CPU_WRITE_COMBINED_BIT = 0x00000008,
1108 VK_MEMORY_PROPERTY_PREFER_CPU_LOCAL = 0x00000010, // all else being equal, prefer CPU access
1109 VK_MEMORY_PROPERTY_SHAREABLE_BIT = 0x00000020,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001110 VK_MAX_ENUM(VkMemoryPropertyFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001111} VkMemoryPropertyFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001112
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001113typedef enum VkMemoryType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001114{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001115 VK_MEMORY_TYPE_OTHER = 0x00000000, // device memory that is not any of the others
1116 VK_MEMORY_TYPE_BUFFER = 0x00000001, // memory for buffers and associated information
1117 VK_MEMORY_TYPE_IMAGE = 0x00000002, // memory for images and associated information
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001118
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001119 VK_MEMORY_TYPE_BEGIN_RANGE = VK_MEMORY_TYPE_OTHER,
1120 VK_MEMORY_TYPE_END_RANGE = VK_MEMORY_TYPE_IMAGE,
1121 VK_NUM_MEMORY_TYPE = (VK_MEMORY_TYPE_END_RANGE - VK_MEMORY_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001122 VK_MAX_ENUM(VkMemoryType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001123} VkMemoryType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001124
1125// Buffer and buffer allocation usage flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001126typedef enum VkBufferUsageFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001127{
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001128 VK_BUFFER_USAGE_GENERAL = 0x00000000, // No special usage
1129 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, // Can be used as a source of transfer operations
1130 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, // Can be used as a destination of transfer operations
1131 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, // Can be used as TBO
1132 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, // Can be used as IBO
1133 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, // Can be used as UBO
1134 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, // Can be used as SSBO
1135 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, // Can be used as source of fixed function index fetch (index buffer)
1136 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, // Can be used as source of fixed function vertex fetch (VBO)
1137 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, // Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001138 VK_MAX_ENUM(VkBufferUsageFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001139} VkBufferUsageFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001140
1141// Buffer flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001142typedef enum VkBufferCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001143{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001144 VK_BUFFER_CREATE_SHAREABLE_BIT = 0x00000001,
1145 VK_BUFFER_CREATE_SPARSE_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001146 VK_MAX_ENUM(VkBufferCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001147} VkBufferCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001148
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001149typedef enum VkBufferViewType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001150{
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001151 VK_BUFFER_VIEW_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
1152 VK_BUFFER_VIEW_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001153
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001154 VK_BUFFER_VIEW_TYPE_BEGIN_RANGE = VK_BUFFER_VIEW_RAW,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001155 VK_BUFFER_VIEW_TYPE_END_RANGE = VK_BUFFER_VIEW_FORMATTED,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001156 VK_NUM_BUFFER_VIEW_TYPE = (VK_BUFFER_VIEW_TYPE_END_RANGE - VK_BUFFER_VIEW_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001157 VK_MAX_ENUM(VkBufferViewType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001158} VkBufferViewType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001159
1160
1161// Images memory allocations can be used for resources of a given format class.
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001162typedef enum VkImageFormatClass_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001163{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001164 VK_IMAGE_FORMAT_CLASS_128_BITS = 1, // color formats
1165 VK_IMAGE_FORMAT_CLASS_96_BITS = 2,
1166 VK_IMAGE_FORMAT_CLASS_64_BITS = 3,
1167 VK_IMAGE_FORMAT_CLASS_48_BITS = 4,
1168 VK_IMAGE_FORMAT_CLASS_32_BITS = 5,
1169 VK_IMAGE_FORMAT_CLASS_24_BITS = 6,
1170 VK_IMAGE_FORMAT_CLASS_16_BITS = 7,
1171 VK_IMAGE_FORMAT_CLASS_8_BITS = 8,
1172 VK_IMAGE_FORMAT_CLASS_128_BIT_BLOCK = 9, // 128-bit block compressed formats
1173 VK_IMAGE_FORMAT_CLASS_64_BIT_BLOCK = 10, // 64-bit block compressed formats
1174 VK_IMAGE_FORMAT_CLASS_D32 = 11, // D32_SFLOAT
1175 VK_IMAGE_FORMAT_CLASS_D24 = 12, // D24_UNORM
1176 VK_IMAGE_FORMAT_CLASS_D16 = 13, // D16_UNORM
1177 VK_IMAGE_FORMAT_CLASS_S8 = 14, // S8_UINT
1178 VK_IMAGE_FORMAT_CLASS_D32S8 = 15, // D32_SFLOAT_S8_UINT
1179 VK_IMAGE_FORMAT_CLASS_D24S8 = 16, // D24_UNORM_S8_UINT
1180 VK_IMAGE_FORMAT_CLASS_D16S8 = 17, // D16_UNORM_S8_UINT
1181 VK_IMAGE_FORMAT_CLASS_LINEAR = 18, // used for pitch-linear (transparent) textures
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001182
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001183 VK_IMAGE_FORMAT_CLASS_BEGIN_RANGE = VK_IMAGE_FORMAT_CLASS_128_BITS,
1184 VK_IMAGE_FORMAT_CLASS_END_RANGE = VK_IMAGE_FORMAT_CLASS_LINEAR,
1185 VK_NUM_IMAGE_FORMAT_CLASS = (VK_IMAGE_FORMAT_CLASS_END_RANGE - VK_IMAGE_FORMAT_CLASS_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001186 VK_MAX_ENUM(VkImageFormatClass)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001187} VkImageFormatClass;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001188
1189// Image and image allocation usage flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001190typedef enum VkImageUsageFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001191{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001192 VK_IMAGE_USAGE_GENERAL = 0x00000000, // no special usage
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001193 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, // Can be used as a source of transfer operations
1194 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, // Can be used as a destination of transfer operations
1195 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1196 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, // Can be used as storage image (STORAGE_IMAGE descriptor type)
1197 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, // Can be used as framebuffer color attachment
1198 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = 0x00000020, // Can be used as framebuffer depth/stencil attachment
1199 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, // Image data not needed outside of rendering
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001200 VK_MAX_ENUM(VkImageUsageFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001201} VkImageUsageFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001202
1203// Image flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001204typedef enum VkImageCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001205{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001206 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = 0x00000001,
1207 VK_IMAGE_CREATE_CLONEABLE_BIT = 0x00000002,
1208 VK_IMAGE_CREATE_SHAREABLE_BIT = 0x00000004,
1209 VK_IMAGE_CREATE_SPARSE_BIT = 0x00000008,
1210 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000010, // Allows image views to have different format than the base image
Mark Lobodzinskiee8373f2015-04-09 18:46:33 -05001211 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000020, // Allows creating image views with cube type from the created image
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001212 VK_MAX_ENUM(VkImageCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001213} VkImageCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001214
1215// Depth-stencil view creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001216typedef enum VkDepthStencilViewCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001217{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001218 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
1219 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001220 VK_MAX_ENUM(VkDepthStencilViewCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001221} VkDepthStencilViewCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001222
1223// Pipeline creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001224typedef enum VkPipelineCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001225{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001226 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1227 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001228 VK_MAX_ENUM(VkPipelineCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001229} VkPipelineCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001230
1231// Fence creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001232typedef enum VkFenceCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001233{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001234 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001235 VK_MAX_ENUM(VkFenceCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001236} VkFenceCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001237
1238// Semaphore creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001239typedef enum VkSemaphoreCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001240{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001241 VK_SEMAPHORE_CREATE_SHAREABLE_BIT = 0x00000001,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001242 VK_MAX_ENUM(VkSemaphoreCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001243} VkSemaphoreCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001244
1245// Format capability flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001246typedef enum VkFormatFeatureFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001247{
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001248 VK_FORMAT_SAMPLED_IMAGE_BIT = 0x00000001, // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1249 VK_FORMAT_STORAGE_IMAGE_BIT = 0x00000002, // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1250 VK_FORMAT_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, // Format supports atomic operations in case it's used for storage images
1251 VK_FORMAT_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, // Format can be used for uniform texel buffers (TBOs)
1252 VK_FORMAT_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, // Format can be used for storage texel buffers (IBOs)
1253 VK_FORMAT_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, // Format supports atomic operations in case it's used for storage texel buffers
1254 VK_FORMAT_VERTEX_BUFFER_BIT = 0x00000040, // Format can be used for vertex buffers (VBOs)
1255 VK_FORMAT_COLOR_ATTACHMENT_BIT = 0x00000080, // Format can be used for color attachment images
1256 VK_FORMAT_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, // Format supports blending in case it's used for color attachment images
1257 VK_FORMAT_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, // Format can be used for depth/stencil attachment images
1258 VK_FORMAT_CONVERSION_BIT = 0x00000400, // Format can be used as the source or destination of format converting blits
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001259 VK_MAX_ENUM(VkFormatFeatureFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001260} VkFormatFeatureFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001261
1262// Query flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001263typedef enum VkQueryControlFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001264{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001265 VK_QUERY_IMPRECISE_DATA_BIT = 0x00000001,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001266 VK_MAX_ENUM(VkQueryControlFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001267} VkQueryControlFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001268
1269// GPU compatibility flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001270typedef enum VkGpuCompatibilityFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001271{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001272 VK_GPU_COMPAT_ASIC_FEATURES_BIT = 0x00000001,
1273 VK_GPU_COMPAT_IQ_MATCH_BIT = 0x00000002,
1274 VK_GPU_COMPAT_PEER_TRANSFER_BIT = 0x00000004,
1275 VK_GPU_COMPAT_SHARED_MEMORY_BIT = 0x00000008,
1276 VK_GPU_COMPAT_SHARED_SYNC_BIT = 0x00000010,
1277 VK_GPU_COMPAT_SHARED_GPU0_DISPLAY_BIT = 0x00000020,
1278 VK_GPU_COMPAT_SHARED_GPU1_DISPLAY_BIT = 0x00000040,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001279 VK_MAX_ENUM(VkGpuCompatibilityFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001280} VkGpuCompatibilityFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001281
1282// Command buffer building flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001283typedef enum VkCmdBufferBuildFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001284{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001285 VK_CMD_BUFFER_OPTIMIZE_GPU_SMALL_BATCH_BIT = 0x00000001,
1286 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = 0x00000002,
1287 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = 0x00000004,
1288 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = 0x00000008,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001289 VK_MAX_ENUM(VkCmdBufferBuildFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001290} VkCmdBufferBuildFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001291
1292// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001293// Vulkan structures
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001294
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001295typedef struct VkOffset2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001296{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001297 int32_t x;
1298 int32_t y;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001299} VkOffset2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001300
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001301typedef struct VkOffset3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001302{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001303 int32_t x;
1304 int32_t y;
1305 int32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001306} VkOffset3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001307
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001308typedef struct VkExtent2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001309{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001310 int32_t width;
1311 int32_t height;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001312} VkExtent2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001313
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001314typedef struct VkExtent3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001315{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001316 int32_t width;
1317 int32_t height;
1318 int32_t depth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001319} VkExtent3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001320
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001321typedef struct VkViewport_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001322{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001323 float originX;
1324 float originY;
1325 float width;
1326 float height;
1327 float minDepth;
1328 float maxDepth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001329} VkViewport;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001330
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001331typedef struct VkRect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001332{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001333 VkOffset2D offset;
1334 VkExtent2D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001335} VkRect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001336
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001337typedef struct VkChannelMapping_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001338{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001339 VkChannelSwizzle r;
1340 VkChannelSwizzle g;
1341 VkChannelSwizzle b;
1342 VkChannelSwizzle a;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001343} VkChannelMapping;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001344
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001345typedef struct VkPhysicalGpuProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001346{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001347 uint32_t apiVersion;
1348 uint32_t driverVersion;
1349 uint32_t vendorId;
1350 uint32_t deviceId;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001351 VkPhysicalGpuType gpuType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001352 char gpuName[VK_MAX_PHYSICAL_GPU_NAME];
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001353 VkGpuSize maxInlineMemoryUpdateSize;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001354 uint32_t maxBoundDescriptorSets;
1355 uint32_t maxThreadGroupSize;
1356 uint64_t timestampFrequency;
1357 bool32_t multiColorAttachmentClears;
1358 uint32_t maxDescriptorSets; // at least 2?
1359 uint32_t maxViewports; // at least 16?
1360 uint32_t maxColorAttachments; // at least 8?
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001361} VkPhysicalGpuProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001362
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001363typedef struct VkPhysicalGpuPerformance_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001364{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001365 float maxGpuClock;
1366 float aluPerClock;
1367 float texPerClock;
1368 float primsPerClock;
1369 float pixelsPerClock;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001370} VkPhysicalGpuPerformance;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001371
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001372typedef struct VkGpuCompatibilityInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001373{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001374 VkFlags compatibilityFlags; // VkGpuCompatibilityFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001375} VkGpuCompatibilityInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001376
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001377typedef struct VkExtensionProperties_
1378{
1379 char extName[VK_MAX_EXTENSION_NAME]; // extension name
1380 uint32_t version; // version of the extension specification
1381} VkExtensionProperties;
1382
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001383typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001384{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001385 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001386 const void* pNext; // Next structure in chain
1387 const char* pAppName;
1388 uint32_t appVersion;
1389 const char* pEngineName;
1390 uint32_t engineVersion;
1391 uint32_t apiVersion;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001392} VkApplicationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001393
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001394typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001395 void* pUserData,
1396 size_t size,
1397 size_t alignment,
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001398 VkSystemAllocType allocType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001399
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001400typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001401 void* pUserData,
1402 void* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001403
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001404typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001405{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001406 void* pUserData;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001407 PFN_vkAllocFunction pfnAlloc;
1408 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001409} VkAllocCallbacks;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001410
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001411typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001412{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001413 uint32_t queueNodeIndex;
1414 uint32_t queueCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001415} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001416
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001417typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001418{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001419 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001420 const void* pNext; // Pointer to next structure
1421 uint32_t queueRecordCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001422 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001423 uint32_t extensionCount;
1424 const char*const* ppEnabledExtensionNames;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001425 VkValidationLevel maxValidationLevel;
1426 VkFlags flags; // VkDeviceCreateFlags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001427} VkDeviceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001428
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001429typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001430{
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001431 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001432 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001433 const VkApplicationInfo* pAppInfo;
1434 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001435 uint32_t extensionCount;
1436 const char*const* ppEnabledExtensionNames; // layer or extension name to be enabled
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001437} VkInstanceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001438
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001439// can be added to VkDeviceCreateInfo or VkInstanceCreateInfo via pNext
1440typedef struct _VkLayerCreateInfo
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001441{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001442 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_LAYER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001443 const void* pNext; // Pointer to next structure
1444 uint32_t layerCount;
1445 const char *const* ppActiveLayerNames; // layer name from the layer's vkEnumerateLayers())
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001446} VkLayerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001447
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001448typedef struct VkPhysicalGpuQueueProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001449{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001450 VkFlags queueFlags; // VkQueueFlags
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001451 uint32_t queueCount;
1452 uint32_t maxAtomicCounters;
1453 bool32_t supportsTimestamps;
1454 uint32_t maxMemReferences; // Tells how many memory references can be active for the given queue
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001455} VkPhysicalGpuQueueProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001456
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001457typedef struct VkPhysicalGpuMemoryProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001458{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001459 bool32_t supportsMigration;
1460 bool32_t supportsPinning;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001461} VkPhysicalGpuMemoryProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001462
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001463typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001464{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001465 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001466 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001467 VkGpuSize allocationSize; // Size of memory allocation
1468 VkFlags memProps; // VkMemoryPropertyFlags
1469 VkMemoryType memType;
1470 VkMemoryPriority memPriority;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001471} VkMemoryAllocInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001472
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001473// This structure is included in the VkMemoryAllocInfo chain
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001474// for memory regions allocated for buffer usage.
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001475typedef struct VkMemoryAllocBufferInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001476{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001477 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_BUFFER_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001478 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001479 VkFlags usage; // VkBufferUsageFlags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001480} VkMemoryAllocBufferInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001481
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001482// This structure is included in the VkMemoryAllocInfo chain
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001483// for memory regions allocated for image usage.
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001484typedef struct VkMemoryAllocImageInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001485{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001486 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_IMAGE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001487 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001488 VkFlags usage; // VkImageUsageFlags
1489 VkImageFormatClass formatClass;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001490 uint32_t samples;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001491} VkMemoryAllocImageInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001492
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001493typedef struct VkMemoryOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001494{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001495 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001496 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001497 VkGpuMemory sharedMem;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001498} VkMemoryOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001499
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001500typedef struct VkPeerMemoryOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001501{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001502 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001503 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001504 VkGpuMemory originalMem;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001505} VkPeerMemoryOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001506
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001507typedef struct VkMemoryRequirements_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001508{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001509 VkGpuSize size; // Specified in bytes
1510 VkGpuSize alignment; // Specified in bytes
1511 VkGpuSize granularity; // Granularity on which vkBindObjectMemoryRange can bind sub-ranges of memory specified in bytes (usually the page size)
1512 VkFlags memProps; // VkMemoryPropertyFlags
1513 VkMemoryType memType;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001514} VkMemoryRequirements;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001515
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001516typedef struct VkBufferMemoryRequirements_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001517{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001518 VkFlags usage; // VkBufferUsageFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001519} VkBufferMemoryRequirements;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001520
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001521typedef struct VkImageMemoryRequirements_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001522{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001523 VkFlags usage; // VkImageUsageFlags
1524 VkImageFormatClass formatClass;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001525 uint32_t samples;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001526} VkImageMemoryRequirements;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001527
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001528typedef struct VkFormatProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001529{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001530 VkFlags linearTilingFeatures; // VkFormatFeatureFlags
1531 VkFlags optimalTilingFeatures; // VkFormatFeatureFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001532} VkFormatProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001533
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001534typedef struct VkBufferViewAttachInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001535{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001536 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001537 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001538 VkBufferView view;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001539} VkBufferViewAttachInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001540
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001541typedef struct VkImageViewAttachInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001542{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001543 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001544 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001545 VkImageView view;
1546 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001547} VkImageViewAttachInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001548
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001549typedef struct VkUpdateSamplers_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001550{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001551 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLERS
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001552 const void* pNext; // Pointer to next structure
1553 uint32_t binding; // Binding of the sampler (array)
1554 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1555 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001556 const VkSampler* pSamplers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001557} VkUpdateSamplers;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001558
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001559typedef struct VkSamplerImageViewInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001560{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001561 VkSampler sampler;
1562 const VkImageViewAttachInfo* pImageView;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001563} VkSamplerImageViewInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001564
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001565typedef struct VkUpdateSamplerTextures_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001566{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001567 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001568 const void* pNext; // Pointer to next structure
1569 uint32_t binding; // Binding of the combined texture sampler (array)
1570 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1571 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001572 const VkSamplerImageViewInfo* pSamplerImageViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001573} VkUpdateSamplerTextures;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001574
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001575typedef struct VkUpdateImages_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001576{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001577 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_IMAGES
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001578 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001579 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001580 uint32_t binding; // Binding of the image (array)
1581 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1582 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001583 const VkImageViewAttachInfo* pImageViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001584} VkUpdateImages;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001585
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001586typedef struct VkUpdateBuffers_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001587{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001588 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_BUFFERS
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001589 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001590 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001591 uint32_t binding; // Binding of the buffer (array)
1592 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1593 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001594 const VkBufferViewAttachInfo* pBufferViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001595} VkUpdateBuffers;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001596
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001597typedef struct VkUpdateAsCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001598{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001599 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_AS_COPY
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001600 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001601 VkDescriptorType descriptorType;
1602 VkDescriptorSet descriptorSet;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001603 uint32_t binding;
1604 uint32_t arrayElement;
1605 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001606} VkUpdateAsCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001607
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001608typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001609{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001610 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001611 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001612 VkGpuSize size; // Specified in bytes
1613 VkFlags usage; // VkBufferUsageFlags
1614 VkFlags flags; // VkBufferCreateFlags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001615} VkBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001616
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001617typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001618{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001619 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001620 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001621 VkBuffer buffer;
1622 VkBufferViewType viewType;
1623 VkFormat format; // Optionally specifies format of elements
1624 VkGpuSize offset; // Specified in bytes
1625 VkGpuSize range; // View size specified in bytes
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001626} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001627
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001628typedef struct VkImageSubresource_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001629{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001630 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001631 uint32_t mipLevel;
1632 uint32_t arraySlice;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001633} VkImageSubresource;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001634
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001635typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001636{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001637 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001638 uint32_t baseMipLevel;
1639 uint32_t mipLevels;
1640 uint32_t baseArraySlice;
1641 uint32_t arraySize;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001642} VkImageSubresourceRange;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001643
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001644typedef struct VkEventWaitInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001645{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001646 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_WAIT_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001647 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001648
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001649 uint32_t eventCount; // Number of events to wait on
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001650 const VkEvent* pEvents; // Array of event objects to wait on
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001651
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001652 VkWaitEvent waitEvent; // Pipeline event where the wait should happen
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001653
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001654 uint32_t memBarrierCount; // Number of memory barriers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001655 const void** ppMemBarriers; // Array of pointers to memory barriers (any of them can be either VkMemoryBarrier, VkBufferMemoryBarrier, or VkImageMemoryBarrier)
1656} VkEventWaitInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001657
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001658typedef struct VkPipelineBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001659{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001660 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001661 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001662
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001663 uint32_t eventCount; // Number of events to wait on
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001664 const VkPipeEvent* pEvents; // Array of pipeline events to wait on
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001665
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001666 VkWaitEvent waitEvent; // Pipeline event where the wait should happen
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001667
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001668 uint32_t memBarrierCount; // Number of memory barriers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001669 const void** ppMemBarriers; // Array of pointers to memory barriers (any of them can be either VkMemoryBarrier, VkBufferMemoryBarrier, or VkImageMemoryBarrier)
1670} VkPipelineBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001671
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001672typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001673{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001674 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001675 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001676
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001677 VkFlags outputMask; // Outputs the barrier should sync (see VkMemoryOutputFlags)
1678 VkFlags inputMask; // Inputs the barrier should sync to (see VkMemoryInputFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001679} VkMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001680
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001681typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001682{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001683 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001684 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001685
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001686 VkFlags outputMask; // Outputs the barrier should sync (see VkMemoryOutputFlags)
1687 VkFlags inputMask; // Inputs the barrier should sync to (see VkMemoryInputFlags)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001688
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001689 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001690
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001691 VkGpuSize offset; // Offset within the buffer to sync
1692 VkGpuSize size; // Amount of bytes to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001693} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001694
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001695typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001696{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001697 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001698 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001699
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001700 VkFlags outputMask; // Outputs the barrier should sync (see VkMemoryOutputFlags)
1701 VkFlags inputMask; // Inputs the barrier should sync to (see VkMemoryInputFlags)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001702
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001703 VkImageLayout oldLayout; // Current layout of the image
1704 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001705
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001706 VkImage image; // Image to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001707
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001708 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001709} VkImageMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001710
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001711typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001712{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001713 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001714 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001715 VkImageType imageType;
1716 VkFormat format;
1717 VkExtent3D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001718 uint32_t mipLevels;
1719 uint32_t arraySize;
1720 uint32_t samples;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001721 VkImageTiling tiling;
1722 VkFlags usage; // VkImageUsageFlags
1723 VkFlags flags; // VkImageCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001724} VkImageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001725
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001726typedef struct VkPeerImageOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001727{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001728 VkImage originalImage;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001729} VkPeerImageOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001730
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001731typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001732{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001733 VkGpuSize offset; // Specified in bytes
1734 VkGpuSize size; // Specified in bytes
1735 VkGpuSize rowPitch; // Specified in bytes
1736 VkGpuSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001737} VkSubresourceLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001738
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001739typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001740{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001741 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001742 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001743 VkImage image;
1744 VkImageViewType viewType;
1745 VkFormat format;
1746 VkChannelMapping channels;
1747 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001748 float minLod;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001749} VkImageViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001750
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001751typedef struct VkColorAttachmentViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001752{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001753 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001754 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001755 VkImage image;
1756 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001757 uint32_t mipLevel;
1758 uint32_t baseArraySlice;
1759 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001760 VkImage msaaResolveImage;
1761 VkImageSubresourceRange msaaResolveSubResource;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001762} VkColorAttachmentViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001763
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001764typedef struct VkDepthStencilViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001765{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001766 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001767 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001768 VkImage image;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001769 uint32_t mipLevel;
1770 uint32_t baseArraySlice;
1771 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001772 VkImage msaaResolveImage;
1773 VkImageSubresourceRange msaaResolveSubResource;
1774 VkFlags flags; // VkDepthStencilViewCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001775} VkDepthStencilViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001776
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001777typedef struct VkColorAttachmentBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001778{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001779 VkColorAttachmentView view;
1780 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001781} VkColorAttachmentBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001782
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001783typedef struct VkDepthStencilBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001784{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001785 VkDepthStencilView view;
1786 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001787} VkDepthStencilBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001788
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001789typedef struct VkBufferCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001790{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001791 VkGpuSize srcOffset; // Specified in bytes
1792 VkGpuSize destOffset; // Specified in bytes
1793 VkGpuSize copySize; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001794} VkBufferCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001795
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001796typedef struct VkImageMemoryBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001797{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001798 VkImageSubresource subresource;
1799 VkOffset3D offset;
1800 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001801} VkImageMemoryBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001802
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001803typedef struct VkImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001804{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001805 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001806 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001807 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001808 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1809 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001810} VkImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001811
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001812typedef struct VkImageBlit_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001813{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001814 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001815 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1816 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001817 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001818 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1819 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001820} VkImageBlit;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001821
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001822typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001823{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001824 VkGpuSize bufferOffset; // Specified in bytes
1825 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001826 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1827 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001828} VkBufferImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001829
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001830typedef struct VkImageResolve_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001831{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001832 VkImageSubresource srcSubresource;
1833 VkOffset2D srcOffset;
1834 VkImageSubresource destSubresource;
1835 VkOffset2D destOffset;
1836 VkExtent2D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001837} VkImageResolve;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001838
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001839typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001840{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001841 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001842 const void* pNext; // Pointer to next structure
1843 size_t codeSize; // Specified in bytes
1844 const void* pCode;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001845 VkFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001846} VkShaderCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001847
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001848typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001849{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001850 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001851 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001852 VkFlags stageFlags; // VkShaderStageFlags
1853 const VkSampler* pImmutableSamplers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001854} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001855
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001856typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001857{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001858 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001859 const void* pNext; // Pointer to next structure
1860 uint32_t count; // Number of bindings in the descriptor set layout
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001861 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001862} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001863
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001864typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001865{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001866 VkDescriptorType type;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001867 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001868} VkDescriptorTypeCount;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001869
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001870typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001871{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001872 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001873 const void* pNext; // Pointer to next structure
1874 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001875 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001876} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001877
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001878typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001879{
1880 uint32_t bufferId;
1881 size_t bufferSize;
1882 const void* pBufferData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001883} VkLinkConstBuffer;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001884
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001885typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001886{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001887 uint32_t constantId; // The SpecConstant ID specified in the BIL
1888 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001889} VkSpecializationMapEntry;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001890
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001891typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001892{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001893 uint32_t mapEntryCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001894 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001895 const void* pData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001896} VkSpecializationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001897
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001898typedef struct VkPipelineShader_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001899{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001900 VkPipelineShaderStage stage;
1901 VkShader shader;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001902 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001903 const VkLinkConstBuffer* pLinkConstBufferInfo;
1904 const VkSpecializationInfo* pSpecializationInfo;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001905} VkPipelineShader;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001906
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001907typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001908{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001909 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001910 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001911 VkPipelineShader cs;
1912 VkFlags flags; // VkPipelineCreateFlags
1913 VkDescriptorSetLayoutChain setLayoutChain;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001914 uint32_t localSizeX;
1915 uint32_t localSizeY;
1916 uint32_t localSizeZ;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001917
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001918} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001919
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001920typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001921{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001922 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001923 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001924
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001925 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001926} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001927
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001928typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001929{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001930 uint32_t location; // location of the shader vertex attrib
1931 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001932
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001933 VkFormat format; // format of source data
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001934
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001935 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001936} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001937
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001938typedef struct VkPipelineVertexInputCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001939{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001940 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001941 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001942
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001943 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001944 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001945
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001946 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001947 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001948} VkPipelineVertexInputCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001949
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001950typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001951{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001952 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001953 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001954 VkPrimitiveTopology topology;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001955 bool32_t disableVertexReuse; // optional
1956 bool32_t primitiveRestartEnable;
1957 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001958} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001959
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001960typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001961{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001962 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001963 const void* pNext; // Pointer to next structure
1964 uint32_t patchControlPoints;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001965} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001966
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001967typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001968{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001969 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001970 const void* pNext; // Pointer to next structure
1971 uint32_t numViewports;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001972 VkCoordinateOrigin clipOrigin; // optional (GL45)
1973 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001974} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001975
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001976typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001977{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001978 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001979 const void* pNext; // Pointer to next structure
1980 bool32_t depthClipEnable;
1981 bool32_t rasterizerDiscardEnable;
1982 bool32_t programPointSize; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001983 VkCoordinateOrigin pointOrigin; // optional (GL45)
1984 VkProvokingVertexConvention provokingVertex; // optional (GL45)
1985 VkFillMode fillMode; // optional (GL45)
1986 VkCullMode cullMode;
1987 VkFaceOrientation frontFace;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001988} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001989
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001990typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001991{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001992 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001993 const void* pNext; // Pointer to next structure
1994 uint32_t samples;
1995 bool32_t multisampleEnable; // optional (GL45)
1996 bool32_t sampleShadingEnable; // optional (GL45)
1997 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001998 VkSampleMask sampleMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001999} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002000
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002001typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002002{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002003 bool32_t blendEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002004 VkFormat format;
2005 VkBlend srcBlendColor;
2006 VkBlend destBlendColor;
2007 VkBlendFunc blendFuncColor;
2008 VkBlend srcBlendAlpha;
2009 VkBlend destBlendAlpha;
2010 VkBlendFunc blendFuncAlpha;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002011 uint8_t channelWriteMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002012} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002013
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002014typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002015{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002016 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002017 const void* pNext; // Pointer to next structure
2018 bool32_t alphaToCoverageEnable;
2019 bool32_t logicOpEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002020 VkLogicOp logicOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002021 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002022 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002023} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002024
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002025typedef struct VkStencilOpState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002026{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002027 VkStencilOp stencilFailOp;
2028 VkStencilOp stencilPassOp;
2029 VkStencilOp stencilDepthFailOp;
2030 VkCompareFunc stencilFunc;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002031} VkStencilOpState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002032
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002033typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002034{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002035 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002036 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002037 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002038 bool32_t depthTestEnable;
2039 bool32_t depthWriteEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002040 VkCompareFunc depthFunc;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002041 bool32_t depthBoundsEnable; // optional (depth_bounds_test)
2042 bool32_t stencilTestEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002043 VkStencilOpState front;
2044 VkStencilOpState back;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002045} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002046
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002047typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002048{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002049 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002050 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002051 VkPipelineShader shader;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002052} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002053
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002054typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002055{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002056 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002057 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002058 VkFlags flags; // VkPipelineCreateFlags
2059 VkDescriptorSetLayoutChain pSetLayoutChain;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002060} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002061
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002062typedef struct VkSamplerCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002063{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002064 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002065 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002066 VkTexFilter magFilter; // Filter mode for magnification
2067 VkTexFilter minFilter; // Filter mode for minifiation
2068 VkTexMipmapMode mipMode; // Mipmap selection mode
2069 VkTexAddress addressU;
2070 VkTexAddress addressV;
2071 VkTexAddress addressW;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002072 float mipLodBias;
2073 uint32_t maxAnisotropy;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002074 VkCompareFunc compareFunc;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002075 float minLod;
2076 float maxLod;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002077 VkBorderColorType borderColorType;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002078} VkSamplerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002079
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002080typedef struct VkDynamicVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002081{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002082 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002083 const void* pNext; // Pointer to next structure
2084 uint32_t viewportAndScissorCount; // number of entries in pViewports and pScissors
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002085 const VkViewport* pViewports;
2086 const VkRect* pScissors;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002087} VkDynamicVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002088
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002089typedef struct VkDynamicRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002090{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002091 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002092 const void* pNext; // Pointer to next structure
2093 float depthBias;
2094 float depthBiasClamp;
2095 float slopeScaledDepthBias;
2096 float pointSize; // optional (GL45) - Size of points
2097 float pointFadeThreshold; // optional (GL45) - Size of point fade threshold
2098 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002099} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002100
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002101typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002102{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002103 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002104 const void* pNext; // Pointer to next structure
2105 float blendConst[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002106} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002107
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002108typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002109{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002110 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002111 const void* pNext; // Pointer to next structure
2112 float minDepth; // optional (depth_bounds_test)
2113 float maxDepth; // optional (depth_bounds_test)
2114 uint32_t stencilReadMask;
2115 uint32_t stencilWriteMask;
2116 uint32_t stencilFrontRef;
2117 uint32_t stencilBackRef;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002118} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002119
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002120typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002121{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002122 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002123 const void* pNext; // Pointer to next structure
2124 uint32_t queueNodeIndex;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002125 VkFlags flags;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002126} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002127
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002128typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002129{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002130 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002131 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002132
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002133 VkFlags flags; // VkCmdBufferBuildFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002134} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002135
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002136typedef struct VkRenderPassBegin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002137{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002138 VkRenderPass renderPass;
2139 VkFramebuffer framebuffer;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002140} VkRenderPassBegin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002141
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002142typedef struct VkCmdBufferGraphicsBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002143{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002144 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002145 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002146
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002147 VkRenderPassBegin renderPassContinue; // Only needed when a render pass is split across two command buffers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002148} VkCmdBufferGraphicsBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002149
2150// Union allowing specification of floating point or raw color data. Actual value selected is based on image being cleared.
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002151typedef union VkClearColorValue_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002152{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002153 float floatColor[4];
2154 uint32_t rawColor[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002155} VkClearColorValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002156
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002157typedef struct VkClearColor_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002158{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002159 VkClearColorValue color;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002160 bool32_t useRawValue;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002161} VkClearColor;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002162
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002163typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002164{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002165 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002166 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002167
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002168 VkRect renderArea;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002169 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002170 VkExtent2D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002171 uint32_t sampleCount;
2172 uint32_t layers;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002173 const VkFormat* pColorFormats;
2174 const VkImageLayout* pColorLayouts;
2175 const VkAttachmentLoadOp* pColorLoadOps;
2176 const VkAttachmentStoreOp* pColorStoreOps;
2177 const VkClearColor* pColorLoadClearValues;
2178 VkFormat depthStencilFormat;
2179 VkImageLayout depthStencilLayout;
2180 VkAttachmentLoadOp depthLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002181 float depthLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002182 VkAttachmentStoreOp depthStoreOp;
2183 VkAttachmentLoadOp stencilLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002184 uint32_t stencilLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002185 VkAttachmentStoreOp stencilStoreOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002186} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002187
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002188typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002189{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002190 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002191 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002192 VkFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002193} VkEventCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002194
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002195typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002196{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002197 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002198 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002199 VkFenceCreateFlags flags; // VkFenceCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002200} VkFenceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002201
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002202typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002203{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002204 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002205 const void* pNext; // Pointer to next structure
2206 uint32_t initialCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002207 VkFlags flags; // VkSemaphoreCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002208} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002209
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002210typedef struct VkSemaphoreOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002211{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002212 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002213 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002214 VkSemaphore sharedSemaphore;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002215} VkSemaphoreOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002216
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002217typedef struct VkPipelineStatisticsData_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002218{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002219 uint64_t fsInvocations; // Fragment shader invocations
2220 uint64_t cPrimitives; // Clipper primitives
2221 uint64_t cInvocations; // Clipper invocations
2222 uint64_t vsInvocations; // Vertex shader invocations
2223 uint64_t gsInvocations; // Geometry shader invocations
2224 uint64_t gsPrimitives; // Geometry shader primitives
2225 uint64_t iaPrimitives; // Input primitives
2226 uint64_t iaVertices; // Input vertices
2227 uint64_t tcsInvocations; // Tessellation control shader invocations
2228 uint64_t tesInvocations; // Tessellation evaluation shader invocations
2229 uint64_t csInvocations; // Compute shader invocations
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002230} VkPipelineStatisticsData;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002231
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002232typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002233{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002234 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002235 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002236 VkQueryType queryType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002237 uint32_t slots;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002238} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002239
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002240typedef struct VkFramebufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002241{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002242 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002243 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002244
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002245 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002246 const VkColorAttachmentBindInfo* pColorAttachments;
2247 const VkDepthStencilBindInfo* pDepthStencilAttachment;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002248
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002249 uint32_t sampleCount;
2250 uint32_t width;
2251 uint32_t height;
2252 uint32_t layers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002253} VkFramebufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002254
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002255typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002256{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002257 uint32_t vertexCount;
2258 uint32_t instanceCount;
2259 uint32_t firstVertex;
2260 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002261} VkDrawIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002262
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002263typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002264{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002265 uint32_t indexCount;
2266 uint32_t instanceCount;
2267 uint32_t firstIndex;
2268 int32_t vertexOffset;
2269 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002270} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002271
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002272typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002273{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002274 uint32_t x;
2275 uint32_t y;
2276 uint32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002277} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002278
2279// ------------------------------------------------------------------------------------------------
2280// API functions
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002281typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2282typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
2283typedef VkResult (VKAPI *PFN_vkEnumerateGpus)(VkInstance instance, uint32_t maxGpus, uint32_t* pGpuCount, VkPhysicalGpu* pGpus);
2284typedef VkResult (VKAPI *PFN_vkGetGpuInfo)(VkPhysicalGpu gpu, VkPhysicalGpuInfoType infoType, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002285typedef void * (VKAPI *PFN_vkGetProcAddr)(VkPhysicalGpu gpu, const char * pName);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002286typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalGpu gpu, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
2287typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06002288typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionInfo)(VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002289typedef VkResult (VKAPI *PFN_vkGetExtensionSupport)(VkPhysicalGpu gpu, const char* pExtName);
2290typedef VkResult (VKAPI *PFN_vkEnumerateLayers)(VkPhysicalGpu gpu, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved);
2291typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2292typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
2293typedef VkResult (VKAPI *PFN_vkQueueAddMemReference)(VkQueue queue, VkGpuMemory mem);
2294typedef VkResult (VKAPI *PFN_vkQueueRemoveMemReference)(VkQueue queue, VkGpuMemory mem);
2295typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2296typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
2297typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkGpuMemory* pMem);
2298typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkGpuMemory mem);
2299typedef VkResult (VKAPI *PFN_vkSetMemoryPriority)(VkGpuMemory mem, VkMemoryPriority priority);
2300typedef VkResult (VKAPI *PFN_vkMapMemory)(VkGpuMemory mem, VkFlags flags, void** ppData);
2301typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkGpuMemory mem);
2302typedef VkResult (VKAPI *PFN_vkPinSystemMemory)(VkDevice device, const void* pSysMem, size_t memSize, VkGpuMemory* pMem);
2303typedef VkResult (VKAPI *PFN_vkGetMultiGpuCompatibility)(VkPhysicalGpu gpu0, VkPhysicalGpu gpu1, VkGpuCompatibilityInfo* pInfo);
2304typedef VkResult (VKAPI *PFN_vkOpenSharedMemory)(VkDevice device, const VkMemoryOpenInfo* pOpenInfo, VkGpuMemory* pMem);
2305typedef VkResult (VKAPI *PFN_vkOpenSharedSemaphore)(VkDevice device, const VkSemaphoreOpenInfo* pOpenInfo, VkSemaphore* pSemaphore);
2306typedef VkResult (VKAPI *PFN_vkOpenPeerMemory)(VkDevice device, const VkPeerMemoryOpenInfo* pOpenInfo, VkGpuMemory* pMem);
2307typedef VkResult (VKAPI *PFN_vkOpenPeerImage)(VkDevice device, const VkPeerImageOpenInfo* pOpenInfo, VkImage* pImage, VkGpuMemory* pMem);
2308typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkObject object);
2309typedef VkResult (VKAPI *PFN_vkGetObjectInfo)(VkBaseObject object, VkObjectInfoType infoType, size_t* pDataSize, void* pData);
2310typedef VkResult (VKAPI *PFN_vkBindObjectMemory)(VkObject object, uint32_t allocationIdx, VkGpuMemory mem, VkGpuSize offset);
2311typedef VkResult (VKAPI *PFN_vkBindObjectMemoryRange)(VkObject object, uint32_t allocationIdx, VkGpuSize rangeOffset,VkGpuSize rangeSize, VkGpuMemory mem, VkGpuSize memOffset);
2312typedef VkResult (VKAPI *PFN_vkBindImageMemoryRange)(VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* bindInfo, VkGpuMemory mem, VkGpuSize memOffset);
2313typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
2314typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, VkFence* pFences);
2315typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkFence fence);
2316typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout);
2317typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2318typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2319typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2320typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
2321typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkEvent event);
2322typedef VkResult (VKAPI *PFN_vkSetEvent)(VkEvent event);
2323typedef VkResult (VKAPI *PFN_vkResetEvent)(VkEvent event);
2324typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
2325typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData);
2326typedef VkResult (VKAPI *PFN_vkGetFormatInfo)(VkDevice device, VkFormat format, VkFormatInfoType infoType, size_t* pDataSize, void* pData);
2327typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2328typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2329typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
2330typedef VkResult (VKAPI *PFN_vkGetImageSubresourceInfo)(VkImage image, const VkImageSubresource* pSubresource, VkSubresourceInfoType infoType, size_t* pDataSize, void* pData);
2331typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
2332typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView);
2333typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView);
2334typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
2335typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipeline)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2336typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelineDerivative)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline basePipeline, VkPipeline* pPipeline);
2337typedef VkResult (VKAPI *PFN_vkCreateComputePipeline)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2338typedef VkResult (VKAPI *PFN_vkStorePipeline)(VkPipeline pipeline, size_t* pDataSize, void* pData);
2339typedef VkResult (VKAPI *PFN_vkLoadPipeline)(VkDevice device, size_t dataSize, const void* pData, VkPipeline* pPipeline);
2340typedef VkResult (VKAPI *PFN_vkLoadPipelineDerivative)(VkDevice device, size_t dataSize, const void* pData, VkPipeline basePipeline, VkPipeline* pPipeline);
2341typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2342typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
2343typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayoutChain)(VkDevice device, uint32_t setLayoutArrayCount, const VkDescriptorSetLayout* pSetLayoutArray, VkDescriptorSetLayoutChain* pLayoutChain);
2344typedef VkResult (VKAPI *PFN_vkBeginDescriptorPoolUpdate)(VkDevice device, VkDescriptorUpdateMode updateMode);
2345typedef VkResult (VKAPI *PFN_vkEndDescriptorPoolUpdate)(VkDevice device, VkCmdBuffer cmd);
2346typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
2347typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDescriptorPool descriptorPool);
2348typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002349typedef void (VKAPI *PFN_vkClearDescriptorSets)(VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
2350typedef void (VKAPI *PFN_vkUpdateDescriptors)(VkDescriptorSet descriptorSet, uint32_t updateCount, const void** pUpdateArray);
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06002351typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2352typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2353typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2354typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002355typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2356typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2357typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2358typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002359typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2360typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
2361typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkDescriptorSetLayoutChain layoutChain, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData);
2362typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, VkIndexType indexType);
2363typedef void (VKAPI *PFN_vkCmdBindVertexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, uint32_t binding);
2364typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2365typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
2366typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, uint32_t count, uint32_t stride);
2367typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, uint32_t count, uint32_t stride);
2368typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
2369typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset);
2370typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2371typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
2372typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions);
2373typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2374typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2375typedef void (VKAPI *PFN_vkCmdCloneImageData)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout);
2376typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkGpuSize destOffset, VkGpuSize dataSize, const uint32_t* pData);
2377typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkGpuSize destOffset, VkGpuSize fillSize, uint32_t data);
2378typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, VkClearColor color, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
2379typedef void (VKAPI *PFN_vkCmdClearDepthStencil)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
2380typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t rectCount, const VkImageResolve* pRects);
2381typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
2382typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
2383typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, const VkEventWaitInfo* pWaitInfo);
2384typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, const VkPipelineBarrier* pBarrier);
2385typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags);
2386typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2387typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
2388typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkGpuSize destOffset);
2389typedef void (VKAPI *PFN_vkCmdInitAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, const uint32_t* pData);
2390typedef void (VKAPI *PFN_vkCmdLoadAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer srcBuffer, VkGpuSize srcOffset);
2391typedef void (VKAPI *PFN_vkCmdSaveAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer destBuffer, VkGpuSize destOffset);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002392typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2393typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002394typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin);
2395typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer, VkRenderPass renderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002396
2397#ifdef VK_PROTOTYPES
2398
2399// GPU initialization
2400
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002401VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002402 const VkInstanceCreateInfo* pCreateInfo,
2403 VkInstance* pInstance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002404
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002405VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002406 VkInstance instance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002407
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002408VkResult VKAPI vkEnumerateGpus(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002409 VkInstance instance,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002410 uint32_t maxGpus,
2411 uint32_t* pGpuCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002412 VkPhysicalGpu* pGpus);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002413
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002414VkResult VKAPI vkGetGpuInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002415 VkPhysicalGpu gpu,
2416 VkPhysicalGpuInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002417 size_t* pDataSize,
2418 void* pData);
2419
2420void * VKAPI vkGetProcAddr(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002421 VkPhysicalGpu gpu,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002422 const char* pName);
2423
2424// Device functions
2425
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002426VkResult VKAPI vkCreateDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002427 VkPhysicalGpu gpu,
2428 const VkDeviceCreateInfo* pCreateInfo,
2429 VkDevice* pDevice);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002430
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002431VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002432 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002433
2434// Extension discovery functions
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06002435VkResult VKAPI vkGetGlobalExtensionInfo(
2436 VkExtensionInfoType infoType,
2437 uint32_t extensionIndex,
2438 size_t* pDataSize,
2439 void* pData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002440
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002441VkResult VKAPI vkGetExtensionSupport(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002442 VkPhysicalGpu gpu,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002443 const char* pExtName);
2444
2445// Layer discovery functions
2446
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002447VkResult VKAPI vkEnumerateLayers(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002448 VkPhysicalGpu gpu,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002449 size_t maxLayerCount,
2450 size_t maxStringSize,
2451 size_t* pOutLayerCount,
2452 char* const* pOutLayers,
2453 void* pReserved);
2454
2455// Queue functions
2456
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002457VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002458 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002459 uint32_t queueNodeIndex,
2460 uint32_t queueIndex,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002461 VkQueue* pQueue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002462
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002463VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002464 VkQueue queue,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002465 uint32_t cmdBufferCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002466 const VkCmdBuffer* pCmdBuffers,
2467 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002468
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002469VkResult VKAPI vkQueueAddMemReference(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002470 VkQueue queue,
2471 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002472
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002473VkResult VKAPI vkQueueRemoveMemReference(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002474 VkQueue queue,
2475 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002476
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002477VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002478 VkQueue queue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002479
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002480VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002481 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002482
2483// Memory functions
2484
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002485VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002486 VkDevice device,
2487 const VkMemoryAllocInfo* pAllocInfo,
2488 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002489
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002490VkResult VKAPI vkFreeMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002491 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002492
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002493VkResult VKAPI vkSetMemoryPriority(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002494 VkGpuMemory mem,
2495 VkMemoryPriority priority);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002496
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002497VkResult VKAPI vkMapMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002498 VkGpuMemory mem,
2499 VkFlags flags, // Reserved
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002500 void** ppData);
2501
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002502VkResult VKAPI vkUnmapMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002503 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002504
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002505VkResult VKAPI vkPinSystemMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002506 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002507 const void* pSysMem,
2508 size_t memSize,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002509 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002510
2511// Multi-device functions
2512
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002513VkResult VKAPI vkGetMultiGpuCompatibility(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002514 VkPhysicalGpu gpu0,
2515 VkPhysicalGpu gpu1,
2516 VkGpuCompatibilityInfo* pInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002517
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002518VkResult VKAPI vkOpenSharedMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002519 VkDevice device,
2520 const VkMemoryOpenInfo* pOpenInfo,
2521 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002522
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002523VkResult VKAPI vkOpenSharedSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002524 VkDevice device,
2525 const VkSemaphoreOpenInfo* pOpenInfo,
2526 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002527
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002528VkResult VKAPI vkOpenPeerMemory(
2529 VkDevice device,
2530 const VkPeerMemoryOpenInfo* pOpenInfo,
2531 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002532
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002533VkResult VKAPI vkOpenPeerImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002534 VkDevice device,
2535 const VkPeerImageOpenInfo* pOpenInfo,
2536 VkImage* pImage,
2537 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002538
2539// Generic API object functions
2540
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002541VkResult VKAPI vkDestroyObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002542 VkObject object);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002543
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002544VkResult VKAPI vkGetObjectInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002545 VkBaseObject object,
2546 VkObjectInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002547 size_t* pDataSize,
2548 void* pData);
2549
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002550VkResult VKAPI vkBindObjectMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002551 VkObject object,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002552 uint32_t allocationIdx,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002553 VkGpuMemory mem,
2554 VkGpuSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002555
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002556VkResult VKAPI vkBindObjectMemoryRange(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002557 VkObject object,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002558 uint32_t allocationIdx,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002559 VkGpuSize rangeOffset,
2560 VkGpuSize rangeSize,
2561 VkGpuMemory mem,
2562 VkGpuSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002563
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002564VkResult VKAPI vkBindImageMemoryRange(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002565 VkImage image,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002566 uint32_t allocationIdx,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002567 const VkImageMemoryBindInfo* bindInfo,
2568 VkGpuMemory mem,
2569 VkGpuSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002570
2571// Fence functions
2572
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002573VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002574 VkDevice device,
2575 const VkFenceCreateInfo* pCreateInfo,
2576 VkFence* pFence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002577
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002578VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002579 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002580 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002581 VkFence* pFences);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002582
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002583VkResult VKAPI vkGetFenceStatus(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002584 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002585
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002586VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002587 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002588 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002589 const VkFence* pFences,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002590 bool32_t waitAll,
2591 uint64_t timeout); // timeout in nanoseconds
2592
2593// Queue semaphore functions
2594
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002595VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002596 VkDevice device,
2597 const VkSemaphoreCreateInfo* pCreateInfo,
2598 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002599
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002600VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002601 VkQueue queue,
2602 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002603
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002604VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002605 VkQueue queue,
2606 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002607
2608// Event functions
2609
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002610VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002611 VkDevice device,
2612 const VkEventCreateInfo* pCreateInfo,
2613 VkEvent* pEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002614
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002615VkResult VKAPI vkGetEventStatus(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002616 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002617
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002618VkResult VKAPI vkSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002619 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002620
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002621VkResult VKAPI vkResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002622 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002623
2624// Query functions
2625
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002626VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002627 VkDevice device,
2628 const VkQueryPoolCreateInfo* pCreateInfo,
2629 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002630
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002631VkResult VKAPI vkGetQueryPoolResults(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002632 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002633 uint32_t startQuery,
2634 uint32_t queryCount,
2635 size_t* pDataSize,
2636 void* pData);
2637
2638// Format capabilities
2639
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002640VkResult VKAPI vkGetFormatInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002641 VkDevice device,
2642 VkFormat format,
2643 VkFormatInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002644 size_t* pDataSize,
2645 void* pData);
2646
2647// Buffer functions
2648
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002649VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002650 VkDevice device,
2651 const VkBufferCreateInfo* pCreateInfo,
2652 VkBuffer* pBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002653
2654// Buffer view functions
2655
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002656VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002657 VkDevice device,
2658 const VkBufferViewCreateInfo* pCreateInfo,
2659 VkBufferView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002660
2661// Image functions
2662
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002663VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002664 VkDevice device,
2665 const VkImageCreateInfo* pCreateInfo,
2666 VkImage* pImage);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002667
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002668VkResult VKAPI vkGetImageSubresourceInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002669 VkImage image,
2670 const VkImageSubresource* pSubresource,
2671 VkSubresourceInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002672 size_t* pDataSize,
2673 void* pData);
2674
2675// Image view functions
2676
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002677VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002678 VkDevice device,
2679 const VkImageViewCreateInfo* pCreateInfo,
2680 VkImageView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002681
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002682VkResult VKAPI vkCreateColorAttachmentView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002683 VkDevice device,
2684 const VkColorAttachmentViewCreateInfo* pCreateInfo,
2685 VkColorAttachmentView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002686
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002687VkResult VKAPI vkCreateDepthStencilView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002688 VkDevice device,
2689 const VkDepthStencilViewCreateInfo* pCreateInfo,
2690 VkDepthStencilView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002691
2692// Shader functions
2693
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002694VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002695 VkDevice device,
2696 const VkShaderCreateInfo* pCreateInfo,
2697 VkShader* pShader);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002698
2699// Pipeline functions
2700
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002701VkResult VKAPI vkCreateGraphicsPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002702 VkDevice device,
2703 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2704 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002705
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002706VkResult VKAPI vkCreateGraphicsPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002707 VkDevice device,
2708 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2709 VkPipeline basePipeline,
2710 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002711
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002712VkResult VKAPI vkCreateComputePipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002713 VkDevice device,
2714 const VkComputePipelineCreateInfo* pCreateInfo,
2715 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002716
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002717VkResult VKAPI vkStorePipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002718 VkPipeline pipeline,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002719 size_t* pDataSize,
2720 void* pData);
2721
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002722VkResult VKAPI vkLoadPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002723 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002724 size_t dataSize,
2725 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002726 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002727
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002728VkResult VKAPI vkLoadPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002729 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002730 size_t dataSize,
2731 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002732 VkPipeline basePipeline,
2733 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002734
2735// Sampler functions
2736
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002737VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002738 VkDevice device,
2739 const VkSamplerCreateInfo* pCreateInfo,
2740 VkSampler* pSampler);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002741
2742// Descriptor set functions
2743
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002744VkResult VKAPI vkCreateDescriptorSetLayout(
2745 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002746 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2747 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002748
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002749VkResult VKAPI vkCreateDescriptorSetLayoutChain(
2750 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002751 uint32_t setLayoutArrayCount,
2752 const VkDescriptorSetLayout* pSetLayoutArray,
2753 VkDescriptorSetLayoutChain* pLayoutChain);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002754
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002755VkResult VKAPI vkBeginDescriptorPoolUpdate(
2756 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002757 VkDescriptorUpdateMode updateMode);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002758
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002759VkResult VKAPI vkEndDescriptorPoolUpdate(
2760 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002761 VkCmdBuffer cmd);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002762
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002763VkResult VKAPI vkCreateDescriptorPool(
2764 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002765 VkDescriptorPoolUsage poolUsage,
2766 uint32_t maxSets,
2767 const VkDescriptorPoolCreateInfo* pCreateInfo,
2768 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002769
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002770VkResult VKAPI vkResetDescriptorPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002771 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002772
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002773VkResult VKAPI vkAllocDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002774 VkDescriptorPool descriptorPool,
2775 VkDescriptorSetUsage setUsage,
2776 uint32_t count,
2777 const VkDescriptorSetLayout* pSetLayouts,
2778 VkDescriptorSet* pDescriptorSets,
2779 uint32_t* pCount);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002780
2781void VKAPI vkClearDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002782 VkDescriptorPool descriptorPool,
2783 uint32_t count,
2784 const VkDescriptorSet* pDescriptorSets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002785
2786void VKAPI vkUpdateDescriptors(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002787 VkDescriptorSet descriptorSet,
2788 uint32_t updateCount,
2789 const void** pUpdateArray);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002790
2791// State object functions
2792
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002793VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002794 VkDevice device,
2795 const VkDynamicVpStateCreateInfo* pCreateInfo,
2796 VkDynamicVpState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002797
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002798VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002799 VkDevice device,
2800 const VkDynamicRsStateCreateInfo* pCreateInfo,
2801 VkDynamicRsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002802
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002803VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002804 VkDevice device,
2805 const VkDynamicCbStateCreateInfo* pCreateInfo,
2806 VkDynamicCbState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002807
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002808VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002809 VkDevice device,
2810 const VkDynamicDsStateCreateInfo* pCreateInfo,
2811 VkDynamicDsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002812
2813// Command buffer functions
2814
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002815VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002816 VkDevice device,
2817 const VkCmdBufferCreateInfo* pCreateInfo,
2818 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002819
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002820VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002821 VkCmdBuffer cmdBuffer,
2822 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002823
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002824VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002825 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002826
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002827VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002828 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002829
2830// Command buffer building functions
2831
2832void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002833 VkCmdBuffer cmdBuffer,
2834 VkPipelineBindPoint pipelineBindPoint,
2835 VkPipeline pipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002836
2837void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002838 VkCmdBuffer cmdBuffer,
2839 VkStateBindPoint stateBindPoint,
2840 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002841
2842void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002843 VkCmdBuffer cmdBuffer,
2844 VkPipelineBindPoint pipelineBindPoint,
2845 VkDescriptorSetLayoutChain layoutChain,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002846 uint32_t layoutChainSlot,
2847 uint32_t count,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002848 const VkDescriptorSet* pDescriptorSets,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06002849 const uint32_t* pUserData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002850
2851void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002852 VkCmdBuffer cmdBuffer,
2853 VkBuffer buffer,
2854 VkGpuSize offset,
2855 VkIndexType indexType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002856
2857void VKAPI vkCmdBindVertexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002858 VkCmdBuffer cmdBuffer,
2859 VkBuffer buffer,
2860 VkGpuSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002861 uint32_t binding);
2862
2863void VKAPI vkCmdDraw(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002864 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002865 uint32_t firstVertex,
2866 uint32_t vertexCount,
2867 uint32_t firstInstance,
2868 uint32_t instanceCount);
2869
2870void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002871 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002872 uint32_t firstIndex,
2873 uint32_t indexCount,
2874 int32_t vertexOffset,
2875 uint32_t firstInstance,
2876 uint32_t instanceCount);
2877
2878void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002879 VkCmdBuffer cmdBuffer,
2880 VkBuffer buffer,
2881 VkGpuSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002882 uint32_t count,
2883 uint32_t stride);
2884
2885void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002886 VkCmdBuffer cmdBuffer,
2887 VkBuffer buffer,
2888 VkGpuSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002889 uint32_t count,
2890 uint32_t stride);
2891
2892void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002893 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002894 uint32_t x,
2895 uint32_t y,
2896 uint32_t z);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002897
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002898void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002899 VkCmdBuffer cmdBuffer,
2900 VkBuffer buffer,
2901 VkGpuSize offset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002902
2903void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002904 VkCmdBuffer cmdBuffer,
2905 VkBuffer srcBuffer,
2906 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002907 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002908 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002909
2910void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002911 VkCmdBuffer cmdBuffer,
2912 VkImage srcImage,
2913 VkImageLayout srcImageLayout,
2914 VkImage destImage,
2915 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002916 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002917 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002918
2919void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002920 VkCmdBuffer cmdBuffer,
2921 VkImage srcImage,
2922 VkImageLayout srcImageLayout,
2923 VkImage destImage,
2924 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002925 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002926 const VkImageBlit* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002927
2928void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002929 VkCmdBuffer cmdBuffer,
2930 VkBuffer srcBuffer,
2931 VkImage destImage,
2932 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002933 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002934 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002935
2936void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002937 VkCmdBuffer cmdBuffer,
2938 VkImage srcImage,
2939 VkImageLayout srcImageLayout,
2940 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002941 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002942 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002943
2944void VKAPI vkCmdCloneImageData(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002945 VkCmdBuffer cmdBuffer,
2946 VkImage srcImage,
2947 VkImageLayout srcImageLayout,
2948 VkImage destImage,
2949 VkImageLayout destImageLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002950
2951void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002952 VkCmdBuffer cmdBuffer,
2953 VkBuffer destBuffer,
2954 VkGpuSize destOffset,
2955 VkGpuSize dataSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002956 const uint32_t* pData);
2957
2958void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002959 VkCmdBuffer cmdBuffer,
2960 VkBuffer destBuffer,
2961 VkGpuSize destOffset,
2962 VkGpuSize fillSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002963 uint32_t data);
2964
2965void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002966 VkCmdBuffer cmdBuffer,
2967 VkImage image,
2968 VkImageLayout imageLayout,
2969 VkClearColor color,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002970 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002971 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002972
2973void VKAPI vkCmdClearDepthStencil(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002974 VkCmdBuffer cmdBuffer,
2975 VkImage image,
2976 VkImageLayout imageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002977 float depth,
2978 uint32_t stencil,
2979 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002980 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002981
2982void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002983 VkCmdBuffer cmdBuffer,
2984 VkImage srcImage,
2985 VkImageLayout srcImageLayout,
2986 VkImage destImage,
2987 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002988 uint32_t rectCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002989 const VkImageResolve* pRects);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002990
2991void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002992 VkCmdBuffer cmdBuffer,
2993 VkEvent event,
2994 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002995
2996void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002997 VkCmdBuffer cmdBuffer,
2998 VkEvent event,
2999 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003000
3001void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003002 VkCmdBuffer cmdBuffer,
3003 const VkEventWaitInfo* pWaitInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003004
3005void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003006 VkCmdBuffer cmdBuffer,
3007 const VkPipelineBarrier* pBarrier);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003008
3009void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003010 VkCmdBuffer cmdBuffer,
3011 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003012 uint32_t slot,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003013 VkFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003014
3015void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003016 VkCmdBuffer cmdBuffer,
3017 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003018 uint32_t slot);
3019
3020void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003021 VkCmdBuffer cmdBuffer,
3022 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003023 uint32_t startQuery,
3024 uint32_t queryCount);
3025
3026void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003027 VkCmdBuffer cmdBuffer,
3028 VkTimestampType timestampType,
3029 VkBuffer destBuffer,
3030 VkGpuSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003031
3032void VKAPI vkCmdInitAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003033 VkCmdBuffer cmdBuffer,
3034 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003035 uint32_t startCounter,
3036 uint32_t counterCount,
3037 const uint32_t* pData);
3038
3039void VKAPI vkCmdLoadAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003040 VkCmdBuffer cmdBuffer,
3041 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003042 uint32_t startCounter,
3043 uint32_t counterCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003044 VkBuffer srcBuffer,
3045 VkGpuSize srcOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003046
3047void VKAPI vkCmdSaveAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003048 VkCmdBuffer cmdBuffer,
3049 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003050 uint32_t startCounter,
3051 uint32_t counterCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003052 VkBuffer destBuffer,
3053 VkGpuSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003054
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06003055VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003056 VkDevice device,
3057 const VkFramebufferCreateInfo* pCreateInfo,
3058 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003059
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06003060VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003061 VkDevice device,
3062 const VkRenderPassCreateInfo* pCreateInfo,
3063 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003064
3065void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003066 VkCmdBuffer cmdBuffer,
3067 const VkRenderPassBegin* pRenderPassBegin);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003068
3069void VKAPI vkCmdEndRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003070 VkCmdBuffer cmdBuffer,
3071 VkRenderPass renderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003072
3073#endif // VK_PROTOTYPES
3074
3075#ifdef __cplusplus
3076} // extern "C"
3077#endif // __cplusplus
3078
3079#endif // __VULKAN_H__