blob: 3856792972687e2341c32dbc69fec2c5a521f41d [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
Chia-I Wu0b50a1c2015-06-26 15:34:39 +080036#define VK_API_VERSION VK_MAKE_VERSION(0, 121, 0)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060037
38#ifdef __cplusplus
39extern "C"
40{
41#endif // __cplusplus
42
43/*
44***************************************************************************************************
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060045* Core Vulkan API
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060046***************************************************************************************************
47*/
48
Mike Stroyanb050c682015-04-17 12:36:38 -060049#if defined (__cplusplus) && (VK_UINTPTRLEAST64_MAX == UINTPTR_MAX)
50 #define VK_TYPE_SAFE_COMPATIBLE_HANDLES 1
51#endif
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060052
Mike Stroyanb050c682015-04-17 12:36:38 -060053#if defined(VK_TYPE_SAFE_COMPATIBLE_HANDLES) && !defined(VK_DISABLE_TYPE_SAFE_HANDLES)
54 #define VK_DEFINE_PTR_HANDLE(_obj) struct _obj##_T { char _dummy; }; typedef _obj##_T* _obj;
55 #define VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base) struct _obj##_T : public _base##_T {}; typedef _obj##_T* _obj;
56
57 #define VK_DEFINE_BASE_HANDLE(_obj) VK_DEFINE_PTR_HANDLE(_obj)
58 #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base)
59 #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base)
60#else
61 #define VK_DEFINE_BASE_HANDLE(_obj) typedef VkUintPtrLeast64 _obj;
62 #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) typedef uintptr_t _obj;
63 #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) typedef VkUintPtrLeast64 _obj;
64#endif
65
66VK_DEFINE_BASE_HANDLE(VkObject)
67
68VK_DEFINE_DISP_SUBCLASS_HANDLE(VkInstance, VkObject)
69VK_DEFINE_DISP_SUBCLASS_HANDLE(VkPhysicalDevice, VkObject)
70VK_DEFINE_DISP_SUBCLASS_HANDLE(VkDevice, VkObject)
71VK_DEFINE_DISP_SUBCLASS_HANDLE(VkQueue, VkObject)
72VK_DEFINE_DISP_SUBCLASS_HANDLE(VkCmdBuffer, VkObject)
73
74VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkNonDispatchable, VkObject)
75VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDeviceMemory, VkNonDispatchable)
76VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkBuffer, VkNonDispatchable)
77VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkBufferView, VkNonDispatchable)
78VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkImage, VkNonDispatchable)
79VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkImageView, VkNonDispatchable)
80VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkColorAttachmentView, VkNonDispatchable)
81VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDepthStencilView, VkNonDispatchable)
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -060082VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShaderModule, VkNonDispatchable)
Mike Stroyanb050c682015-04-17 12:36:38 -060083VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShader, VkNonDispatchable)
84VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipeline, VkNonDispatchable)
85VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipelineLayout, VkNonDispatchable)
86VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkSampler, VkNonDispatchable)
87VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorSet, VkNonDispatchable)
88VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorSetLayout, VkNonDispatchable)
89VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorPool, VkNonDispatchable)
90VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicStateObject, VkNonDispatchable)
91VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicVpState, VkDynamicStateObject)
92VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicRsState, VkDynamicStateObject)
93VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicCbState, VkDynamicStateObject)
94VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicDsState, VkDynamicStateObject)
95VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkFence, VkNonDispatchable)
96VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkSemaphore, VkNonDispatchable)
97VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkEvent, VkNonDispatchable)
98VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkQueryPool, VkNonDispatchable)
99VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkFramebuffer, VkNonDispatchable)
100VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkRenderPass, VkNonDispatchable)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600101
Tony Barbourd1c35722015-04-16 15:59:00 -0600102#define VK_MAX_PHYSICAL_DEVICE_NAME 256
Mike Stroyanb050c682015-04-17 12:36:38 -0600103#define VK_MAX_EXTENSION_NAME 256
Mark Lobodzinskieb68f0e2015-07-03 10:26:22 -0600104#define VK_MAX_DESCRIPTION 256
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -0600105#define VK_MAX_MEMORY_TYPES 32
106#define VK_MAX_MEMORY_HEAPS 16
107#define VK_LOD_CLAMP_NONE MAX_FLOAT
108#define VK_LAST_MIP_LEVEL UINT32_MAX
109#define VK_LAST_ARRAY_SLICE UINT32_MAX
Courtney Goeltzenleuchter62b2d432015-06-04 11:35:43 -0600110
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600111
Tony Barbourd1c35722015-04-16 15:59:00 -0600112#define VK_WHOLE_SIZE UINT64_MAX
113
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600114#define VK_TRUE 1
115#define VK_FALSE 0
116
117#define VK_NULL_HANDLE 0
118
119// This macro defines INT_MAX in enumerations to force compilers to use 32 bits
120// to represent them. This may or may not be necessary on some compilers. The
121// option to compile it out may allow compilers that warn about missing enumerants
122// in switch statements to be silenced.
Tony Barbourd1c35722015-04-16 15:59:00 -0600123// Using this macro is not needed for flag bit enums because those aren't used
124// as storage type anywhere.
125#define VK_MAX_ENUM(Prefix) VK_##Prefix##_MAX_ENUM = 0x7FFFFFFF
126
127// This macro defines the BEGIN_RANGE, END_RANGE, NUM, and MAX_ENUM constants for
128// the enumerations.
129#define VK_ENUM_RANGE(Prefix, First, Last) \
130 VK_##Prefix##_BEGIN_RANGE = VK_##Prefix##_##First, \
131 VK_##Prefix##_END_RANGE = VK_##Prefix##_##Last, \
132 VK_NUM_##Prefix = (VK_##Prefix##_END_RANGE - VK_##Prefix##_BEGIN_RANGE + 1), \
133 VK_MAX_ENUM(Prefix)
134
135// This is a helper macro to define the value of flag bit enum values.
136#define VK_BIT(bit) (1 << (bit))
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600137
138// ------------------------------------------------------------------------------------------------
139// Enumerations
140
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600141typedef enum VkImageLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600142{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600143 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
144 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access
145 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write
146 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write
147 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access
148 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access
Mark Lobodzinski2b3fa3d2015-07-01 15:18:26 -0600149 VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000006, // Optimal layout when image is used only as source of transfer operations
150 VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000007, // Optimal layout when image is used only as destination of transfer operations
Tony Barbour71a85122015-04-16 19:09:28 -0600151
Tony Barbourd1c35722015-04-16 15:59:00 -0600152 VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600153} VkImageLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600154
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600155typedef enum VkAttachmentLoadOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600156{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600157 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
158 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
159 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600160
Tony Barbourd1c35722015-04-16 15:59:00 -0600161 VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600162} VkAttachmentLoadOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600163
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600164typedef enum VkAttachmentStoreOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600165{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600166 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
167 VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001,
168 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600169
Tony Barbourd1c35722015-04-16 15:59:00 -0600170 VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600171} VkAttachmentStoreOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600172
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600173typedef enum VkImageType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600174{
Tony Barbourd1c35722015-04-16 15:59:00 -0600175 VK_IMAGE_TYPE_1D = 0x00000000,
176 VK_IMAGE_TYPE_2D = 0x00000001,
177 VK_IMAGE_TYPE_3D = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600178
Tony Barbourd1c35722015-04-16 15:59:00 -0600179 VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600180} VkImageType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600181
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600182typedef enum VkImageTiling_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600183{
Tony Barbourd1c35722015-04-16 15:59:00 -0600184 VK_IMAGE_TILING_LINEAR = 0x00000000,
185 VK_IMAGE_TILING_OPTIMAL = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600186
Tony Barbourd1c35722015-04-16 15:59:00 -0600187 VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600188} VkImageTiling;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600189
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600190typedef enum VkImageViewType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600191{
Tony Barbourd1c35722015-04-16 15:59:00 -0600192 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
193 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
194 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
195 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
Mark Lobodzinskie3f66112015-07-02 09:53:03 -0600196 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
197 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
198 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600199
Mark Lobodzinskie3f66112015-07-02 09:53:03 -0600200 VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE_ARRAY)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600201} VkImageViewType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600202
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600203typedef enum VkImageAspect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600204{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600205 VK_IMAGE_ASPECT_COLOR = 0x00000000,
206 VK_IMAGE_ASPECT_DEPTH = 0x00000001,
207 VK_IMAGE_ASPECT_STENCIL = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600208
Tony Barbourd1c35722015-04-16 15:59:00 -0600209 VK_ENUM_RANGE(IMAGE_ASPECT, COLOR, STENCIL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600210} VkImageAspect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600211
Tony Barbourd1c35722015-04-16 15:59:00 -0600212typedef enum VkBufferViewType_
213{
214 VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
215 VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
216
217 VK_ENUM_RANGE(BUFFER_VIEW_TYPE, RAW, FORMATTED)
218} VkBufferViewType;
219
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600220typedef enum VkChannelSwizzle_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600221{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600222 VK_CHANNEL_SWIZZLE_ZERO = 0x00000000,
223 VK_CHANNEL_SWIZZLE_ONE = 0x00000001,
224 VK_CHANNEL_SWIZZLE_R = 0x00000002,
225 VK_CHANNEL_SWIZZLE_G = 0x00000003,
226 VK_CHANNEL_SWIZZLE_B = 0x00000004,
227 VK_CHANNEL_SWIZZLE_A = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600228
Tony Barbourd1c35722015-04-16 15:59:00 -0600229 VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600230} VkChannelSwizzle;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600231
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600232typedef enum VkDescriptorType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600233{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600234 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600235 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
236 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
237 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
238 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
239 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600240 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600241 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600242 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600243 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600244
Tony Barbourd1c35722015-04-16 15:59:00 -0600245 VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600246} VkDescriptorType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600247
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600248typedef enum VkDescriptorPoolUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600249{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600250 VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000,
251 VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600252
Tony Barbourd1c35722015-04-16 15:59:00 -0600253 VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600254} VkDescriptorPoolUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600255
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600256typedef enum VkDescriptorSetUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600257{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600258 VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000,
259 VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600260
Tony Barbourd1c35722015-04-16 15:59:00 -0600261 VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600262} VkDescriptorSetUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600263
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600264typedef enum VkQueryType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600265{
Tony Barbourd1c35722015-04-16 15:59:00 -0600266 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -0600267 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, // Optional
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600268
Tony Barbourd1c35722015-04-16 15:59:00 -0600269 VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600270} VkQueryType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600271
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600272typedef enum VkTimestampType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600273{
Tony Barbourd1c35722015-04-16 15:59:00 -0600274 VK_TIMESTAMP_TYPE_TOP = 0x00000000,
275 VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600276
Tony Barbourd1c35722015-04-16 15:59:00 -0600277 VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600278} VkTimestampType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600279
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800280typedef enum VkRenderPassContents_
281{
282 VK_RENDER_PASS_CONTENTS_INLINE = 0x00000000,
283 VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 0x00000001,
284
285 VK_ENUM_RANGE(RENDER_PASS_CONTENTS, INLINE, SECONDARY_CMD_BUFFERS)
286} VkRenderPassContents;
287
Tony Barbourd1c35722015-04-16 15:59:00 -0600288typedef enum VkBorderColor_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600289{
Tony Barbour26b17f82015-06-25 16:56:44 -0600290 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
291 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
292 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
293 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
294 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
295 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600296
Tony Barbour26b17f82015-06-25 16:56:44 -0600297 VK_ENUM_RANGE(BORDER_COLOR, FLOAT_TRANSPARENT_BLACK, INT_OPAQUE_WHITE)
Tony Barbourd1c35722015-04-16 15:59:00 -0600298} VkBorderColor;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600299
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600300typedef enum VkPipelineBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600301{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600302 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000,
303 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600304
Tony Barbourd1c35722015-04-16 15:59:00 -0600305 VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600306} VkPipelineBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600307
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600308typedef enum VkStateBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600309{
Tony Barbourd1c35722015-04-16 15:59:00 -0600310 VK_STATE_BIND_POINT_VIEWPORT = 0x00000000,
311 VK_STATE_BIND_POINT_RASTER = 0x00000001,
312 VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002,
313 VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600314
Tony Barbourd1c35722015-04-16 15:59:00 -0600315 VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600316} VkStateBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600317
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600318typedef enum VkPrimitiveTopology_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600319{
Tony Barbourd1c35722015-04-16 15:59:00 -0600320 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
321 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
322 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
323 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
324 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
325 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
326 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ = 0x00000006,
327 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ = 0x00000007,
328 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ = 0x00000008,
329 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ = 0x00000009,
330 VK_PRIMITIVE_TOPOLOGY_PATCH = 0x0000000a,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600331
Tony Barbourd1c35722015-04-16 15:59:00 -0600332 VK_ENUM_RANGE(PRIMITIVE_TOPOLOGY, POINT_LIST, PATCH)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600333} VkPrimitiveTopology;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600334
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800335typedef enum VkCmdBufferLevel_
336{
337 VK_CMD_BUFFER_LEVEL_PRIMARY = 0x00000000,
338 VK_CMD_BUFFER_LEVEL_SECONDARY = 0x00000001,
339
340 VK_ENUM_RANGE(CMD_BUFFER_LEVEL, PRIMARY, SECONDARY)
341} VkCmdBufferLevel;
342
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600343typedef enum VkIndexType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600344{
Mark Lobodzinski75721e82015-07-02 10:03:43 -0600345 VK_INDEX_TYPE_UINT16 = 0x00000000,
346 VK_INDEX_TYPE_UINT32 = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600347
Mark Lobodzinski75721e82015-07-02 10:03:43 -0600348 VK_ENUM_RANGE(INDEX_TYPE, UINT16, UINT32)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600349} VkIndexType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600350
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600351typedef enum VkTexFilter_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600352{
Tony Barbourd1c35722015-04-16 15:59:00 -0600353 VK_TEX_FILTER_NEAREST = 0x00000000,
354 VK_TEX_FILTER_LINEAR = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600355
Tony Barbourd1c35722015-04-16 15:59:00 -0600356 VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600357} VkTexFilter;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600358
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600359typedef enum VkTexMipmapMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600360{
Tony Barbourd1c35722015-04-16 15:59:00 -0600361 VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level
362 VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level
363 VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600364
Tony Barbourd1c35722015-04-16 15:59:00 -0600365 VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600366} VkTexMipmapMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600367
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600368typedef enum VkTexAddress_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600369{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600370 VK_TEX_ADDRESS_WRAP = 0x00000000,
371 VK_TEX_ADDRESS_MIRROR = 0x00000001,
372 VK_TEX_ADDRESS_CLAMP = 0x00000002,
373 VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
374 VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600375
Tony Barbourd1c35722015-04-16 15:59:00 -0600376 VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600377} VkTexAddress;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600378
Tony Barbourd1c35722015-04-16 15:59:00 -0600379typedef enum VkCompareOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600380{
Tony Barbourd1c35722015-04-16 15:59:00 -0600381 VK_COMPARE_OP_NEVER = 0x00000000,
382 VK_COMPARE_OP_LESS = 0x00000001,
383 VK_COMPARE_OP_EQUAL = 0x00000002,
384 VK_COMPARE_OP_LESS_EQUAL = 0x00000003,
385 VK_COMPARE_OP_GREATER = 0x00000004,
386 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
387 VK_COMPARE_OP_GREATER_EQUAL = 0x00000006,
388 VK_COMPARE_OP_ALWAYS = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600389
Tony Barbourd1c35722015-04-16 15:59:00 -0600390 VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS)
391} VkCompareOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600392
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600393typedef enum VkFillMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600394{
Tony Barbourd1c35722015-04-16 15:59:00 -0600395 VK_FILL_MODE_POINTS = 0x00000000,
396 VK_FILL_MODE_WIREFRAME = 0x00000001,
397 VK_FILL_MODE_SOLID = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600398
Tony Barbourd1c35722015-04-16 15:59:00 -0600399 VK_ENUM_RANGE(FILL_MODE, POINTS, SOLID)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600400} VkFillMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600401
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600402typedef enum VkCullMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600403{
Tony Barbourd1c35722015-04-16 15:59:00 -0600404 VK_CULL_MODE_NONE = 0x00000000,
405 VK_CULL_MODE_FRONT = 0x00000001,
406 VK_CULL_MODE_BACK = 0x00000002,
407 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600408
Tony Barbourd1c35722015-04-16 15:59:00 -0600409 VK_ENUM_RANGE(CULL_MODE, NONE, FRONT_AND_BACK)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600410} VkCullMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600411
Tony Barbourd1c35722015-04-16 15:59:00 -0600412typedef enum VkFrontFace_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600413{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600414 VK_FRONT_FACE_CCW = 0x00000000,
415 VK_FRONT_FACE_CW = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600416
Tony Barbourd1c35722015-04-16 15:59:00 -0600417 VK_ENUM_RANGE(FRONT_FACE, CCW, CW)
418} VkFrontFace;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600419
Tony Barbourd1c35722015-04-16 15:59:00 -0600420typedef enum VkProvokingVertex_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600421{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600422 VK_PROVOKING_VERTEX_FIRST = 0x00000000,
423 VK_PROVOKING_VERTEX_LAST = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600424
Tony Barbourd1c35722015-04-16 15:59:00 -0600425 VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST)
426} VkProvokingVertex;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600427
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600428typedef enum VkCoordinateOrigin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600429{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600430 VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
431 VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600432
Tony Barbourd1c35722015-04-16 15:59:00 -0600433 VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600434} VkCoordinateOrigin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600435
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600436typedef enum VkDepthMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600437{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600438 VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000,
439 VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600440
Tony Barbourd1c35722015-04-16 15:59:00 -0600441 VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600442} VkDepthMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600443
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600444typedef enum VkBlend_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600445{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600446 VK_BLEND_ZERO = 0x00000000,
447 VK_BLEND_ONE = 0x00000001,
448 VK_BLEND_SRC_COLOR = 0x00000002,
449 VK_BLEND_ONE_MINUS_SRC_COLOR = 0x00000003,
450 VK_BLEND_DEST_COLOR = 0x00000004,
451 VK_BLEND_ONE_MINUS_DEST_COLOR = 0x00000005,
452 VK_BLEND_SRC_ALPHA = 0x00000006,
453 VK_BLEND_ONE_MINUS_SRC_ALPHA = 0x00000007,
454 VK_BLEND_DEST_ALPHA = 0x00000008,
455 VK_BLEND_ONE_MINUS_DEST_ALPHA = 0x00000009,
456 VK_BLEND_CONSTANT_COLOR = 0x0000000a,
457 VK_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
458 VK_BLEND_CONSTANT_ALPHA = 0x0000000c,
459 VK_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
460 VK_BLEND_SRC_ALPHA_SATURATE = 0x0000000e,
461 VK_BLEND_SRC1_COLOR = 0x0000000f,
462 VK_BLEND_ONE_MINUS_SRC1_COLOR = 0x00000010,
463 VK_BLEND_SRC1_ALPHA = 0x00000011,
464 VK_BLEND_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600465
Tony Barbourd1c35722015-04-16 15:59:00 -0600466 VK_ENUM_RANGE(BLEND, ZERO, ONE_MINUS_SRC1_ALPHA)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600467} VkBlend;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600468
Tony Barbourd1c35722015-04-16 15:59:00 -0600469typedef enum VkBlendOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600470{
Tony Barbourd1c35722015-04-16 15:59:00 -0600471 VK_BLEND_OP_ADD = 0x00000000,
472 VK_BLEND_OP_SUBTRACT = 0x00000001,
473 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
474 VK_BLEND_OP_MIN = 0x00000003,
475 VK_BLEND_OP_MAX = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600476
Tony Barbourd1c35722015-04-16 15:59:00 -0600477 VK_ENUM_RANGE(BLEND_OP, ADD, MAX)
478} VkBlendOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600479
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600480typedef enum VkStencilOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600481{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600482 VK_STENCIL_OP_KEEP = 0x00000000,
483 VK_STENCIL_OP_ZERO = 0x00000001,
484 VK_STENCIL_OP_REPLACE = 0x00000002,
485 VK_STENCIL_OP_INC_CLAMP = 0x00000003,
486 VK_STENCIL_OP_DEC_CLAMP = 0x00000004,
487 VK_STENCIL_OP_INVERT = 0x00000005,
488 VK_STENCIL_OP_INC_WRAP = 0x00000006,
489 VK_STENCIL_OP_DEC_WRAP = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600490
Tony Barbourd1c35722015-04-16 15:59:00 -0600491 VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600492} VkStencilOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600493
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600494typedef enum VkLogicOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600495{
Tony Barbour6be764c2015-06-26 13:28:56 -0600496 VK_LOGIC_OP_CLEAR = 0x00000000,
497 VK_LOGIC_OP_AND = 0x00000001,
498 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
499 VK_LOGIC_OP_COPY = 0x00000003,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600500 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
501 VK_LOGIC_OP_NOOP = 0x00000005,
502 VK_LOGIC_OP_XOR = 0x00000006,
503 VK_LOGIC_OP_OR = 0x00000007,
504 VK_LOGIC_OP_NOR = 0x00000008,
505 VK_LOGIC_OP_EQUIV = 0x00000009,
506 VK_LOGIC_OP_INVERT = 0x0000000a,
507 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
508 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
509 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
510 VK_LOGIC_OP_NAND = 0x0000000e,
511 VK_LOGIC_OP_SET = 0x0000000f,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600512
Tony Barbour6be764c2015-06-26 13:28:56 -0600513 VK_ENUM_RANGE(LOGIC_OP, CLEAR, SET)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600514} VkLogicOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600515
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600516typedef enum VkSystemAllocType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600517{
Tony Barbourd1c35722015-04-16 15:59:00 -0600518 VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000,
519 VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001,
520 VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002,
521 VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003,
522 VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600523
Tony Barbourd1c35722015-04-16 15:59:00 -0600524 VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600525} VkSystemAllocType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600526
Tony Barbourd1c35722015-04-16 15:59:00 -0600527typedef enum VkPhysicalDeviceType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600528{
Tony Barbourd1c35722015-04-16 15:59:00 -0600529 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
530 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
531 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
532 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
533 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600534
Tony Barbourd1c35722015-04-16 15:59:00 -0600535 VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU)
536} VkPhysicalDeviceType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600537
Tony Barbourd1c35722015-04-16 15:59:00 -0600538typedef enum VkVertexInputStepRate_
539{
540 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
541 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
542 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
543
544 VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW)
545} VkVertexInputStepRate;
546
Tony Barbourd1c35722015-04-16 15:59:00 -0600547// Vulkan format definitions
548typedef enum VkFormat_
549{
550 VK_FORMAT_UNDEFINED = 0x00000000,
551 VK_FORMAT_R4G4_UNORM = 0x00000001,
552 VK_FORMAT_R4G4_USCALED = 0x00000002,
553 VK_FORMAT_R4G4B4A4_UNORM = 0x00000003,
554 VK_FORMAT_R4G4B4A4_USCALED = 0x00000004,
555 VK_FORMAT_R5G6B5_UNORM = 0x00000005,
556 VK_FORMAT_R5G6B5_USCALED = 0x00000006,
557 VK_FORMAT_R5G5B5A1_UNORM = 0x00000007,
558 VK_FORMAT_R5G5B5A1_USCALED = 0x00000008,
559 VK_FORMAT_R8_UNORM = 0x00000009,
560 VK_FORMAT_R8_SNORM = 0x0000000A,
561 VK_FORMAT_R8_USCALED = 0x0000000B,
562 VK_FORMAT_R8_SSCALED = 0x0000000C,
563 VK_FORMAT_R8_UINT = 0x0000000D,
564 VK_FORMAT_R8_SINT = 0x0000000E,
565 VK_FORMAT_R8_SRGB = 0x0000000F,
566 VK_FORMAT_R8G8_UNORM = 0x00000010,
567 VK_FORMAT_R8G8_SNORM = 0x00000011,
568 VK_FORMAT_R8G8_USCALED = 0x00000012,
569 VK_FORMAT_R8G8_SSCALED = 0x00000013,
570 VK_FORMAT_R8G8_UINT = 0x00000014,
571 VK_FORMAT_R8G8_SINT = 0x00000015,
572 VK_FORMAT_R8G8_SRGB = 0x00000016,
573 VK_FORMAT_R8G8B8_UNORM = 0x00000017,
574 VK_FORMAT_R8G8B8_SNORM = 0x00000018,
575 VK_FORMAT_R8G8B8_USCALED = 0x00000019,
576 VK_FORMAT_R8G8B8_SSCALED = 0x0000001A,
577 VK_FORMAT_R8G8B8_UINT = 0x0000001B,
578 VK_FORMAT_R8G8B8_SINT = 0x0000001C,
579 VK_FORMAT_R8G8B8_SRGB = 0x0000001D,
580 VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E,
581 VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F,
582 VK_FORMAT_R8G8B8A8_USCALED = 0x00000020,
583 VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021,
584 VK_FORMAT_R8G8B8A8_UINT = 0x00000022,
585 VK_FORMAT_R8G8B8A8_SINT = 0x00000023,
586 VK_FORMAT_R8G8B8A8_SRGB = 0x00000024,
587 VK_FORMAT_R10G10B10A2_UNORM = 0x00000025,
588 VK_FORMAT_R10G10B10A2_SNORM = 0x00000026,
589 VK_FORMAT_R10G10B10A2_USCALED = 0x00000027,
590 VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028,
591 VK_FORMAT_R10G10B10A2_UINT = 0x00000029,
592 VK_FORMAT_R10G10B10A2_SINT = 0x0000002A,
593 VK_FORMAT_R16_UNORM = 0x0000002B,
594 VK_FORMAT_R16_SNORM = 0x0000002C,
595 VK_FORMAT_R16_USCALED = 0x0000002D,
596 VK_FORMAT_R16_SSCALED = 0x0000002E,
597 VK_FORMAT_R16_UINT = 0x0000002F,
598 VK_FORMAT_R16_SINT = 0x00000030,
599 VK_FORMAT_R16_SFLOAT = 0x00000031,
600 VK_FORMAT_R16G16_UNORM = 0x00000032,
601 VK_FORMAT_R16G16_SNORM = 0x00000033,
602 VK_FORMAT_R16G16_USCALED = 0x00000034,
603 VK_FORMAT_R16G16_SSCALED = 0x00000035,
604 VK_FORMAT_R16G16_UINT = 0x00000036,
605 VK_FORMAT_R16G16_SINT = 0x00000037,
606 VK_FORMAT_R16G16_SFLOAT = 0x00000038,
607 VK_FORMAT_R16G16B16_UNORM = 0x00000039,
608 VK_FORMAT_R16G16B16_SNORM = 0x0000003A,
609 VK_FORMAT_R16G16B16_USCALED = 0x0000003B,
610 VK_FORMAT_R16G16B16_SSCALED = 0x0000003C,
611 VK_FORMAT_R16G16B16_UINT = 0x0000003D,
612 VK_FORMAT_R16G16B16_SINT = 0x0000003E,
613 VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F,
614 VK_FORMAT_R16G16B16A16_UNORM = 0x00000040,
615 VK_FORMAT_R16G16B16A16_SNORM = 0x00000041,
616 VK_FORMAT_R16G16B16A16_USCALED = 0x00000042,
617 VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043,
618 VK_FORMAT_R16G16B16A16_UINT = 0x00000044,
619 VK_FORMAT_R16G16B16A16_SINT = 0x00000045,
620 VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046,
621 VK_FORMAT_R32_UINT = 0x00000047,
622 VK_FORMAT_R32_SINT = 0x00000048,
623 VK_FORMAT_R32_SFLOAT = 0x00000049,
624 VK_FORMAT_R32G32_UINT = 0x0000004A,
625 VK_FORMAT_R32G32_SINT = 0x0000004B,
626 VK_FORMAT_R32G32_SFLOAT = 0x0000004C,
627 VK_FORMAT_R32G32B32_UINT = 0x0000004D,
628 VK_FORMAT_R32G32B32_SINT = 0x0000004E,
629 VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F,
630 VK_FORMAT_R32G32B32A32_UINT = 0x00000050,
631 VK_FORMAT_R32G32B32A32_SINT = 0x00000051,
632 VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052,
633 VK_FORMAT_R64_SFLOAT = 0x00000053,
634 VK_FORMAT_R64G64_SFLOAT = 0x00000054,
635 VK_FORMAT_R64G64B64_SFLOAT = 0x00000055,
636 VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056,
637 VK_FORMAT_R11G11B10_UFLOAT = 0x00000057,
638 VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058,
639 VK_FORMAT_D16_UNORM = 0x00000059,
640 VK_FORMAT_D24_UNORM = 0x0000005A,
641 VK_FORMAT_D32_SFLOAT = 0x0000005B,
642 VK_FORMAT_S8_UINT = 0x0000005C,
643 VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D,
644 VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E,
645 VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F,
646 VK_FORMAT_BC1_RGB_UNORM = 0x00000060,
647 VK_FORMAT_BC1_RGB_SRGB = 0x00000061,
648 VK_FORMAT_BC1_RGBA_UNORM = 0x00000062,
649 VK_FORMAT_BC1_RGBA_SRGB = 0x00000063,
650 VK_FORMAT_BC2_UNORM = 0x00000064,
651 VK_FORMAT_BC2_SRGB = 0x00000065,
652 VK_FORMAT_BC3_UNORM = 0x00000066,
653 VK_FORMAT_BC3_SRGB = 0x00000067,
654 VK_FORMAT_BC4_UNORM = 0x00000068,
655 VK_FORMAT_BC4_SNORM = 0x00000069,
656 VK_FORMAT_BC5_UNORM = 0x0000006A,
657 VK_FORMAT_BC5_SNORM = 0x0000006B,
658 VK_FORMAT_BC6H_UFLOAT = 0x0000006C,
659 VK_FORMAT_BC6H_SFLOAT = 0x0000006D,
660 VK_FORMAT_BC7_UNORM = 0x0000006E,
661 VK_FORMAT_BC7_SRGB = 0x0000006F,
662 VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070,
663 VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071,
664 VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072,
665 VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073,
666 VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074,
667 VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075,
668 VK_FORMAT_EAC_R11_UNORM = 0x00000076,
669 VK_FORMAT_EAC_R11_SNORM = 0x00000077,
670 VK_FORMAT_EAC_R11G11_UNORM = 0x00000078,
671 VK_FORMAT_EAC_R11G11_SNORM = 0x00000079,
672 VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A,
673 VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B,
674 VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C,
675 VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D,
676 VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E,
677 VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F,
678 VK_FORMAT_ASTC_6x5_UNORM = 0x00000080,
679 VK_FORMAT_ASTC_6x5_SRGB = 0x00000081,
680 VK_FORMAT_ASTC_6x6_UNORM = 0x00000082,
681 VK_FORMAT_ASTC_6x6_SRGB = 0x00000083,
682 VK_FORMAT_ASTC_8x5_UNORM = 0x00000084,
683 VK_FORMAT_ASTC_8x5_SRGB = 0x00000085,
684 VK_FORMAT_ASTC_8x6_UNORM = 0x00000086,
685 VK_FORMAT_ASTC_8x6_SRGB = 0x00000087,
686 VK_FORMAT_ASTC_8x8_UNORM = 0x00000088,
687 VK_FORMAT_ASTC_8x8_SRGB = 0x00000089,
688 VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A,
689 VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B,
690 VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C,
691 VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D,
692 VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E,
693 VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F,
694 VK_FORMAT_ASTC_10x10_UNORM = 0x00000090,
695 VK_FORMAT_ASTC_10x10_SRGB = 0x00000091,
696 VK_FORMAT_ASTC_12x10_UNORM = 0x00000092,
697 VK_FORMAT_ASTC_12x10_SRGB = 0x00000093,
698 VK_FORMAT_ASTC_12x12_UNORM = 0x00000094,
699 VK_FORMAT_ASTC_12x12_SRGB = 0x00000095,
700 VK_FORMAT_B4G4R4A4_UNORM = 0x00000096,
701 VK_FORMAT_B5G5R5A1_UNORM = 0x00000097,
702 VK_FORMAT_B5G6R5_UNORM = 0x00000098,
703 VK_FORMAT_B5G6R5_USCALED = 0x00000099,
704 VK_FORMAT_B8G8R8_UNORM = 0x0000009A,
705 VK_FORMAT_B8G8R8_SNORM = 0x0000009B,
706 VK_FORMAT_B8G8R8_USCALED = 0x0000009C,
707 VK_FORMAT_B8G8R8_SSCALED = 0x0000009D,
708 VK_FORMAT_B8G8R8_UINT = 0x0000009E,
709 VK_FORMAT_B8G8R8_SINT = 0x0000009F,
710 VK_FORMAT_B8G8R8_SRGB = 0x000000A0,
711 VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1,
712 VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2,
713 VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3,
714 VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4,
715 VK_FORMAT_B8G8R8A8_UINT = 0x000000A5,
716 VK_FORMAT_B8G8R8A8_SINT = 0x000000A6,
717 VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7,
718 VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8,
719 VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9,
720 VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA,
721 VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB,
722 VK_FORMAT_B10G10R10A2_UINT = 0x000000AC,
723 VK_FORMAT_B10G10R10A2_SINT = 0x000000AD,
724
725 VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT)
726} VkFormat;
727
728// Shader stage enumerant
729typedef enum VkShaderStage_
730{
731 VK_SHADER_STAGE_VERTEX = 0,
732 VK_SHADER_STAGE_TESS_CONTROL = 1,
733 VK_SHADER_STAGE_TESS_EVALUATION = 2,
734 VK_SHADER_STAGE_GEOMETRY = 3,
735 VK_SHADER_STAGE_FRAGMENT = 4,
736 VK_SHADER_STAGE_COMPUTE = 5,
737
738 VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE)
739} VkShaderStage;
740
741// Structure type enumerant
742typedef enum VkStructureType_
743{
Tony Barbour15fb0952015-06-26 15:02:35 -0600744 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
745 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
746 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
747 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 3,
748 VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 4,
749 VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 5,
750 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 6,
751 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 7,
752 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 8,
753 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 9,
754 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 10,
755 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 11,
756 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 12,
757 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 13,
758 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 14,
759 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 15,
760 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 16,
761 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 17,
762 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 18,
763 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 19,
764 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 20,
765 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 21,
766 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 22,
767 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 23,
768 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 24,
769 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 25,
770 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 26,
771 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 27,
772 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 28,
773 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 29,
774 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 30,
775 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 31,
776 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 32,
777 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 33,
778 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 34,
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800779
Tony Barbour15fb0952015-06-26 15:02:35 -0600780 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 36,
781 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 37,
782 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 38,
783 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 39,
784 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 40,
785 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 41,
786 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 42,
787 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 43,
788 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 44,
789 VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES = 45,
Tony Barbourd1c35722015-04-16 15:59:00 -0600790
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600791 VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, EXTENSION_PROPERTIES)
Tony Barbourd1c35722015-04-16 15:59:00 -0600792} VkStructureType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600793
Mike Stroyanb050c682015-04-17 12:36:38 -0600794// Object type enumerant
795typedef enum VkObjectType_
796{
797 VK_OBJECT_TYPE_INSTANCE = 0,
798 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1,
799 VK_OBJECT_TYPE_DEVICE = 2,
800 VK_OBJECT_TYPE_QUEUE = 3,
801 VK_OBJECT_TYPE_COMMAND_BUFFER = 4,
802 VK_OBJECT_TYPE_DEVICE_MEMORY = 5,
803 VK_OBJECT_TYPE_BUFFER = 6,
804 VK_OBJECT_TYPE_BUFFER_VIEW = 7,
805 VK_OBJECT_TYPE_IMAGE = 8,
806 VK_OBJECT_TYPE_IMAGE_VIEW = 9,
807 VK_OBJECT_TYPE_COLOR_ATTACHMENT_VIEW = 10,
808 VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW = 11,
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -0600809 VK_OBJECT_TYPE_SHADER_MODULE = 12,
810 VK_OBJECT_TYPE_SHADER = 13,
811 VK_OBJECT_TYPE_PIPELINE = 14,
812 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 15,
813 VK_OBJECT_TYPE_SAMPLER = 16,
814 VK_OBJECT_TYPE_DESCRIPTOR_SET = 17,
815 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 18,
816 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 19,
817 VK_OBJECT_TYPE_DYNAMIC_VP_STATE = 20,
818 VK_OBJECT_TYPE_DYNAMIC_RS_STATE = 21,
819 VK_OBJECT_TYPE_DYNAMIC_CB_STATE = 22,
820 VK_OBJECT_TYPE_DYNAMIC_DS_STATE = 23,
821 VK_OBJECT_TYPE_FENCE = 24,
822 VK_OBJECT_TYPE_SEMAPHORE = 25,
823 VK_OBJECT_TYPE_EVENT = 26,
824 VK_OBJECT_TYPE_QUERY_POOL = 27,
825 VK_OBJECT_TYPE_FRAMEBUFFER = 28,
826 VK_OBJECT_TYPE_RENDER_PASS = 29,
Mike Stroyanb050c682015-04-17 12:36:38 -0600827
828 // Valid ranges for core Vulkan:
829 VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE,
830 VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_RENDER_PASS,
831 VK_NUM_OBJECT_TYPE = (VK_OBJECT_TYPE_END_RANGE - VK_OBJECT_TYPE_BEGIN_RANGE + 1),
832 VK_MAX_ENUM(VkObjectType)
833} VkObjectType;
834
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600835// ------------------------------------------------------------------------------------------------
836// Error and return codes
837
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600838typedef enum VkResult_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600839{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600840 // Return codes for successful operation execution (> = 0)
841 VK_SUCCESS = 0x0000000,
842 VK_UNSUPPORTED = 0x0000001,
843 VK_NOT_READY = 0x0000002,
844 VK_TIMEOUT = 0x0000003,
845 VK_EVENT_SET = 0x0000004,
846 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600847 VK_INCOMPLETE = 0x0000006,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600848
849 // Error codes (negative values)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600850 VK_ERROR_UNKNOWN = -(0x00000001),
851 VK_ERROR_UNAVAILABLE = -(0x00000002),
852 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
Tony Barbourd1c35722015-04-16 15:59:00 -0600853 VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004),
854 VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005),
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600855 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
856 VK_ERROR_DEVICE_LOST = -(0x00000007),
857 VK_ERROR_INVALID_POINTER = -(0x00000008),
858 VK_ERROR_INVALID_VALUE = -(0x00000009),
859 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
860 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
861 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
862 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600863 VK_ERROR_INVALID_LAYER = -(0x0000000E),
864 VK_ERROR_INVALID_FLAGS = -(0x0000000F),
865 VK_ERROR_INVALID_ALIGNMENT = -(0x00000010),
866 VK_ERROR_INVALID_FORMAT = -(0x00000011),
867 VK_ERROR_INVALID_IMAGE = -(0x00000012),
868 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000013),
869 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000014),
870 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000015),
871 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000016),
872 VK_ERROR_BAD_SHADER_CODE = -(0x00000017),
873 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000018),
874 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
875 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
876 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
877 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
878 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
879 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
880 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
881 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
882 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
Tony Barbourd1c35722015-04-16 15:59:00 -0600883
884 VK_MAX_ENUM(RESULT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600885} VkResult;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600886
887// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600888// Flags
889
890// Device creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -0600891typedef VkFlags VkDeviceCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600892
893// Queue capabilities
Tony Barbourd1c35722015-04-16 15:59:00 -0600894typedef VkFlags VkQueueFlags;
895typedef enum VkQueueFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600896{
Tony Barbourd1c35722015-04-16 15:59:00 -0600897 VK_QUEUE_GRAPHICS_BIT = VK_BIT(0), // Queue supports graphics operations
898 VK_QUEUE_COMPUTE_BIT = VK_BIT(1), // Queue supports compute operations
899 VK_QUEUE_DMA_BIT = VK_BIT(2), // Queue supports DMA operations
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500900 VK_QUEUE_SPARSE_MEMMGR_BIT = VK_BIT(3), // Queue supports sparse resource memory management operations
Tony Barbourd1c35722015-04-16 15:59:00 -0600901 VK_QUEUE_EXTENDED_BIT = VK_BIT(30), // Extended queue
902} VkQueueFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600903
Tony Barbourd1c35722015-04-16 15:59:00 -0600904// Memory properties passed into vkAllocMemory().
905typedef VkFlags VkMemoryPropertyFlags;
906typedef enum VkMemoryPropertyFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600907{
Tony Barbourd1c35722015-04-16 15:59:00 -0600908 VK_MEMORY_PROPERTY_DEVICE_ONLY = 0, // If otherwise stated, then allocate memory on device
909 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = VK_BIT(0), // Memory should be mappable by host
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600910 VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT = VK_BIT(1), // Memory may not have i/o coherency so vkFlushMappedMemoryRanges and
911 // vkInvalidateMappedMemoryRanges must be used flush/invalidate host cache
Tony Barbourd1c35722015-04-16 15:59:00 -0600912 VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = VK_BIT(2), // Memory should not be cached by the host
913 VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = VK_BIT(3), // Memory should support host write combining
Tony Barbourd1c35722015-04-16 15:59:00 -0600914} VkMemoryPropertyFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600915
Tony Barbourd1c35722015-04-16 15:59:00 -0600916// Memory output flags passed to resource transition commands
917typedef VkFlags VkMemoryOutputFlags;
918typedef enum VkMemoryOutputFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600919{
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600920 VK_MEMORY_OUTPUT_HOST_WRITE_BIT = VK_BIT(0), // Controls output coherency of host writes
Tony Barbourd1c35722015-04-16 15:59:00 -0600921 VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes
922 VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes
923 VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes
924 VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations
925} VkMemoryOutputFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600926
Tony Barbourd1c35722015-04-16 15:59:00 -0600927// Memory input flags passed to resource transition commands
928typedef VkFlags VkMemoryInputFlags;
929typedef enum VkMemoryInputFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600930{
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600931 VK_MEMORY_INPUT_HOST_READ_BIT = VK_BIT(0), // Controls input coherency of host reads
Tony Barbourd1c35722015-04-16 15:59:00 -0600932 VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads
933 VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches
934 VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches
935 VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads
936 VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads
937 VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads
938 VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads
939 VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(8), // Controls input coherency of transfer operations
940} VkMemoryInputFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600941
Tony Barbourd1c35722015-04-16 15:59:00 -0600942// Buffer usage flags
943typedef VkFlags VkBufferUsageFlags;
944typedef enum VkBufferUsageFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600945{
Tony Barbourd1c35722015-04-16 15:59:00 -0600946 VK_BUFFER_USAGE_GENERAL = 0, // No special usage
947 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
948 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
949 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(2), // Can be used as TBO
950 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(3), // Can be used as IBO
951 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = VK_BIT(4), // Can be used as UBO
952 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = VK_BIT(5), // Can be used as SSBO
953 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = VK_BIT(6), // Can be used as source of fixed function index fetch (index buffer)
954 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = VK_BIT(7), // Can be used as source of fixed function vertex fetch (VBO)
955 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = VK_BIT(8), // Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
956} VkBufferUsageFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600957
Tony Barbourd1c35722015-04-16 15:59:00 -0600958// Buffer creation flags
959typedef VkFlags VkBufferCreateFlags;
960typedef enum VkBufferCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600961{
Courtney Goeltzenleuchter908aa752015-06-18 17:01:41 -0600962 VK_BUFFER_CREATE_SPARSE_BIT = VK_BIT(0), // Buffer should support sparse backing
Tony Barbourd1c35722015-04-16 15:59:00 -0600963} VkBufferCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600964
Tony Barbourd1c35722015-04-16 15:59:00 -0600965// Shader stage flags
966typedef VkFlags VkShaderStageFlags;
967typedef enum VkShaderStageFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600968{
Tony Barbourd1c35722015-04-16 15:59:00 -0600969 VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0),
970 VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1),
971 VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2),
972 VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3),
973 VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4),
974 VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5),
975
976 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
977} VkShaderStageFlagBits;
978
979// Image usage flags
980typedef VkFlags VkImageUsageFlags;
981typedef enum VkImageUsageFlagBits_
982{
983 VK_IMAGE_USAGE_GENERAL = 0, // No special usage
984 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
985 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
986 VK_IMAGE_USAGE_SAMPLED_BIT = VK_BIT(2), // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
987 VK_IMAGE_USAGE_STORAGE_BIT = VK_BIT(3), // Can be used as storage image (STORAGE_IMAGE descriptor type)
988 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = VK_BIT(4), // Can be used as framebuffer color attachment
989 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = VK_BIT(5), // Can be used as framebuffer depth/stencil attachment
990 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = VK_BIT(6), // Image data not needed outside of rendering
991} VkImageUsageFlagBits;
992
993// Image creation flags
994typedef VkFlags VkImageCreateFlags;
995typedef enum VkImageCreateFlagBits_
996{
997 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = VK_BIT(0),
Courtney Goeltzenleuchter908aa752015-06-18 17:01:41 -0600998 VK_IMAGE_CREATE_SPARSE_BIT = VK_BIT(1), // Image should support sparse backing
999 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = VK_BIT(2), // Allows image views to have different format than the base image
1000 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = VK_BIT(3), // Allows creating image views with cube type from the created image
Tony Barbourd1c35722015-04-16 15:59:00 -06001001} VkImageCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001002
1003// Depth-stencil view creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001004typedef VkFlags VkDepthStencilViewCreateFlags;
1005typedef enum VkDepthStencilViewCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001006{
Tony Barbourd1c35722015-04-16 15:59:00 -06001007 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_DEPTH_BIT = VK_BIT(0),
1008 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = VK_BIT(1),
1009} VkDepthStencilViewCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001010
1011// Pipeline creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001012typedef VkFlags VkPipelineCreateFlags;
1013typedef enum VkPipelineCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001014{
Tony Barbourd1c35722015-04-16 15:59:00 -06001015 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0),
1016 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1),
1017} VkPipelineCreateFlagBits;
1018
1019// Channel flags
1020typedef VkFlags VkChannelFlags;
1021typedef enum VkChannelFlagBits_
1022{
1023 VK_CHANNEL_R_BIT = VK_BIT(0),
1024 VK_CHANNEL_G_BIT = VK_BIT(1),
1025 VK_CHANNEL_B_BIT = VK_BIT(2),
1026 VK_CHANNEL_A_BIT = VK_BIT(3),
1027} VkChannelFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001028
1029// Fence creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001030typedef VkFlags VkFenceCreateFlags;
1031typedef enum VkFenceCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001032{
Tony Barbourd1c35722015-04-16 15:59:00 -06001033 VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0),
1034} VkFenceCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001035
1036// Semaphore creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001037typedef VkFlags VkSemaphoreCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001038
1039// Format capability flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001040typedef VkFlags VkFormatFeatureFlags;
1041typedef enum VkFormatFeatureFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001042{
Tony Barbourd1c35722015-04-16 15:59:00 -06001043 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1044 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1045 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images
1046 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs)
1047 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs)
1048 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers
1049 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs)
1050 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images
1051 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images
1052 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images
1053 VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits
1054} VkFormatFeatureFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001055
Tony Barbour0b2cfb22015-06-29 16:20:35 -06001056// Pipeline stage flags
1057typedef enum {
1058 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = VK_BIT(0),
1059 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = VK_BIT(1),
1060 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = VK_BIT(2),
1061 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = VK_BIT(3),
1062 VK_PIPELINE_STAGE_TESS_CONTROL_SHADER_BIT = VK_BIT(4),
1063 VK_PIPELINE_STAGE_TESS_EVALUATION_SHADER_BIT = VK_BIT(5),
1064 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = VK_BIT(6),
1065 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = VK_BIT(7),
1066 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = VK_BIT(8),
1067 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = VK_BIT(9),
1068 VK_PIPELINE_STAGE_ATTACHMENT_OUTPUT_BIT = VK_BIT(10),
1069 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = VK_BIT(11),
1070 VK_PIPELINE_STAGE_TRANSFER_BIT = VK_BIT(12),
1071 VK_PIPELINE_STAGE_HOST_BIT = VK_BIT(13),
1072 VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF,
1073 VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF,
1074} VkPipelineStageFlagBits;
1075
1076typedef VkFlags VkPipelineStageFlags;
1077
Chris Forbesd9be82b2015-06-22 17:21:59 +12001078// Image aspect flags
1079typedef VkFlags VkImageAspectFlags;
1080typedef enum VkImageAspectFlagBits_
1081{
1082 VK_IMAGE_ASPECT_COLOR_BIT = VK_BIT(0),
1083 VK_IMAGE_ASPECT_DEPTH_BIT = VK_BIT(1),
1084 VK_IMAGE_ASPECT_STENCIL_BIT = VK_BIT(2),
1085} VkImageAspectFlagBits;
1086
Tony Barbourd1c35722015-04-16 15:59:00 -06001087// Query control flags
1088typedef VkFlags VkQueryControlFlags;
1089typedef enum VkQueryControlFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001090{
Tony Barbourd1c35722015-04-16 15:59:00 -06001091 VK_QUERY_CONTROL_CONSERVATIVE_BIT = VK_BIT(0), // Allow conservative results to be collected by the query
1092} VkQueryControlFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001093
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001094// Query result flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001095typedef VkFlags VkQueryResultFlags;
1096typedef enum VkQueryResultFlagBits_
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001097{
Courtney Goeltzenleuchter48d7bac2015-06-09 08:45:23 -06001098 VK_QUERY_RESULT_DEFAULT = 0, // Results of the queries are immediately written to the destination buffer as 32-bit values
Tony Barbourd1c35722015-04-16 15:59:00 -06001099 VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values
Tony Barbourd1c35722015-04-16 15:59:00 -06001100 VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy
1101 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written
1102 VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available
1103} VkQueryResultFlagBits;
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001104
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06001105// Shader module creation flags
1106typedef VkFlags VkShaderModuleCreateFlags;
1107
Tony Barbourd1c35722015-04-16 15:59:00 -06001108// Shader creation flags
1109typedef VkFlags VkShaderCreateFlags;
1110
1111// Event creation flags
1112typedef VkFlags VkEventCreateFlags;
1113
1114// Command buffer creation flags
1115typedef VkFlags VkCmdBufferCreateFlags;
1116
1117// Command buffer optimization flags
1118typedef VkFlags VkCmdBufferOptimizeFlags;
1119typedef enum VkCmdBufferOptimizeFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001120{
Tony Barbourd1c35722015-04-16 15:59:00 -06001121 VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0),
1122 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1),
1123 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2),
1124 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3),
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001125 VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT = 0x00000010,
Tony Barbourd1c35722015-04-16 15:59:00 -06001126} VkCmdBufferOptimizeFlagBits;
1127
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06001128// Pipeline statistics flags
1129typedef VkFlags VkQueryPipelineStatisticFlags;
1130typedef enum VkQueryPipelineStatisticFlagBits_ {
1131 VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = VK_BIT(0), // Optional
1132 VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = VK_BIT(1), // Optional
1133 VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = VK_BIT(2), // Optional
1134 VK_QUERY_PIPELINE_STATISTIC_GS_INVOCATIONS_BIT = VK_BIT(3), // Optional
1135 VK_QUERY_PIPELINE_STATISTIC_GS_PRIMITIVES_BIT = VK_BIT(4), // Optional
1136 VK_QUERY_PIPELINE_STATISTIC_C_INVOCATIONS_BIT = VK_BIT(5), // Optional
1137 VK_QUERY_PIPELINE_STATISTIC_C_PRIMITIVES_BIT = VK_BIT(6), // Optional
1138 VK_QUERY_PIPELINE_STATISTIC_FS_INVOCATIONS_BIT = VK_BIT(7), // Optional
1139 VK_QUERY_PIPELINE_STATISTIC_TCS_PATCHES_BIT = VK_BIT(8), // Optional
1140 VK_QUERY_PIPELINE_STATISTIC_TES_INVOCATIONS_BIT = VK_BIT(9), // Optional
1141 VK_QUERY_PIPELINE_STATISTIC_CS_INVOCATIONS_BIT = VK_BIT(10), // Optional
1142} VkQueryPipelineStatisticFlagBits;
1143
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06001144// Memory mapping flags
1145typedef VkFlags VkMemoryMapFlags;
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06001146
Mark Lobodzinski3fbc9c22015-07-02 17:09:57 -06001147// Memory heap flags
1148typedef VkFlags VkMemoryHeapFlags;
1149typedef enum VkMemoryHeapFlagBits_ {
1150 VK_MEMORY_HEAP_HOST_LOCAL = VK_BIT(0), // If set, heap represents host memory
1151} VkMemoryHeapFlagBits;
1152
1153
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001154// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001155// Vulkan structures
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001156
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001157typedef struct VkOffset2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001158{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001159 int32_t x;
1160 int32_t y;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001161} VkOffset2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001162
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001163typedef struct VkOffset3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001164{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001165 int32_t x;
1166 int32_t y;
1167 int32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001168} VkOffset3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001169
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001170typedef struct VkExtent2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001171{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001172 int32_t width;
1173 int32_t height;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001174} VkExtent2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001175
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001176typedef struct VkExtent3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001177{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001178 int32_t width;
1179 int32_t height;
1180 int32_t depth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001181} VkExtent3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001182
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001183typedef struct VkViewport_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001184{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001185 float originX;
1186 float originY;
1187 float width;
1188 float height;
1189 float minDepth;
1190 float maxDepth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001191} VkViewport;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001192
Chris Forbesd9be82b2015-06-22 17:21:59 +12001193typedef struct VkRect2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001194{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001195 VkOffset2D offset;
1196 VkExtent2D extent;
Chris Forbesd9be82b2015-06-22 17:21:59 +12001197} VkRect2D;
1198
1199typedef struct VkRect3D_
1200{
1201 VkOffset3D offset;
1202 VkExtent3D extent;
1203} VkRect3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001204
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001205typedef struct VkChannelMapping_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001206{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001207 VkChannelSwizzle r;
1208 VkChannelSwizzle g;
1209 VkChannelSwizzle b;
1210 VkChannelSwizzle a;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001211} VkChannelMapping;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001212
Tony Barbourd1c35722015-04-16 15:59:00 -06001213typedef struct VkPhysicalDeviceProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001214{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001215 uint32_t apiVersion;
1216 uint32_t driverVersion;
1217 uint32_t vendorId;
1218 uint32_t deviceId;
Tony Barbourd1c35722015-04-16 15:59:00 -06001219 VkPhysicalDeviceType deviceType;
1220 char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
Tony Barbourd1c35722015-04-16 15:59:00 -06001221} VkPhysicalDeviceProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001222
Chris Forbesbc0bb772015-06-21 22:55:02 +12001223typedef struct VkPhysicalDeviceFeatures_
1224{
Chris Forbes658ec0d2015-06-21 20:09:12 +12001225 bool32_t robustBufferAccess;
1226 bool32_t fullDrawIndexUint32;
1227 bool32_t imageCubeArray;
1228 bool32_t independentBlend;
1229 bool32_t geometryShader;
1230 bool32_t tessellationShader;
1231 bool32_t sampleRateShading;
1232 bool32_t dualSourceBlend;
1233 bool32_t logicOp;
1234 bool32_t instancedDrawIndirect;
1235 bool32_t depthClip;
1236 bool32_t depthBiasClamp;
1237 bool32_t fillModeNonSolid;
1238 bool32_t depthBounds;
1239 bool32_t wideLines;
1240 bool32_t largePoints;
1241 bool32_t textureCompressionETC2;
1242 bool32_t textureCompressionASTC_LDR;
1243 bool32_t textureCompressionBC;
1244 bool32_t pipelineStatisticsQuery;
1245 bool32_t vertexSideEffects;
1246 bool32_t tessellationSideEffects;
1247 bool32_t geometrySideEffects;
1248 bool32_t fragmentSideEffects;
1249 bool32_t shaderTessellationPointSize;
1250 bool32_t shaderGeometryPointSize;
1251 bool32_t shaderTextureGatherExtended;
1252 bool32_t shaderStorageImageExtendedFormats;
1253 bool32_t shaderStorageImageMultisample;
1254 bool32_t shaderStorageBufferArrayConstantIndexing;
1255 bool32_t shaderStorageImageArrayConstantIndexing;
1256 bool32_t shaderUniformBufferArrayDynamicIndexing;
1257 bool32_t shaderSampledImageArrayDynamicIndexing;
1258 bool32_t shaderStorageBufferArrayDynamicIndexing;
1259 bool32_t shaderStorageImageArrayDynamicIndexing;
1260 bool32_t shaderClipDistance;
1261 bool32_t shaderCullDistance;
1262 bool32_t shaderFloat64;
1263 bool32_t shaderInt64;
1264 bool32_t shaderFloat16;
1265 bool32_t shaderInt16;
Chris Forbesbc0bb772015-06-21 22:55:02 +12001266} VkPhysicalDeviceFeatures;
1267
1268typedef struct VkPhysicalDeviceLimits_
1269{
Chris Forbes658ec0d2015-06-21 20:09:12 +12001270 uint32_t maxImageDimension1D;
1271 uint32_t maxImageDimension2D;
1272 uint32_t maxImageDimension3D;
1273 uint32_t maxImageDimensionCube;
1274 uint32_t maxImageArrayLayers;
1275 uint32_t maxTexelBufferSize;
1276 uint32_t maxUniformBufferSize;
1277 uint32_t maxStorageBufferSize;
1278 uint32_t maxPushConstantsSize;
1279 uint32_t maxMemoryAllocationCount;
1280 VkDeviceSize maxInlineMemoryUpdateSize;
1281 uint32_t maxBoundDescriptorSets;
1282 uint32_t maxDescriptorSets;
1283 uint32_t maxPerStageDescriptorSamplers;
1284 uint32_t maxPerStageDescriptorUniformBuffers;
1285 uint32_t maxPerStageDescriptorStorageBuffers;
1286 uint32_t maxPerStageDescriptorSampledImages;
1287 uint32_t maxPerStageDescriptorStorageImages;
1288 uint32_t maxDescriptorSetSamplers;
1289 uint32_t maxDescriptorSetUniformBuffers;
1290 uint32_t maxDescriptorSetStorageBuffers;
1291 uint32_t maxDescriptorSetSampledImages;
1292 uint32_t maxDescriptorSetStorageImages;
1293 uint32_t maxVertexInputAttributes;
1294 uint32_t maxVertexInputAttributeOffset;
1295 uint32_t maxVertexInputBindingStride;
1296 uint32_t maxVertexOutputComponents;
1297 uint32_t maxTessGenLevel;
1298 uint32_t maxTessPatchSize;
1299 uint32_t maxTessControlPerVertexInputComponents;
1300 uint32_t maxTessControlPerVertexOutputComponents;
1301 uint32_t maxTessControlPerPatchOutputComponents;
1302 uint32_t maxTessControlTotalOutputComponents;
1303 uint32_t maxTessEvaluationInputComponents;
1304 uint32_t maxTessEvaluationOutputComponents;
1305 uint32_t maxGeometryShaderInvocations;
1306 uint32_t maxGeometryInputComponents;
1307 uint32_t maxGeometryOutputComponents;
1308 uint32_t maxGeometryOutputVertices;
1309 uint32_t maxGeometryTotalOutputComponents;
1310 uint32_t maxFragmentInputComponents;
1311 uint32_t maxFragmentOutputBuffers;
1312 uint32_t maxFragmentDualSourceBuffers;
1313 uint32_t maxFragmentCombinedOutputResources;
1314 uint32_t maxComputeSharedMemorySize;
1315 uint32_t maxComputeWorkGroupCount[3];
1316 uint32_t maxComputeWorkGroupInvocations;
1317 uint32_t maxComputeWorkGroupSize[3];
1318 uint32_t subPixelPrecisionBits;
1319 uint32_t subTexelPrecisionBits;
1320 uint32_t mipmapPrecisionBits;
1321 uint32_t maxDrawIndexedIndexValue;
1322 uint32_t maxDrawIndirectInstanceCount;
1323 bool32_t primitiveRestartForPatches;
1324 float maxSamplerLodBias;
1325 uint32_t maxSamplerAnisotropy;
1326 uint32_t maxViewports;
1327 uint32_t maxDynamicViewportStates;
1328 uint32_t maxViewportDimensions[2];
1329 float viewportBoundsRange[2];
1330 uint32_t viewportSubPixelBits;
1331 uint32_t minMemoryMapAlignment;
1332 uint32_t minTexelBufferOffsetAlignment;
1333 uint32_t minUniformBufferOffsetAlignment;
1334 uint32_t minStorageBufferOffsetAlignment;
1335 uint32_t minTexelOffset;
1336 uint32_t maxTexelOffset;
1337 uint32_t minTexelGatherOffset;
1338 uint32_t maxTexelGatherOffset;
1339 uint32_t minInterpolationOffset;
1340 uint32_t maxInterpolationOffset;
1341 uint32_t subPixelInterpolationOffsetBits;
1342 uint32_t maxFramebufferWidth;
1343 uint32_t maxFramebufferHeight;
1344 uint32_t maxFramebufferLayers;
1345 uint32_t maxFramebufferColorSamples;
1346 uint32_t maxFramebufferDepthSamples;
1347 uint32_t maxFramebufferStencilSamples;
1348 uint32_t maxColorAttachments;
1349 uint32_t maxSampledImageColorSamples;
1350 uint32_t maxSampledImageDepthSamples;
1351 uint32_t maxSampledImageIntegerSamples;
1352 uint32_t maxStorageImageSamples;
1353 uint32_t maxSampleMaskWords;
1354 uint64_t timestampFrequency;
1355 uint32_t maxClipDistances;
1356 uint32_t maxCullDistances;
1357 uint32_t maxCombinedClipAndCullDistances;
1358 float pointSizeRange[2];
1359 float lineWidthRange[2];
1360 float pointSizeGranularity;
1361 float lineWidthGranularity;
Chris Forbesbc0bb772015-06-21 22:55:02 +12001362} VkPhysicalDeviceLimits;
1363
1364
Tony Barbourd1c35722015-04-16 15:59:00 -06001365typedef struct VkPhysicalDevicePerformance_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001366{
Tony Barbourd1c35722015-04-16 15:59:00 -06001367 float maxDeviceClock;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001368 float aluPerClock;
1369 float texPerClock;
1370 float primsPerClock;
1371 float pixelsPerClock;
Tony Barbourd1c35722015-04-16 15:59:00 -06001372} VkPhysicalDevicePerformance;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001373
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001374typedef struct VkExtensionProperties_
1375{
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001376 char extName[VK_MAX_EXTENSION_NAME]; // extension name
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001377 uint32_t version; // version of the extension specification
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001378 uint32_t specVersion; // version number constructed via VK_API_VERSION
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001379} VkExtensionProperties;
1380
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001381typedef struct VkLayerProperties_
1382{
1383 char layerName[VK_MAX_EXTENSION_NAME]; // extension name
1384 uint32_t specVersion; // version of spec this layer is compatible with
1385 uint32_t implVersion; // version of the layer
1386 char description[VK_MAX_DESCRIPTION]; // additional description
1387} VkLayerProperties;
1388
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001389typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001390{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001391 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001392 const void* pNext; // Next structure in chain
1393 const char* pAppName;
1394 uint32_t appVersion;
1395 const char* pEngineName;
1396 uint32_t engineVersion;
1397 uint32_t apiVersion;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001398} VkApplicationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001399
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001400typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001401 void* pUserData,
1402 size_t size,
1403 size_t alignment,
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001404 VkSystemAllocType allocType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001405
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001406typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001407 void* pUserData,
1408 void* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001409
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001410typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001411{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001412 void* pUserData;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001413 PFN_vkAllocFunction pfnAlloc;
1414 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001415} VkAllocCallbacks;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001416
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001417typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001418{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001419 uint32_t queueNodeIndex;
1420 uint32_t queueCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001421} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001422
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001423typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001424{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001425 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001426 const void* pNext; // Pointer to next structure
1427 uint32_t queueRecordCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001428 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001429 uint32_t layerCount;
1430 const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001431 uint32_t extensionCount;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001432 const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value
Chris Forbesbc0bb772015-06-21 22:55:02 +12001433 const VkPhysicalDeviceFeatures* pEnabledFeatures;
Tony Barbourd1c35722015-04-16 15:59:00 -06001434 VkDeviceCreateFlags flags; // Device creation flags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001435} VkDeviceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001436
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001437typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001438{
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001439 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001440 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001441 const VkApplicationInfo* pAppInfo;
1442 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001443 uint32_t layerCount;
1444 const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001445 uint32_t extensionCount;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001446 const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001447} VkInstanceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001448
Tony Barbourd1c35722015-04-16 15:59:00 -06001449typedef struct VkPhysicalDeviceQueueProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001450{
Tony Barbourd1c35722015-04-16 15:59:00 -06001451 VkQueueFlags queueFlags; // Queue flags
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001452 uint32_t queueCount;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001453 bool32_t supportsTimestamps;
Tony Barbourd1c35722015-04-16 15:59:00 -06001454} VkPhysicalDeviceQueueProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001455
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001456typedef struct VkMemoryType_
1457{
1458 VkMemoryPropertyFlags propertyFlags; // Memory properties of this memory type
1459 uint32_t heapIndex; // Index of the memory heap allocations of this memory type are taken from
1460} VkMemoryType;
1461
1462typedef struct VkMemoryHeap_
1463{
1464 VkDeviceSize size; // Available memory in the heap
Mark Lobodzinski3fbc9c22015-07-02 17:09:57 -06001465 VkMemoryHeapFlags flags; // Flags for the heap
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001466} VkMemoryHeap;
1467
Tony Barbourd1c35722015-04-16 15:59:00 -06001468typedef struct VkPhysicalDeviceMemoryProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001469{
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001470 uint32_t memoryTypeCount;
1471 VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
1472 uint32_t memoryHeapCount;
1473 VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
Tony Barbourd1c35722015-04-16 15:59:00 -06001474} VkPhysicalDeviceMemoryProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001475
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001476typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001477{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001478 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001479 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001480 VkDeviceSize allocationSize; // Size of memory allocation
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001481 uint32_t memoryTypeIndex; // Index of the memory type to allocate from
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001482} VkMemoryAllocInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001483
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06001484typedef struct VkMappedMemoryRange_
1485{
1486 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
1487 const void* pNext; // Pointer to next structure
1488 VkDeviceMemory mem; // Mapped memory object
1489 VkDeviceSize offset; // Offset within the mapped memory the range starts from
1490 VkDeviceSize size; // Size of the range within the mapped memory
1491} VkMappedMemoryRange;
1492
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001493typedef struct VkMemoryRequirements_
1494{
1495 VkDeviceSize size; // Specified in bytes
1496 VkDeviceSize alignment; // Specified in bytes
1497 VkDeviceSize granularity; // Granularity at which memory can be bound to resource sub-ranges specified in bytes (usually the page size)
1498 uint32_t memoryTypeBits; // Bitfield of the allowed memory type indices into memoryTypes[] for this object
1499} VkMemoryRequirements;
1500
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001501typedef struct VkFormatProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001502{
Tony Barbourd1c35722015-04-16 15:59:00 -06001503 VkFormatFeatureFlags linearTilingFeatures; // Format features in case of linear tiling
1504 VkFormatFeatureFlags optimalTilingFeatures; // Format features in case of optimal tiling
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001505} VkFormatProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001506
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001507typedef struct VkDescriptorInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001508{
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001509 VkBufferView bufferView; // Buffer view to write to the descriptor (in case it's a buffer descriptor, otherwise should be VK_NULL_HANDLE)
1510 VkSampler sampler; // Sampler to write to the descriptor (in case it's a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor, otherwise should be VK_NULL_HANDLE)
1511 VkImageView imageView; // Image view to write to the descriptor (in case it's a SAMPLED_IMAGE, STORAGE_IMAGE, or COMBINED_IMAGE_SAMPLER descriptor, otherwise should be VK_NULL_HANDLE)
1512 VkImageLayout imageLayout; // Layout the image is expected to be in when accessed using this descriptor (only used if <imageView> is not VK_NULL_HANDLE)
1513} VkDescriptorInfo;
1514
1515typedef struct VkWriteDescriptorSet_
1516{
1517 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001518 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001519
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001520 VkDescriptorSet destSet; // Destination descriptor set
1521 uint32_t destBinding; // Binding within the destination descriptor set to write
1522 uint32_t destArrayElement; // Array element within the destination binding to write
1523
1524 uint32_t count; // Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
1525
1526 VkDescriptorType descriptorType; // Descriptor type to write (determines which fields of the array pointed by <pDescriptors> are going to be used)
1527 const VkDescriptorInfo* pDescriptors; // Array of info structures describing the descriptors to write
1528} VkWriteDescriptorSet;
1529
1530typedef struct VkCopyDescriptorSet_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001531{
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001532 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001533 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001534
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001535 VkDescriptorSet srcSet; // Source descriptor set
1536 uint32_t srcBinding; // Binding within the source descriptor set to copy from
1537 uint32_t srcArrayElement; // Array element within the source binding to copy from
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001538
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001539 VkDescriptorSet destSet; // Destination descriptor set
1540 uint32_t destBinding; // Binding within the destination descriptor set to copy to
1541 uint32_t destArrayElement; // Array element within the destination binding to copy to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001542
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001543 uint32_t count; // Number of descriptors to copy
1544} VkCopyDescriptorSet;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001545
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001546typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001547{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001548 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001549 const void* pNext; // Pointer to next structure.
Tony Barbourd1c35722015-04-16 15:59:00 -06001550 VkDeviceSize size; // Specified in bytes
1551 VkBufferUsageFlags usage; // Buffer usage flags
1552 VkBufferCreateFlags flags; // Buffer creation flags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001553} VkBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001554
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001555typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001556{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001557 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001558 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001559 VkBuffer buffer;
1560 VkBufferViewType viewType;
1561 VkFormat format; // Optionally specifies format of elements
Tony Barbourd1c35722015-04-16 15:59:00 -06001562 VkDeviceSize offset; // Specified in bytes
1563 VkDeviceSize range; // View size specified in bytes
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001564} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001565
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001566typedef struct VkImageSubresource_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001567{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001568 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001569 uint32_t mipLevel;
1570 uint32_t arraySlice;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001571} VkImageSubresource;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001572
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001573typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001574{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001575 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001576 uint32_t baseMipLevel;
1577 uint32_t mipLevels;
1578 uint32_t baseArraySlice;
1579 uint32_t arraySize;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001580} VkImageSubresourceRange;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001581
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001582typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001583{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001584 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001585 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001586
Tony Barbourd1c35722015-04-16 15:59:00 -06001587 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1588 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001589} VkMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001590
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001591typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001592{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001593 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001594 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001595
Tony Barbourd1c35722015-04-16 15:59:00 -06001596 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1597 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001598
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001599 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001600
Tony Barbourd1c35722015-04-16 15:59:00 -06001601 VkDeviceSize offset; // Offset within the buffer to sync
1602 VkDeviceSize size; // Amount of bytes to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001603} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001604
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001605typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001606{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001607 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001608 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001609
Tony Barbourd1c35722015-04-16 15:59:00 -06001610 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1611 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001612
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001613 VkImageLayout oldLayout; // Current layout of the image
1614 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001615
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001616 VkImage image; // Image to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001617
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001618 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001619} VkImageMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001620
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001621typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001622{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001623 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001624 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001625 VkImageType imageType;
1626 VkFormat format;
1627 VkExtent3D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001628 uint32_t mipLevels;
1629 uint32_t arraySize;
1630 uint32_t samples;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001631 VkImageTiling tiling;
Tony Barbourd1c35722015-04-16 15:59:00 -06001632 VkImageUsageFlags usage; // Image usage flags
1633 VkImageCreateFlags flags; // Image creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001634} VkImageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001635
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001636typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001637{
Tony Barbourd1c35722015-04-16 15:59:00 -06001638 VkDeviceSize offset; // Specified in bytes
1639 VkDeviceSize size; // Specified in bytes
1640 VkDeviceSize rowPitch; // Specified in bytes
1641 VkDeviceSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001642} VkSubresourceLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001643
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001644typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001645{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001646 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001647 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001648 VkImage image;
1649 VkImageViewType viewType;
1650 VkFormat format;
1651 VkChannelMapping channels;
1652 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001653} VkImageViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001654
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001655typedef struct VkColorAttachmentViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001656{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001657 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001658 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001659 VkImage image;
1660 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001661 uint32_t mipLevel;
1662 uint32_t baseArraySlice;
1663 uint32_t arraySize;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001664 VkImage msaaResolveImage;
1665 VkImageSubresourceRange msaaResolveSubResource;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001666} VkColorAttachmentViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001667
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001668typedef struct VkDepthStencilViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001669{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001670 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001671 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001672 VkImage image;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001673 uint32_t mipLevel;
1674 uint32_t baseArraySlice;
1675 uint32_t arraySize;
Tony Barbourd1c35722015-04-16 15:59:00 -06001676 VkDepthStencilViewCreateFlags flags; // Depth stencil attachment view flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001677} VkDepthStencilViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001678
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001679typedef struct VkColorAttachmentBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001680{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001681 VkColorAttachmentView view;
1682 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001683} VkColorAttachmentBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001684
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001685typedef struct VkDepthStencilBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001686{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001687 VkDepthStencilView view;
1688 VkImageLayout layout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001689} VkDepthStencilBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001690
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001691typedef struct VkBufferCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001692{
Tony Barbourd1c35722015-04-16 15:59:00 -06001693 VkDeviceSize srcOffset; // Specified in bytes
1694 VkDeviceSize destOffset; // Specified in bytes
1695 VkDeviceSize copySize; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001696} VkBufferCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001697
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001698typedef struct VkImageMemoryBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001699{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001700 VkImageSubresource subresource;
1701 VkOffset3D offset;
1702 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001703} VkImageMemoryBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001704
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001705typedef struct VkImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001706{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001707 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001708 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001709 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001710 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1711 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001712} VkImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001713
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001714typedef struct VkImageBlit_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001715{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001716 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001717 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1718 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001719 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001720 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1721 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001722} VkImageBlit;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001723
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001724typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001725{
Tony Barbourd1c35722015-04-16 15:59:00 -06001726 VkDeviceSize bufferOffset; // Specified in bytes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001727 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001728 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1729 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001730} VkBufferImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001731
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001732typedef struct VkImageResolve_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001733{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001734 VkImageSubresource srcSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001735 VkOffset3D srcOffset;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001736 VkImageSubresource destSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001737 VkOffset3D destOffset;
1738 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001739} VkImageResolve;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001740
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06001741typedef struct VkShaderModuleCreateInfo_
1742{
1743 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
1744 const void* pNext; // Pointer to next structure
1745 size_t codeSize; // Specified in bytes
1746 const void* pCode; // Binary code of size codeSize
1747 VkShaderModuleCreateFlags flags; // Reserved
1748} VkShaderModuleCreateInfo;
1749
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001750typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001751{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001752 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001753 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06001754 VkShaderModule module; // Module containing entry point
Courtney Goeltzenleuchteree4027d2015-06-28 13:01:17 -06001755 const char* pName; // Null-terminate entry point name
Tony Barbourd1c35722015-04-16 15:59:00 -06001756 VkShaderCreateFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001757} VkShaderCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001758
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001759typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001760{
Tony Barbourd1c35722015-04-16 15:59:00 -06001761 VkDescriptorType descriptorType; // Type of the descriptors in this binding
Chia-I Wu712bb5d2015-05-25 16:22:52 +08001762 uint32_t arraySize; // Number of descriptors in this binding
Tony Barbourd1c35722015-04-16 15:59:00 -06001763 VkShaderStageFlags stageFlags; // Shader stages this binding is visible to
1764 const VkSampler* pImmutableSamplers; // Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001765} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001766
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001767typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001768{
Tony Barbourd1c35722015-04-16 15:59:00 -06001769 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
1770 const void* pNext; // Pointer to next structure
1771 uint32_t count; // Number of bindings in the descriptor set layout
1772 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001773} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001774
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001775typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001776{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001777 VkDescriptorType type;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001778 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001779} VkDescriptorTypeCount;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001780
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001781typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001782{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001783 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001784 const void* pNext; // Pointer to next structure
1785 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001786 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001787} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001788
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001789typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001790{
1791 uint32_t bufferId;
1792 size_t bufferSize;
1793 const void* pBufferData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001794} VkLinkConstBuffer;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001795
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001796typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001797{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001798 uint32_t constantId; // The SpecConstant ID specified in the BIL
1799 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001800} VkSpecializationMapEntry;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001801
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001802typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001803{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001804 uint32_t mapEntryCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001805 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001806 const void* pData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001807} VkSpecializationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001808
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001809typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001810{
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001811 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
1812 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001813 VkShaderStage stage;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001814 VkShader shader;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001815 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001816 const VkLinkConstBuffer* pLinkConstBufferInfo;
1817 const VkSpecializationInfo* pSpecializationInfo;
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001818} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001819
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001820typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001821{
Tony Barbourd1c35722015-04-16 15:59:00 -06001822 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
1823 const void* pNext; // Pointer to next structure
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001824 VkPipelineShaderStageCreateInfo cs;
Tony Barbourd1c35722015-04-16 15:59:00 -06001825 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001826 VkPipelineLayout layout; // Interface layout of the pipeline
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001827} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001828
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001829typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001830{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001831 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001832 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001833
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001834 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001835} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001836
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001837typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001838{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001839 uint32_t location; // location of the shader vertex attrib
1840 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001841
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001842 VkFormat format; // format of source data
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001843
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001844 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001845} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001846
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001847typedef struct VkPipelineVertexInputStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001848{
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001849 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001850 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001851
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001852 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001853 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001854
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001855 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001856 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001857} VkPipelineVertexInputStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001858
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001859typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001860{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001861 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001862 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001863 VkPrimitiveTopology topology;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001864 bool32_t disableVertexReuse; // optional
1865 bool32_t primitiveRestartEnable;
1866 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001867} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001868
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001869typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001870{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001871 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001872 const void* pNext; // Pointer to next structure
1873 uint32_t patchControlPoints;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001874} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001875
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001876typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001877{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001878 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001879 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001880 uint32_t viewportCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001881 VkCoordinateOrigin clipOrigin; // optional (GL45)
1882 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001883} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001884
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001885typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001886{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001887 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001888 const void* pNext; // Pointer to next structure
1889 bool32_t depthClipEnable;
1890 bool32_t rasterizerDiscardEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001891 VkCoordinateOrigin pointOrigin; // optional (GL45)
Tony Barbourd1c35722015-04-16 15:59:00 -06001892 VkProvokingVertex provokingVertex; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001893 VkFillMode fillMode; // optional (GL45)
1894 VkCullMode cullMode;
Tony Barbourd1c35722015-04-16 15:59:00 -06001895 VkFrontFace frontFace;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001896} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001897
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001898typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001899{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001900 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001901 const void* pNext; // Pointer to next structure
Tony Barbourdfd533a2015-06-26 10:18:34 -06001902 uint32_t rasterSamples;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001903 bool32_t multisampleEnable; // optional (GL45)
1904 bool32_t sampleShadingEnable; // optional (GL45)
1905 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001906 VkSampleMask sampleMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001907} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001908
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001909typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001910{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001911 bool32_t blendEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001912 VkFormat format;
1913 VkBlend srcBlendColor;
1914 VkBlend destBlendColor;
Tony Barbourd1c35722015-04-16 15:59:00 -06001915 VkBlendOp blendOpColor;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001916 VkBlend srcBlendAlpha;
1917 VkBlend destBlendAlpha;
Tony Barbourd1c35722015-04-16 15:59:00 -06001918 VkBlendOp blendOpAlpha;
1919 VkChannelFlags channelWriteMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001920} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001921
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001922typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001923{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001924 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001925 const void* pNext; // Pointer to next structure
1926 bool32_t alphaToCoverageEnable;
1927 bool32_t logicOpEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001928 VkLogicOp logicOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001929 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001930 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001931} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001932
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001933typedef struct VkStencilOpState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001934{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001935 VkStencilOp stencilFailOp;
1936 VkStencilOp stencilPassOp;
1937 VkStencilOp stencilDepthFailOp;
Tony Barbourd1c35722015-04-16 15:59:00 -06001938 VkCompareOp stencilCompareOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001939} VkStencilOpState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001940
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001941typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001942{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001943 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001944 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001945 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001946 bool32_t depthTestEnable;
1947 bool32_t depthWriteEnable;
Tony Barbourd1c35722015-04-16 15:59:00 -06001948 VkCompareOp depthCompareOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001949 bool32_t depthBoundsEnable; // optional (depth_bounds_test)
1950 bool32_t stencilTestEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001951 VkStencilOpState front;
1952 VkStencilOpState back;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001953} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001954
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001955typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001956{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001957 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001958 const void* pNext; // Pointer to next structure
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001959 uint32_t stageCount;
1960 const VkPipelineShaderStageCreateInfo* pStages; // One entry for each active shader stage
1961 const VkPipelineVertexInputStateCreateInfo* pVertexInputState;
1962 const VkPipelineIaStateCreateInfo* pIaState;
1963 const VkPipelineTessStateCreateInfo* pTessState;
1964 const VkPipelineVpStateCreateInfo* pVpState;
1965 const VkPipelineRsStateCreateInfo* pRsState;
1966 const VkPipelineMsStateCreateInfo* pMsState;
1967 const VkPipelineDsStateCreateInfo* pDsState;
1968 const VkPipelineCbStateCreateInfo* pCbState;
Tony Barbourd1c35722015-04-16 15:59:00 -06001969 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001970 VkPipelineLayout layout; // Interface layout of the pipeline
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001971} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001972
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001973typedef struct VkPipelineLayoutCreateInfo_
1974{
1975 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
1976 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06001977
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001978 uint32_t descriptorSetCount; // Number of descriptor sets interfaced by the pipeline
1979 const VkDescriptorSetLayout* pSetLayouts; // Array of <setCount> number of descriptor set layout objects defining the layout of the
1980} VkPipelineLayoutCreateInfo;
1981
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;
Tony Barbourd1c35722015-04-16 15:59:00 -06001994 VkCompareOp compareOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001995 float minLod;
1996 float maxLod;
Tony Barbourd1c35722015-04-16 15:59:00 -06001997 VkBorderColor borderColor;
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;
Chris Forbesd9be82b2015-06-22 17:21:59 +12002006 const VkRect2D* 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;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002016 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002017} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002018
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002019typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002020{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002021 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002022 const void* pNext; // Pointer to next structure
2023 float blendConst[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002024} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002025
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002026typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002027{
Mark Lobodzinski365feea2015-06-12 11:14:17 -06002028 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
2029 const void* pNext; // Pointer to next structure
2030 float minDepthBounds; // optional (depth_bounds_test)
2031 float maxDepthBounds; // optional (depth_bounds_test)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002032 uint32_t stencilReadMask;
2033 uint32_t stencilWriteMask;
2034 uint32_t stencilFrontRef;
2035 uint32_t stencilBackRef;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002036} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002037
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002038typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002039{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002040 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002041 const void* pNext; // Pointer to next structure
2042 uint32_t queueNodeIndex;
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002043 VkCmdBufferLevel level;
Tony Barbourd1c35722015-04-16 15:59:00 -06002044 VkCmdBufferCreateFlags flags; // Command buffer creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002045} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002046
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002047typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002048{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002049 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002050 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002051
Tony Barbourd1c35722015-04-16 15:59:00 -06002052 VkCmdBufferOptimizeFlags flags; // Command buffer optimization flags
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002053
2054 VkRenderPass renderPass;
2055 VkFramebuffer framebuffer;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002056} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002057
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002058typedef struct VkRenderPassBegin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002059{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002060 VkRenderPass renderPass;
2061 VkFramebuffer framebuffer;
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002062 VkRenderPassContents contents;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002063} VkRenderPassBegin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002064
Chris Forbesf0796e12015-06-24 14:34:53 +12002065// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on format.
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002066typedef union VkClearColorValue_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002067{
Chris Forbesf0796e12015-06-24 14:34:53 +12002068 float f32[4];
2069 int32_t s32[4];
2070 uint32_t u32[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002071} VkClearColorValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002072
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002073typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002074{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002075 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002076 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002077
Chris Forbesd9be82b2015-06-22 17:21:59 +12002078 VkRect2D renderArea;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002079 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002080 VkExtent2D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002081 uint32_t sampleCount;
2082 uint32_t layers;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002083 const VkFormat* pColorFormats;
2084 const VkImageLayout* pColorLayouts;
2085 const VkAttachmentLoadOp* pColorLoadOps;
2086 const VkAttachmentStoreOp* pColorStoreOps;
Chris Forbesf0796e12015-06-24 14:34:53 +12002087 const VkClearColorValue* pColorLoadClearValues;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002088 VkFormat depthStencilFormat;
2089 VkImageLayout depthStencilLayout;
2090 VkAttachmentLoadOp depthLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002091 float depthLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002092 VkAttachmentStoreOp depthStoreOp;
2093 VkAttachmentLoadOp stencilLoadOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002094 uint32_t stencilLoadClearValue;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002095 VkAttachmentStoreOp stencilStoreOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002096} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002097
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002098typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002099{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002100 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002101 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002102 VkEventCreateFlags flags; // Event creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002103} VkEventCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002104
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002105typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002106{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002107 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002108 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002109 VkFenceCreateFlags flags; // Fence creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002110} VkFenceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002111
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002112typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002113{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002114 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002115 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002116 VkSemaphoreCreateFlags flags; // Semaphore creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002117} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002118
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002119typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002120{
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06002121 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
2122 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002123 VkQueryType queryType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002124 uint32_t slots;
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06002125 VkQueryPipelineStatisticFlags pipelineStatistics; // Optional
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002126} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002127
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002128typedef struct VkFramebufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002129{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002130 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002131 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002132
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002133 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002134 const VkColorAttachmentBindInfo* pColorAttachments;
2135 const VkDepthStencilBindInfo* pDepthStencilAttachment;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002136
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002137 uint32_t sampleCount;
2138 uint32_t width;
2139 uint32_t height;
2140 uint32_t layers;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002141} VkFramebufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002142
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002143typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002144{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002145 uint32_t vertexCount;
2146 uint32_t instanceCount;
2147 uint32_t firstVertex;
2148 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002149} VkDrawIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002150
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002151typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002152{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002153 uint32_t indexCount;
2154 uint32_t instanceCount;
2155 uint32_t firstIndex;
2156 int32_t vertexOffset;
2157 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002158} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002159
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002160typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002161{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002162 uint32_t x;
2163 uint32_t y;
2164 uint32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002165} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002166
2167// ------------------------------------------------------------------------------------------------
2168// API functions
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002169typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2170typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
Tony Barbourd1c35722015-04-16 15:59:00 -06002171typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
Chris Forbesbc0bb772015-06-21 22:55:02 +12002172typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
2173typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatInfo)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatInfo);
2174typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
Jon Ashburnb0fbe912015-05-06 10:15:07 -06002175typedef void * (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char * pName);
Jon Ashburn8d1b0b52015-05-18 13:20:15 -06002176typedef void * (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char * pName);
Tony Barbourd1c35722015-04-16 15:59:00 -06002177typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002178typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Tony Barbour59a47322015-06-24 16:06:58 -06002179typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
2180typedef VkResult (VKAPI *PFN_vkGetPhysicalDevicePerformance)(VkPhysicalDevice physicalDevice, VkPhysicalDevicePerformance* pPerformance);
2181typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount);
2182typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties);
2183typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperies);
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002184typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char * pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
2185typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t *pCount, VkExtensionProperties* pProperties);
2186typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties);
2187typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties* pProperties);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002188typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2189typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002190typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2191typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
Tony Barbourd1c35722015-04-16 15:59:00 -06002192typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
Mike Stroyanb050c682015-04-17 12:36:38 -06002193typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem);
Mike Stroyanb050c682015-04-17 12:36:38 -06002194typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
2195typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06002196typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
2197typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
Mike Stroyanb050c682015-04-17 12:36:38 -06002198typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkDevice device, VkObjectType objType, VkObject object);
Tony Barbour59a47322015-06-24 16:06:58 -06002199typedef VkResult (VKAPI *PFN_vkGetObjectMemoryRequirements)(VkDevice device, VkObjectType objType, VkObject object, VkMemoryRequirements* pMemoryRequirements);
Mark Lobodzinski23065352015-05-29 09:32:35 -05002200typedef VkResult (VKAPI *PFN_vkBindObjectMemory)(VkDevice device, VkObjectType objType, VkObject object, VkDeviceMemory mem, VkDeviceSize offset);
2201typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuffer buffer, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset);
2202typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002203typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -06002204typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
Mike Stroyanb050c682015-04-17 12:36:38 -06002205typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002206typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout);
2207typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2208typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2209typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2210typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
Mike Stroyanb050c682015-04-17 12:36:38 -06002211typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
2212typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event);
2213typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002214typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
Mike Stroyanb050c682015-04-17 12:36:38 -06002215typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002216typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2217typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2218typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
Tony Barbour59a47322015-06-24 16:06:58 -06002219typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002220typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
2221typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView);
2222typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView);
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06002223typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002224typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
2225typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipeline)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
2226typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelineDerivative)(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline basePipeline, VkPipeline* pPipeline);
2227typedef VkResult (VKAPI *PFN_vkCreateComputePipeline)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline);
Mike Stroyanb050c682015-04-17 12:36:38 -06002228typedef VkResult (VKAPI *PFN_vkStorePipeline)(VkDevice device, VkPipeline pipeline, size_t* pDataSize, void* pData);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002229typedef VkResult (VKAPI *PFN_vkLoadPipeline)(VkDevice device, size_t dataSize, const void* pData, VkPipeline* pPipeline);
2230typedef VkResult (VKAPI *PFN_vkLoadPipelineDerivative)(VkDevice device, size_t dataSize, const void* pData, VkPipeline basePipeline, VkPipeline* pPipeline);
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002231typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002232typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2233typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002234typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
Mike Stroyanb050c682015-04-17 12:36:38 -06002235typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
2236typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
Chia-I Wu9d00ed72015-05-25 16:27:55 +08002237typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06002238typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2239typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2240typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2241typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002242typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2243typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2244typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2245typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002246typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2247typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
Mark Lobodzinskif2093b62015-06-15 13:21:21 -06002248typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
Tony Barbourd1c35722015-04-16 15:59:00 -06002249typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
2250typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002251typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2252typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
Tony Barbourd1c35722015-04-16 15:59:00 -06002253typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
2254typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002255typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
Tony Barbourd1c35722015-04-16 15:59:00 -06002256typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002257typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2258typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -05002259typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002260typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2261typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
Tony Barbourd1c35722015-04-16 15:59:00 -06002262typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
2263typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
Chris Forbesf0796e12015-06-24 14:34:53 +12002264typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Chris Forbesd9be82b2015-06-22 17:21:59 +12002265typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Chris Forbesf0796e12015-06-24 14:34:53 +12002266typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
Chris Forbesd9be82b2015-06-22 17:21:59 +12002267typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects);
Tony Barbour6865d4a2015-04-13 15:02:52 -06002268typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Tony Barbour0b2cfb22015-06-29 16:20:35 -06002269typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
2270typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
2271typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void** ppMemBarriers);
2272typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, bool32_t byRegion, uint32_t memBarrierCount, const void** ppMemBarriers);
Tony Barbourd1c35722015-04-16 15:59:00 -06002273typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002274typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2275typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
Tony Barbourd1c35722015-04-16 15:59:00 -06002276typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
Tony Barbour71a85122015-04-16 19:09:28 -06002277typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002278typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2279typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002280typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin);
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002281typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer);
2282typedef void (VKAPI *PFN_vkCmdExecuteCommands)(VkCmdBuffer cmdBuffer, uint32_t cmdBuffersCount, const VkCmdBuffer* pCmdBuffers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002283
2284#ifdef VK_PROTOTYPES
2285
Tony Barbourd1c35722015-04-16 15:59:00 -06002286// Device initialization
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002287
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002288VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002289 const VkInstanceCreateInfo* pCreateInfo,
2290 VkInstance* pInstance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002291
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002292VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002293 VkInstance instance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002294
Jon Ashburn83a64252015-04-15 11:31:12 -06002295VkResult VKAPI vkEnumeratePhysicalDevices(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002296 VkInstance instance,
Jon Ashburn83a64252015-04-15 11:31:12 -06002297 uint32_t* pPhysicalDeviceCount,
Tony Barbourd1c35722015-04-16 15:59:00 -06002298 VkPhysicalDevice* pPhysicalDevices);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002299
Chris Forbesbc0bb772015-06-21 22:55:02 +12002300VkResult VKAPI vkGetPhysicalDeviceFeatures(
2301 VkPhysicalDevice physicalDevice,
2302 VkPhysicalDeviceFeatures* pFeatures);
2303
2304VkResult VKAPI vkGetPhysicalDeviceFormatInfo(
2305 VkPhysicalDevice physicalDevice,
2306 VkFormat format,
2307 VkFormatProperties* pFormatInfo);
2308
2309VkResult VKAPI vkGetPhysicalDeviceLimits(
2310 VkPhysicalDevice physicalDevice,
2311 VkPhysicalDeviceLimits* pLimits);
2312
Jon Ashburnb0fbe912015-05-06 10:15:07 -06002313void * VKAPI vkGetInstanceProcAddr(
2314 VkInstance instance,
2315 const char* pName);
2316
Jon Ashburn8d1b0b52015-05-18 13:20:15 -06002317void * VKAPI vkGetDeviceProcAddr(
2318 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002319 const char* pName);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002320// Device functions
2321
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002322VkResult VKAPI vkCreateDevice(
Tony Barbourd1c35722015-04-16 15:59:00 -06002323 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002324 const VkDeviceCreateInfo* pCreateInfo,
2325 VkDevice* pDevice);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002326
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002327VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002328 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002329
Tony Barbour59a47322015-06-24 16:06:58 -06002330VkResult VKAPI vkGetPhysicalDeviceProperties(
2331 VkPhysicalDevice physicalDevice,
2332 VkPhysicalDeviceProperties* pProperties);
2333
2334VkResult VKAPI vkGetPhysicalDevicePerformance(
2335 VkPhysicalDevice physicalDevice,
2336 VkPhysicalDevicePerformance* pPerformance);
2337
2338VkResult VKAPI vkGetPhysicalDeviceQueueCount(
2339 VkPhysicalDevice physicalDevice,
2340 uint32_t* pCount);
2341
2342VkResult VKAPI vkGetPhysicalDeviceQueueProperties(
2343 VkPhysicalDevice physicalDevice,
2344 uint32_t count,
2345 VkPhysicalDeviceQueueProperties* pQueueProperties);
2346
2347VkResult VKAPI vkGetPhysicalDeviceMemoryProperties(
2348 VkPhysicalDevice physicalDevice,
2349 VkPhysicalDeviceMemoryProperties* pMemoryProperies);
2350
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002351// Extension discovery functions
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -06002352
Tony Barbour59a47322015-06-24 16:06:58 -06002353VkResult VKAPI vkGetGlobalExtensionProperties(
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002354 const char* pLayerName,
2355 uint32_t* pCount,
Tony Barbour59a47322015-06-24 16:06:58 -06002356 VkExtensionProperties* pProperties);
2357
Tony Barbour59a47322015-06-24 16:06:58 -06002358VkResult VKAPI vkGetPhysicalDeviceExtensionProperties(
2359 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002360 const char* pLayerName,
2361 uint32_t* pCount,
Tony Barbour59a47322015-06-24 16:06:58 -06002362 VkExtensionProperties* pProperties);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002363
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002364VkResult VKAPI vkGetGlobalLayerProperties(
2365 uint32_t* pCount,
2366 VkLayerProperties* pProperties);
2367
2368VkResult VKAPI vkGetPhysicalDeviceLayerProperties(
2369 VkPhysicalDevice physicalDevice,
2370 uint32_t* pCount,
2371 VkLayerProperties* pProperties);
2372
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002373// Queue functions
2374
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002375VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002376 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002377 uint32_t queueNodeIndex,
2378 uint32_t queueIndex,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002379 VkQueue* pQueue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002380
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002381VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002382 VkQueue queue,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002383 uint32_t cmdBufferCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002384 const VkCmdBuffer* pCmdBuffers,
2385 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002386
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002387VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002388 VkQueue queue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002389
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002390VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002391 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002392
2393// Memory functions
2394
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002395VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002396 VkDevice device,
2397 const VkMemoryAllocInfo* pAllocInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002398 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002399
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002400VkResult VKAPI vkFreeMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002401 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002402 VkDeviceMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002403
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002404VkResult VKAPI vkMapMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002405 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002406 VkDeviceMemory mem,
Tony Barbour71a85122015-04-16 19:09:28 -06002407 VkDeviceSize offset,
2408 VkDeviceSize size,
Tony Barbourd1c35722015-04-16 15:59:00 -06002409 VkMemoryMapFlags flags,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002410 void** ppData);
2411
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002412VkResult VKAPI vkUnmapMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002413 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002414 VkDeviceMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002415
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06002416VkResult VKAPI vkFlushMappedMemoryRanges(
Mike Stroyanb050c682015-04-17 12:36:38 -06002417 VkDevice device,
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06002418 uint32_t memRangeCount,
2419 const VkMappedMemoryRange* pMemRanges);
2420
2421VkResult VKAPI vkInvalidateMappedMemoryRanges(
2422 VkDevice device,
2423 uint32_t memRangeCount,
2424 const VkMappedMemoryRange* pMemRanges);
Tony Barbourb1250542015-04-16 19:23:13 -06002425
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002426// Generic API object functions
2427
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002428VkResult VKAPI vkDestroyObject(
Mike Stroyanb050c682015-04-17 12:36:38 -06002429 VkDevice device,
2430 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002431 VkObject object);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002432
Tony Barbour71a85122015-04-16 19:09:28 -06002433// Memory management API functions
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002434
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002435VkResult VKAPI vkBindObjectMemory(
2436 VkDevice device,
Mike Stroyanb050c682015-04-17 12:36:38 -06002437 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002438 VkObject object,
Tony Barbourd1c35722015-04-16 15:59:00 -06002439 VkDeviceMemory mem,
2440 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002441
Tony Barbour59a47322015-06-24 16:06:58 -06002442VkResult VKAPI vkGetObjectMemoryRequirements(
2443 VkDevice device,
2444 VkObjectType objType,
2445 VkObject object,
2446 VkMemoryRequirements* pMemoryRequirements);
2447
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002448VkResult VKAPI vkQueueBindSparseBufferMemory(
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002449 VkQueue queue,
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002450 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002451 VkDeviceSize rangeOffset,
2452 VkDeviceSize rangeSize,
2453 VkDeviceMemory mem,
2454 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002455
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002456VkResult VKAPI vkQueueBindSparseImageMemory(
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002457 VkQueue queue,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002458 VkImage image,
Jeremy Hayesaf0d72c2015-04-15 15:20:03 -06002459 const VkImageMemoryBindInfo* pBindInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002460 VkDeviceMemory mem,
2461 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002462
2463// Fence functions
2464
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002465VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002466 VkDevice device,
2467 const VkFenceCreateInfo* pCreateInfo,
2468 VkFence* pFence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002469
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002470VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002471 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002472 uint32_t fenceCount,
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -06002473 const VkFence* pFences);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002474
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002475VkResult VKAPI vkGetFenceStatus(
Mike Stroyanb050c682015-04-17 12:36:38 -06002476 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002477 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002478
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002479VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002480 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002481 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002482 const VkFence* pFences,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002483 bool32_t waitAll,
2484 uint64_t timeout); // timeout in nanoseconds
2485
2486// Queue semaphore functions
2487
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002488VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002489 VkDevice device,
2490 const VkSemaphoreCreateInfo* pCreateInfo,
2491 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002492
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002493VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002494 VkQueue queue,
2495 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002496
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002497VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002498 VkQueue queue,
2499 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002500
2501// Event functions
2502
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002503VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002504 VkDevice device,
2505 const VkEventCreateInfo* pCreateInfo,
2506 VkEvent* pEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002507
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002508VkResult VKAPI vkGetEventStatus(
Mike Stroyanb050c682015-04-17 12:36:38 -06002509 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002510 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002511
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002512VkResult VKAPI vkSetEvent(
Mike Stroyanb050c682015-04-17 12:36:38 -06002513 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002514 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002515
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002516VkResult VKAPI vkResetEvent(
Mike Stroyanb050c682015-04-17 12:36:38 -06002517 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002518 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002519
2520// Query functions
2521
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002522VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002523 VkDevice device,
2524 const VkQueryPoolCreateInfo* pCreateInfo,
2525 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002526
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002527VkResult VKAPI vkGetQueryPoolResults(
Mike Stroyanb050c682015-04-17 12:36:38 -06002528 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002529 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002530 uint32_t startQuery,
2531 uint32_t queryCount,
2532 size_t* pDataSize,
Tony Barbourd1c35722015-04-16 15:59:00 -06002533 void* pData,
2534 VkQueryResultFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002535
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002536// Buffer functions
2537
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002538VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002539 VkDevice device,
2540 const VkBufferCreateInfo* pCreateInfo,
2541 VkBuffer* pBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002542
2543// Buffer view functions
2544
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002545VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002546 VkDevice device,
2547 const VkBufferViewCreateInfo* pCreateInfo,
2548 VkBufferView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002549
2550// Image functions
2551
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002552VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002553 VkDevice device,
2554 const VkImageCreateInfo* pCreateInfo,
2555 VkImage* pImage);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002556
Tony Barbour59a47322015-06-24 16:06:58 -06002557VkResult VKAPI vkGetImageSubresourceLayout(
Mike Stroyanb050c682015-04-17 12:36:38 -06002558 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002559 VkImage image,
2560 const VkImageSubresource* pSubresource,
Tony Barbour59a47322015-06-24 16:06:58 -06002561 VkSubresourceLayout* pLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002562
2563// Image view functions
2564
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002565VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002566 VkDevice device,
2567 const VkImageViewCreateInfo* pCreateInfo,
2568 VkImageView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002569
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002570VkResult VKAPI vkCreateColorAttachmentView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002571 VkDevice device,
2572 const VkColorAttachmentViewCreateInfo* pCreateInfo,
2573 VkColorAttachmentView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002574
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002575VkResult VKAPI vkCreateDepthStencilView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002576 VkDevice device,
2577 const VkDepthStencilViewCreateInfo* pCreateInfo,
2578 VkDepthStencilView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002579
2580// Shader functions
2581
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06002582VkResult VKAPI vkCreateShaderModule(
2583 VkDevice device,
2584 const VkShaderModuleCreateInfo* pCreateInfo,
2585 VkShaderModule* pShaderModule);
2586
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002587VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002588 VkDevice device,
2589 const VkShaderCreateInfo* pCreateInfo,
2590 VkShader* pShader);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002591
2592// Pipeline functions
2593
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002594VkResult VKAPI vkCreateGraphicsPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002595 VkDevice device,
2596 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2597 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002598
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002599VkResult VKAPI vkCreateGraphicsPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002600 VkDevice device,
2601 const VkGraphicsPipelineCreateInfo* pCreateInfo,
2602 VkPipeline basePipeline,
2603 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002604
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002605VkResult VKAPI vkCreateComputePipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002606 VkDevice device,
2607 const VkComputePipelineCreateInfo* pCreateInfo,
2608 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002609
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002610VkResult VKAPI vkStorePipeline(
Mike Stroyanb050c682015-04-17 12:36:38 -06002611 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002612 VkPipeline pipeline,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002613 size_t* pDataSize,
2614 void* pData);
2615
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002616VkResult VKAPI vkLoadPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002617 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002618 size_t dataSize,
2619 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002620 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002621
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002622VkResult VKAPI vkLoadPipelineDerivative(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002623 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002624 size_t dataSize,
2625 const void* pData,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002626 VkPipeline basePipeline,
2627 VkPipeline* pPipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002628
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002629// Pipeline layout functions
2630
2631VkResult VKAPI vkCreatePipelineLayout(
2632 VkDevice device,
2633 const VkPipelineLayoutCreateInfo* pCreateInfo,
2634 VkPipelineLayout* pPipelineLayout);
2635
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002636// Sampler functions
2637
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002638VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002639 VkDevice device,
2640 const VkSamplerCreateInfo* pCreateInfo,
2641 VkSampler* pSampler);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002642
2643// Descriptor set functions
2644
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002645VkResult VKAPI vkCreateDescriptorSetLayout(
2646 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002647 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2648 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002649
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002650VkResult VKAPI vkCreateDescriptorPool(
2651 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002652 VkDescriptorPoolUsage poolUsage,
2653 uint32_t maxSets,
2654 const VkDescriptorPoolCreateInfo* pCreateInfo,
2655 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002656
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002657VkResult VKAPI vkResetDescriptorPool(
Mike Stroyanb050c682015-04-17 12:36:38 -06002658 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002659 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002660
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002661VkResult VKAPI vkAllocDescriptorSets(
Mike Stroyanb050c682015-04-17 12:36:38 -06002662 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002663 VkDescriptorPool descriptorPool,
2664 VkDescriptorSetUsage setUsage,
2665 uint32_t count,
2666 const VkDescriptorSetLayout* pSetLayouts,
2667 VkDescriptorSet* pDescriptorSets,
2668 uint32_t* pCount);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002669
Chia-I Wu9d00ed72015-05-25 16:27:55 +08002670VkResult VKAPI vkUpdateDescriptorSets(
Mike Stroyanb050c682015-04-17 12:36:38 -06002671 VkDevice device,
Chia-I Wu9d00ed72015-05-25 16:27:55 +08002672 uint32_t writeCount,
2673 const VkWriteDescriptorSet* pDescriptorWrites,
2674 uint32_t copyCount,
2675 const VkCopyDescriptorSet* pDescriptorCopies);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002676
2677// State object functions
2678
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002679VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002680 VkDevice device,
2681 const VkDynamicVpStateCreateInfo* pCreateInfo,
2682 VkDynamicVpState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002683
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002684VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002685 VkDevice device,
2686 const VkDynamicRsStateCreateInfo* pCreateInfo,
2687 VkDynamicRsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002688
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002689VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002690 VkDevice device,
2691 const VkDynamicCbStateCreateInfo* pCreateInfo,
2692 VkDynamicCbState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002693
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002694VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002695 VkDevice device,
2696 const VkDynamicDsStateCreateInfo* pCreateInfo,
2697 VkDynamicDsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002698
2699// Command buffer functions
2700
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002701VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002702 VkDevice device,
2703 const VkCmdBufferCreateInfo* pCreateInfo,
2704 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002705
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002706VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002707 VkCmdBuffer cmdBuffer,
2708 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002709
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002710VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002711 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002712
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002713VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002714 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002715
2716// Command buffer building functions
2717
2718void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002719 VkCmdBuffer cmdBuffer,
2720 VkPipelineBindPoint pipelineBindPoint,
2721 VkPipeline pipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002722
2723void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002724 VkCmdBuffer cmdBuffer,
2725 VkStateBindPoint stateBindPoint,
2726 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002727
2728void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002729 VkCmdBuffer cmdBuffer,
2730 VkPipelineBindPoint pipelineBindPoint,
Mark Lobodzinskif2093b62015-06-15 13:21:21 -06002731 VkPipelineLayout layout,
Cody Northropd4c1a502015-04-16 13:41:56 -06002732 uint32_t firstSet,
2733 uint32_t setCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002734 const VkDescriptorSet* pDescriptorSets,
Cody Northropd4c1a502015-04-16 13:41:56 -06002735 uint32_t dynamicOffsetCount,
2736 const uint32_t* pDynamicOffsets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002737
2738void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002739 VkCmdBuffer cmdBuffer,
2740 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002741 VkDeviceSize offset,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002742 VkIndexType indexType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002743
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002744void VKAPI vkCmdBindVertexBuffers(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002745 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002746 uint32_t startBinding,
2747 uint32_t bindingCount,
2748 const VkBuffer* pBuffers,
Tony Barbourd1c35722015-04-16 15:59:00 -06002749 const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002750
2751void VKAPI vkCmdDraw(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002752 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002753 uint32_t firstVertex,
2754 uint32_t vertexCount,
2755 uint32_t firstInstance,
2756 uint32_t instanceCount);
2757
2758void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002759 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002760 uint32_t firstIndex,
2761 uint32_t indexCount,
2762 int32_t vertexOffset,
2763 uint32_t firstInstance,
2764 uint32_t instanceCount);
2765
2766void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002767 VkCmdBuffer cmdBuffer,
2768 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002769 VkDeviceSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002770 uint32_t count,
2771 uint32_t stride);
2772
2773void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002774 VkCmdBuffer cmdBuffer,
2775 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002776 VkDeviceSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002777 uint32_t count,
2778 uint32_t stride);
2779
2780void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002781 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002782 uint32_t x,
2783 uint32_t y,
2784 uint32_t z);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002785
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002786void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002787 VkCmdBuffer cmdBuffer,
2788 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002789 VkDeviceSize offset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002790
2791void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002792 VkCmdBuffer cmdBuffer,
2793 VkBuffer srcBuffer,
2794 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002795 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002796 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002797
2798void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002799 VkCmdBuffer cmdBuffer,
2800 VkImage srcImage,
2801 VkImageLayout srcImageLayout,
2802 VkImage destImage,
2803 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002804 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002805 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002806
2807void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002808 VkCmdBuffer cmdBuffer,
2809 VkImage srcImage,
2810 VkImageLayout srcImageLayout,
2811 VkImage destImage,
2812 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002813 uint32_t regionCount,
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -05002814 const VkImageBlit* pRegions,
2815 VkTexFilter filter);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002816
2817void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002818 VkCmdBuffer cmdBuffer,
2819 VkBuffer srcBuffer,
2820 VkImage destImage,
2821 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002822 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002823 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002824
2825void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002826 VkCmdBuffer cmdBuffer,
2827 VkImage srcImage,
2828 VkImageLayout srcImageLayout,
2829 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002830 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002831 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002832
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002833void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002834 VkCmdBuffer cmdBuffer,
2835 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002836 VkDeviceSize destOffset,
2837 VkDeviceSize dataSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002838 const uint32_t* pData);
2839
2840void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002841 VkCmdBuffer cmdBuffer,
2842 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002843 VkDeviceSize destOffset,
2844 VkDeviceSize fillSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002845 uint32_t data);
2846
2847void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002848 VkCmdBuffer cmdBuffer,
2849 VkImage image,
2850 VkImageLayout imageLayout,
Chris Forbesf0796e12015-06-24 14:34:53 +12002851 const VkClearColorValue* pColor,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002852 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002853 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002854
Chris Forbesd9be82b2015-06-22 17:21:59 +12002855void VKAPI vkCmdClearDepthStencilImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002856 VkCmdBuffer cmdBuffer,
2857 VkImage image,
2858 VkImageLayout imageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002859 float depth,
2860 uint32_t stencil,
2861 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002862 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002863
Chris Forbesd9be82b2015-06-22 17:21:59 +12002864void VKAPI vkCmdClearColorAttachment(
2865 VkCmdBuffer cmdBuffer,
2866 uint32_t colorAttachment,
2867 VkImageLayout imageLayout,
Chris Forbesf0796e12015-06-24 14:34:53 +12002868 const VkClearColorValue* pColor,
Chris Forbesd9be82b2015-06-22 17:21:59 +12002869 uint32_t rectCount,
2870 const VkRect3D* pRects);
2871
2872void VKAPI vkCmdClearDepthStencilAttachment(
2873 VkCmdBuffer cmdBuffer,
2874 VkImageAspectFlags imageAspectMask,
2875 VkImageLayout imageLayout,
2876 float depth,
2877 uint32_t stencil,
2878 uint32_t rectCount,
2879 const VkRect3D* pRects);
2880
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002881void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002882 VkCmdBuffer cmdBuffer,
2883 VkImage srcImage,
2884 VkImageLayout srcImageLayout,
2885 VkImage destImage,
2886 VkImageLayout destImageLayout,
Tony Barbour6865d4a2015-04-13 15:02:52 -06002887 uint32_t regionCount,
2888 const VkImageResolve* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002889
2890void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002891 VkCmdBuffer cmdBuffer,
2892 VkEvent event,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06002893 VkPipelineStageFlags stageMask);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002894
2895void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002896 VkCmdBuffer cmdBuffer,
2897 VkEvent event,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06002898 VkPipelineStageFlags stageMask);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002899
2900void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002901 VkCmdBuffer cmdBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002902 uint32_t eventCount,
2903 const VkEvent* pEvents,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06002904 VkPipelineStageFlags sourceStageMask,
2905 VkPipelineStageFlags destStageMask,
Tony Barbourd1c35722015-04-16 15:59:00 -06002906 uint32_t memBarrierCount,
2907 const void** ppMemBarriers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002908
2909void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002910 VkCmdBuffer cmdBuffer,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06002911 VkPipelineStageFlags sourceStageMask,
2912 VkPipelineStageFlags destStageMask,
2913 bool32_t byRegion,
Tony Barbourd1c35722015-04-16 15:59:00 -06002914 uint32_t memBarrierCount,
2915 const void** ppMemBarriers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002916
2917void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002918 VkCmdBuffer cmdBuffer,
2919 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002920 uint32_t slot,
Tony Barbourd1c35722015-04-16 15:59:00 -06002921 VkQueryControlFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002922
2923void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002924 VkCmdBuffer cmdBuffer,
2925 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002926 uint32_t slot);
2927
2928void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002929 VkCmdBuffer cmdBuffer,
2930 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002931 uint32_t startQuery,
2932 uint32_t queryCount);
2933
2934void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002935 VkCmdBuffer cmdBuffer,
2936 VkTimestampType timestampType,
2937 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002938 VkDeviceSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002939
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06002940void VKAPI vkCmdCopyQueryPoolResults(
2941 VkCmdBuffer cmdBuffer,
2942 VkQueryPool queryPool,
2943 uint32_t startQuery,
2944 uint32_t queryCount,
2945 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002946 VkDeviceSize destOffset,
2947 VkDeviceSize destStride,
Tony Barbour71a85122015-04-16 19:09:28 -06002948 VkQueryResultFlags flags);
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06002949
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002950VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002951 VkDevice device,
2952 const VkFramebufferCreateInfo* pCreateInfo,
2953 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002954
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002955VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002956 VkDevice device,
2957 const VkRenderPassCreateInfo* pCreateInfo,
2958 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002959
2960void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002961 VkCmdBuffer cmdBuffer,
2962 const VkRenderPassBegin* pRenderPassBegin);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002963
2964void VKAPI vkCmdEndRenderPass(
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002965 VkCmdBuffer cmdBuffer);
2966
2967void VKAPI vkCmdExecuteCommands(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002968 VkCmdBuffer cmdBuffer,
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002969 uint32_t cmdBuffersCount,
2970 const VkCmdBuffer* pCmdBuffers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002971
2972#endif // VK_PROTOTYPES
2973
2974#ifdef __cplusplus
2975} // extern "C"
2976#endif // __cplusplus
2977
2978#endif // __VULKAN_H__