blob: 77b701024dc86993d89028511a7c462f8ee89351 [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 Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -060036#define VK_API_VERSION VK_MAKE_VERSION(0, 80, 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,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600710
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600711 VK_INFO_TYPE_BEGIN_RANGE = VK_INFO_TYPE_MEMORY_ALLOCATION_COUNT,
Mark Lobodzinskie39f6952015-04-16 08:52:00 -0500712 VK_INFO_TYPE_END_RANGE = VK_INFO_TYPE_MEMORY_REQUIREMENTS,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600713 VK_NUM_INFO_TYPE = (VK_INFO_TYPE_END_RANGE - VK_INFO_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600714 VK_MAX_ENUM(VkObjectInfoType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600715} VkObjectInfoType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600716
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600717
718// ------------------------------------------------------------------------------------------------
719// Error and return codes
720
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600721typedef enum VkResult_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600722{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600723 // Return codes for successful operation execution (> = 0)
724 VK_SUCCESS = 0x0000000,
725 VK_UNSUPPORTED = 0x0000001,
726 VK_NOT_READY = 0x0000002,
727 VK_TIMEOUT = 0x0000003,
728 VK_EVENT_SET = 0x0000004,
729 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600730
731 // Error codes (negative values)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600732 VK_ERROR_UNKNOWN = -(0x00000001),
733 VK_ERROR_UNAVAILABLE = -(0x00000002),
734 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
735 VK_ERROR_OUT_OF_MEMORY = -(0x00000004),
736 VK_ERROR_OUT_OF_GPU_MEMORY = -(0x00000005),
737 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
738 VK_ERROR_DEVICE_LOST = -(0x00000007),
739 VK_ERROR_INVALID_POINTER = -(0x00000008),
740 VK_ERROR_INVALID_VALUE = -(0x00000009),
741 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
742 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
743 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
744 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
745 VK_ERROR_INVALID_FLAGS = -(0x0000000E),
746 VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F),
747 VK_ERROR_INVALID_FORMAT = -(0x00000010),
748 VK_ERROR_INVALID_IMAGE = -(0x00000011),
749 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012),
750 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013),
751 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014),
752 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015),
753 VK_ERROR_BAD_SHADER_CODE = -(0x00000016),
754 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017),
755 VK_ERROR_TOO_MANY_MEMORY_REFERENCES = -(0x00000018),
756 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
757 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
758 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
759 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
760 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
761 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
762 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
763 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
764 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
765 VK_ERROR_NOT_SHAREABLE = -(0x00000022),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600766 VK_MAX_ENUM(VkResult)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600767} VkResult;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600768
769// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600770// Vulkan format definitions
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600771
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600772typedef enum VkVertexInputStepRate_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600773{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600774 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
775 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
776 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600777
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600778 VK_VERTEX_INPUT_STEP_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_STEP_RATE_VERTEX,
779 VK_VERTEX_INPUT_STEP_RATE_END_RANGE = VK_VERTEX_INPUT_STEP_RATE_DRAW,
780 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 -0600781 VK_MAX_ENUM(VkVertexInputStepRate)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600782} VkVertexInputStepRate;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600783
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600784typedef enum VkFormat_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600785{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600786 VK_FMT_UNDEFINED = 0x00000000,
787 VK_FMT_R4G4_UNORM = 0x00000001,
788 VK_FMT_R4G4_USCALED = 0x00000002,
789 VK_FMT_R4G4B4A4_UNORM = 0x00000003,
790 VK_FMT_R4G4B4A4_USCALED = 0x00000004,
791 VK_FMT_R5G6B5_UNORM = 0x00000005,
792 VK_FMT_R5G6B5_USCALED = 0x00000006,
793 VK_FMT_R5G5B5A1_UNORM = 0x00000007,
794 VK_FMT_R5G5B5A1_USCALED = 0x00000008,
795 VK_FMT_R8_UNORM = 0x00000009,
796 VK_FMT_R8_SNORM = 0x0000000A,
797 VK_FMT_R8_USCALED = 0x0000000B,
798 VK_FMT_R8_SSCALED = 0x0000000C,
799 VK_FMT_R8_UINT = 0x0000000D,
800 VK_FMT_R8_SINT = 0x0000000E,
801 VK_FMT_R8_SRGB = 0x0000000F,
802 VK_FMT_R8G8_UNORM = 0x00000010,
803 VK_FMT_R8G8_SNORM = 0x00000011,
804 VK_FMT_R8G8_USCALED = 0x00000012,
805 VK_FMT_R8G8_SSCALED = 0x00000013,
806 VK_FMT_R8G8_UINT = 0x00000014,
807 VK_FMT_R8G8_SINT = 0x00000015,
808 VK_FMT_R8G8_SRGB = 0x00000016,
809 VK_FMT_R8G8B8_UNORM = 0x00000017,
810 VK_FMT_R8G8B8_SNORM = 0x00000018,
811 VK_FMT_R8G8B8_USCALED = 0x00000019,
812 VK_FMT_R8G8B8_SSCALED = 0x0000001A,
813 VK_FMT_R8G8B8_UINT = 0x0000001B,
814 VK_FMT_R8G8B8_SINT = 0x0000001C,
815 VK_FMT_R8G8B8_SRGB = 0x0000001D,
816 VK_FMT_R8G8B8A8_UNORM = 0x0000001E,
817 VK_FMT_R8G8B8A8_SNORM = 0x0000001F,
818 VK_FMT_R8G8B8A8_USCALED = 0x00000020,
819 VK_FMT_R8G8B8A8_SSCALED = 0x00000021,
820 VK_FMT_R8G8B8A8_UINT = 0x00000022,
821 VK_FMT_R8G8B8A8_SINT = 0x00000023,
822 VK_FMT_R8G8B8A8_SRGB = 0x00000024,
823 VK_FMT_R10G10B10A2_UNORM = 0x00000025,
824 VK_FMT_R10G10B10A2_SNORM = 0x00000026,
825 VK_FMT_R10G10B10A2_USCALED = 0x00000027,
826 VK_FMT_R10G10B10A2_SSCALED = 0x00000028,
827 VK_FMT_R10G10B10A2_UINT = 0x00000029,
828 VK_FMT_R10G10B10A2_SINT = 0x0000002A,
829 VK_FMT_R16_UNORM = 0x0000002B,
830 VK_FMT_R16_SNORM = 0x0000002C,
831 VK_FMT_R16_USCALED = 0x0000002D,
832 VK_FMT_R16_SSCALED = 0x0000002E,
833 VK_FMT_R16_UINT = 0x0000002F,
834 VK_FMT_R16_SINT = 0x00000030,
835 VK_FMT_R16_SFLOAT = 0x00000031,
836 VK_FMT_R16G16_UNORM = 0x00000032,
837 VK_FMT_R16G16_SNORM = 0x00000033,
838 VK_FMT_R16G16_USCALED = 0x00000034,
839 VK_FMT_R16G16_SSCALED = 0x00000035,
840 VK_FMT_R16G16_UINT = 0x00000036,
841 VK_FMT_R16G16_SINT = 0x00000037,
842 VK_FMT_R16G16_SFLOAT = 0x00000038,
843 VK_FMT_R16G16B16_UNORM = 0x00000039,
844 VK_FMT_R16G16B16_SNORM = 0x0000003A,
845 VK_FMT_R16G16B16_USCALED = 0x0000003B,
846 VK_FMT_R16G16B16_SSCALED = 0x0000003C,
847 VK_FMT_R16G16B16_UINT = 0x0000003D,
848 VK_FMT_R16G16B16_SINT = 0x0000003E,
849 VK_FMT_R16G16B16_SFLOAT = 0x0000003F,
850 VK_FMT_R16G16B16A16_UNORM = 0x00000040,
851 VK_FMT_R16G16B16A16_SNORM = 0x00000041,
852 VK_FMT_R16G16B16A16_USCALED = 0x00000042,
853 VK_FMT_R16G16B16A16_SSCALED = 0x00000043,
854 VK_FMT_R16G16B16A16_UINT = 0x00000044,
855 VK_FMT_R16G16B16A16_SINT = 0x00000045,
856 VK_FMT_R16G16B16A16_SFLOAT = 0x00000046,
857 VK_FMT_R32_UINT = 0x00000047,
858 VK_FMT_R32_SINT = 0x00000048,
859 VK_FMT_R32_SFLOAT = 0x00000049,
860 VK_FMT_R32G32_UINT = 0x0000004A,
861 VK_FMT_R32G32_SINT = 0x0000004B,
862 VK_FMT_R32G32_SFLOAT = 0x0000004C,
863 VK_FMT_R32G32B32_UINT = 0x0000004D,
864 VK_FMT_R32G32B32_SINT = 0x0000004E,
865 VK_FMT_R32G32B32_SFLOAT = 0x0000004F,
866 VK_FMT_R32G32B32A32_UINT = 0x00000050,
867 VK_FMT_R32G32B32A32_SINT = 0x00000051,
868 VK_FMT_R32G32B32A32_SFLOAT = 0x00000052,
869 VK_FMT_R64_SFLOAT = 0x00000053,
870 VK_FMT_R64G64_SFLOAT = 0x00000054,
871 VK_FMT_R64G64B64_SFLOAT = 0x00000055,
872 VK_FMT_R64G64B64A64_SFLOAT = 0x00000056,
873 VK_FMT_R11G11B10_UFLOAT = 0x00000057,
874 VK_FMT_R9G9B9E5_UFLOAT = 0x00000058,
875 VK_FMT_D16_UNORM = 0x00000059,
876 VK_FMT_D24_UNORM = 0x0000005A,
877 VK_FMT_D32_SFLOAT = 0x0000005B,
878 VK_FMT_S8_UINT = 0x0000005C,
879 VK_FMT_D16_UNORM_S8_UINT = 0x0000005D,
880 VK_FMT_D24_UNORM_S8_UINT = 0x0000005E,
881 VK_FMT_D32_SFLOAT_S8_UINT = 0x0000005F,
882 VK_FMT_BC1_RGB_UNORM = 0x00000060,
883 VK_FMT_BC1_RGB_SRGB = 0x00000061,
884 VK_FMT_BC1_RGBA_UNORM = 0x00000062,
885 VK_FMT_BC1_RGBA_SRGB = 0x00000063,
886 VK_FMT_BC2_UNORM = 0x00000064,
887 VK_FMT_BC2_SRGB = 0x00000065,
888 VK_FMT_BC3_UNORM = 0x00000066,
889 VK_FMT_BC3_SRGB = 0x00000067,
890 VK_FMT_BC4_UNORM = 0x00000068,
891 VK_FMT_BC4_SNORM = 0x00000069,
892 VK_FMT_BC5_UNORM = 0x0000006A,
893 VK_FMT_BC5_SNORM = 0x0000006B,
894 VK_FMT_BC6H_UFLOAT = 0x0000006C,
895 VK_FMT_BC6H_SFLOAT = 0x0000006D,
896 VK_FMT_BC7_UNORM = 0x0000006E,
897 VK_FMT_BC7_SRGB = 0x0000006F,
898 VK_FMT_ETC2_R8G8B8_UNORM = 0x00000070,
899 VK_FMT_ETC2_R8G8B8_SRGB = 0x00000071,
900 VK_FMT_ETC2_R8G8B8A1_UNORM = 0x00000072,
901 VK_FMT_ETC2_R8G8B8A1_SRGB = 0x00000073,
902 VK_FMT_ETC2_R8G8B8A8_UNORM = 0x00000074,
903 VK_FMT_ETC2_R8G8B8A8_SRGB = 0x00000075,
904 VK_FMT_EAC_R11_UNORM = 0x00000076,
905 VK_FMT_EAC_R11_SNORM = 0x00000077,
906 VK_FMT_EAC_R11G11_UNORM = 0x00000078,
907 VK_FMT_EAC_R11G11_SNORM = 0x00000079,
908 VK_FMT_ASTC_4x4_UNORM = 0x0000007A,
909 VK_FMT_ASTC_4x4_SRGB = 0x0000007B,
910 VK_FMT_ASTC_5x4_UNORM = 0x0000007C,
911 VK_FMT_ASTC_5x4_SRGB = 0x0000007D,
912 VK_FMT_ASTC_5x5_UNORM = 0x0000007E,
913 VK_FMT_ASTC_5x5_SRGB = 0x0000007F,
914 VK_FMT_ASTC_6x5_UNORM = 0x00000080,
915 VK_FMT_ASTC_6x5_SRGB = 0x00000081,
916 VK_FMT_ASTC_6x6_UNORM = 0x00000082,
917 VK_FMT_ASTC_6x6_SRGB = 0x00000083,
918 VK_FMT_ASTC_8x5_UNORM = 0x00000084,
919 VK_FMT_ASTC_8x5_SRGB = 0x00000085,
920 VK_FMT_ASTC_8x6_UNORM = 0x00000086,
921 VK_FMT_ASTC_8x6_SRGB = 0x00000087,
922 VK_FMT_ASTC_8x8_UNORM = 0x00000088,
923 VK_FMT_ASTC_8x8_SRGB = 0x00000089,
924 VK_FMT_ASTC_10x5_UNORM = 0x0000008A,
925 VK_FMT_ASTC_10x5_SRGB = 0x0000008B,
926 VK_FMT_ASTC_10x6_UNORM = 0x0000008C,
927 VK_FMT_ASTC_10x6_SRGB = 0x0000008D,
928 VK_FMT_ASTC_10x8_UNORM = 0x0000008E,
929 VK_FMT_ASTC_10x8_SRGB = 0x0000008F,
930 VK_FMT_ASTC_10x10_UNORM = 0x00000090,
931 VK_FMT_ASTC_10x10_SRGB = 0x00000091,
932 VK_FMT_ASTC_12x10_UNORM = 0x00000092,
933 VK_FMT_ASTC_12x10_SRGB = 0x00000093,
934 VK_FMT_ASTC_12x12_UNORM = 0x00000094,
935 VK_FMT_ASTC_12x12_SRGB = 0x00000095,
936 VK_FMT_B4G4R4A4_UNORM = 0x00000096,
937 VK_FMT_B5G5R5A1_UNORM = 0x00000097,
938 VK_FMT_B5G6R5_UNORM = 0x00000098,
939 VK_FMT_B5G6R5_USCALED = 0x00000099,
940 VK_FMT_B8G8R8_UNORM = 0x0000009A,
941 VK_FMT_B8G8R8_SNORM = 0x0000009B,
942 VK_FMT_B8G8R8_USCALED = 0x0000009C,
943 VK_FMT_B8G8R8_SSCALED = 0x0000009D,
944 VK_FMT_B8G8R8_UINT = 0x0000009E,
945 VK_FMT_B8G8R8_SINT = 0x0000009F,
946 VK_FMT_B8G8R8_SRGB = 0x000000A0,
947 VK_FMT_B8G8R8A8_UNORM = 0x000000A1,
948 VK_FMT_B8G8R8A8_SNORM = 0x000000A2,
949 VK_FMT_B8G8R8A8_USCALED = 0x000000A3,
950 VK_FMT_B8G8R8A8_SSCALED = 0x000000A4,
951 VK_FMT_B8G8R8A8_UINT = 0x000000A5,
952 VK_FMT_B8G8R8A8_SINT = 0x000000A6,
953 VK_FMT_B8G8R8A8_SRGB = 0x000000A7,
954 VK_FMT_B10G10R10A2_UNORM = 0x000000A8,
955 VK_FMT_B10G10R10A2_SNORM = 0x000000A9,
956 VK_FMT_B10G10R10A2_USCALED = 0x000000AA,
957 VK_FMT_B10G10R10A2_SSCALED = 0x000000AB,
958 VK_FMT_B10G10R10A2_UINT = 0x000000AC,
959 VK_FMT_B10G10R10A2_SINT = 0x000000AD,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600960
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600961 VK_FMT_BEGIN_RANGE = VK_FMT_UNDEFINED,
962 VK_FMT_END_RANGE = VK_FMT_B10G10R10A2_SINT,
963 VK_NUM_FMT = (VK_FMT_END_RANGE - VK_FMT_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600964 VK_MAX_ENUM(VkFormat)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600965} VkFormat;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600966
967// Shader stage enumerant
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600968typedef enum VkPipelineShaderStage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600969{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600970 VK_SHADER_STAGE_VERTEX = 0,
971 VK_SHADER_STAGE_TESS_CONTROL = 1,
972 VK_SHADER_STAGE_TESS_EVALUATION = 2,
973 VK_SHADER_STAGE_GEOMETRY = 3,
974 VK_SHADER_STAGE_FRAGMENT = 4,
975 VK_SHADER_STAGE_COMPUTE = 5,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600976
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600977 VK_SHADER_STAGE_BEGIN_RANGE = VK_SHADER_STAGE_VERTEX,
978 VK_SHADER_STAGE_END_RANGE = VK_SHADER_STAGE_COMPUTE,
979 VK_NUM_SHADER_STAGE = (VK_SHADER_STAGE_END_RANGE - VK_SHADER_STAGE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600980 VK_MAX_ENUM(VkPipelineShaderStage)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600981} VkPipelineShaderStage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600982
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600983typedef enum VkShaderStageFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600984{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -0600985 VK_SHADER_STAGE_FLAGS_VERTEX_BIT = 0x00000001,
986 VK_SHADER_STAGE_FLAGS_TESS_CONTROL_BIT = 0x00000002,
987 VK_SHADER_STAGE_FLAGS_TESS_EVALUATION_BIT = 0x00000004,
988 VK_SHADER_STAGE_FLAGS_GEOMETRY_BIT = 0x00000008,
989 VK_SHADER_STAGE_FLAGS_FRAGMENT_BIT = 0x00000010,
990 VK_SHADER_STAGE_FLAGS_COMPUTE_BIT = 0x00000020,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600991
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -0600992 VK_SHADER_STAGE_FLAGS_ALL = 0x7FFFFFFF,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -0600993 VK_MAX_ENUM(VkShaderStageFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600994} VkShaderStageFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600995
996// Structure type enumerant
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600997typedef enum VkStructureType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600998{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600999 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
1000 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
1001 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
1002 VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO = 4,
1003 VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO = 5,
1004 VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO = 6,
1005 VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO = 7,
1006 VK_STRUCTURE_TYPE_EVENT_WAIT_INFO = 8,
1007 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 9,
1008 VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 10,
1009 VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 11,
1010 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 12,
1011 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 13,
1012 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 14,
1013 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 15,
1014 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 16,
1015 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 17,
1016 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 18,
1017 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 19,
1018 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 20,
1019 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 21,
1020 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 22,
1021 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 23,
1022 VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO = 24,
1023 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 25,
1024 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 26,
1025 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 27,
1026 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO = 28,
1027 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 29,
1028 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 30,
1029 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 31,
1030 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 32,
1031 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 33,
1032 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 34,
1033 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 35,
1034 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 36,
1035 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 37,
1036 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 38,
1037 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 39,
1038 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 40,
1039 VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO = 41,
1040 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 42,
1041 VK_STRUCTURE_TYPE_LAYER_CREATE_INFO = 43,
1042 VK_STRUCTURE_TYPE_PIPELINE_BARRIER = 44,
1043 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 45,
1044 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 46,
1045 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 47,
1046 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 48,
1047 VK_STRUCTURE_TYPE_UPDATE_SAMPLERS = 49,
1048 VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES = 50,
1049 VK_STRUCTURE_TYPE_UPDATE_IMAGES = 51,
1050 VK_STRUCTURE_TYPE_UPDATE_BUFFERS = 52,
1051 VK_STRUCTURE_TYPE_UPDATE_AS_COPY = 53,
Mark Lobodzinskie39f6952015-04-16 08:52:00 -05001052 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 54,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001053
1054 VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
1055 VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
1056
1057 VK_NUM_STRUCTURE_TYPE = (VK_STRUCTURE_TYPE_END_RANGE - VK_STRUCTURE_TYPE_BEGIN_RANGE + 1),
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001058 VK_MAX_ENUM(VkStructureType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001059} VkStructureType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001060
1061// ------------------------------------------------------------------------------------------------
1062// Flags
1063
1064// Device creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001065typedef enum VkDeviceCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001066{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001067 VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001,
1068 VK_DEVICE_CREATE_MGPU_IQ_MATCH_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001069 VK_MAX_ENUM(VkDeviceCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001070} VkDeviceCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001071
1072// Queue capabilities
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001073typedef enum VkQueueFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001074{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001075 VK_QUEUE_GRAPHICS_BIT = 0x00000001, // Queue supports graphics operations
1076 VK_QUEUE_COMPUTE_BIT = 0x00000002, // Queue supports compute operations
1077 VK_QUEUE_DMA_BIT = 0x00000004, // Queue supports DMA operations
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05001078 VK_QUEUE_MEMMGR_BIT = 0x00000008, // Queue supports memory management operations
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001079 VK_QUEUE_EXTENDED_BIT = 0x40000000, // Extended queue
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001080 VK_MAX_ENUM(VkQueueFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001081} VkQueueFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001082
1083// memory properties passed into vkAllocMemory().
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001084typedef enum VkMemoryPropertyFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001085{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001086 VK_MEMORY_PROPERTY_GPU_ONLY = 0x00000000, // If not set, then allocate memory on device (GPU)
1087 VK_MEMORY_PROPERTY_CPU_VISIBLE_BIT = 0x00000001,
1088 VK_MEMORY_PROPERTY_CPU_GPU_COHERENT_BIT = 0x00000002,
1089 VK_MEMORY_PROPERTY_CPU_UNCACHED_BIT = 0x00000004,
1090 VK_MEMORY_PROPERTY_CPU_WRITE_COMBINED_BIT = 0x00000008,
1091 VK_MEMORY_PROPERTY_PREFER_CPU_LOCAL = 0x00000010, // all else being equal, prefer CPU access
1092 VK_MEMORY_PROPERTY_SHAREABLE_BIT = 0x00000020,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001093 VK_MAX_ENUM(VkMemoryPropertyFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001094} VkMemoryPropertyFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001095
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001096// Buffer and buffer allocation usage flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001097typedef enum VkBufferUsageFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001098{
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001099 VK_BUFFER_USAGE_GENERAL = 0x00000000, // No special usage
1100 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, // Can be used as a source of transfer operations
1101 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, // Can be used as a destination of transfer operations
1102 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, // Can be used as TBO
1103 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, // Can be used as IBO
1104 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, // Can be used as UBO
1105 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, // Can be used as SSBO
1106 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, // Can be used as source of fixed function index fetch (index buffer)
1107 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, // Can be used as source of fixed function vertex fetch (VBO)
1108 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 -06001109 VK_MAX_ENUM(VkBufferUsageFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001110} VkBufferUsageFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001111
1112// Buffer flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001113typedef enum VkBufferCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001114{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001115 VK_BUFFER_CREATE_SHAREABLE_BIT = 0x00000001,
1116 VK_BUFFER_CREATE_SPARSE_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001117 VK_MAX_ENUM(VkBufferCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001118} VkBufferCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001119
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001120typedef enum VkBufferViewType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001121{
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001122 VK_BUFFER_VIEW_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
1123 VK_BUFFER_VIEW_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001124
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001125 VK_BUFFER_VIEW_TYPE_BEGIN_RANGE = VK_BUFFER_VIEW_RAW,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001126 VK_BUFFER_VIEW_TYPE_END_RANGE = VK_BUFFER_VIEW_FORMATTED,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001127 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 -06001128 VK_MAX_ENUM(VkBufferViewType)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001129} VkBufferViewType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001130
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001131// Image and image allocation usage flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001132typedef enum VkImageUsageFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001133{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001134 VK_IMAGE_USAGE_GENERAL = 0x00000000, // no special usage
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001135 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, // Can be used as a source of transfer operations
1136 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, // Can be used as a destination of transfer operations
1137 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1138 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, // Can be used as storage image (STORAGE_IMAGE descriptor type)
1139 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, // Can be used as framebuffer color attachment
1140 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = 0x00000020, // Can be used as framebuffer depth/stencil attachment
1141 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, // Image data not needed outside of rendering
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001142 VK_MAX_ENUM(VkImageUsageFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001143} VkImageUsageFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001144
1145// Image flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001146typedef enum VkImageCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001147{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001148 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = 0x00000001,
1149 VK_IMAGE_CREATE_CLONEABLE_BIT = 0x00000002,
1150 VK_IMAGE_CREATE_SHAREABLE_BIT = 0x00000004,
1151 VK_IMAGE_CREATE_SPARSE_BIT = 0x00000008,
1152 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 -05001153 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 -06001154 VK_MAX_ENUM(VkImageCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001155} VkImageCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001156
1157// Depth-stencil view creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001158typedef enum VkDepthStencilViewCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001159{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001160 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
1161 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001162 VK_MAX_ENUM(VkDepthStencilViewCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001163} VkDepthStencilViewCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001164
1165// Pipeline creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001166typedef enum VkPipelineCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001167{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001168 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1169 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001170 VK_MAX_ENUM(VkPipelineCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001171} VkPipelineCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001172
1173// Fence creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001174typedef enum VkFenceCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001175{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001176 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001177 VK_MAX_ENUM(VkFenceCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001178} VkFenceCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001179
1180// Semaphore creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001181typedef enum VkSemaphoreCreateFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001182{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001183 VK_SEMAPHORE_CREATE_SHAREABLE_BIT = 0x00000001,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001184 VK_MAX_ENUM(VkSemaphoreCreateFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001185} VkSemaphoreCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001186
1187// Format capability flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001188typedef enum VkFormatFeatureFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001189{
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001190 VK_FORMAT_SAMPLED_IMAGE_BIT = 0x00000001, // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1191 VK_FORMAT_STORAGE_IMAGE_BIT = 0x00000002, // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1192 VK_FORMAT_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, // Format supports atomic operations in case it's used for storage images
1193 VK_FORMAT_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, // Format can be used for uniform texel buffers (TBOs)
1194 VK_FORMAT_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, // Format can be used for storage texel buffers (IBOs)
1195 VK_FORMAT_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, // Format supports atomic operations in case it's used for storage texel buffers
1196 VK_FORMAT_VERTEX_BUFFER_BIT = 0x00000040, // Format can be used for vertex buffers (VBOs)
1197 VK_FORMAT_COLOR_ATTACHMENT_BIT = 0x00000080, // Format can be used for color attachment images
1198 VK_FORMAT_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, // Format supports blending in case it's used for color attachment images
1199 VK_FORMAT_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, // Format can be used for depth/stencil attachment images
1200 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 -06001201 VK_MAX_ENUM(VkFormatFeatureFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001202} VkFormatFeatureFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001203
1204// Query flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001205typedef enum VkQueryControlFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001206{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001207 VK_QUERY_IMPRECISE_DATA_BIT = 0x00000001,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001208 VK_MAX_ENUM(VkQueryControlFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001209} VkQueryControlFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001210
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001211// Query result flags
1212typedef enum VkQueryResultFlags_
1213{
1214 VK_QUERY_RESULT_32_BIT = 0x00000000, // Results of the queries are written to the destination buffer as 32-bit values
1215 VK_QUERY_RESULT_64_BIT = 0x00000001, // Results of the queries are written to the destination buffer as 64-bit values
1216 // Duplicate enum result messes with validation
1217// VK_QUERY_RESULT_NO_WAIT_BIT = 0x00000000, // Results of the queries aren't waited on before proceeding with the result copy
1218 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, // Results of the queries are waited on before proceeding with the result copy
1219 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, // Besides the results of the query, the availability of the results is also written
1220 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008 // Copy the partial results of the query even if the final results aren't available
1221} VkQueryResultFlags;
1222
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001223// GPU compatibility flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001224typedef enum VkGpuCompatibilityFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001225{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001226 VK_GPU_COMPAT_ASIC_FEATURES_BIT = 0x00000001,
1227 VK_GPU_COMPAT_IQ_MATCH_BIT = 0x00000002,
1228 VK_GPU_COMPAT_PEER_TRANSFER_BIT = 0x00000004,
1229 VK_GPU_COMPAT_SHARED_MEMORY_BIT = 0x00000008,
1230 VK_GPU_COMPAT_SHARED_SYNC_BIT = 0x00000010,
1231 VK_GPU_COMPAT_SHARED_GPU0_DISPLAY_BIT = 0x00000020,
1232 VK_GPU_COMPAT_SHARED_GPU1_DISPLAY_BIT = 0x00000040,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001233 VK_MAX_ENUM(VkGpuCompatibilityFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001234} VkGpuCompatibilityFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001235
1236// Command buffer building flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001237typedef enum VkCmdBufferBuildFlags_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001238{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001239 VK_CMD_BUFFER_OPTIMIZE_GPU_SMALL_BATCH_BIT = 0x00000001,
1240 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = 0x00000002,
1241 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = 0x00000004,
1242 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = 0x00000008,
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001243 VK_MAX_ENUM(VkCmdBufferBuildFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001244} VkCmdBufferBuildFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001245
1246// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001247// Vulkan structures
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001248
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001249typedef struct VkOffset2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001250{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001251 int32_t x;
1252 int32_t y;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001253} VkOffset2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001254
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001255typedef struct VkOffset3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001256{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001257 int32_t x;
1258 int32_t y;
1259 int32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001260} VkOffset3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001261
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001262typedef struct VkExtent2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001263{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001264 int32_t width;
1265 int32_t height;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001266} VkExtent2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001267
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001268typedef struct VkExtent3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001269{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001270 int32_t width;
1271 int32_t height;
1272 int32_t depth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001273} VkExtent3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001274
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001275typedef struct VkViewport_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001276{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001277 float originX;
1278 float originY;
1279 float width;
1280 float height;
1281 float minDepth;
1282 float maxDepth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001283} VkViewport;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001284
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001285typedef struct VkRect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001286{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001287 VkOffset2D offset;
1288 VkExtent2D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001289} VkRect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001290
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001291typedef struct VkChannelMapping_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001292{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001293 VkChannelSwizzle r;
1294 VkChannelSwizzle g;
1295 VkChannelSwizzle b;
1296 VkChannelSwizzle a;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001297} VkChannelMapping;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001298
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001299typedef struct VkPhysicalGpuProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001300{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001301 uint32_t apiVersion;
1302 uint32_t driverVersion;
1303 uint32_t vendorId;
1304 uint32_t deviceId;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001305 VkPhysicalGpuType gpuType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001306 char gpuName[VK_MAX_PHYSICAL_GPU_NAME];
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001307 VkGpuSize maxInlineMemoryUpdateSize;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001308 uint32_t maxBoundDescriptorSets;
1309 uint32_t maxThreadGroupSize;
1310 uint64_t timestampFrequency;
1311 bool32_t multiColorAttachmentClears;
1312 uint32_t maxDescriptorSets; // at least 2?
1313 uint32_t maxViewports; // at least 16?
1314 uint32_t maxColorAttachments; // at least 8?
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001315} VkPhysicalGpuProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001316
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001317typedef struct VkPhysicalGpuPerformance_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001318{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001319 float maxGpuClock;
1320 float aluPerClock;
1321 float texPerClock;
1322 float primsPerClock;
1323 float pixelsPerClock;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001324} VkPhysicalGpuPerformance;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001325
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001326typedef struct VkGpuCompatibilityInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001327{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001328 VkFlags compatibilityFlags; // VkGpuCompatibilityFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001329} VkGpuCompatibilityInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001330
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001331typedef struct VkExtensionProperties_
1332{
1333 char extName[VK_MAX_EXTENSION_NAME]; // extension name
1334 uint32_t version; // version of the extension specification
1335} VkExtensionProperties;
1336
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001337typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001338{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001339 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001340 const void* pNext; // Next structure in chain
1341 const char* pAppName;
1342 uint32_t appVersion;
1343 const char* pEngineName;
1344 uint32_t engineVersion;
1345 uint32_t apiVersion;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001346} VkApplicationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001347
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001348typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001349 void* pUserData,
1350 size_t size,
1351 size_t alignment,
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001352 VkSystemAllocType allocType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001353
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001354typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001355 void* pUserData,
1356 void* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001357
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001358typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001359{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001360 void* pUserData;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001361 PFN_vkAllocFunction pfnAlloc;
1362 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001363} VkAllocCallbacks;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001364
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001365typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001366{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001367 uint32_t queueNodeIndex;
1368 uint32_t queueCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001369} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001370
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001371typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001372{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001373 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001374 const void* pNext; // Pointer to next structure
1375 uint32_t queueRecordCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001376 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001377 uint32_t extensionCount;
1378 const char*const* ppEnabledExtensionNames;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001379 VkFlags flags; // VkDeviceCreateFlags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001380} VkDeviceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001381
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001382typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001383{
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001384 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001385 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001386 const VkApplicationInfo* pAppInfo;
1387 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001388 uint32_t extensionCount;
1389 const char*const* ppEnabledExtensionNames; // layer or extension name to be enabled
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001390} VkInstanceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001391
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001392// can be added to VkDeviceCreateInfo or VkInstanceCreateInfo via pNext
1393typedef struct _VkLayerCreateInfo
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001394{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001395 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_LAYER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001396 const void* pNext; // Pointer to next structure
1397 uint32_t layerCount;
1398 const char *const* ppActiveLayerNames; // layer name from the layer's vkEnumerateLayers())
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001399} VkLayerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001400
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001401typedef struct VkPhysicalGpuQueueProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001402{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001403 VkFlags queueFlags; // VkQueueFlags
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001404 uint32_t queueCount;
1405 uint32_t maxAtomicCounters;
1406 bool32_t supportsTimestamps;
1407 uint32_t maxMemReferences; // Tells how many memory references can be active for the given queue
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001408} VkPhysicalGpuQueueProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001409
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001410typedef struct VkPhysicalGpuMemoryProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001411{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001412 bool32_t supportsMigration;
1413 bool32_t supportsPinning;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001414} VkPhysicalGpuMemoryProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001415
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001416typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001417{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001418 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001419 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001420 VkGpuSize allocationSize; // Size of memory allocation
1421 VkFlags memProps; // VkMemoryPropertyFlags
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001422 VkMemoryPriority memPriority;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001423} VkMemoryAllocInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001424
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001425typedef struct VkMemoryOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001426{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001427 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001428 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001429 VkGpuMemory sharedMem;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001430} VkMemoryOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001431
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001432typedef struct VkPeerMemoryOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001433{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001434 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001435 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001436 VkGpuMemory originalMem;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001437} VkPeerMemoryOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001438
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001439typedef struct VkMemoryRequirements_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001440{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001441 VkGpuSize size; // Specified in bytes
1442 VkGpuSize alignment; // Specified in bytes
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05001443 VkGpuSize granularity; // Granularity on which vkQueueBindObjectMemoryRange can bind sub-ranges of memory specified in bytes (usually the page size)
Jeremy Hayes38ce2b12015-04-15 14:17:56 -06001444 VkMemoryPropertyFlags memPropsAllowed; // Allowed memory property flags
1445 VkMemoryPropertyFlags memPropsRequired; // Required memory property flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001446} VkMemoryRequirements;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001447
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001448typedef struct VkFormatProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001449{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001450 VkFlags linearTilingFeatures; // VkFormatFeatureFlags
1451 VkFlags optimalTilingFeatures; // VkFormatFeatureFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001452} VkFormatProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001453
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001454typedef struct VkBufferViewAttachInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001455{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001456 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001457 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001458 VkBufferView view;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001459} VkBufferViewAttachInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001460
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001461typedef struct VkImageViewAttachInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001462{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001463 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001464 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001465 VkImageView view;
1466 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001467} VkImageViewAttachInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001468
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001469typedef struct VkUpdateSamplers_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001470{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001471 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLERS
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001472 const void* pNext; // Pointer to next structure
1473 uint32_t binding; // Binding of the sampler (array)
1474 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1475 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001476 const VkSampler* pSamplers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001477} VkUpdateSamplers;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001478
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001479typedef struct VkSamplerImageViewInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001480{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001481 VkSampler sampler;
1482 const VkImageViewAttachInfo* pImageView;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001483} VkSamplerImageViewInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001484
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001485typedef struct VkUpdateSamplerTextures_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001486{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001487 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001488 const void* pNext; // Pointer to next structure
1489 uint32_t binding; // Binding of the combined texture sampler (array)
1490 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1491 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001492 const VkSamplerImageViewInfo* pSamplerImageViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001493} VkUpdateSamplerTextures;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001494
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001495typedef struct VkUpdateImages_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001496{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001497 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_IMAGES
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001498 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001499 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001500 uint32_t binding; // Binding of the image (array)
1501 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1502 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001503 const VkImageViewAttachInfo* pImageViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001504} VkUpdateImages;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001505
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001506typedef struct VkUpdateBuffers_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001507{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001508 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_BUFFERS
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001509 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001510 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001511 uint32_t binding; // Binding of the buffer (array)
1512 uint32_t arrayIndex; // First element of the array to update or zero otherwise
1513 uint32_t count; // Number of elements to update
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001514 const VkBufferViewAttachInfo* pBufferViews;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001515} VkUpdateBuffers;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001516
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001517typedef struct VkUpdateAsCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001518{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001519 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_UPDATE_AS_COPY
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001520 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001521 VkDescriptorType descriptorType;
1522 VkDescriptorSet descriptorSet;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001523 uint32_t binding;
1524 uint32_t arrayElement;
1525 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001526} VkUpdateAsCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001527
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001528typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001529{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001530 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001531 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001532 VkGpuSize size; // Specified in bytes
1533 VkFlags usage; // VkBufferUsageFlags
1534 VkFlags flags; // VkBufferCreateFlags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001535} VkBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001536
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001537typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001538{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001539 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001540 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001541 VkBuffer buffer;
1542 VkBufferViewType viewType;
1543 VkFormat format; // Optionally specifies format of elements
1544 VkGpuSize offset; // Specified in bytes
1545 VkGpuSize range; // View size specified in bytes
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001546} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001547
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001548typedef struct VkImageSubresource_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001549{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001550 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001551 uint32_t mipLevel;
1552 uint32_t arraySlice;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001553} VkImageSubresource;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001554
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001555typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001556{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001557 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001558 uint32_t baseMipLevel;
1559 uint32_t mipLevels;
1560 uint32_t baseArraySlice;
1561 uint32_t arraySize;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001562} VkImageSubresourceRange;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001563
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001564typedef struct VkEventWaitInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001565{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001566 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_WAIT_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001567 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001568
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001569 uint32_t eventCount; // Number of events to wait on
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001570 const VkEvent* pEvents; // Array of event objects to wait on
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001571
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001572 VkWaitEvent waitEvent; // Pipeline event where the wait should happen
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001573
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001574 uint32_t memBarrierCount; // Number of memory barriers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001575 const void** ppMemBarriers; // Array of pointers to memory barriers (any of them can be either VkMemoryBarrier, VkBufferMemoryBarrier, or VkImageMemoryBarrier)
1576} VkEventWaitInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001577
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001578typedef struct VkPipelineBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001579{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001580 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001581 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001582
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001583 uint32_t eventCount; // Number of events to wait on
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001584 const VkPipeEvent* pEvents; // Array of pipeline events to wait on
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001585
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001586 VkWaitEvent waitEvent; // Pipeline event where the wait should happen
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001587
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001588 uint32_t memBarrierCount; // Number of memory barriers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001589 const void** ppMemBarriers; // Array of pointers to memory barriers (any of them can be either VkMemoryBarrier, VkBufferMemoryBarrier, or VkImageMemoryBarrier)
1590} VkPipelineBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001591
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001592typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001593{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001594 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001595 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001596
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001597 VkFlags outputMask; // Outputs the barrier should sync (see VkMemoryOutputFlags)
1598 VkFlags inputMask; // Inputs the barrier should sync to (see VkMemoryInputFlags)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001599} VkMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001600
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001601typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001602{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001603 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001604 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001605
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001606 VkFlags outputMask; // Outputs the barrier should sync (see VkMemoryOutputFlags)
1607 VkFlags inputMask; // Inputs the barrier should sync to (see VkMemoryInputFlags)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001608
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001609 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001610
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001611 VkGpuSize offset; // Offset within the buffer to sync
1612 VkGpuSize size; // Amount of bytes to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001613} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001614
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001615typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001616{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001617 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001618 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001619
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001620 VkFlags outputMask; // Outputs the barrier should sync (see VkMemoryOutputFlags)
1621 VkFlags inputMask; // Inputs the barrier should sync to (see VkMemoryInputFlags)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001622
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001623 VkImageLayout oldLayout; // Current layout of the image
1624 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001625
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001626 VkImage image; // Image to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001627
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001628 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001629} VkImageMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001630
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001631typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001632{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001633 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001634 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001635 VkImageType imageType;
1636 VkFormat format;
1637 VkExtent3D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001638 uint32_t mipLevels;
1639 uint32_t arraySize;
1640 uint32_t samples;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001641 VkImageTiling tiling;
1642 VkFlags usage; // VkImageUsageFlags
1643 VkFlags flags; // VkImageCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001644} VkImageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001645
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001646typedef struct VkPeerImageOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001647{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001648 VkImage originalImage;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001649} VkPeerImageOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001650
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001651typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001652{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001653 VkGpuSize offset; // Specified in bytes
1654 VkGpuSize size; // Specified in bytes
1655 VkGpuSize rowPitch; // Specified in bytes
1656 VkGpuSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001657} VkSubresourceLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001658
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001659typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001660{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001661 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001662 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001663 VkImage image;
1664 VkImageViewType viewType;
1665 VkFormat format;
1666 VkChannelMapping channels;
1667 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001668 float minLod;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001669} VkImageViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001670
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001671typedef struct VkColorAttachmentViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001672{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001673 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001674 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001675 VkImage image;
1676 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001677 uint32_t mipLevel;
1678 uint32_t baseArraySlice;
1679 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001680 VkImage msaaResolveImage;
1681 VkImageSubresourceRange msaaResolveSubResource;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001682} VkColorAttachmentViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001683
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001684typedef struct VkDepthStencilViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001685{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001686 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001687 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001688 VkImage image;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001689 uint32_t mipLevel;
1690 uint32_t baseArraySlice;
1691 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001692 VkImage msaaResolveImage;
1693 VkImageSubresourceRange msaaResolveSubResource;
1694 VkFlags flags; // VkDepthStencilViewCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001695} VkDepthStencilViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001696
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001697typedef struct VkColorAttachmentBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001698{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001699 VkColorAttachmentView view;
1700 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001701} VkColorAttachmentBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001702
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001703typedef struct VkDepthStencilBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001704{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001705 VkDepthStencilView view;
1706 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001707} VkDepthStencilBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001708
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001709typedef struct VkBufferCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001710{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001711 VkGpuSize srcOffset; // Specified in bytes
1712 VkGpuSize destOffset; // Specified in bytes
1713 VkGpuSize copySize; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001714} VkBufferCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001715
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001716typedef struct VkImageMemoryBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001717{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001718 VkImageSubresource subresource;
1719 VkOffset3D offset;
1720 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001721} VkImageMemoryBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001722
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001723typedef struct VkImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001724{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001725 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001726 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001727 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001728 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1729 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001730} VkImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001731
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001732typedef struct VkImageBlit_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001733{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001734 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001735 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1736 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001737 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001738 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1739 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001740} VkImageBlit;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001741
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001742typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001743{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001744 VkGpuSize bufferOffset; // Specified in bytes
1745 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001746 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1747 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001748} VkBufferImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001749
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001750typedef struct VkImageResolve_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001751{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001752 VkImageSubresource srcSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001753 VkOffset3D srcOffset;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001754 VkImageSubresource destSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001755 VkOffset3D destOffset;
1756 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001757} VkImageResolve;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001758
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001759typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001760{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001761 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001762 const void* pNext; // Pointer to next structure
1763 size_t codeSize; // Specified in bytes
1764 const void* pCode;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001765 VkFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001766} VkShaderCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001767
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001768typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001769{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001770 VkDescriptorType descriptorType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001771 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001772 VkFlags stageFlags; // VkShaderStageFlags
1773 const VkSampler* pImmutableSamplers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001774} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001775
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001776typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001777{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001778 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001779 const void* pNext; // Pointer to next structure
1780 uint32_t count; // Number of bindings in the descriptor set layout
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001781 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001782} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001783
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001784typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001785{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001786 VkDescriptorType type;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001787 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001788} VkDescriptorTypeCount;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001789
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001790typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001791{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001792 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001793 const void* pNext; // Pointer to next structure
1794 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001795 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001796} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001797
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001798typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001799{
1800 uint32_t bufferId;
1801 size_t bufferSize;
1802 const void* pBufferData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001803} VkLinkConstBuffer;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001804
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001805typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001806{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001807 uint32_t constantId; // The SpecConstant ID specified in the BIL
1808 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001809} VkSpecializationMapEntry;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001810
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001811typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001812{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001813 uint32_t mapEntryCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001814 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001815 const void* pData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001816} VkSpecializationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001817
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001818typedef struct VkPipelineShader_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001819{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001820 VkPipelineShaderStage stage;
1821 VkShader shader;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001822 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001823 const VkLinkConstBuffer* pLinkConstBufferInfo;
1824 const VkSpecializationInfo* pSpecializationInfo;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001825} VkPipelineShader;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001826
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001827typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001828{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001829 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001830 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001831 VkPipelineShader cs;
1832 VkFlags flags; // VkPipelineCreateFlags
1833 VkDescriptorSetLayoutChain setLayoutChain;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001834 uint32_t localSizeX;
1835 uint32_t localSizeY;
1836 uint32_t localSizeZ;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001837
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001838} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001839
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001840typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001841{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001842 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001843 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001844
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001845 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001846} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001847
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001848typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001849{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001850 uint32_t location; // location of the shader vertex attrib
1851 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001852
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001853 VkFormat format; // format of source data
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001854
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001855 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001856} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001857
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001858typedef struct VkPipelineVertexInputCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001859{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001860 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001861 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001862
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001863 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001864 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001865
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001866 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001867 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001868} VkPipelineVertexInputCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001869
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001870typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001871{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001872 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001873 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001874 VkPrimitiveTopology topology;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001875 bool32_t disableVertexReuse; // optional
1876 bool32_t primitiveRestartEnable;
1877 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001878} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001879
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001880typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001881{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001882 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001883 const void* pNext; // Pointer to next structure
1884 uint32_t patchControlPoints;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001885} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001886
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001887typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001888{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001889 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001890 const void* pNext; // Pointer to next structure
1891 uint32_t numViewports;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001892 VkCoordinateOrigin clipOrigin; // optional (GL45)
1893 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001894} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001895
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001896typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001897{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001898 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001899 const void* pNext; // Pointer to next structure
1900 bool32_t depthClipEnable;
1901 bool32_t rasterizerDiscardEnable;
1902 bool32_t programPointSize; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001903 VkCoordinateOrigin pointOrigin; // optional (GL45)
1904 VkProvokingVertexConvention provokingVertex; // optional (GL45)
1905 VkFillMode fillMode; // optional (GL45)
1906 VkCullMode cullMode;
1907 VkFaceOrientation frontFace;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001908} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001909
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001910typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001911{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001912 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001913 const void* pNext; // Pointer to next structure
1914 uint32_t samples;
1915 bool32_t multisampleEnable; // optional (GL45)
1916 bool32_t sampleShadingEnable; // optional (GL45)
1917 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001918 VkSampleMask sampleMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001919} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001920
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001921typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001922{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001923 bool32_t blendEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001924 VkFormat format;
1925 VkBlend srcBlendColor;
1926 VkBlend destBlendColor;
1927 VkBlendFunc blendFuncColor;
1928 VkBlend srcBlendAlpha;
1929 VkBlend destBlendAlpha;
1930 VkBlendFunc blendFuncAlpha;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001931 uint8_t channelWriteMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001932} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001933
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001934typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001935{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001936 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001937 const void* pNext; // Pointer to next structure
1938 bool32_t alphaToCoverageEnable;
1939 bool32_t logicOpEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001940 VkLogicOp logicOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001941 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001942 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001943} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001944
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001945typedef struct VkStencilOpState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001946{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001947 VkStencilOp stencilFailOp;
1948 VkStencilOp stencilPassOp;
1949 VkStencilOp stencilDepthFailOp;
1950 VkCompareFunc stencilFunc;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001951} VkStencilOpState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001952
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001953typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001954{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001955 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001956 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001957 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001958 bool32_t depthTestEnable;
1959 bool32_t depthWriteEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001960 VkCompareFunc depthFunc;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001961 bool32_t depthBoundsEnable; // optional (depth_bounds_test)
1962 bool32_t stencilTestEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001963 VkStencilOpState front;
1964 VkStencilOpState back;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001965} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001966
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001967typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001968{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001969 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001970 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001971 VkPipelineShader shader;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001972} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001973
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001974typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001975{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001976 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001977 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001978 VkFlags flags; // VkPipelineCreateFlags
1979 VkDescriptorSetLayoutChain pSetLayoutChain;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001980} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001981
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001982typedef struct VkSamplerCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001983{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001984 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001985 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001986 VkTexFilter magFilter; // Filter mode for magnification
1987 VkTexFilter minFilter; // Filter mode for minifiation
1988 VkTexMipmapMode mipMode; // Mipmap selection mode
1989 VkTexAddress addressU;
1990 VkTexAddress addressV;
1991 VkTexAddress addressW;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001992 float mipLodBias;
1993 uint32_t maxAnisotropy;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001994 VkCompareFunc compareFunc;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001995 float minLod;
1996 float maxLod;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001997 VkBorderColorType borderColorType;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001998} VkSamplerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001999
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002000typedef struct VkDynamicVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002001{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002002 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002003 const void* pNext; // Pointer to next structure
2004 uint32_t viewportAndScissorCount; // number of entries in pViewports and pScissors
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002005 const VkViewport* pViewports;
2006 const VkRect* pScissors;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002007} VkDynamicVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002008
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002009typedef struct VkDynamicRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002010{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002011 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002012 const void* pNext; // Pointer to next structure
2013 float depthBias;
2014 float depthBiasClamp;
2015 float slopeScaledDepthBias;
2016 float pointSize; // optional (GL45) - Size of points
2017 float pointFadeThreshold; // optional (GL45) - Size of point fade threshold
2018 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002019} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002020
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002021typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002022{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002023 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002024 const void* pNext; // Pointer to next structure
2025 float blendConst[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002026} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002027
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002028typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002029{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002030 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002031 const void* pNext; // Pointer to next structure
2032 float minDepth; // optional (depth_bounds_test)
2033 float maxDepth; // optional (depth_bounds_test)
2034 uint32_t stencilReadMask;
2035 uint32_t stencilWriteMask;
2036 uint32_t stencilFrontRef;
2037 uint32_t stencilBackRef;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002038} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002039
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002040typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002041{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002042 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002043 const void* pNext; // Pointer to next structure
2044 uint32_t queueNodeIndex;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002045 VkFlags flags;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002046} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002047
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002048typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002049{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002050 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002051 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002052
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002053 VkFlags flags; // VkCmdBufferBuildFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002054} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002055
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002056typedef struct VkRenderPassBegin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002057{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002058 VkRenderPass renderPass;
2059 VkFramebuffer framebuffer;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002060} VkRenderPassBegin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002061
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002062typedef struct VkCmdBufferGraphicsBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002063{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002064 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002065 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002066
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002067 VkRenderPassBegin renderPassContinue; // Only needed when a render pass is split across two command buffers
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002068} VkCmdBufferGraphicsBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002069
2070// 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 -06002071typedef union VkClearColorValue_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002072{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002073 float floatColor[4];
2074 uint32_t rawColor[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002075} VkClearColorValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002076
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002077typedef struct VkClearColor_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002078{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002079 VkClearColorValue color;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002080 bool32_t useRawValue;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002081} VkClearColor;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002082
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002083typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002084{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002085 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002086 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002087
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002088 VkRect renderArea;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002089 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002090 VkExtent2D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002091 uint32_t sampleCount;
2092 uint32_t layers;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002093 const VkFormat* pColorFormats;
2094 const VkImageLayout* pColorLayouts;
2095 const VkAttachmentLoadOp* pColorLoadOps;
2096 const VkAttachmentStoreOp* pColorStoreOps;
2097 const VkClearColor* pColorLoadClearValues;
2098 VkFormat depthStencilFormat;
2099 VkImageLayout depthStencilLayout;
2100 VkAttachmentLoadOp depthLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002101 float depthLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002102 VkAttachmentStoreOp depthStoreOp;
2103 VkAttachmentLoadOp stencilLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002104 uint32_t stencilLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002105 VkAttachmentStoreOp stencilStoreOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002106} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002107
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002108typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002109{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002110 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002111 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002112 VkFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002113} VkEventCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002114
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002115typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002116{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002117 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002118 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002119 VkFenceCreateFlags flags; // VkFenceCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002120} VkFenceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002121
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002122typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002123{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002124 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002125 const void* pNext; // Pointer to next structure
2126 uint32_t initialCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002127 VkFlags flags; // VkSemaphoreCreateFlags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002128} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002129
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002130typedef struct VkSemaphoreOpenInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002131{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002132 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002133 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002134 VkSemaphore sharedSemaphore;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002135} VkSemaphoreOpenInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002136
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002137typedef struct VkPipelineStatisticsData_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002138{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002139 uint64_t fsInvocations; // Fragment shader invocations
2140 uint64_t cPrimitives; // Clipper primitives
2141 uint64_t cInvocations; // Clipper invocations
2142 uint64_t vsInvocations; // Vertex shader invocations
2143 uint64_t gsInvocations; // Geometry shader invocations
2144 uint64_t gsPrimitives; // Geometry shader primitives
2145 uint64_t iaPrimitives; // Input primitives
2146 uint64_t iaVertices; // Input vertices
2147 uint64_t tcsInvocations; // Tessellation control shader invocations
2148 uint64_t tesInvocations; // Tessellation evaluation shader invocations
2149 uint64_t csInvocations; // Compute shader invocations
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002150} VkPipelineStatisticsData;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002151
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002152typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002153{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002154 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002155 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002156 VkQueryType queryType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002157 uint32_t slots;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002158} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002159
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002160typedef struct VkFramebufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002161{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002162 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002163 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002164
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002165 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002166 const VkColorAttachmentBindInfo* pColorAttachments;
2167 const VkDepthStencilBindInfo* pDepthStencilAttachment;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002168
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002169 uint32_t sampleCount;
2170 uint32_t width;
2171 uint32_t height;
2172 uint32_t layers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002173} VkFramebufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002174
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002175typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002176{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002177 uint32_t vertexCount;
2178 uint32_t instanceCount;
2179 uint32_t firstVertex;
2180 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002181} VkDrawIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002182
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002183typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002184{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002185 uint32_t indexCount;
2186 uint32_t instanceCount;
2187 uint32_t firstIndex;
2188 int32_t vertexOffset;
2189 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002190} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002191
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002192typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002193{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002194 uint32_t x;
2195 uint32_t y;
2196 uint32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002197} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002198
2199// ------------------------------------------------------------------------------------------------
2200// API functions
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002201typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2202typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
2203typedef VkResult (VKAPI *PFN_vkEnumerateGpus)(VkInstance instance, uint32_t maxGpus, uint32_t* pGpuCount, VkPhysicalGpu* pGpus);
2204typedef VkResult (VKAPI *PFN_vkGetGpuInfo)(VkPhysicalGpu gpu, VkPhysicalGpuInfoType infoType, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002205typedef void * (VKAPI *PFN_vkGetProcAddr)(VkPhysicalGpu gpu, const char * pName);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002206typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalGpu gpu, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
2207typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06002208typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionInfo)(VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
Tobin Ehlis01939012015-04-16 12:51:37 -06002209typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionInfo)(VkPhysicalGpu gpu, VkExtensionInfoType infoType, uint32_t extensionIndex, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002210typedef VkResult (VKAPI *PFN_vkEnumerateLayers)(VkPhysicalGpu gpu, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved);
2211typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2212typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
2213typedef VkResult (VKAPI *PFN_vkQueueAddMemReference)(VkQueue queue, VkGpuMemory mem);
2214typedef VkResult (VKAPI *PFN_vkQueueRemoveMemReference)(VkQueue queue, VkGpuMemory mem);
2215typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2216typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
2217typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkGpuMemory* pMem);
2218typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkGpuMemory mem);
2219typedef VkResult (VKAPI *PFN_vkSetMemoryPriority)(VkGpuMemory mem, VkMemoryPriority priority);
2220typedef VkResult (VKAPI *PFN_vkMapMemory)(VkGpuMemory mem, VkFlags flags, void** ppData);
2221typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkGpuMemory mem);
2222typedef VkResult (VKAPI *PFN_vkPinSystemMemory)(VkDevice device, const void* pSysMem, size_t memSize, VkGpuMemory* pMem);
2223typedef VkResult (VKAPI *PFN_vkGetMultiGpuCompatibility)(VkPhysicalGpu gpu0, VkPhysicalGpu gpu1, VkGpuCompatibilityInfo* pInfo);
2224typedef VkResult (VKAPI *PFN_vkOpenSharedMemory)(VkDevice device, const VkMemoryOpenInfo* pOpenInfo, VkGpuMemory* pMem);
2225typedef VkResult (VKAPI *PFN_vkOpenSharedSemaphore)(VkDevice device, const VkSemaphoreOpenInfo* pOpenInfo, VkSemaphore* pSemaphore);
2226typedef VkResult (VKAPI *PFN_vkOpenPeerMemory)(VkDevice device, const VkPeerMemoryOpenInfo* pOpenInfo, VkGpuMemory* pMem);
2227typedef VkResult (VKAPI *PFN_vkOpenPeerImage)(VkDevice device, const VkPeerImageOpenInfo* pOpenInfo, VkImage* pImage, VkGpuMemory* pMem);
2228typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkObject object);
2229typedef VkResult (VKAPI *PFN_vkGetObjectInfo)(VkBaseObject object, VkObjectInfoType infoType, size_t* pDataSize, void* pData);
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002230typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemory)(VkQueue queue, VkObject object, uint32_t allocationIdx, VkGpuMemory mem, VkGpuSize offset);
2231typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemoryRange)(VkQueue queue, VkObject object, uint32_t allocationIdx, VkGpuSize rangeOffset,VkGpuSize rangeSize, VkGpuMemory mem, VkGpuSize memOffset);
2232typedef VkResult (VKAPI *PFN_vkQueueBindImageMemoryRange)(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* bindInfo, VkGpuMemory mem, VkGpuSize memOffset);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002233typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
2234typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, VkFence* pFences);
2235typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkFence fence);
2236typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout);
2237typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2238typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2239typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2240typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
2241typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkEvent event);
2242typedef VkResult (VKAPI *PFN_vkSetEvent)(VkEvent event);
2243typedef VkResult (VKAPI *PFN_vkResetEvent)(VkEvent event);
2244typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
2245typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData);
2246typedef VkResult (VKAPI *PFN_vkGetFormatInfo)(VkDevice device, VkFormat format, VkFormatInfoType infoType, size_t* pDataSize, void* pData);
2247typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2248typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2249typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
2250typedef VkResult (VKAPI *PFN_vkGetImageSubresourceInfo)(VkImage image, const VkImageSubresource* pSubresource, VkSubresourceInfoType infoType, size_t* pDataSize, void* pData);
2251typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
2252typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView);
2253typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView);
2254typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
2255typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipeline)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2256typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelineDerivative)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline basePipeline, VkPipeline* pPipeline);
2257typedef VkResult (VKAPI *PFN_vkCreateComputePipeline)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2258typedef VkResult (VKAPI *PFN_vkStorePipeline)(VkPipeline pipeline, size_t* pDataSize, void* pData);
2259typedef VkResult (VKAPI *PFN_vkLoadPipeline)(VkDevice device, size_t dataSize, const void* pData, VkPipeline* pPipeline);
2260typedef VkResult (VKAPI *PFN_vkLoadPipelineDerivative)(VkDevice device, size_t dataSize, const void* pData, VkPipeline basePipeline, VkPipeline* pPipeline);
2261typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2262typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
2263typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayoutChain)(VkDevice device, uint32_t setLayoutArrayCount, const VkDescriptorSetLayout* pSetLayoutArray, VkDescriptorSetLayoutChain* pLayoutChain);
2264typedef VkResult (VKAPI *PFN_vkBeginDescriptorPoolUpdate)(VkDevice device, VkDescriptorUpdateMode updateMode);
2265typedef VkResult (VKAPI *PFN_vkEndDescriptorPoolUpdate)(VkDevice device, VkCmdBuffer cmd);
2266typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
2267typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDescriptorPool descriptorPool);
2268typedef 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 -06002269typedef void (VKAPI *PFN_vkClearDescriptorSets)(VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
2270typedef void (VKAPI *PFN_vkUpdateDescriptors)(VkDescriptorSet descriptorSet, uint32_t updateCount, const void** pUpdateArray);
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06002271typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2272typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2273typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2274typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002275typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2276typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2277typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2278typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002279typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2280typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
2281typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkDescriptorSetLayoutChain layoutChain, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData);
2282typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, VkIndexType indexType);
2283typedef void (VKAPI *PFN_vkCmdBindVertexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, uint32_t binding);
2284typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2285typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
2286typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, uint32_t count, uint32_t stride);
2287typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset, uint32_t count, uint32_t stride);
2288typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
2289typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkGpuSize offset);
2290typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2291typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
2292typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions);
2293typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2294typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2295typedef void (VKAPI *PFN_vkCmdCloneImageData)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout);
2296typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkGpuSize destOffset, VkGpuSize dataSize, const uint32_t* pData);
2297typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkGpuSize destOffset, VkGpuSize fillSize, uint32_t data);
2298typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, VkClearColor color, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
2299typedef void (VKAPI *PFN_vkCmdClearDepthStencil)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Tony Barbour6865d4a2015-04-13 15:02:52 -06002300typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002301typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
2302typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent);
2303typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, const VkEventWaitInfo* pWaitInfo);
2304typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, const VkPipelineBarrier* pBarrier);
2305typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags);
2306typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2307typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
2308typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkGpuSize destOffset);
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06002309typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkGpuSize destOffset, VkGpuSize destStride, VkFlags flags);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002310typedef void (VKAPI *PFN_vkCmdInitAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, const uint32_t* pData);
2311typedef void (VKAPI *PFN_vkCmdLoadAtomicCounters)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer srcBuffer, VkGpuSize srcOffset);
2312typedef 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 -06002313typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2314typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002315typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin);
2316typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer, VkRenderPass renderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002317
2318#ifdef VK_PROTOTYPES
2319
2320// GPU initialization
2321
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002322VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002323 const VkInstanceCreateInfo* pCreateInfo,
2324 VkInstance* pInstance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002325
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002326VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002327 VkInstance instance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002328
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002329VkResult VKAPI vkEnumerateGpus(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002330 VkInstance instance,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002331 uint32_t maxGpus,
2332 uint32_t* pGpuCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002333 VkPhysicalGpu* pGpus);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002334
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002335VkResult VKAPI vkGetGpuInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002336 VkPhysicalGpu gpu,
2337 VkPhysicalGpuInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002338 size_t* pDataSize,
2339 void* pData);
2340
2341void * VKAPI vkGetProcAddr(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002342 VkPhysicalGpu gpu,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002343 const char* pName);
2344
2345// Device functions
2346
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002347VkResult VKAPI vkCreateDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002348 VkPhysicalGpu gpu,
2349 const VkDeviceCreateInfo* pCreateInfo,
2350 VkDevice* pDevice);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002351
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002352VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002353 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002354
2355// Extension discovery functions
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06002356VkResult VKAPI vkGetGlobalExtensionInfo(
2357 VkExtensionInfoType infoType,
2358 uint32_t extensionIndex,
2359 size_t* pDataSize,
2360 void* pData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002361
Tobin Ehlis01939012015-04-16 12:51:37 -06002362VkResult VKAPI vkGetPhysicalDeviceExtensionInfo(
2363 VkPhysicalGpu gpu,
2364 VkExtensionInfoType infoType,
2365 uint32_t extensionIndex,
2366 size_t* pDataSize,
2367 void* pData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002368
2369// Layer discovery functions
2370
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002371VkResult VKAPI vkEnumerateLayers(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002372 VkPhysicalGpu gpu,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002373 size_t maxLayerCount,
2374 size_t maxStringSize,
2375 size_t* pOutLayerCount,
2376 char* const* pOutLayers,
2377 void* pReserved);
2378
2379// Queue functions
2380
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002381VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002382 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002383 uint32_t queueNodeIndex,
2384 uint32_t queueIndex,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002385 VkQueue* pQueue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002386
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002387VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002388 VkQueue queue,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002389 uint32_t cmdBufferCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002390 const VkCmdBuffer* pCmdBuffers,
2391 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002392
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002393VkResult VKAPI vkQueueAddMemReference(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002394 VkQueue queue,
2395 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002396
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002397VkResult VKAPI vkQueueRemoveMemReference(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002398 VkQueue queue,
2399 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002400
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002401VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002402 VkQueue queue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002403
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002404VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002405 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002406
2407// Memory functions
2408
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002409VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002410 VkDevice device,
2411 const VkMemoryAllocInfo* pAllocInfo,
2412 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002413
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002414VkResult VKAPI vkFreeMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002415 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002416
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002417VkResult VKAPI vkSetMemoryPriority(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002418 VkGpuMemory mem,
2419 VkMemoryPriority priority);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002420
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002421VkResult VKAPI vkMapMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002422 VkGpuMemory mem,
2423 VkFlags flags, // Reserved
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002424 void** ppData);
2425
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002426VkResult VKAPI vkUnmapMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002427 VkGpuMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002428
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002429VkResult VKAPI vkPinSystemMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002430 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002431 const void* pSysMem,
2432 size_t memSize,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002433 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002434
2435// Multi-device functions
2436
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002437VkResult VKAPI vkGetMultiGpuCompatibility(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002438 VkPhysicalGpu gpu0,
2439 VkPhysicalGpu gpu1,
2440 VkGpuCompatibilityInfo* pInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002441
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002442VkResult VKAPI vkOpenSharedMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002443 VkDevice device,
2444 const VkMemoryOpenInfo* pOpenInfo,
2445 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002446
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002447VkResult VKAPI vkOpenSharedSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002448 VkDevice device,
2449 const VkSemaphoreOpenInfo* pOpenInfo,
2450 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002451
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002452VkResult VKAPI vkOpenPeerMemory(
2453 VkDevice device,
2454 const VkPeerMemoryOpenInfo* pOpenInfo,
2455 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002456
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002457VkResult VKAPI vkOpenPeerImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002458 VkDevice device,
2459 const VkPeerImageOpenInfo* pOpenInfo,
2460 VkImage* pImage,
2461 VkGpuMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002462
2463// Generic API object functions
2464
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002465VkResult VKAPI vkDestroyObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002466 VkObject object);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002467
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002468VkResult VKAPI vkGetObjectInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002469 VkBaseObject object,
2470 VkObjectInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002471 size_t* pDataSize,
2472 void* pData);
2473
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002474// Memory namagement API functions
2475
2476VkResult VKAPI vkQueueBindObjectMemory(
2477 VkQueue queue,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002478 VkObject object,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002479 uint32_t allocationIdx,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002480 VkGpuMemory mem,
2481 VkGpuSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002482
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002483VkResult VKAPI vkQueueBindObjectMemoryRange(
2484 VkQueue queue,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002485 VkObject object,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002486 uint32_t allocationIdx,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002487 VkGpuSize rangeOffset,
2488 VkGpuSize rangeSize,
2489 VkGpuMemory mem,
2490 VkGpuSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002491
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002492VkResult VKAPI vkQueueBindImageMemoryRange(
2493 VkQueue queue,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002494 VkImage image,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002495 uint32_t allocationIdx,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002496 const VkImageMemoryBindInfo* bindInfo,
2497 VkGpuMemory mem,
2498 VkGpuSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002499
2500// Fence functions
2501
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002502VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002503 VkDevice device,
2504 const VkFenceCreateInfo* pCreateInfo,
2505 VkFence* pFence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002506
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002507VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002508 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002509 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002510 VkFence* pFences);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002511
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002512VkResult VKAPI vkGetFenceStatus(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002513 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002514
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002515VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002516 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002517 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002518 const VkFence* pFences,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002519 bool32_t waitAll,
2520 uint64_t timeout); // timeout in nanoseconds
2521
2522// Queue semaphore functions
2523
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002524VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002525 VkDevice device,
2526 const VkSemaphoreCreateInfo* pCreateInfo,
2527 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002528
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002529VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002530 VkQueue queue,
2531 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002532
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002533VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002534 VkQueue queue,
2535 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002536
2537// Event functions
2538
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002539VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002540 VkDevice device,
2541 const VkEventCreateInfo* pCreateInfo,
2542 VkEvent* pEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002543
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002544VkResult VKAPI vkGetEventStatus(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002545 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002546
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002547VkResult VKAPI vkSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002548 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002549
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002550VkResult VKAPI vkResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002551 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002552
2553// Query functions
2554
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002555VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002556 VkDevice device,
2557 const VkQueryPoolCreateInfo* pCreateInfo,
2558 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002559
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002560VkResult VKAPI vkGetQueryPoolResults(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002561 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002562 uint32_t startQuery,
2563 uint32_t queryCount,
2564 size_t* pDataSize,
2565 void* pData);
2566
2567// Format capabilities
2568
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002569VkResult VKAPI vkGetFormatInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002570 VkDevice device,
2571 VkFormat format,
2572 VkFormatInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002573 size_t* pDataSize,
2574 void* pData);
2575
2576// Buffer functions
2577
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002578VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002579 VkDevice device,
2580 const VkBufferCreateInfo* pCreateInfo,
2581 VkBuffer* pBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002582
2583// Buffer view functions
2584
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002585VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002586 VkDevice device,
2587 const VkBufferViewCreateInfo* pCreateInfo,
2588 VkBufferView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002589
2590// Image functions
2591
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002592VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002593 VkDevice device,
2594 const VkImageCreateInfo* pCreateInfo,
2595 VkImage* pImage);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002596
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002597VkResult VKAPI vkGetImageSubresourceInfo(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002598 VkImage image,
2599 const VkImageSubresource* pSubresource,
2600 VkSubresourceInfoType infoType,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002601 size_t* pDataSize,
2602 void* pData);
2603
2604// Image view functions
2605
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002606VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002607 VkDevice device,
2608 const VkImageViewCreateInfo* pCreateInfo,
2609 VkImageView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002610
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002611VkResult VKAPI vkCreateColorAttachmentView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002612 VkDevice device,
2613 const VkColorAttachmentViewCreateInfo* pCreateInfo,
2614 VkColorAttachmentView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002615
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002616VkResult VKAPI vkCreateDepthStencilView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002617 VkDevice device,
2618 const VkDepthStencilViewCreateInfo* pCreateInfo,
2619 VkDepthStencilView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002620
2621// Shader functions
2622
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002623VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002624 VkDevice device,
2625 const VkShaderCreateInfo* pCreateInfo,
2626 VkShader* pShader);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002627
2628// Pipeline functions
2629
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002630VkResult VKAPI vkCreateGraphicsPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002631 VkDevice device,
2632 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2633 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002634
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002635VkResult VKAPI vkCreateGraphicsPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002636 VkDevice device,
2637 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2638 VkPipeline basePipeline,
2639 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002640
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002641VkResult VKAPI vkCreateComputePipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002642 VkDevice device,
2643 const VkComputePipelineCreateInfo* pCreateInfo,
2644 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002645
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002646VkResult VKAPI vkStorePipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002647 VkPipeline pipeline,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002648 size_t* pDataSize,
2649 void* pData);
2650
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002651VkResult VKAPI vkLoadPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002652 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002653 size_t dataSize,
2654 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002655 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002656
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002657VkResult VKAPI vkLoadPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002658 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002659 size_t dataSize,
2660 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002661 VkPipeline basePipeline,
2662 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002663
2664// Sampler functions
2665
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002666VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002667 VkDevice device,
2668 const VkSamplerCreateInfo* pCreateInfo,
2669 VkSampler* pSampler);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002670
2671// Descriptor set functions
2672
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002673VkResult VKAPI vkCreateDescriptorSetLayout(
2674 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002675 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2676 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002677
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002678VkResult VKAPI vkCreateDescriptorSetLayoutChain(
2679 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002680 uint32_t setLayoutArrayCount,
2681 const VkDescriptorSetLayout* pSetLayoutArray,
2682 VkDescriptorSetLayoutChain* pLayoutChain);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002683
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002684VkResult VKAPI vkBeginDescriptorPoolUpdate(
2685 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002686 VkDescriptorUpdateMode updateMode);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002687
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002688VkResult VKAPI vkEndDescriptorPoolUpdate(
2689 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002690 VkCmdBuffer cmd);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002691
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002692VkResult VKAPI vkCreateDescriptorPool(
2693 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002694 VkDescriptorPoolUsage poolUsage,
2695 uint32_t maxSets,
2696 const VkDescriptorPoolCreateInfo* pCreateInfo,
2697 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002698
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002699VkResult VKAPI vkResetDescriptorPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002700 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002701
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002702VkResult VKAPI vkAllocDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002703 VkDescriptorPool descriptorPool,
2704 VkDescriptorSetUsage setUsage,
2705 uint32_t count,
2706 const VkDescriptorSetLayout* pSetLayouts,
2707 VkDescriptorSet* pDescriptorSets,
2708 uint32_t* pCount);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002709
2710void VKAPI vkClearDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002711 VkDescriptorPool descriptorPool,
2712 uint32_t count,
2713 const VkDescriptorSet* pDescriptorSets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002714
2715void VKAPI vkUpdateDescriptors(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002716 VkDescriptorSet descriptorSet,
2717 uint32_t updateCount,
2718 const void** pUpdateArray);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002719
2720// State object functions
2721
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002722VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002723 VkDevice device,
2724 const VkDynamicVpStateCreateInfo* pCreateInfo,
2725 VkDynamicVpState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002726
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002727VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002728 VkDevice device,
2729 const VkDynamicRsStateCreateInfo* pCreateInfo,
2730 VkDynamicRsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002731
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002732VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002733 VkDevice device,
2734 const VkDynamicCbStateCreateInfo* pCreateInfo,
2735 VkDynamicCbState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002736
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002737VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002738 VkDevice device,
2739 const VkDynamicDsStateCreateInfo* pCreateInfo,
2740 VkDynamicDsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002741
2742// Command buffer functions
2743
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002744VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002745 VkDevice device,
2746 const VkCmdBufferCreateInfo* pCreateInfo,
2747 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002748
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002749VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002750 VkCmdBuffer cmdBuffer,
2751 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002752
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002753VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002754 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002755
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002756VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002757 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002758
2759// Command buffer building functions
2760
2761void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002762 VkCmdBuffer cmdBuffer,
2763 VkPipelineBindPoint pipelineBindPoint,
2764 VkPipeline pipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002765
2766void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002767 VkCmdBuffer cmdBuffer,
2768 VkStateBindPoint stateBindPoint,
2769 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002770
2771void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002772 VkCmdBuffer cmdBuffer,
2773 VkPipelineBindPoint pipelineBindPoint,
2774 VkDescriptorSetLayoutChain layoutChain,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002775 uint32_t layoutChainSlot,
2776 uint32_t count,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002777 const VkDescriptorSet* pDescriptorSets,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06002778 const uint32_t* pUserData);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002779
2780void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002781 VkCmdBuffer cmdBuffer,
2782 VkBuffer buffer,
2783 VkGpuSize offset,
2784 VkIndexType indexType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002785
2786void VKAPI vkCmdBindVertexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002787 VkCmdBuffer cmdBuffer,
2788 VkBuffer buffer,
2789 VkGpuSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002790 uint32_t binding);
2791
2792void VKAPI vkCmdDraw(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002793 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002794 uint32_t firstVertex,
2795 uint32_t vertexCount,
2796 uint32_t firstInstance,
2797 uint32_t instanceCount);
2798
2799void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002800 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002801 uint32_t firstIndex,
2802 uint32_t indexCount,
2803 int32_t vertexOffset,
2804 uint32_t firstInstance,
2805 uint32_t instanceCount);
2806
2807void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002808 VkCmdBuffer cmdBuffer,
2809 VkBuffer buffer,
2810 VkGpuSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002811 uint32_t count,
2812 uint32_t stride);
2813
2814void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002815 VkCmdBuffer cmdBuffer,
2816 VkBuffer buffer,
2817 VkGpuSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002818 uint32_t count,
2819 uint32_t stride);
2820
2821void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002822 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002823 uint32_t x,
2824 uint32_t y,
2825 uint32_t z);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002826
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002827void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002828 VkCmdBuffer cmdBuffer,
2829 VkBuffer buffer,
2830 VkGpuSize offset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002831
2832void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002833 VkCmdBuffer cmdBuffer,
2834 VkBuffer srcBuffer,
2835 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002836 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002837 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002838
2839void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002840 VkCmdBuffer cmdBuffer,
2841 VkImage srcImage,
2842 VkImageLayout srcImageLayout,
2843 VkImage destImage,
2844 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002845 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002846 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002847
2848void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002849 VkCmdBuffer cmdBuffer,
2850 VkImage srcImage,
2851 VkImageLayout srcImageLayout,
2852 VkImage destImage,
2853 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002854 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002855 const VkImageBlit* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002856
2857void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002858 VkCmdBuffer cmdBuffer,
2859 VkBuffer srcBuffer,
2860 VkImage destImage,
2861 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002862 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002863 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002864
2865void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002866 VkCmdBuffer cmdBuffer,
2867 VkImage srcImage,
2868 VkImageLayout srcImageLayout,
2869 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002870 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002871 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002872
2873void VKAPI vkCmdCloneImageData(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002874 VkCmdBuffer cmdBuffer,
2875 VkImage srcImage,
2876 VkImageLayout srcImageLayout,
2877 VkImage destImage,
2878 VkImageLayout destImageLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002879
2880void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002881 VkCmdBuffer cmdBuffer,
2882 VkBuffer destBuffer,
2883 VkGpuSize destOffset,
2884 VkGpuSize dataSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002885 const uint32_t* pData);
2886
2887void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002888 VkCmdBuffer cmdBuffer,
2889 VkBuffer destBuffer,
2890 VkGpuSize destOffset,
2891 VkGpuSize fillSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002892 uint32_t data);
2893
2894void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002895 VkCmdBuffer cmdBuffer,
2896 VkImage image,
2897 VkImageLayout imageLayout,
2898 VkClearColor color,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002899 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002900 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002901
2902void VKAPI vkCmdClearDepthStencil(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002903 VkCmdBuffer cmdBuffer,
2904 VkImage image,
2905 VkImageLayout imageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002906 float depth,
2907 uint32_t stencil,
2908 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002909 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002910
2911void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002912 VkCmdBuffer cmdBuffer,
2913 VkImage srcImage,
2914 VkImageLayout srcImageLayout,
2915 VkImage destImage,
2916 VkImageLayout destImageLayout,
Tony Barbour6865d4a2015-04-13 15:02:52 -06002917 uint32_t regionCount,
2918 const VkImageResolve* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002919
2920void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002921 VkCmdBuffer cmdBuffer,
2922 VkEvent event,
2923 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002924
2925void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002926 VkCmdBuffer cmdBuffer,
2927 VkEvent event,
2928 VkPipeEvent pipeEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002929
2930void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002931 VkCmdBuffer cmdBuffer,
2932 const VkEventWaitInfo* pWaitInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002933
2934void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002935 VkCmdBuffer cmdBuffer,
2936 const VkPipelineBarrier* pBarrier);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002937
2938void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002939 VkCmdBuffer cmdBuffer,
2940 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002941 uint32_t slot,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002942 VkFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002943
2944void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002945 VkCmdBuffer cmdBuffer,
2946 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002947 uint32_t slot);
2948
2949void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002950 VkCmdBuffer cmdBuffer,
2951 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002952 uint32_t startQuery,
2953 uint32_t queryCount);
2954
2955void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002956 VkCmdBuffer cmdBuffer,
2957 VkTimestampType timestampType,
2958 VkBuffer destBuffer,
2959 VkGpuSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002960
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06002961void VKAPI vkCmdCopyQueryPoolResults(
2962 VkCmdBuffer cmdBuffer,
2963 VkQueryPool queryPool,
2964 uint32_t startQuery,
2965 uint32_t queryCount,
2966 VkBuffer destBuffer,
2967 VkGpuSize destOffset,
2968 VkGpuSize destStride,
2969 VkFlags flags); // VkQueryResultFlags
2970
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002971void VKAPI vkCmdInitAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002972 VkCmdBuffer cmdBuffer,
2973 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002974 uint32_t startCounter,
2975 uint32_t counterCount,
2976 const uint32_t* pData);
2977
2978void VKAPI vkCmdLoadAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002979 VkCmdBuffer cmdBuffer,
2980 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002981 uint32_t startCounter,
2982 uint32_t counterCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002983 VkBuffer srcBuffer,
2984 VkGpuSize srcOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002985
2986void VKAPI vkCmdSaveAtomicCounters(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002987 VkCmdBuffer cmdBuffer,
2988 VkPipelineBindPoint pipelineBindPoint,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002989 uint32_t startCounter,
2990 uint32_t counterCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002991 VkBuffer destBuffer,
2992 VkGpuSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002993
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002994VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002995 VkDevice device,
2996 const VkFramebufferCreateInfo* pCreateInfo,
2997 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002998
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002999VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003000 VkDevice device,
3001 const VkRenderPassCreateInfo* pCreateInfo,
3002 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003003
3004void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003005 VkCmdBuffer cmdBuffer,
3006 const VkRenderPassBegin* pRenderPassBegin);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003007
3008void VKAPI vkCmdEndRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003009 VkCmdBuffer cmdBuffer,
3010 VkRenderPass renderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003011
3012#endif // VK_PROTOTYPES
3013
3014#ifdef __cplusplus
3015} // extern "C"
3016#endif // __cplusplus
3017
3018#endif // __VULKAN_H__