blob: 8ef46cc8ef2f03a0f727e56306a861e562a61335 [file] [log] [blame]
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001//
2// File: vulkan.h
3//
4/*
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06005** Copyright (c) 2014-2015 The Khronos Group Inc.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06006**
7** Permission is hereby granted, free of charge, to any person obtaining a
8** copy of this software and/or associated documentation files (the
9** "Materials"), to deal in the Materials without restriction, including
10** without limitation the rights to use, copy, modify, merge, publish,
11** distribute, sublicense, and/or sell copies of the Materials, and to
12** permit persons to whom the Materials are furnished to do so, subject to
13** the following conditions:
14**
15** The above copyright notice and this permission notice shall be included
16** in all copies or substantial portions of the Materials.
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
25*/
26
27#ifndef __VULKAN_H__
28#define __VULKAN_H__
29
30#define VK_MAKE_VERSION(major, minor, patch) \
31 ((major << 22) | (minor << 12) | patch)
32
Courtney Goeltzenleuchter2040b432015-04-09 11:52:55 -060033#include "vk_platform.h"
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060034
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -060035// Vulkan API version supported by this file
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -060036#define VK_API_VERSION VK_MAKE_VERSION(0, 136, 0)
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060037
38#ifdef __cplusplus
39extern "C"
40{
41#endif // __cplusplus
42
43/*
44***************************************************************************************************
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -060045* Core Vulkan API
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -060046***************************************************************************************************
47*/
48
Mike Stroyan230e6252015-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 Goeltzenleuchter89e99e62015-04-08 18:04:29 -060052
Mike Stroyan230e6252015-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 Goeltzenleuchter1d723102015-06-18 21:49:59 -060082VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShaderModule, VkNonDispatchable)
Mike Stroyan230e6252015-04-17 12:36:38 -060083VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShader, VkNonDispatchable)
84VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipeline, VkNonDispatchable)
Jon Ashburn0d60d272015-07-09 15:02:25 -060085VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipelineCache, VkNonDispatchable)
Mike Stroyan230e6252015-04-17 12:36:38 -060086VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipelineLayout, VkNonDispatchable)
87VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkSampler, VkNonDispatchable)
88VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorSet, VkNonDispatchable)
89VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorSetLayout, VkNonDispatchable)
90VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDescriptorPool, VkNonDispatchable)
91VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicStateObject, VkNonDispatchable)
92VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicVpState, VkDynamicStateObject)
93VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicRsState, VkDynamicStateObject)
94VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicCbState, VkDynamicStateObject)
95VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDynamicDsState, VkDynamicStateObject)
96VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkFence, VkNonDispatchable)
97VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkSemaphore, VkNonDispatchable)
98VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkEvent, VkNonDispatchable)
99VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkQueryPool, VkNonDispatchable)
100VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkFramebuffer, VkNonDispatchable)
101VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkRenderPass, VkNonDispatchable)
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600102
Tony Barbour8205d902015-04-16 15:59:00 -0600103#define VK_MAX_PHYSICAL_DEVICE_NAME 256
Mike Stroyan230e6252015-04-17 12:36:38 -0600104#define VK_MAX_EXTENSION_NAME 256
Mark Lobodzinski854a4a02015-07-03 10:26:22 -0600105#define VK_MAX_DESCRIPTION 256
Mark Lobodzinski72346292015-07-02 16:49:40 -0600106#define VK_MAX_MEMORY_TYPES 32
107#define VK_MAX_MEMORY_HEAPS 16
Jon Ashburn0d60d272015-07-09 15:02:25 -0600108#define VK_UUID_LENGTH 16
Mark Lobodzinski72346292015-07-02 16:49:40 -0600109#define VK_LOD_CLAMP_NONE MAX_FLOAT
110#define VK_LAST_MIP_LEVEL UINT32_MAX
111#define VK_LAST_ARRAY_SLICE UINT32_MAX
Courtney Goeltzenleuchterdac96cf2015-06-04 11:35:43 -0600112
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600113
Tony Barbour8205d902015-04-16 15:59:00 -0600114#define VK_WHOLE_SIZE UINT64_MAX
115
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600116#define VK_TRUE 1
117#define VK_FALSE 0
118
119#define VK_NULL_HANDLE 0
120
121// This macro defines INT_MAX in enumerations to force compilers to use 32 bits
122// to represent them. This may or may not be necessary on some compilers. The
123// option to compile it out may allow compilers that warn about missing enumerants
124// in switch statements to be silenced.
Tony Barbour8205d902015-04-16 15:59:00 -0600125// Using this macro is not needed for flag bit enums because those aren't used
126// as storage type anywhere.
127#define VK_MAX_ENUM(Prefix) VK_##Prefix##_MAX_ENUM = 0x7FFFFFFF
128
129// This macro defines the BEGIN_RANGE, END_RANGE, NUM, and MAX_ENUM constants for
130// the enumerations.
131#define VK_ENUM_RANGE(Prefix, First, Last) \
132 VK_##Prefix##_BEGIN_RANGE = VK_##Prefix##_##First, \
133 VK_##Prefix##_END_RANGE = VK_##Prefix##_##Last, \
134 VK_NUM_##Prefix = (VK_##Prefix##_END_RANGE - VK_##Prefix##_BEGIN_RANGE + 1), \
135 VK_MAX_ENUM(Prefix)
136
137// This is a helper macro to define the value of flag bit enum values.
138#define VK_BIT(bit) (1 << (bit))
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600139
140// ------------------------------------------------------------------------------------------------
141// Enumerations
142
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600143typedef enum VkImageLayout_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600144{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600145 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
146 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access
147 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write
148 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write
149 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access
150 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access
Mark Lobodzinski4e97c452015-07-01 15:18:26 -0600151 VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000006, // Optimal layout when image is used only as source of transfer operations
152 VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000007, // Optimal layout when image is used only as destination of transfer operations
Tony Barbour3e3420a2015-04-16 19:09:28 -0600153
Tony Barbour8205d902015-04-16 15:59:00 -0600154 VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600155} VkImageLayout;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600156
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600157typedef enum VkAttachmentLoadOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600158{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600159 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
160 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
161 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600162
Tony Barbour8205d902015-04-16 15:59:00 -0600163 VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600164} VkAttachmentLoadOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600165
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600166typedef enum VkAttachmentStoreOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600167{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600168 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
169 VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001,
170 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600171
Tony Barbour8205d902015-04-16 15:59:00 -0600172 VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600173} VkAttachmentStoreOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600174
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600175typedef enum VkImageType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600176{
Tony Barbour8205d902015-04-16 15:59:00 -0600177 VK_IMAGE_TYPE_1D = 0x00000000,
178 VK_IMAGE_TYPE_2D = 0x00000001,
179 VK_IMAGE_TYPE_3D = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600180
Tony Barbour8205d902015-04-16 15:59:00 -0600181 VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600182} VkImageType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600183
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600184typedef enum VkImageTiling_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600185{
Tony Barbour8205d902015-04-16 15:59:00 -0600186 VK_IMAGE_TILING_LINEAR = 0x00000000,
187 VK_IMAGE_TILING_OPTIMAL = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600188
Tony Barbour8205d902015-04-16 15:59:00 -0600189 VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600190} VkImageTiling;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600191
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600192typedef enum VkImageViewType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600193{
Tony Barbour8205d902015-04-16 15:59:00 -0600194 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
195 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
196 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
197 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
Mark Lobodzinskic4e83e32015-07-02 09:53:03 -0600198 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
199 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
200 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600201
Mark Lobodzinskic4e83e32015-07-02 09:53:03 -0600202 VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE_ARRAY)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600203} VkImageViewType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600204
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600205typedef enum VkImageAspect_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600206{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600207 VK_IMAGE_ASPECT_COLOR = 0x00000000,
208 VK_IMAGE_ASPECT_DEPTH = 0x00000001,
209 VK_IMAGE_ASPECT_STENCIL = 0x00000002,
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600210 VK_IMAGE_ASPECT_METADATA = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600211
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600212 VK_ENUM_RANGE(IMAGE_ASPECT, COLOR, METADATA)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600213} VkImageAspect;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600214
Tony Barbour8205d902015-04-16 15:59:00 -0600215typedef enum VkBufferViewType_
216{
217 VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
218 VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
219
220 VK_ENUM_RANGE(BUFFER_VIEW_TYPE, RAW, FORMATTED)
221} VkBufferViewType;
222
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600223typedef enum VkChannelSwizzle_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600224{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600225 VK_CHANNEL_SWIZZLE_ZERO = 0x00000000,
226 VK_CHANNEL_SWIZZLE_ONE = 0x00000001,
227 VK_CHANNEL_SWIZZLE_R = 0x00000002,
228 VK_CHANNEL_SWIZZLE_G = 0x00000003,
229 VK_CHANNEL_SWIZZLE_B = 0x00000004,
230 VK_CHANNEL_SWIZZLE_A = 0x00000005,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600231
Tony Barbour8205d902015-04-16 15:59:00 -0600232 VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600233} VkChannelSwizzle;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600234
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600235typedef enum VkDescriptorType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600236{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600237 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -0600238 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
239 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
240 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
241 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
242 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600243 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -0600244 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600245 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -0600246 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600247
Tony Barbour8205d902015-04-16 15:59:00 -0600248 VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600249} VkDescriptorType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600250
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600251typedef enum VkDescriptorPoolUsage_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600252{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600253 VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000,
254 VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600255
Tony Barbour8205d902015-04-16 15:59:00 -0600256 VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600257} VkDescriptorPoolUsage;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600258
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600259typedef enum VkDescriptorSetUsage_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600260{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600261 VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000,
262 VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600263
Tony Barbour8205d902015-04-16 15:59:00 -0600264 VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600265} VkDescriptorSetUsage;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600266
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600267typedef enum VkQueryType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600268{
Tony Barbour8205d902015-04-16 15:59:00 -0600269 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
Courtney Goeltzenleuchter553acb92015-04-16 21:42:44 -0600270 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, // Optional
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600271
Tony Barbour8205d902015-04-16 15:59:00 -0600272 VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600273} VkQueryType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600274
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600275typedef enum VkTimestampType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600276{
Tony Barbour8205d902015-04-16 15:59:00 -0600277 VK_TIMESTAMP_TYPE_TOP = 0x00000000,
278 VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600279
Tony Barbour8205d902015-04-16 15:59:00 -0600280 VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600281} VkTimestampType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600282
Chia-I Wu88eaa3b2015-06-26 15:34:39 +0800283typedef enum VkRenderPassContents_
284{
285 VK_RENDER_PASS_CONTENTS_INLINE = 0x00000000,
286 VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 0x00000001,
287
288 VK_ENUM_RANGE(RENDER_PASS_CONTENTS, INLINE, SECONDARY_CMD_BUFFERS)
289} VkRenderPassContents;
290
Tony Barbour8205d902015-04-16 15:59:00 -0600291typedef enum VkBorderColor_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600292{
Tony Barbour2c4e7c72015-06-25 16:56:44 -0600293 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
294 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
295 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
296 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
297 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
298 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600299
Tony Barbour2c4e7c72015-06-25 16:56:44 -0600300 VK_ENUM_RANGE(BORDER_COLOR, FLOAT_TRANSPARENT_BLACK, INT_OPAQUE_WHITE)
Tony Barbour8205d902015-04-16 15:59:00 -0600301} VkBorderColor;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600302
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600303typedef enum VkPipelineBindPoint_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600304{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600305 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000,
306 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600307
Tony Barbour8205d902015-04-16 15:59:00 -0600308 VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600309} VkPipelineBindPoint;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600310
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600311typedef enum VkStateBindPoint_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600312{
Tony Barbour8205d902015-04-16 15:59:00 -0600313 VK_STATE_BIND_POINT_VIEWPORT = 0x00000000,
314 VK_STATE_BIND_POINT_RASTER = 0x00000001,
315 VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002,
316 VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600317
Tony Barbour8205d902015-04-16 15:59:00 -0600318 VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600319} VkStateBindPoint;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600320
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600321typedef enum VkPrimitiveTopology_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600322{
Tony Barbour8205d902015-04-16 15:59:00 -0600323 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
324 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
325 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
326 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
327 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
328 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
329 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ = 0x00000006,
330 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ = 0x00000007,
331 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ = 0x00000008,
332 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ = 0x00000009,
333 VK_PRIMITIVE_TOPOLOGY_PATCH = 0x0000000a,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600334
Tony Barbour8205d902015-04-16 15:59:00 -0600335 VK_ENUM_RANGE(PRIMITIVE_TOPOLOGY, POINT_LIST, PATCH)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600336} VkPrimitiveTopology;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600337
Chia-I Wu88eaa3b2015-06-26 15:34:39 +0800338typedef enum VkCmdBufferLevel_
339{
340 VK_CMD_BUFFER_LEVEL_PRIMARY = 0x00000000,
341 VK_CMD_BUFFER_LEVEL_SECONDARY = 0x00000001,
342
343 VK_ENUM_RANGE(CMD_BUFFER_LEVEL, PRIMARY, SECONDARY)
344} VkCmdBufferLevel;
345
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600346typedef enum VkIndexType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600347{
Mark Lobodzinskic20fc412015-07-02 10:03:43 -0600348 VK_INDEX_TYPE_UINT16 = 0x00000000,
349 VK_INDEX_TYPE_UINT32 = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600350
Mark Lobodzinskic20fc412015-07-02 10:03:43 -0600351 VK_ENUM_RANGE(INDEX_TYPE, UINT16, UINT32)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600352} VkIndexType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600353
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600354typedef enum VkTexFilter_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600355{
Tony Barbour8205d902015-04-16 15:59:00 -0600356 VK_TEX_FILTER_NEAREST = 0x00000000,
357 VK_TEX_FILTER_LINEAR = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600358
Tony Barbour8205d902015-04-16 15:59:00 -0600359 VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600360} VkTexFilter;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600361
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600362typedef enum VkTexMipmapMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600363{
Tony Barbour8205d902015-04-16 15:59:00 -0600364 VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level
365 VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level
366 VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600367
Tony Barbour8205d902015-04-16 15:59:00 -0600368 VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600369} VkTexMipmapMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600370
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600371typedef enum VkTexAddress_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600372{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600373 VK_TEX_ADDRESS_WRAP = 0x00000000,
374 VK_TEX_ADDRESS_MIRROR = 0x00000001,
375 VK_TEX_ADDRESS_CLAMP = 0x00000002,
376 VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
377 VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600378
Tony Barbour8205d902015-04-16 15:59:00 -0600379 VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600380} VkTexAddress;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600381
Tony Barbour8205d902015-04-16 15:59:00 -0600382typedef enum VkCompareOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600383{
Tony Barbour8205d902015-04-16 15:59:00 -0600384 VK_COMPARE_OP_NEVER = 0x00000000,
385 VK_COMPARE_OP_LESS = 0x00000001,
386 VK_COMPARE_OP_EQUAL = 0x00000002,
387 VK_COMPARE_OP_LESS_EQUAL = 0x00000003,
388 VK_COMPARE_OP_GREATER = 0x00000004,
389 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
390 VK_COMPARE_OP_GREATER_EQUAL = 0x00000006,
391 VK_COMPARE_OP_ALWAYS = 0x00000007,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600392
Tony Barbour8205d902015-04-16 15:59:00 -0600393 VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS)
394} VkCompareOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600395
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600396typedef enum VkFillMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600397{
Tony Barbour8205d902015-04-16 15:59:00 -0600398 VK_FILL_MODE_POINTS = 0x00000000,
399 VK_FILL_MODE_WIREFRAME = 0x00000001,
400 VK_FILL_MODE_SOLID = 0x00000002,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600401
Tony Barbour8205d902015-04-16 15:59:00 -0600402 VK_ENUM_RANGE(FILL_MODE, POINTS, SOLID)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600403} VkFillMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600404
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600405typedef enum VkCullMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600406{
Tony Barbour8205d902015-04-16 15:59:00 -0600407 VK_CULL_MODE_NONE = 0x00000000,
408 VK_CULL_MODE_FRONT = 0x00000001,
409 VK_CULL_MODE_BACK = 0x00000002,
410 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600411
Tony Barbour8205d902015-04-16 15:59:00 -0600412 VK_ENUM_RANGE(CULL_MODE, NONE, FRONT_AND_BACK)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600413} VkCullMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600414
Tony Barbour8205d902015-04-16 15:59:00 -0600415typedef enum VkFrontFace_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600416{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600417 VK_FRONT_FACE_CCW = 0x00000000,
418 VK_FRONT_FACE_CW = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600419
Tony Barbour8205d902015-04-16 15:59:00 -0600420 VK_ENUM_RANGE(FRONT_FACE, CCW, CW)
421} VkFrontFace;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600422
Tony Barbour8205d902015-04-16 15:59:00 -0600423typedef enum VkProvokingVertex_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600424{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600425 VK_PROVOKING_VERTEX_FIRST = 0x00000000,
426 VK_PROVOKING_VERTEX_LAST = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600427
Tony Barbour8205d902015-04-16 15:59:00 -0600428 VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST)
429} VkProvokingVertex;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600430
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600431typedef enum VkCoordinateOrigin_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600432{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600433 VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
434 VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600435
Tony Barbour8205d902015-04-16 15:59:00 -0600436 VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600437} VkCoordinateOrigin;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600438
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600439typedef enum VkDepthMode_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600440{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600441 VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000,
442 VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600443
Tony Barbour8205d902015-04-16 15:59:00 -0600444 VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600445} VkDepthMode;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600446
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600447typedef enum VkBlend_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600448{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600449 VK_BLEND_ZERO = 0x00000000,
450 VK_BLEND_ONE = 0x00000001,
451 VK_BLEND_SRC_COLOR = 0x00000002,
452 VK_BLEND_ONE_MINUS_SRC_COLOR = 0x00000003,
453 VK_BLEND_DEST_COLOR = 0x00000004,
454 VK_BLEND_ONE_MINUS_DEST_COLOR = 0x00000005,
455 VK_BLEND_SRC_ALPHA = 0x00000006,
456 VK_BLEND_ONE_MINUS_SRC_ALPHA = 0x00000007,
457 VK_BLEND_DEST_ALPHA = 0x00000008,
458 VK_BLEND_ONE_MINUS_DEST_ALPHA = 0x00000009,
459 VK_BLEND_CONSTANT_COLOR = 0x0000000a,
460 VK_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
461 VK_BLEND_CONSTANT_ALPHA = 0x0000000c,
462 VK_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
463 VK_BLEND_SRC_ALPHA_SATURATE = 0x0000000e,
464 VK_BLEND_SRC1_COLOR = 0x0000000f,
465 VK_BLEND_ONE_MINUS_SRC1_COLOR = 0x00000010,
466 VK_BLEND_SRC1_ALPHA = 0x00000011,
467 VK_BLEND_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600468
Tony Barbour8205d902015-04-16 15:59:00 -0600469 VK_ENUM_RANGE(BLEND, ZERO, ONE_MINUS_SRC1_ALPHA)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600470} VkBlend;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600471
Tony Barbour8205d902015-04-16 15:59:00 -0600472typedef enum VkBlendOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600473{
Tony Barbour8205d902015-04-16 15:59:00 -0600474 VK_BLEND_OP_ADD = 0x00000000,
475 VK_BLEND_OP_SUBTRACT = 0x00000001,
476 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
477 VK_BLEND_OP_MIN = 0x00000003,
478 VK_BLEND_OP_MAX = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600479
Tony Barbour8205d902015-04-16 15:59:00 -0600480 VK_ENUM_RANGE(BLEND_OP, ADD, MAX)
481} VkBlendOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600482
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600483typedef enum VkStencilOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600484{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600485 VK_STENCIL_OP_KEEP = 0x00000000,
486 VK_STENCIL_OP_ZERO = 0x00000001,
487 VK_STENCIL_OP_REPLACE = 0x00000002,
488 VK_STENCIL_OP_INC_CLAMP = 0x00000003,
489 VK_STENCIL_OP_DEC_CLAMP = 0x00000004,
490 VK_STENCIL_OP_INVERT = 0x00000005,
491 VK_STENCIL_OP_INC_WRAP = 0x00000006,
492 VK_STENCIL_OP_DEC_WRAP = 0x00000007,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600493
Tony Barbour8205d902015-04-16 15:59:00 -0600494 VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600495} VkStencilOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600496
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600497typedef enum VkLogicOp_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600498{
Tony Barbourfdff5572015-06-26 13:28:56 -0600499 VK_LOGIC_OP_CLEAR = 0x00000000,
500 VK_LOGIC_OP_AND = 0x00000001,
501 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
502 VK_LOGIC_OP_COPY = 0x00000003,
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600503 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
504 VK_LOGIC_OP_NOOP = 0x00000005,
505 VK_LOGIC_OP_XOR = 0x00000006,
506 VK_LOGIC_OP_OR = 0x00000007,
507 VK_LOGIC_OP_NOR = 0x00000008,
508 VK_LOGIC_OP_EQUIV = 0x00000009,
509 VK_LOGIC_OP_INVERT = 0x0000000a,
510 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
511 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
512 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
513 VK_LOGIC_OP_NAND = 0x0000000e,
514 VK_LOGIC_OP_SET = 0x0000000f,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600515
Tony Barbourfdff5572015-06-26 13:28:56 -0600516 VK_ENUM_RANGE(LOGIC_OP, CLEAR, SET)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600517} VkLogicOp;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600518
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600519typedef enum VkSystemAllocType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600520{
Tony Barbour8205d902015-04-16 15:59:00 -0600521 VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000,
522 VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001,
523 VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002,
524 VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003,
525 VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600526
Tony Barbour8205d902015-04-16 15:59:00 -0600527 VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600528} VkSystemAllocType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600529
Tony Barbour8205d902015-04-16 15:59:00 -0600530typedef enum VkPhysicalDeviceType_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600531{
Tony Barbour8205d902015-04-16 15:59:00 -0600532 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
533 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
534 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
535 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
536 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600537
Tony Barbour8205d902015-04-16 15:59:00 -0600538 VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU)
539} VkPhysicalDeviceType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600540
Tony Barbour8205d902015-04-16 15:59:00 -0600541typedef enum VkVertexInputStepRate_
542{
543 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
544 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
545 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
546
547 VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW)
548} VkVertexInputStepRate;
549
Tony Barbour8205d902015-04-16 15:59:00 -0600550// Vulkan format definitions
551typedef enum VkFormat_
552{
553 VK_FORMAT_UNDEFINED = 0x00000000,
554 VK_FORMAT_R4G4_UNORM = 0x00000001,
555 VK_FORMAT_R4G4_USCALED = 0x00000002,
556 VK_FORMAT_R4G4B4A4_UNORM = 0x00000003,
557 VK_FORMAT_R4G4B4A4_USCALED = 0x00000004,
558 VK_FORMAT_R5G6B5_UNORM = 0x00000005,
559 VK_FORMAT_R5G6B5_USCALED = 0x00000006,
560 VK_FORMAT_R5G5B5A1_UNORM = 0x00000007,
561 VK_FORMAT_R5G5B5A1_USCALED = 0x00000008,
562 VK_FORMAT_R8_UNORM = 0x00000009,
563 VK_FORMAT_R8_SNORM = 0x0000000A,
564 VK_FORMAT_R8_USCALED = 0x0000000B,
565 VK_FORMAT_R8_SSCALED = 0x0000000C,
566 VK_FORMAT_R8_UINT = 0x0000000D,
567 VK_FORMAT_R8_SINT = 0x0000000E,
568 VK_FORMAT_R8_SRGB = 0x0000000F,
569 VK_FORMAT_R8G8_UNORM = 0x00000010,
570 VK_FORMAT_R8G8_SNORM = 0x00000011,
571 VK_FORMAT_R8G8_USCALED = 0x00000012,
572 VK_FORMAT_R8G8_SSCALED = 0x00000013,
573 VK_FORMAT_R8G8_UINT = 0x00000014,
574 VK_FORMAT_R8G8_SINT = 0x00000015,
575 VK_FORMAT_R8G8_SRGB = 0x00000016,
576 VK_FORMAT_R8G8B8_UNORM = 0x00000017,
577 VK_FORMAT_R8G8B8_SNORM = 0x00000018,
578 VK_FORMAT_R8G8B8_USCALED = 0x00000019,
579 VK_FORMAT_R8G8B8_SSCALED = 0x0000001A,
580 VK_FORMAT_R8G8B8_UINT = 0x0000001B,
581 VK_FORMAT_R8G8B8_SINT = 0x0000001C,
582 VK_FORMAT_R8G8B8_SRGB = 0x0000001D,
583 VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E,
584 VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F,
585 VK_FORMAT_R8G8B8A8_USCALED = 0x00000020,
586 VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021,
587 VK_FORMAT_R8G8B8A8_UINT = 0x00000022,
588 VK_FORMAT_R8G8B8A8_SINT = 0x00000023,
589 VK_FORMAT_R8G8B8A8_SRGB = 0x00000024,
590 VK_FORMAT_R10G10B10A2_UNORM = 0x00000025,
591 VK_FORMAT_R10G10B10A2_SNORM = 0x00000026,
592 VK_FORMAT_R10G10B10A2_USCALED = 0x00000027,
593 VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028,
594 VK_FORMAT_R10G10B10A2_UINT = 0x00000029,
595 VK_FORMAT_R10G10B10A2_SINT = 0x0000002A,
596 VK_FORMAT_R16_UNORM = 0x0000002B,
597 VK_FORMAT_R16_SNORM = 0x0000002C,
598 VK_FORMAT_R16_USCALED = 0x0000002D,
599 VK_FORMAT_R16_SSCALED = 0x0000002E,
600 VK_FORMAT_R16_UINT = 0x0000002F,
601 VK_FORMAT_R16_SINT = 0x00000030,
602 VK_FORMAT_R16_SFLOAT = 0x00000031,
603 VK_FORMAT_R16G16_UNORM = 0x00000032,
604 VK_FORMAT_R16G16_SNORM = 0x00000033,
605 VK_FORMAT_R16G16_USCALED = 0x00000034,
606 VK_FORMAT_R16G16_SSCALED = 0x00000035,
607 VK_FORMAT_R16G16_UINT = 0x00000036,
608 VK_FORMAT_R16G16_SINT = 0x00000037,
609 VK_FORMAT_R16G16_SFLOAT = 0x00000038,
610 VK_FORMAT_R16G16B16_UNORM = 0x00000039,
611 VK_FORMAT_R16G16B16_SNORM = 0x0000003A,
612 VK_FORMAT_R16G16B16_USCALED = 0x0000003B,
613 VK_FORMAT_R16G16B16_SSCALED = 0x0000003C,
614 VK_FORMAT_R16G16B16_UINT = 0x0000003D,
615 VK_FORMAT_R16G16B16_SINT = 0x0000003E,
616 VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F,
617 VK_FORMAT_R16G16B16A16_UNORM = 0x00000040,
618 VK_FORMAT_R16G16B16A16_SNORM = 0x00000041,
619 VK_FORMAT_R16G16B16A16_USCALED = 0x00000042,
620 VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043,
621 VK_FORMAT_R16G16B16A16_UINT = 0x00000044,
622 VK_FORMAT_R16G16B16A16_SINT = 0x00000045,
623 VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046,
624 VK_FORMAT_R32_UINT = 0x00000047,
625 VK_FORMAT_R32_SINT = 0x00000048,
626 VK_FORMAT_R32_SFLOAT = 0x00000049,
627 VK_FORMAT_R32G32_UINT = 0x0000004A,
628 VK_FORMAT_R32G32_SINT = 0x0000004B,
629 VK_FORMAT_R32G32_SFLOAT = 0x0000004C,
630 VK_FORMAT_R32G32B32_UINT = 0x0000004D,
631 VK_FORMAT_R32G32B32_SINT = 0x0000004E,
632 VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F,
633 VK_FORMAT_R32G32B32A32_UINT = 0x00000050,
634 VK_FORMAT_R32G32B32A32_SINT = 0x00000051,
635 VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052,
636 VK_FORMAT_R64_SFLOAT = 0x00000053,
637 VK_FORMAT_R64G64_SFLOAT = 0x00000054,
638 VK_FORMAT_R64G64B64_SFLOAT = 0x00000055,
639 VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056,
640 VK_FORMAT_R11G11B10_UFLOAT = 0x00000057,
641 VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058,
642 VK_FORMAT_D16_UNORM = 0x00000059,
643 VK_FORMAT_D24_UNORM = 0x0000005A,
644 VK_FORMAT_D32_SFLOAT = 0x0000005B,
645 VK_FORMAT_S8_UINT = 0x0000005C,
646 VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D,
647 VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E,
648 VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F,
649 VK_FORMAT_BC1_RGB_UNORM = 0x00000060,
650 VK_FORMAT_BC1_RGB_SRGB = 0x00000061,
651 VK_FORMAT_BC1_RGBA_UNORM = 0x00000062,
652 VK_FORMAT_BC1_RGBA_SRGB = 0x00000063,
653 VK_FORMAT_BC2_UNORM = 0x00000064,
654 VK_FORMAT_BC2_SRGB = 0x00000065,
655 VK_FORMAT_BC3_UNORM = 0x00000066,
656 VK_FORMAT_BC3_SRGB = 0x00000067,
657 VK_FORMAT_BC4_UNORM = 0x00000068,
658 VK_FORMAT_BC4_SNORM = 0x00000069,
659 VK_FORMAT_BC5_UNORM = 0x0000006A,
660 VK_FORMAT_BC5_SNORM = 0x0000006B,
661 VK_FORMAT_BC6H_UFLOAT = 0x0000006C,
662 VK_FORMAT_BC6H_SFLOAT = 0x0000006D,
663 VK_FORMAT_BC7_UNORM = 0x0000006E,
664 VK_FORMAT_BC7_SRGB = 0x0000006F,
665 VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070,
666 VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071,
667 VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072,
668 VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073,
669 VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074,
670 VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075,
671 VK_FORMAT_EAC_R11_UNORM = 0x00000076,
672 VK_FORMAT_EAC_R11_SNORM = 0x00000077,
673 VK_FORMAT_EAC_R11G11_UNORM = 0x00000078,
674 VK_FORMAT_EAC_R11G11_SNORM = 0x00000079,
675 VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A,
676 VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B,
677 VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C,
678 VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D,
679 VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E,
680 VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F,
681 VK_FORMAT_ASTC_6x5_UNORM = 0x00000080,
682 VK_FORMAT_ASTC_6x5_SRGB = 0x00000081,
683 VK_FORMAT_ASTC_6x6_UNORM = 0x00000082,
684 VK_FORMAT_ASTC_6x6_SRGB = 0x00000083,
685 VK_FORMAT_ASTC_8x5_UNORM = 0x00000084,
686 VK_FORMAT_ASTC_8x5_SRGB = 0x00000085,
687 VK_FORMAT_ASTC_8x6_UNORM = 0x00000086,
688 VK_FORMAT_ASTC_8x6_SRGB = 0x00000087,
689 VK_FORMAT_ASTC_8x8_UNORM = 0x00000088,
690 VK_FORMAT_ASTC_8x8_SRGB = 0x00000089,
691 VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A,
692 VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B,
693 VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C,
694 VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D,
695 VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E,
696 VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F,
697 VK_FORMAT_ASTC_10x10_UNORM = 0x00000090,
698 VK_FORMAT_ASTC_10x10_SRGB = 0x00000091,
699 VK_FORMAT_ASTC_12x10_UNORM = 0x00000092,
700 VK_FORMAT_ASTC_12x10_SRGB = 0x00000093,
701 VK_FORMAT_ASTC_12x12_UNORM = 0x00000094,
702 VK_FORMAT_ASTC_12x12_SRGB = 0x00000095,
703 VK_FORMAT_B4G4R4A4_UNORM = 0x00000096,
704 VK_FORMAT_B5G5R5A1_UNORM = 0x00000097,
705 VK_FORMAT_B5G6R5_UNORM = 0x00000098,
706 VK_FORMAT_B5G6R5_USCALED = 0x00000099,
707 VK_FORMAT_B8G8R8_UNORM = 0x0000009A,
708 VK_FORMAT_B8G8R8_SNORM = 0x0000009B,
709 VK_FORMAT_B8G8R8_USCALED = 0x0000009C,
710 VK_FORMAT_B8G8R8_SSCALED = 0x0000009D,
711 VK_FORMAT_B8G8R8_UINT = 0x0000009E,
712 VK_FORMAT_B8G8R8_SINT = 0x0000009F,
713 VK_FORMAT_B8G8R8_SRGB = 0x000000A0,
714 VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1,
715 VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2,
716 VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3,
717 VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4,
718 VK_FORMAT_B8G8R8A8_UINT = 0x000000A5,
719 VK_FORMAT_B8G8R8A8_SINT = 0x000000A6,
720 VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7,
721 VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8,
722 VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9,
723 VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA,
724 VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB,
725 VK_FORMAT_B10G10R10A2_UINT = 0x000000AC,
726 VK_FORMAT_B10G10R10A2_SINT = 0x000000AD,
727
728 VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT)
729} VkFormat;
730
731// Shader stage enumerant
732typedef enum VkShaderStage_
733{
734 VK_SHADER_STAGE_VERTEX = 0,
735 VK_SHADER_STAGE_TESS_CONTROL = 1,
736 VK_SHADER_STAGE_TESS_EVALUATION = 2,
737 VK_SHADER_STAGE_GEOMETRY = 3,
738 VK_SHADER_STAGE_FRAGMENT = 4,
739 VK_SHADER_STAGE_COMPUTE = 5,
740
741 VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE)
742} VkShaderStage;
743
744// Structure type enumerant
745typedef enum VkStructureType_
746{
Tony Barbour04ee6b92015-06-26 15:02:35 -0600747 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
748 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
749 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
750 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 3,
751 VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 4,
752 VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 5,
753 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 6,
754 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 7,
755 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 8,
756 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 9,
757 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 10,
758 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 11,
759 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 12,
760 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 13,
761 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 14,
762 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 15,
763 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 16,
764 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 17,
765 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 18,
766 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 19,
767 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 20,
768 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 21,
769 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 22,
770 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 23,
771 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 24,
772 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 25,
773 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 26,
774 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 27,
775 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 28,
776 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 29,
777 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 30,
778 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 31,
779 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 32,
780 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 33,
781 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 34,
Chia-I Wu88eaa3b2015-06-26 15:34:39 +0800782
Tony Barbour04ee6b92015-06-26 15:02:35 -0600783 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 36,
784 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 37,
785 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 38,
786 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 39,
787 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 40,
788 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 41,
789 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 42,
790 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 43,
791 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 44,
Jon Ashburn0d60d272015-07-09 15:02:25 -0600792 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 45,
793 VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES = 46,
Tony Barbour8205d902015-04-16 15:59:00 -0600794
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -0600795 VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, EXTENSION_PROPERTIES)
Tony Barbour8205d902015-04-16 15:59:00 -0600796} VkStructureType;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600797
Mike Stroyan230e6252015-04-17 12:36:38 -0600798// Object type enumerant
799typedef enum VkObjectType_
800{
801 VK_OBJECT_TYPE_INSTANCE = 0,
802 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1,
803 VK_OBJECT_TYPE_DEVICE = 2,
804 VK_OBJECT_TYPE_QUEUE = 3,
805 VK_OBJECT_TYPE_COMMAND_BUFFER = 4,
806 VK_OBJECT_TYPE_DEVICE_MEMORY = 5,
807 VK_OBJECT_TYPE_BUFFER = 6,
808 VK_OBJECT_TYPE_BUFFER_VIEW = 7,
809 VK_OBJECT_TYPE_IMAGE = 8,
810 VK_OBJECT_TYPE_IMAGE_VIEW = 9,
811 VK_OBJECT_TYPE_COLOR_ATTACHMENT_VIEW = 10,
812 VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW = 11,
Courtney Goeltzenleuchter1d723102015-06-18 21:49:59 -0600813 VK_OBJECT_TYPE_SHADER_MODULE = 12,
814 VK_OBJECT_TYPE_SHADER = 13,
815 VK_OBJECT_TYPE_PIPELINE = 14,
816 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 15,
817 VK_OBJECT_TYPE_SAMPLER = 16,
818 VK_OBJECT_TYPE_DESCRIPTOR_SET = 17,
819 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 18,
820 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 19,
821 VK_OBJECT_TYPE_DYNAMIC_VP_STATE = 20,
822 VK_OBJECT_TYPE_DYNAMIC_RS_STATE = 21,
823 VK_OBJECT_TYPE_DYNAMIC_CB_STATE = 22,
824 VK_OBJECT_TYPE_DYNAMIC_DS_STATE = 23,
825 VK_OBJECT_TYPE_FENCE = 24,
826 VK_OBJECT_TYPE_SEMAPHORE = 25,
827 VK_OBJECT_TYPE_EVENT = 26,
828 VK_OBJECT_TYPE_QUERY_POOL = 27,
829 VK_OBJECT_TYPE_FRAMEBUFFER = 28,
Jon Ashburn0d60d272015-07-09 15:02:25 -0600830 VK_OBJECT_TYPE_PIPELINE_CACHE = 29,
831 VK_OBJECT_TYPE_RENDER_PASS = 30,
Mike Stroyan230e6252015-04-17 12:36:38 -0600832
833 // Valid ranges for core Vulkan:
834 VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE,
835 VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_RENDER_PASS,
836 VK_NUM_OBJECT_TYPE = (VK_OBJECT_TYPE_END_RANGE - VK_OBJECT_TYPE_BEGIN_RANGE + 1),
837 VK_MAX_ENUM(VkObjectType)
838} VkObjectType;
839
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600840// ------------------------------------------------------------------------------------------------
841// Error and return codes
842
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600843typedef enum VkResult_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600844{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600845 // Return codes for successful operation execution (> = 0)
846 VK_SUCCESS = 0x0000000,
847 VK_UNSUPPORTED = 0x0000001,
848 VK_NOT_READY = 0x0000002,
849 VK_TIMEOUT = 0x0000003,
850 VK_EVENT_SET = 0x0000004,
851 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -0600852 VK_INCOMPLETE = 0x0000006,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600853
854 // Error codes (negative values)
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600855 VK_ERROR_UNKNOWN = -(0x00000001),
856 VK_ERROR_UNAVAILABLE = -(0x00000002),
857 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
Tony Barbour8205d902015-04-16 15:59:00 -0600858 VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004),
859 VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005),
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -0600860 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
861 VK_ERROR_DEVICE_LOST = -(0x00000007),
862 VK_ERROR_INVALID_POINTER = -(0x00000008),
863 VK_ERROR_INVALID_VALUE = -(0x00000009),
864 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
865 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
866 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
867 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -0600868 VK_ERROR_INVALID_LAYER = -(0x0000000E),
869 VK_ERROR_INVALID_FLAGS = -(0x0000000F),
870 VK_ERROR_INVALID_ALIGNMENT = -(0x00000010),
871 VK_ERROR_INVALID_FORMAT = -(0x00000011),
872 VK_ERROR_INVALID_IMAGE = -(0x00000012),
873 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000013),
874 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000014),
875 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000015),
876 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000016),
877 VK_ERROR_BAD_SHADER_CODE = -(0x00000017),
878 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000018),
879 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
880 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
881 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
882 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
883 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
884 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
885 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
886 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
887 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
Tony Barbour8205d902015-04-16 15:59:00 -0600888
889 VK_MAX_ENUM(RESULT)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600890} VkResult;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600891
892// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600893// Flags
894
895// Device creation flags
Tony Barbour8205d902015-04-16 15:59:00 -0600896typedef VkFlags VkDeviceCreateFlags;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600897
898// Queue capabilities
Tony Barbour8205d902015-04-16 15:59:00 -0600899typedef VkFlags VkQueueFlags;
900typedef enum VkQueueFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600901{
Tony Barbour8205d902015-04-16 15:59:00 -0600902 VK_QUEUE_GRAPHICS_BIT = VK_BIT(0), // Queue supports graphics operations
903 VK_QUEUE_COMPUTE_BIT = VK_BIT(1), // Queue supports compute operations
904 VK_QUEUE_DMA_BIT = VK_BIT(2), // Queue supports DMA operations
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500905 VK_QUEUE_SPARSE_MEMMGR_BIT = VK_BIT(3), // Queue supports sparse resource memory management operations
Tony Barbour8205d902015-04-16 15:59:00 -0600906 VK_QUEUE_EXTENDED_BIT = VK_BIT(30), // Extended queue
907} VkQueueFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600908
Tony Barbour8205d902015-04-16 15:59:00 -0600909// Memory properties passed into vkAllocMemory().
910typedef VkFlags VkMemoryPropertyFlags;
911typedef enum VkMemoryPropertyFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600912{
Tony Barbour8205d902015-04-16 15:59:00 -0600913 VK_MEMORY_PROPERTY_DEVICE_ONLY = 0, // If otherwise stated, then allocate memory on device
914 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = VK_BIT(0), // Memory should be mappable by host
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -0600915 VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT = VK_BIT(1), // Memory may not have i/o coherency so vkFlushMappedMemoryRanges and
916 // vkInvalidateMappedMemoryRanges must be used flush/invalidate host cache
Tony Barbour8205d902015-04-16 15:59:00 -0600917 VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = VK_BIT(2), // Memory should not be cached by the host
918 VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = VK_BIT(3), // Memory should support host write combining
Tony Barbour8205d902015-04-16 15:59:00 -0600919} VkMemoryPropertyFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600920
Tony Barbour8205d902015-04-16 15:59:00 -0600921// Memory output flags passed to resource transition commands
922typedef VkFlags VkMemoryOutputFlags;
923typedef enum VkMemoryOutputFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600924{
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -0600925 VK_MEMORY_OUTPUT_HOST_WRITE_BIT = VK_BIT(0), // Controls output coherency of host writes
Tony Barbour8205d902015-04-16 15:59:00 -0600926 VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes
927 VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes
928 VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes
929 VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations
930} VkMemoryOutputFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600931
Tony Barbour8205d902015-04-16 15:59:00 -0600932// Memory input flags passed to resource transition commands
933typedef VkFlags VkMemoryInputFlags;
934typedef enum VkMemoryInputFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600935{
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -0600936 VK_MEMORY_INPUT_HOST_READ_BIT = VK_BIT(0), // Controls input coherency of host reads
Tony Barbour8205d902015-04-16 15:59:00 -0600937 VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads
938 VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches
939 VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches
940 VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads
941 VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads
942 VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads
943 VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads
944 VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(8), // Controls input coherency of transfer operations
945} VkMemoryInputFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600946
Tony Barbour8205d902015-04-16 15:59:00 -0600947// Buffer usage flags
948typedef VkFlags VkBufferUsageFlags;
949typedef enum VkBufferUsageFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600950{
Tony Barbour8205d902015-04-16 15:59:00 -0600951 VK_BUFFER_USAGE_GENERAL = 0, // No special usage
952 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
953 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
954 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(2), // Can be used as TBO
955 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(3), // Can be used as IBO
956 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = VK_BIT(4), // Can be used as UBO
957 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = VK_BIT(5), // Can be used as SSBO
958 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = VK_BIT(6), // Can be used as source of fixed function index fetch (index buffer)
959 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = VK_BIT(7), // Can be used as source of fixed function vertex fetch (VBO)
960 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = VK_BIT(8), // Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
961} VkBufferUsageFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600962
Tony Barbour8205d902015-04-16 15:59:00 -0600963// Buffer creation flags
964typedef VkFlags VkBufferCreateFlags;
965typedef enum VkBufferCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600966{
Courtney Goeltzenleuchterb25c9b92015-06-18 17:01:41 -0600967 VK_BUFFER_CREATE_SPARSE_BIT = VK_BIT(0), // Buffer should support sparse backing
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600968 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = VK_BIT(1), // Buffer should support sparse backing with partial residency
969 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = VK_BIT(2), // Buffer should support consistent data access to physical memoryblocks mapped into multiple locations of sparse buffers
Tony Barbour8205d902015-04-16 15:59:00 -0600970} VkBufferCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600971
Tony Barbour8205d902015-04-16 15:59:00 -0600972// Shader stage flags
973typedef VkFlags VkShaderStageFlags;
974typedef enum VkShaderStageFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -0600975{
Tony Barbour8205d902015-04-16 15:59:00 -0600976 VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0),
977 VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1),
978 VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2),
979 VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3),
980 VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4),
981 VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5),
982
983 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
984} VkShaderStageFlagBits;
985
986// Image usage flags
987typedef VkFlags VkImageUsageFlags;
988typedef enum VkImageUsageFlagBits_
989{
990 VK_IMAGE_USAGE_GENERAL = 0, // No special usage
991 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
992 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
993 VK_IMAGE_USAGE_SAMPLED_BIT = VK_BIT(2), // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
994 VK_IMAGE_USAGE_STORAGE_BIT = VK_BIT(3), // Can be used as storage image (STORAGE_IMAGE descriptor type)
995 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = VK_BIT(4), // Can be used as framebuffer color attachment
996 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = VK_BIT(5), // Can be used as framebuffer depth/stencil attachment
997 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = VK_BIT(6), // Image data not needed outside of rendering
998} VkImageUsageFlagBits;
999
1000// Image creation flags
1001typedef VkFlags VkImageCreateFlags;
1002typedef enum VkImageCreateFlagBits_
1003{
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06001004 VK_IMAGE_CREATE_SPARSE_BIT = VK_BIT(0), // Image should support sparse backing
1005 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = VK_BIT(1), // Image should support sparse backing with partial residency
1006 VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = VK_BIT(2), // Image should support constant data access to physical memoryblocks mapped into multiple locations fo sparse images
1007 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = VK_BIT(3),
1008 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = VK_BIT(4), // Allows image views to have different format than the base image
1009 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = VK_BIT(5), // Allows creating image views with cube type from the created image
Tony Barbour8205d902015-04-16 15:59:00 -06001010} VkImageCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001011
1012// Depth-stencil view creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001013typedef VkFlags VkDepthStencilViewCreateFlags;
1014typedef enum VkDepthStencilViewCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001015{
Tony Barbour8205d902015-04-16 15:59:00 -06001016 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_DEPTH_BIT = VK_BIT(0),
1017 VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = VK_BIT(1),
1018} VkDepthStencilViewCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001019
1020// Pipeline creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001021typedef VkFlags VkPipelineCreateFlags;
1022typedef enum VkPipelineCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001023{
Tony Barbour8205d902015-04-16 15:59:00 -06001024 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0),
1025 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1),
Jon Ashburn0d60d272015-07-09 15:02:25 -06001026 VK_PIPELINE_CREATE_DERIVATIVE_BIT = VK_BIT(2),
Tony Barbour8205d902015-04-16 15:59:00 -06001027} VkPipelineCreateFlagBits;
1028
1029// Channel flags
1030typedef VkFlags VkChannelFlags;
1031typedef enum VkChannelFlagBits_
1032{
1033 VK_CHANNEL_R_BIT = VK_BIT(0),
1034 VK_CHANNEL_G_BIT = VK_BIT(1),
1035 VK_CHANNEL_B_BIT = VK_BIT(2),
1036 VK_CHANNEL_A_BIT = VK_BIT(3),
1037} VkChannelFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001038
1039// Fence creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001040typedef VkFlags VkFenceCreateFlags;
1041typedef enum VkFenceCreateFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001042{
Tony Barbour8205d902015-04-16 15:59:00 -06001043 VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0),
1044} VkFenceCreateFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001045
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06001046// Sparse image format flags
1047typedef VkFlags VkSparseImageFormatFlags;
1048typedef enum VkSparseImageFormatFlagBits_
1049{
1050 VK_SPARSE_IMAGE_FMT_SINGLE_MIPTAIL_BIT = VK_BIT(0),
1051 VK_SPARSE_IMAGE_FMT_ALIGNED_MIP_SIZE_BIT = VK_BIT(1),
1052 VK_SPARSE_IMAGE_FMT_NONSTD_BLOCK_SIZE_BIT = VK_BIT(2),
1053} VkSparseImageFormatFlagBits;
1054
1055// Sparse memory bind flags
1056typedef VkFlags VkSparseMemoryBindFlags;
1057typedef enum VkSparseMemoryBindFlagBits_
1058{
1059 VK_SPARSE_MEMORY_BIND_REPLICATE_64KIB_BLOCK_BIT = VK_BIT(0),
1060} VkSparseMemoryBindFlagBits;
1061
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001062// Semaphore creation flags
Tony Barbour8205d902015-04-16 15:59:00 -06001063typedef VkFlags VkSemaphoreCreateFlags;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001064
1065// Format capability flags
Tony Barbour8205d902015-04-16 15:59:00 -06001066typedef VkFlags VkFormatFeatureFlags;
1067typedef enum VkFormatFeatureFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001068{
Tony Barbour8205d902015-04-16 15:59:00 -06001069 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1070 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1071 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images
1072 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs)
1073 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs)
1074 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers
1075 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs)
1076 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images
1077 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images
1078 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images
1079 VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits
1080} VkFormatFeatureFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001081
Tony Barbourc2e987e2015-06-29 16:20:35 -06001082// Pipeline stage flags
1083typedef enum {
1084 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = VK_BIT(0),
1085 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = VK_BIT(1),
1086 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = VK_BIT(2),
1087 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = VK_BIT(3),
1088 VK_PIPELINE_STAGE_TESS_CONTROL_SHADER_BIT = VK_BIT(4),
1089 VK_PIPELINE_STAGE_TESS_EVALUATION_SHADER_BIT = VK_BIT(5),
1090 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = VK_BIT(6),
1091 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = VK_BIT(7),
1092 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = VK_BIT(8),
1093 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = VK_BIT(9),
1094 VK_PIPELINE_STAGE_ATTACHMENT_OUTPUT_BIT = VK_BIT(10),
1095 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = VK_BIT(11),
1096 VK_PIPELINE_STAGE_TRANSFER_BIT = VK_BIT(12),
1097 VK_PIPELINE_STAGE_HOST_BIT = VK_BIT(13),
1098 VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF,
1099 VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF,
1100} VkPipelineStageFlagBits;
1101
1102typedef VkFlags VkPipelineStageFlags;
1103
Chris Forbes2951d7d2015-06-22 17:21:59 +12001104// Image aspect flags
1105typedef VkFlags VkImageAspectFlags;
1106typedef enum VkImageAspectFlagBits_
1107{
1108 VK_IMAGE_ASPECT_COLOR_BIT = VK_BIT(0),
1109 VK_IMAGE_ASPECT_DEPTH_BIT = VK_BIT(1),
1110 VK_IMAGE_ASPECT_STENCIL_BIT = VK_BIT(2),
1111} VkImageAspectFlagBits;
1112
Tony Barbour8205d902015-04-16 15:59:00 -06001113// Query control flags
1114typedef VkFlags VkQueryControlFlags;
1115typedef enum VkQueryControlFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001116{
Tony Barbour8205d902015-04-16 15:59:00 -06001117 VK_QUERY_CONTROL_CONSERVATIVE_BIT = VK_BIT(0), // Allow conservative results to be collected by the query
1118} VkQueryControlFlagBits;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001119
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06001120// Query result flags
Tony Barbour8205d902015-04-16 15:59:00 -06001121typedef VkFlags VkQueryResultFlags;
1122typedef enum VkQueryResultFlagBits_
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06001123{
Courtney Goeltzenleuchterc0d0bb02015-06-09 08:45:23 -06001124 VK_QUERY_RESULT_DEFAULT = 0, // Results of the queries are immediately written to the destination buffer as 32-bit values
Tony Barbour8205d902015-04-16 15:59:00 -06001125 VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values
Tony Barbour8205d902015-04-16 15:59:00 -06001126 VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy
1127 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written
1128 VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available
1129} VkQueryResultFlagBits;
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06001130
Courtney Goeltzenleuchter1d723102015-06-18 21:49:59 -06001131// Shader module creation flags
1132typedef VkFlags VkShaderModuleCreateFlags;
1133
Tony Barbour8205d902015-04-16 15:59:00 -06001134// Shader creation flags
1135typedef VkFlags VkShaderCreateFlags;
1136
1137// Event creation flags
1138typedef VkFlags VkEventCreateFlags;
1139
1140// Command buffer creation flags
1141typedef VkFlags VkCmdBufferCreateFlags;
1142
1143// Command buffer optimization flags
1144typedef VkFlags VkCmdBufferOptimizeFlags;
1145typedef enum VkCmdBufferOptimizeFlagBits_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001146{
Tony Barbour8205d902015-04-16 15:59:00 -06001147 VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0),
1148 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1),
1149 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2),
1150 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3),
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08001151 VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT = 0x00000010,
Tony Barbour8205d902015-04-16 15:59:00 -06001152} VkCmdBufferOptimizeFlagBits;
1153
Courtney Goeltzenleuchter29862812015-04-16 09:13:59 -06001154// Pipeline statistics flags
1155typedef VkFlags VkQueryPipelineStatisticFlags;
1156typedef enum VkQueryPipelineStatisticFlagBits_ {
1157 VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = VK_BIT(0), // Optional
1158 VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = VK_BIT(1), // Optional
1159 VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = VK_BIT(2), // Optional
1160 VK_QUERY_PIPELINE_STATISTIC_GS_INVOCATIONS_BIT = VK_BIT(3), // Optional
1161 VK_QUERY_PIPELINE_STATISTIC_GS_PRIMITIVES_BIT = VK_BIT(4), // Optional
1162 VK_QUERY_PIPELINE_STATISTIC_C_INVOCATIONS_BIT = VK_BIT(5), // Optional
1163 VK_QUERY_PIPELINE_STATISTIC_C_PRIMITIVES_BIT = VK_BIT(6), // Optional
1164 VK_QUERY_PIPELINE_STATISTIC_FS_INVOCATIONS_BIT = VK_BIT(7), // Optional
1165 VK_QUERY_PIPELINE_STATISTIC_TCS_PATCHES_BIT = VK_BIT(8), // Optional
1166 VK_QUERY_PIPELINE_STATISTIC_TES_INVOCATIONS_BIT = VK_BIT(9), // Optional
1167 VK_QUERY_PIPELINE_STATISTIC_CS_INVOCATIONS_BIT = VK_BIT(10), // Optional
1168} VkQueryPipelineStatisticFlagBits;
1169
Courtney Goeltzenleuchter699e2aa2015-04-17 20:48:17 -06001170// Memory mapping flags
1171typedef VkFlags VkMemoryMapFlags;
Courtney Goeltzenleuchter29862812015-04-16 09:13:59 -06001172
Mark Lobodzinski99d272a2015-07-02 17:09:57 -06001173// Memory heap flags
1174typedef VkFlags VkMemoryHeapFlags;
1175typedef enum VkMemoryHeapFlagBits_ {
1176 VK_MEMORY_HEAP_HOST_LOCAL = VK_BIT(0), // If set, heap represents host memory
1177} VkMemoryHeapFlagBits;
1178
1179
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001180// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001181// Vulkan structures
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001182
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001183typedef struct VkOffset2D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001184{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001185 int32_t x;
1186 int32_t y;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001187} VkOffset2D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001188
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001189typedef struct VkOffset3D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001190{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001191 int32_t x;
1192 int32_t y;
1193 int32_t z;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001194} VkOffset3D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001195
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001196typedef struct VkExtent2D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001197{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001198 int32_t width;
1199 int32_t height;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001200} VkExtent2D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001201
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001202typedef struct VkExtent3D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001203{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001204 int32_t width;
1205 int32_t height;
1206 int32_t depth;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001207} VkExtent3D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001208
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001209typedef struct VkViewport_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001210{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001211 float originX;
1212 float originY;
1213 float width;
1214 float height;
1215 float minDepth;
1216 float maxDepth;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001217} VkViewport;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001218
Chris Forbes2951d7d2015-06-22 17:21:59 +12001219typedef struct VkRect2D_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001220{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001221 VkOffset2D offset;
1222 VkExtent2D extent;
Chris Forbes2951d7d2015-06-22 17:21:59 +12001223} VkRect2D;
1224
1225typedef struct VkRect3D_
1226{
1227 VkOffset3D offset;
1228 VkExtent3D extent;
1229} VkRect3D;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001230
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001231typedef struct VkChannelMapping_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001232{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001233 VkChannelSwizzle r;
1234 VkChannelSwizzle g;
1235 VkChannelSwizzle b;
1236 VkChannelSwizzle a;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001237} VkChannelMapping;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001238
Tony Barbour8205d902015-04-16 15:59:00 -06001239typedef struct VkPhysicalDeviceProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001240{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001241 uint32_t apiVersion;
1242 uint32_t driverVersion;
1243 uint32_t vendorId;
1244 uint32_t deviceId;
Tony Barbour8205d902015-04-16 15:59:00 -06001245 VkPhysicalDeviceType deviceType;
1246 char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
Jon Ashburn0d60d272015-07-09 15:02:25 -06001247 uint8_t pipelineCacheUUID[VK_UUID_LENGTH];
Tony Barbour8205d902015-04-16 15:59:00 -06001248} VkPhysicalDeviceProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001249
Chris Forbesd7576302015-06-21 22:55:02 +12001250typedef struct VkPhysicalDeviceFeatures_
1251{
Chris Forbesa048b312015-06-21 20:09:12 +12001252 bool32_t robustBufferAccess;
1253 bool32_t fullDrawIndexUint32;
1254 bool32_t imageCubeArray;
1255 bool32_t independentBlend;
1256 bool32_t geometryShader;
1257 bool32_t tessellationShader;
1258 bool32_t sampleRateShading;
1259 bool32_t dualSourceBlend;
1260 bool32_t logicOp;
1261 bool32_t instancedDrawIndirect;
1262 bool32_t depthClip;
1263 bool32_t depthBiasClamp;
1264 bool32_t fillModeNonSolid;
1265 bool32_t depthBounds;
1266 bool32_t wideLines;
1267 bool32_t largePoints;
1268 bool32_t textureCompressionETC2;
1269 bool32_t textureCompressionASTC_LDR;
1270 bool32_t textureCompressionBC;
1271 bool32_t pipelineStatisticsQuery;
1272 bool32_t vertexSideEffects;
1273 bool32_t tessellationSideEffects;
1274 bool32_t geometrySideEffects;
1275 bool32_t fragmentSideEffects;
1276 bool32_t shaderTessellationPointSize;
1277 bool32_t shaderGeometryPointSize;
1278 bool32_t shaderTextureGatherExtended;
1279 bool32_t shaderStorageImageExtendedFormats;
1280 bool32_t shaderStorageImageMultisample;
1281 bool32_t shaderStorageBufferArrayConstantIndexing;
1282 bool32_t shaderStorageImageArrayConstantIndexing;
1283 bool32_t shaderUniformBufferArrayDynamicIndexing;
1284 bool32_t shaderSampledImageArrayDynamicIndexing;
1285 bool32_t shaderStorageBufferArrayDynamicIndexing;
1286 bool32_t shaderStorageImageArrayDynamicIndexing;
1287 bool32_t shaderClipDistance;
1288 bool32_t shaderCullDistance;
1289 bool32_t shaderFloat64;
1290 bool32_t shaderInt64;
1291 bool32_t shaderFloat16;
1292 bool32_t shaderInt16;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06001293 bool32_t shaderResourceResidency;
1294 bool32_t shaderResourceMinLOD;
1295 bool32_t sparse;
1296 bool32_t sparseResidencyBuffer;
1297 bool32_t sparseResidencyImage2D;
1298 bool32_t sparseResidencyImage3D;
1299 bool32_t sparseResidency2Samples;
1300 bool32_t sparseResidency4Samples;
1301 bool32_t sparseResidency8Samples;
1302 bool32_t sparseResidency16Samples;
1303 bool32_t sparseResidencyStandard2DBlockShape;
1304 bool32_t sparseResidencyStandard2DMSBlockShape;
1305 bool32_t sparseResidencyStandard3DBlockShape;
1306 bool32_t sparseResidencyAlignedMipSize;
1307 bool32_t sparseResidencyNonResident;
1308 bool32_t sparseResidencyNonResidentStrict;
1309 bool32_t sparseResidencyAliased;
Chris Forbesd7576302015-06-21 22:55:02 +12001310} VkPhysicalDeviceFeatures;
1311
1312typedef struct VkPhysicalDeviceLimits_
1313{
Chris Forbesa048b312015-06-21 20:09:12 +12001314 uint32_t maxImageDimension1D;
1315 uint32_t maxImageDimension2D;
1316 uint32_t maxImageDimension3D;
1317 uint32_t maxImageDimensionCube;
1318 uint32_t maxImageArrayLayers;
1319 uint32_t maxTexelBufferSize;
1320 uint32_t maxUniformBufferSize;
1321 uint32_t maxStorageBufferSize;
1322 uint32_t maxPushConstantsSize;
1323 uint32_t maxMemoryAllocationCount;
1324 VkDeviceSize maxInlineMemoryUpdateSize;
1325 uint32_t maxBoundDescriptorSets;
1326 uint32_t maxDescriptorSets;
1327 uint32_t maxPerStageDescriptorSamplers;
1328 uint32_t maxPerStageDescriptorUniformBuffers;
1329 uint32_t maxPerStageDescriptorStorageBuffers;
1330 uint32_t maxPerStageDescriptorSampledImages;
1331 uint32_t maxPerStageDescriptorStorageImages;
1332 uint32_t maxDescriptorSetSamplers;
1333 uint32_t maxDescriptorSetUniformBuffers;
1334 uint32_t maxDescriptorSetStorageBuffers;
1335 uint32_t maxDescriptorSetSampledImages;
1336 uint32_t maxDescriptorSetStorageImages;
1337 uint32_t maxVertexInputAttributes;
1338 uint32_t maxVertexInputAttributeOffset;
1339 uint32_t maxVertexInputBindingStride;
1340 uint32_t maxVertexOutputComponents;
1341 uint32_t maxTessGenLevel;
1342 uint32_t maxTessPatchSize;
1343 uint32_t maxTessControlPerVertexInputComponents;
1344 uint32_t maxTessControlPerVertexOutputComponents;
1345 uint32_t maxTessControlPerPatchOutputComponents;
1346 uint32_t maxTessControlTotalOutputComponents;
1347 uint32_t maxTessEvaluationInputComponents;
1348 uint32_t maxTessEvaluationOutputComponents;
1349 uint32_t maxGeometryShaderInvocations;
1350 uint32_t maxGeometryInputComponents;
1351 uint32_t maxGeometryOutputComponents;
1352 uint32_t maxGeometryOutputVertices;
1353 uint32_t maxGeometryTotalOutputComponents;
1354 uint32_t maxFragmentInputComponents;
1355 uint32_t maxFragmentOutputBuffers;
1356 uint32_t maxFragmentDualSourceBuffers;
1357 uint32_t maxFragmentCombinedOutputResources;
1358 uint32_t maxComputeSharedMemorySize;
1359 uint32_t maxComputeWorkGroupCount[3];
1360 uint32_t maxComputeWorkGroupInvocations;
1361 uint32_t maxComputeWorkGroupSize[3];
1362 uint32_t subPixelPrecisionBits;
1363 uint32_t subTexelPrecisionBits;
1364 uint32_t mipmapPrecisionBits;
1365 uint32_t maxDrawIndexedIndexValue;
1366 uint32_t maxDrawIndirectInstanceCount;
1367 bool32_t primitiveRestartForPatches;
1368 float maxSamplerLodBias;
1369 uint32_t maxSamplerAnisotropy;
1370 uint32_t maxViewports;
1371 uint32_t maxDynamicViewportStates;
1372 uint32_t maxViewportDimensions[2];
1373 float viewportBoundsRange[2];
1374 uint32_t viewportSubPixelBits;
1375 uint32_t minMemoryMapAlignment;
1376 uint32_t minTexelBufferOffsetAlignment;
1377 uint32_t minUniformBufferOffsetAlignment;
1378 uint32_t minStorageBufferOffsetAlignment;
1379 uint32_t minTexelOffset;
1380 uint32_t maxTexelOffset;
1381 uint32_t minTexelGatherOffset;
1382 uint32_t maxTexelGatherOffset;
1383 uint32_t minInterpolationOffset;
1384 uint32_t maxInterpolationOffset;
1385 uint32_t subPixelInterpolationOffsetBits;
1386 uint32_t maxFramebufferWidth;
1387 uint32_t maxFramebufferHeight;
1388 uint32_t maxFramebufferLayers;
1389 uint32_t maxFramebufferColorSamples;
1390 uint32_t maxFramebufferDepthSamples;
1391 uint32_t maxFramebufferStencilSamples;
1392 uint32_t maxColorAttachments;
1393 uint32_t maxSampledImageColorSamples;
1394 uint32_t maxSampledImageDepthSamples;
1395 uint32_t maxSampledImageIntegerSamples;
1396 uint32_t maxStorageImageSamples;
1397 uint32_t maxSampleMaskWords;
1398 uint64_t timestampFrequency;
1399 uint32_t maxClipDistances;
1400 uint32_t maxCullDistances;
1401 uint32_t maxCombinedClipAndCullDistances;
1402 float pointSizeRange[2];
1403 float lineWidthRange[2];
1404 float pointSizeGranularity;
1405 float lineWidthGranularity;
Chris Forbesd7576302015-06-21 22:55:02 +12001406} VkPhysicalDeviceLimits;
1407
1408
Tony Barbour8205d902015-04-16 15:59:00 -06001409typedef struct VkPhysicalDevicePerformance_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001410{
Tony Barbour8205d902015-04-16 15:59:00 -06001411 float maxDeviceClock;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001412 float aluPerClock;
1413 float texPerClock;
1414 float primsPerClock;
1415 float pixelsPerClock;
Tony Barbour8205d902015-04-16 15:59:00 -06001416} VkPhysicalDevicePerformance;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001417
Jon Ashburneb2728b2015-04-10 14:33:07 -06001418typedef struct VkExtensionProperties_
1419{
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001420 char extName[VK_MAX_EXTENSION_NAME]; // extension name
Jon Ashburneb2728b2015-04-10 14:33:07 -06001421 uint32_t version; // version of the extension specification
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001422 uint32_t specVersion; // version number constructed via VK_API_VERSION
Jon Ashburneb2728b2015-04-10 14:33:07 -06001423} VkExtensionProperties;
1424
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001425typedef struct VkLayerProperties_
1426{
1427 char layerName[VK_MAX_EXTENSION_NAME]; // extension name
1428 uint32_t specVersion; // version of spec this layer is compatible with
1429 uint32_t implVersion; // version of the layer
1430 char description[VK_MAX_DESCRIPTION]; // additional description
1431} VkLayerProperties;
1432
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001433typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001434{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001435 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001436 const void* pNext; // Next structure in chain
1437 const char* pAppName;
1438 uint32_t appVersion;
1439 const char* pEngineName;
1440 uint32_t engineVersion;
1441 uint32_t apiVersion;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001442} VkApplicationInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001443
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001444typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001445 void* pUserData,
1446 size_t size,
1447 size_t alignment,
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001448 VkSystemAllocType allocType);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001449
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001450typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001451 void* pUserData,
1452 void* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001453
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001454typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001455{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001456 void* pUserData;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001457 PFN_vkAllocFunction pfnAlloc;
1458 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001459} VkAllocCallbacks;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001460
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001461typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001462{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001463 uint32_t queueNodeIndex;
1464 uint32_t queueCount;
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001465} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001466
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001467typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001468{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001469 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001470 const void* pNext; // Pointer to next structure
1471 uint32_t queueRecordCount;
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001472 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001473 uint32_t layerCount;
1474 const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001475 uint32_t extensionCount;
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001476 const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value
Chris Forbesd7576302015-06-21 22:55:02 +12001477 const VkPhysicalDeviceFeatures* pEnabledFeatures;
Tony Barbour8205d902015-04-16 15:59:00 -06001478 VkDeviceCreateFlags flags; // Device creation flags
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001479} VkDeviceCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001480
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001481typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001482{
Courtney Goeltzenleuchter553acb92015-04-16 21:42:44 -06001483 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001484 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter553acb92015-04-16 21:42:44 -06001485 const VkApplicationInfo* pAppInfo;
1486 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001487 uint32_t layerCount;
1488 const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001489 uint32_t extensionCount;
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06001490 const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001491} VkInstanceCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001492
Tony Barbour8205d902015-04-16 15:59:00 -06001493typedef struct VkPhysicalDeviceQueueProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001494{
Tony Barbour8205d902015-04-16 15:59:00 -06001495 VkQueueFlags queueFlags; // Queue flags
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001496 uint32_t queueCount;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001497 bool32_t supportsTimestamps;
Tony Barbour8205d902015-04-16 15:59:00 -06001498} VkPhysicalDeviceQueueProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001499
Mark Lobodzinski72346292015-07-02 16:49:40 -06001500typedef struct VkMemoryType_
1501{
1502 VkMemoryPropertyFlags propertyFlags; // Memory properties of this memory type
1503 uint32_t heapIndex; // Index of the memory heap allocations of this memory type are taken from
1504} VkMemoryType;
1505
1506typedef struct VkMemoryHeap_
1507{
1508 VkDeviceSize size; // Available memory in the heap
Mark Lobodzinski99d272a2015-07-02 17:09:57 -06001509 VkMemoryHeapFlags flags; // Flags for the heap
Mark Lobodzinski72346292015-07-02 16:49:40 -06001510} VkMemoryHeap;
1511
Tony Barbour8205d902015-04-16 15:59:00 -06001512typedef struct VkPhysicalDeviceMemoryProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001513{
Mark Lobodzinski72346292015-07-02 16:49:40 -06001514 uint32_t memoryTypeCount;
1515 VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
1516 uint32_t memoryHeapCount;
1517 VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
Tony Barbour8205d902015-04-16 15:59:00 -06001518} VkPhysicalDeviceMemoryProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001519
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001520typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001521{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001522 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001523 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001524 VkDeviceSize allocationSize; // Size of memory allocation
Mark Lobodzinski72346292015-07-02 16:49:40 -06001525 uint32_t memoryTypeIndex; // Index of the memory type to allocate from
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001526} VkMemoryAllocInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001527
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -06001528typedef struct VkMappedMemoryRange_
1529{
1530 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
1531 const void* pNext; // Pointer to next structure
1532 VkDeviceMemory mem; // Mapped memory object
1533 VkDeviceSize offset; // Offset within the mapped memory the range starts from
1534 VkDeviceSize size; // Size of the range within the mapped memory
1535} VkMappedMemoryRange;
1536
Mark Lobodzinski72346292015-07-02 16:49:40 -06001537typedef struct VkMemoryRequirements_
1538{
1539 VkDeviceSize size; // Specified in bytes
1540 VkDeviceSize alignment; // Specified in bytes
1541 VkDeviceSize granularity; // Granularity at which memory can be bound to resource sub-ranges specified in bytes (usually the page size)
1542 uint32_t memoryTypeBits; // Bitfield of the allowed memory type indices into memoryTypes[] for this object
1543} VkMemoryRequirements;
1544
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06001545typedef struct VkSparseImageFormatProperties_
1546{
1547 VkImageAspect aspect;
1548 VkExtent3D imageGranularity;
1549 VkSparseImageFormatFlags flags;
1550} VkSparseImageFormatProperties;
1551
1552typedef struct VkSparseImageMemoryRequirements_
1553{
1554 VkSparseImageFormatProperties formatProps;
1555 uint32_t imageMipTailStartLOD;
1556 VkDeviceSize imageMipTailSize;
1557 VkDeviceSize imageMipTailOffset;
1558 VkDeviceSize imageMipTailStride;
1559} VkSparseImageMemoryRequirements;
1560
1561typedef struct VkImageSubresource_
1562{
1563 VkImageAspect aspect;
1564 uint32_t mipLevel;
1565 uint32_t arraySlice;
1566} VkImageSubresource;
1567
1568typedef struct VkSparseMemoryBindInfo
1569{
1570 VkDeviceSize offset;
1571 VkDeviceSize memOffset;
1572 VkDeviceMemory mem;
1573 VkSparseMemoryBindFlags flags;
1574} VkSparseMemoryBindInfo;
1575
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001576typedef struct VkFormatProperties_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001577{
Tony Barbour8205d902015-04-16 15:59:00 -06001578 VkFormatFeatureFlags linearTilingFeatures; // Format features in case of linear tiling
1579 VkFormatFeatureFlags optimalTilingFeatures; // Format features in case of optimal tiling
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001580} VkFormatProperties;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001581
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001582typedef struct VkDescriptorInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001583{
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001584 VkBufferView bufferView; // Buffer view to write to the descriptor (in case it's a buffer descriptor, otherwise should be VK_NULL_HANDLE)
1585 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)
1586 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)
1587 VkImageLayout imageLayout; // Layout the image is expected to be in when accessed using this descriptor (only used if <imageView> is not VK_NULL_HANDLE)
1588} VkDescriptorInfo;
1589
1590typedef struct VkWriteDescriptorSet_
1591{
1592 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001593 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001594
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001595 VkDescriptorSet destSet; // Destination descriptor set
1596 uint32_t destBinding; // Binding within the destination descriptor set to write
1597 uint32_t destArrayElement; // Array element within the destination binding to write
1598
1599 uint32_t count; // Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
1600
1601 VkDescriptorType descriptorType; // Descriptor type to write (determines which fields of the array pointed by <pDescriptors> are going to be used)
1602 const VkDescriptorInfo* pDescriptors; // Array of info structures describing the descriptors to write
1603} VkWriteDescriptorSet;
1604
1605typedef struct VkCopyDescriptorSet_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001606{
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001607 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001608 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001609
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001610 VkDescriptorSet srcSet; // Source descriptor set
1611 uint32_t srcBinding; // Binding within the source descriptor set to copy from
1612 uint32_t srcArrayElement; // Array element within the source binding to copy from
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001613
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001614 VkDescriptorSet destSet; // Destination descriptor set
1615 uint32_t destBinding; // Binding within the destination descriptor set to copy to
1616 uint32_t destArrayElement; // Array element within the destination binding to copy to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001617
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08001618 uint32_t count; // Number of descriptors to copy
1619} VkCopyDescriptorSet;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001620
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001621typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001622{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001623 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001624 const void* pNext; // Pointer to next structure.
Tony Barbour8205d902015-04-16 15:59:00 -06001625 VkDeviceSize size; // Specified in bytes
1626 VkBufferUsageFlags usage; // Buffer usage flags
1627 VkBufferCreateFlags flags; // Buffer creation flags
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001628} VkBufferCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001629
Courtney Goeltzenleuchter070f6da2015-04-10 17:59:44 -06001630typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001631{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001632 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001633 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001634 VkBuffer buffer;
1635 VkBufferViewType viewType;
1636 VkFormat format; // Optionally specifies format of elements
Tony Barbour8205d902015-04-16 15:59:00 -06001637 VkDeviceSize offset; // Specified in bytes
1638 VkDeviceSize range; // View size specified in bytes
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -06001639} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001640
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001641typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001642{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001643 VkImageAspect aspect;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001644 uint32_t baseMipLevel;
1645 uint32_t mipLevels;
1646 uint32_t baseArraySlice;
1647 uint32_t arraySize;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001648} VkImageSubresourceRange;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001649
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001650typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001651{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001652 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001653 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001654
Tony Barbour8205d902015-04-16 15:59:00 -06001655 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1656 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001657} VkMemoryBarrier;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001658
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001659typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001660{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001661 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001662 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001663
Tony Barbour8205d902015-04-16 15:59:00 -06001664 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1665 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001666
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001667 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001668
Tony Barbour8205d902015-04-16 15:59:00 -06001669 VkDeviceSize offset; // Offset within the buffer to sync
1670 VkDeviceSize size; // Amount of bytes to sync
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001671} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001672
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001673typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001674{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001675 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001676 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001677
Tony Barbour8205d902015-04-16 15:59:00 -06001678 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1679 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001680
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001681 VkImageLayout oldLayout; // Current layout of the image
1682 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001683
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001684 VkImage image; // Image to sync
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001685
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001686 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001687} VkImageMemoryBarrier;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001688
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001689typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001690{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001691 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001692 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001693 VkImageType imageType;
1694 VkFormat format;
1695 VkExtent3D extent;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001696 uint32_t mipLevels;
1697 uint32_t arraySize;
1698 uint32_t samples;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001699 VkImageTiling tiling;
Tony Barbour8205d902015-04-16 15:59:00 -06001700 VkImageUsageFlags usage; // Image usage flags
1701 VkImageCreateFlags flags; // Image creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001702} VkImageCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001703
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001704typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001705{
Tony Barbour8205d902015-04-16 15:59:00 -06001706 VkDeviceSize offset; // Specified in bytes
1707 VkDeviceSize size; // Specified in bytes
1708 VkDeviceSize rowPitch; // Specified in bytes
1709 VkDeviceSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001710} VkSubresourceLayout;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001711
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001712typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001713{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001714 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001715 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001716 VkImage image;
1717 VkImageViewType viewType;
1718 VkFormat format;
1719 VkChannelMapping channels;
1720 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001721} VkImageViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001722
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001723typedef struct VkColorAttachmentViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001724{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001725 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001726 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001727 VkImage image;
1728 VkFormat format;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001729 uint32_t mipLevel;
1730 uint32_t baseArraySlice;
1731 uint32_t arraySize;
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001732 VkImage msaaResolveImage;
1733 VkImageSubresourceRange msaaResolveSubResource;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001734} VkColorAttachmentViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001735
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001736typedef struct VkDepthStencilViewCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001737{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001738 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001739 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001740 VkImage image;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001741 uint32_t mipLevel;
1742 uint32_t baseArraySlice;
1743 uint32_t arraySize;
Tony Barbour8205d902015-04-16 15:59:00 -06001744 VkDepthStencilViewCreateFlags flags; // Depth stencil attachment view flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001745} VkDepthStencilViewCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001746
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001747typedef struct VkColorAttachmentBindInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001748{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001749 VkColorAttachmentView view;
1750 VkImageLayout layout;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001751} VkColorAttachmentBindInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001752
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001753typedef struct VkDepthStencilBindInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001754{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001755 VkDepthStencilView view;
1756 VkImageLayout layout;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001757} VkDepthStencilBindInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001758
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001759typedef struct VkBufferCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001760{
Tony Barbour8205d902015-04-16 15:59:00 -06001761 VkDeviceSize srcOffset; // Specified in bytes
1762 VkDeviceSize destOffset; // Specified in bytes
1763 VkDeviceSize copySize; // Specified in bytes
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001764} VkBufferCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001765
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06001766typedef struct VkSparseImageMemoryBindInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001767{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001768 VkImageSubresource subresource;
1769 VkOffset3D offset;
1770 VkExtent3D extent;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06001771 VkDeviceSize memOffset;
1772 VkDeviceMemory mem;
1773 VkSparseMemoryBindFlags flags;
1774} VkSparseImageMemoryBindInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001775
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001776typedef struct VkImageCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001777{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001778 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001779 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001780 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001781 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1782 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001783} VkImageCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001784
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001785typedef struct VkImageBlit_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001786{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001787 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001788 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1789 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001790 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001791 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1792 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001793} VkImageBlit;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001794
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001795typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001796{
Tony Barbour8205d902015-04-16 15:59:00 -06001797 VkDeviceSize bufferOffset; // Specified in bytes
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001798 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001799 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1800 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001801} VkBufferImageCopy;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001802
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001803typedef struct VkImageResolve_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001804{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001805 VkImageSubresource srcSubresource;
Tony Barboure9f99942015-04-13 13:11:12 -06001806 VkOffset3D srcOffset;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001807 VkImageSubresource destSubresource;
Tony Barboure9f99942015-04-13 13:11:12 -06001808 VkOffset3D destOffset;
1809 VkExtent3D extent;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001810} VkImageResolve;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001811
Courtney Goeltzenleuchter1d723102015-06-18 21:49:59 -06001812typedef struct VkShaderModuleCreateInfo_
1813{
1814 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
1815 const void* pNext; // Pointer to next structure
1816 size_t codeSize; // Specified in bytes
1817 const void* pCode; // Binary code of size codeSize
1818 VkShaderModuleCreateFlags flags; // Reserved
1819} VkShaderModuleCreateInfo;
1820
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001821typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001822{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001823 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001824 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter1d723102015-06-18 21:49:59 -06001825 VkShaderModule module; // Module containing entry point
Courtney Goeltzenleuchter2d034fd2015-06-28 13:01:17 -06001826 const char* pName; // Null-terminate entry point name
Tony Barbour8205d902015-04-16 15:59:00 -06001827 VkShaderCreateFlags flags; // Reserved
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001828} VkShaderCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001829
Jon Ashburn0d60d272015-07-09 15:02:25 -06001830typedef struct VkPipelineCacheCreateInfo_
1831{
1832 VkStructureType sType;
1833 const void* pNext;
1834 size_t initialSize;
1835 const void* initialData;
1836 size_t maxSize;
1837} VkPipelineCacheCreateInfo;
1838
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001839typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001840{
Tony Barbour8205d902015-04-16 15:59:00 -06001841 VkDescriptorType descriptorType; // Type of the descriptors in this binding
Chia-I Wud3114a22015-05-25 16:22:52 +08001842 uint32_t arraySize; // Number of descriptors in this binding
Tony Barbour8205d902015-04-16 15:59:00 -06001843 VkShaderStageFlags stageFlags; // Shader stages this binding is visible to
1844 const VkSampler* pImmutableSamplers; // Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001845} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001846
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001847typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001848{
Tony Barbour8205d902015-04-16 15:59:00 -06001849 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
1850 const void* pNext; // Pointer to next structure
1851 uint32_t count; // Number of bindings in the descriptor set layout
1852 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001853} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001854
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001855typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001856{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001857 VkDescriptorType type;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001858 uint32_t count;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001859} VkDescriptorTypeCount;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001860
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001861typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001862{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001863 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001864 const void* pNext; // Pointer to next structure
1865 uint32_t count;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001866 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001867} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001868
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001869typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001870{
1871 uint32_t bufferId;
1872 size_t bufferSize;
1873 const void* pBufferData;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001874} VkLinkConstBuffer;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001875
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001876typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001877{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001878 uint32_t constantId; // The SpecConstant ID specified in the BIL
1879 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001880} VkSpecializationMapEntry;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001881
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001882typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001883{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001884 uint32_t mapEntryCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001885 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001886 const void* pData;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001887} VkSpecializationInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001888
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001889typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001890{
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001891 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
1892 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001893 VkShaderStage stage;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001894 VkShader shader;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001895 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001896 const VkLinkConstBuffer* pLinkConstBufferInfo;
1897 const VkSpecializationInfo* pSpecializationInfo;
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001898} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001899
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001900typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001901{
Tony Barbour8205d902015-04-16 15:59:00 -06001902 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
1903 const void* pNext; // Pointer to next structure
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001904 VkPipelineShaderStageCreateInfo cs;
Tony Barbour8205d902015-04-16 15:59:00 -06001905 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski556f7212015-04-17 14:11:39 -05001906 VkPipelineLayout layout; // Interface layout of the pipeline
Jon Ashburn0d60d272015-07-09 15:02:25 -06001907 VkPipeline basePipelineHandle;
1908 int32_t basePipelineIndex;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001909} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001910
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001911typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001912{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001913 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterad870812015-04-15 15:29:59 -06001914 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001915
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001916 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001917} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001918
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001919typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001920{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001921 uint32_t location; // location of the shader vertex attrib
1922 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001923
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001924 VkFormat format; // format of source data
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001925
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001926 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001927} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001928
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001929typedef struct VkPipelineVertexInputStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001930{
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001931 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001932 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001933
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001934 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001935 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001936
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001937 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001938 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06001939} VkPipelineVertexInputStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001940
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001941typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001942{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001943 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001944 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001945 VkPrimitiveTopology topology;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001946 bool32_t disableVertexReuse; // optional
1947 bool32_t primitiveRestartEnable;
1948 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001949} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001950
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001951typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001952{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001953 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001954 const void* pNext; // Pointer to next structure
1955 uint32_t patchControlPoints;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001956} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001957
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001958typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001959{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001960 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001961 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06001962 uint32_t viewportCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001963 VkCoordinateOrigin clipOrigin; // optional (GL45)
1964 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001965} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001966
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001967typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001968{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001969 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001970 const void* pNext; // Pointer to next structure
1971 bool32_t depthClipEnable;
1972 bool32_t rasterizerDiscardEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001973 VkCoordinateOrigin pointOrigin; // optional (GL45)
Tony Barbour8205d902015-04-16 15:59:00 -06001974 VkProvokingVertex provokingVertex; // optional (GL45)
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001975 VkFillMode fillMode; // optional (GL45)
1976 VkCullMode cullMode;
Tony Barbour8205d902015-04-16 15:59:00 -06001977 VkFrontFace frontFace;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001978} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001979
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001980typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001981{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06001982 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001983 const void* pNext; // Pointer to next structure
Tony Barboure094edf2015-06-26 10:18:34 -06001984 uint32_t rasterSamples;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001985 bool32_t multisampleEnable; // optional (GL45)
1986 bool32_t sampleShadingEnable; // optional (GL45)
1987 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001988 VkSampleMask sampleMask;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001989} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001990
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001991typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06001992{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001993 bool32_t blendEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001994 VkFormat format;
1995 VkBlend srcBlendColor;
1996 VkBlend destBlendColor;
Tony Barbour8205d902015-04-16 15:59:00 -06001997 VkBlendOp blendOpColor;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06001998 VkBlend srcBlendAlpha;
1999 VkBlend destBlendAlpha;
Tony Barbour8205d902015-04-16 15:59:00 -06002000 VkBlendOp blendOpAlpha;
2001 VkChannelFlags channelWriteMask;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002002} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002003
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002004typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002005{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002006 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002007 const void* pNext; // Pointer to next structure
2008 bool32_t alphaToCoverageEnable;
2009 bool32_t logicOpEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002010 VkLogicOp logicOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002011 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002012 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002013} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002014
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002015typedef struct VkStencilOpState_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002016{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002017 VkStencilOp stencilFailOp;
2018 VkStencilOp stencilPassOp;
2019 VkStencilOp stencilDepthFailOp;
Tony Barbour8205d902015-04-16 15:59:00 -06002020 VkCompareOp stencilCompareOp;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002021} VkStencilOpState;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002022
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002023typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002024{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002025 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002026 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002027 VkFormat format;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002028 bool32_t depthTestEnable;
2029 bool32_t depthWriteEnable;
Tony Barbour8205d902015-04-16 15:59:00 -06002030 VkCompareOp depthCompareOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002031 bool32_t depthBoundsEnable; // optional (depth_bounds_test)
2032 bool32_t stencilTestEnable;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002033 VkStencilOpState front;
2034 VkStencilOpState back;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002035} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002036
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002037typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002038{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002039 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002040 const void* pNext; // Pointer to next structure
Mark Lobodzinski0e0fb5c2015-06-23 15:11:57 -06002041 uint32_t stageCount;
2042 const VkPipelineShaderStageCreateInfo* pStages; // One entry for each active shader stage
2043 const VkPipelineVertexInputStateCreateInfo* pVertexInputState;
2044 const VkPipelineIaStateCreateInfo* pIaState;
2045 const VkPipelineTessStateCreateInfo* pTessState;
2046 const VkPipelineVpStateCreateInfo* pVpState;
2047 const VkPipelineRsStateCreateInfo* pRsState;
2048 const VkPipelineMsStateCreateInfo* pMsState;
2049 const VkPipelineDsStateCreateInfo* pDsState;
2050 const VkPipelineCbStateCreateInfo* pCbState;
Tony Barbour8205d902015-04-16 15:59:00 -06002051 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski556f7212015-04-17 14:11:39 -05002052 VkPipelineLayout layout; // Interface layout of the pipeline
Jon Ashburn0d60d272015-07-09 15:02:25 -06002053 VkPipeline basePipelineHandle;
2054 int32_t basePipelineIndex;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002055} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002056
Mark Lobodzinski556f7212015-04-17 14:11:39 -05002057typedef struct VkPipelineLayoutCreateInfo_
2058{
2059 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2060 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter699e2aa2015-04-17 20:48:17 -06002061
Mark Lobodzinski556f7212015-04-17 14:11:39 -05002062 uint32_t descriptorSetCount; // Number of descriptor sets interfaced by the pipeline
2063 const VkDescriptorSetLayout* pSetLayouts; // Array of <setCount> number of descriptor set layout objects defining the layout of the
2064} VkPipelineLayoutCreateInfo;
2065
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002066typedef struct VkSamplerCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002067{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002068 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002069 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002070 VkTexFilter magFilter; // Filter mode for magnification
2071 VkTexFilter minFilter; // Filter mode for minifiation
2072 VkTexMipmapMode mipMode; // Mipmap selection mode
2073 VkTexAddress addressU;
2074 VkTexAddress addressV;
2075 VkTexAddress addressW;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002076 float mipLodBias;
2077 uint32_t maxAnisotropy;
Tony Barbour8205d902015-04-16 15:59:00 -06002078 VkCompareOp compareOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002079 float minLod;
2080 float maxLod;
Tony Barbour8205d902015-04-16 15:59:00 -06002081 VkBorderColor borderColor;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002082} VkSamplerCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002083
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002084typedef struct VkDynamicVpStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002085{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002086 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002087 const void* pNext; // Pointer to next structure
2088 uint32_t viewportAndScissorCount; // number of entries in pViewports and pScissors
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002089 const VkViewport* pViewports;
Chris Forbes2951d7d2015-06-22 17:21:59 +12002090 const VkRect2D* pScissors;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002091} VkDynamicVpStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002092
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002093typedef struct VkDynamicRsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002094{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002095 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002096 const void* pNext; // Pointer to next structure
2097 float depthBias;
2098 float depthBiasClamp;
2099 float slopeScaledDepthBias;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002100 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002101} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002102
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002103typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002104{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002105 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002106 const void* pNext; // Pointer to next structure
2107 float blendConst[4];
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002108} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002109
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002110typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002111{
Mark Lobodzinski4405fbf2015-06-12 11:14:17 -06002112 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
2113 const void* pNext; // Pointer to next structure
2114 float minDepthBounds; // optional (depth_bounds_test)
2115 float maxDepthBounds; // optional (depth_bounds_test)
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002116 uint32_t stencilReadMask;
2117 uint32_t stencilWriteMask;
2118 uint32_t stencilFrontRef;
2119 uint32_t stencilBackRef;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002120} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002121
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002122typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002123{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002124 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002125 const void* pNext; // Pointer to next structure
2126 uint32_t queueNodeIndex;
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08002127 VkCmdBufferLevel level;
Tony Barbour8205d902015-04-16 15:59:00 -06002128 VkCmdBufferCreateFlags flags; // Command buffer creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002129} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002130
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002131typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002132{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002133 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002134 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002135
Tony Barbour8205d902015-04-16 15:59:00 -06002136 VkCmdBufferOptimizeFlags flags; // Command buffer optimization flags
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08002137
2138 VkRenderPass renderPass;
2139 VkFramebuffer framebuffer;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002140} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002141
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002142typedef struct VkRenderPassBegin_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002143{
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002144 VkRenderPass renderPass;
2145 VkFramebuffer framebuffer;
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08002146 VkRenderPassContents contents;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002147} VkRenderPassBegin;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002148
Chris Forbese3105972015-06-24 14:34:53 +12002149// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on format.
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002150typedef union VkClearColorValue_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002151{
Chris Forbese3105972015-06-24 14:34:53 +12002152 float f32[4];
2153 int32_t s32[4];
2154 uint32_t u32[4];
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002155} VkClearColorValue;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002156
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002157typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002158{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002159 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002160 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002161
Chris Forbes2951d7d2015-06-22 17:21:59 +12002162 VkRect2D renderArea;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002163 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002164 VkExtent2D extent;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002165 uint32_t sampleCount;
2166 uint32_t layers;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002167 const VkFormat* pColorFormats;
2168 const VkImageLayout* pColorLayouts;
2169 const VkAttachmentLoadOp* pColorLoadOps;
2170 const VkAttachmentStoreOp* pColorStoreOps;
Chris Forbese3105972015-06-24 14:34:53 +12002171 const VkClearColorValue* pColorLoadClearValues;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002172 VkFormat depthStencilFormat;
2173 VkImageLayout depthStencilLayout;
2174 VkAttachmentLoadOp depthLoadOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002175 float depthLoadClearValue;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002176 VkAttachmentStoreOp depthStoreOp;
2177 VkAttachmentLoadOp stencilLoadOp;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002178 uint32_t stencilLoadClearValue;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002179 VkAttachmentStoreOp stencilStoreOp;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002180} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002181
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002182typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002183{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002184 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002185 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06002186 VkEventCreateFlags flags; // Event creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002187} VkEventCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002188
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002189typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002190{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002191 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002192 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06002193 VkFenceCreateFlags flags; // Fence creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002194} VkFenceCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002195
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002196typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002197{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002198 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002199 const void* pNext; // Pointer to next structure
Tony Barbour8205d902015-04-16 15:59:00 -06002200 VkSemaphoreCreateFlags flags; // Semaphore creation flags
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002201} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002202
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002203typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002204{
Courtney Goeltzenleuchter29862812015-04-16 09:13:59 -06002205 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
2206 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002207 VkQueryType queryType;
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002208 uint32_t slots;
Courtney Goeltzenleuchter29862812015-04-16 09:13:59 -06002209 VkQueryPipelineStatisticFlags pipelineStatistics; // Optional
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002210} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002211
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002212typedef struct VkFramebufferCreateInfo_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002213{
Courtney Goeltzenleuchter136eb182015-04-10 16:34:21 -06002214 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002215 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002216
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002217 uint32_t colorAttachmentCount;
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002218 const VkColorAttachmentBindInfo* pColorAttachments;
2219 const VkDepthStencilBindInfo* pDepthStencilAttachment;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002220
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002221 uint32_t sampleCount;
2222 uint32_t width;
2223 uint32_t height;
2224 uint32_t layers;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002225} VkFramebufferCreateInfo;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002226
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002227typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002228{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002229 uint32_t vertexCount;
2230 uint32_t instanceCount;
2231 uint32_t firstVertex;
2232 uint32_t firstInstance;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002233} VkDrawIndirectCmd;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002234
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002235typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002236{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002237 uint32_t indexCount;
2238 uint32_t instanceCount;
2239 uint32_t firstIndex;
2240 int32_t vertexOffset;
2241 uint32_t firstInstance;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002242} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002243
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002244typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002245{
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06002246 uint32_t x;
2247 uint32_t y;
2248 uint32_t z;
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002249} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002250
2251// ------------------------------------------------------------------------------------------------
2252// API functions
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002253typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2254typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
Tony Barbour8205d902015-04-16 15:59:00 -06002255typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
Chris Forbesd7576302015-06-21 22:55:02 +12002256typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
2257typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatInfo)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatInfo);
2258typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
Jon Ashburn53c16772015-05-06 10:15:07 -06002259typedef void * (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char * pName);
Jon Ashburn1245cec2015-05-18 13:20:15 -06002260typedef void * (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char * pName);
Tony Barbour8205d902015-04-16 15:59:00 -06002261typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002262typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Tony Barbour426b9052015-06-24 16:06:58 -06002263typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
2264typedef VkResult (VKAPI *PFN_vkGetPhysicalDevicePerformance)(VkPhysicalDevice physicalDevice, VkPhysicalDevicePerformance* pPerformance);
2265typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount);
2266typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties);
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06002267typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06002268typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char * pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
2269typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t *pCount, VkExtensionProperties* pProperties);
2270typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties);
2271typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties* pProperties);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002272typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2273typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002274typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2275typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
Tony Barbour8205d902015-04-16 15:59:00 -06002276typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
Mike Stroyan230e6252015-04-17 12:36:38 -06002277typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem);
Mike Stroyan230e6252015-04-17 12:36:38 -06002278typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
2279typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -06002280typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
2281typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
Mike Stroyan230e6252015-04-17 12:36:38 -06002282typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkDevice device, VkObjectType objType, VkObject object);
Tony Barbour426b9052015-06-24 16:06:58 -06002283typedef VkResult (VKAPI *PFN_vkGetObjectMemoryRequirements)(VkDevice device, VkObjectType objType, VkObject object, VkMemoryRequirements* pMemoryRequirements);
Mark Lobodzinski23182612015-05-29 09:32:35 -05002284typedef VkResult (VKAPI *PFN_vkBindObjectMemory)(VkDevice device, VkObjectType objType, VkObject object, VkDeviceMemory mem, VkDeviceSize offset);
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06002285typedef VkResult (VKAPI *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pNumRequirements, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
2286typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, uint32_t samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pNumProperties, VkSparseImageFormatProperties* pProperties);
2287typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuffer buffer, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo);
2288typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageOpaqueMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo);
2289typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002290typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
Courtney Goeltzenleuchterf2e33ad2015-06-18 17:28:20 -06002291typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
Mike Stroyan230e6252015-04-17 12:36:38 -06002292typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002293typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout);
2294typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2295typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2296typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2297typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
Mike Stroyan230e6252015-04-17 12:36:38 -06002298typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
2299typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event);
2300typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002301typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
Mike Stroyan230e6252015-04-17 12:36:38 -06002302typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002303typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2304typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2305typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
Tony Barbour426b9052015-06-24 16:06:58 -06002306typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002307typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
2308typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView);
2309typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView);
Courtney Goeltzenleuchter1d723102015-06-18 21:49:59 -06002310typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002311typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
Jon Ashburn0d60d272015-07-09 15:02:25 -06002312typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache);
2313typedef VkResult (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache);
2314typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache);
2315typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData);
2316typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches);
2317typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines);
2318typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines);
Mark Lobodzinski556f7212015-04-17 14:11:39 -05002319typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002320typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2321typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002322typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
Mike Stroyan230e6252015-04-17 12:36:38 -06002323typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
2324typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08002325typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
Courtney Goeltzenleuchterfcf855f2015-04-10 16:24:50 -06002326typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2327typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2328typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2329typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002330typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2331typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2332typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2333typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002334typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2335typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
Mark Lobodzinskia65c4632015-06-15 13:21:21 -06002336typedef 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 Barbour8205d902015-04-16 15:59:00 -06002337typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
2338typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002339typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2340typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
Tony Barbour8205d902015-04-16 15:59:00 -06002341typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
2342typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002343typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
Tony Barbour8205d902015-04-16 15:59:00 -06002344typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002345typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2346typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
Mark Lobodzinski20f68592015-05-22 14:43:25 -05002347typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002348typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2349typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
Tony Barbour8205d902015-04-16 15:59:00 -06002350typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
2351typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
Chris Forbese3105972015-06-24 14:34:53 +12002352typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Chris Forbes2951d7d2015-06-22 17:21:59 +12002353typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Chris Forbese3105972015-06-24 14:34:53 +12002354typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
Chris Forbes2951d7d2015-06-22 17:21:59 +12002355typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects);
Tony Barbour11f74372015-04-13 15:02:52 -06002356typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Tony Barbourc2e987e2015-06-29 16:20:35 -06002357typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
2358typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
2359typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void** ppMemBarriers);
2360typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, bool32_t byRegion, uint32_t memBarrierCount, const void** ppMemBarriers);
Tony Barbour8205d902015-04-16 15:59:00 -06002361typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002362typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2363typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
Tony Barbour8205d902015-04-16 15:59:00 -06002364typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
Tony Barbour3e3420a2015-04-16 19:09:28 -06002365typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags);
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002366typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2367typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002368typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin);
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08002369typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer);
2370typedef void (VKAPI *PFN_vkCmdExecuteCommands)(VkCmdBuffer cmdBuffer, uint32_t cmdBuffersCount, const VkCmdBuffer* pCmdBuffers);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002371
2372#ifdef VK_PROTOTYPES
2373
Tony Barbour8205d902015-04-16 15:59:00 -06002374// Device initialization
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002375
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002376VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002377 const VkInstanceCreateInfo* pCreateInfo,
2378 VkInstance* pInstance);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002379
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002380VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002381 VkInstance instance);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002382
Jon Ashburn07b309a2015-04-15 11:31:12 -06002383VkResult VKAPI vkEnumeratePhysicalDevices(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002384 VkInstance instance,
Jon Ashburn07b309a2015-04-15 11:31:12 -06002385 uint32_t* pPhysicalDeviceCount,
Tony Barbour8205d902015-04-16 15:59:00 -06002386 VkPhysicalDevice* pPhysicalDevices);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002387
Chris Forbesd7576302015-06-21 22:55:02 +12002388VkResult VKAPI vkGetPhysicalDeviceFeatures(
2389 VkPhysicalDevice physicalDevice,
2390 VkPhysicalDeviceFeatures* pFeatures);
2391
2392VkResult VKAPI vkGetPhysicalDeviceFormatInfo(
2393 VkPhysicalDevice physicalDevice,
2394 VkFormat format,
2395 VkFormatProperties* pFormatInfo);
2396
2397VkResult VKAPI vkGetPhysicalDeviceLimits(
2398 VkPhysicalDevice physicalDevice,
2399 VkPhysicalDeviceLimits* pLimits);
2400
Jon Ashburn53c16772015-05-06 10:15:07 -06002401void * VKAPI vkGetInstanceProcAddr(
2402 VkInstance instance,
2403 const char* pName);
2404
Jon Ashburn1245cec2015-05-18 13:20:15 -06002405void * VKAPI vkGetDeviceProcAddr(
2406 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002407 const char* pName);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002408// Device functions
2409
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002410VkResult VKAPI vkCreateDevice(
Tony Barbour8205d902015-04-16 15:59:00 -06002411 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002412 const VkDeviceCreateInfo* pCreateInfo,
2413 VkDevice* pDevice);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002414
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002415VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002416 VkDevice device);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002417
Tony Barbour426b9052015-06-24 16:06:58 -06002418VkResult VKAPI vkGetPhysicalDeviceProperties(
2419 VkPhysicalDevice physicalDevice,
2420 VkPhysicalDeviceProperties* pProperties);
2421
2422VkResult VKAPI vkGetPhysicalDevicePerformance(
2423 VkPhysicalDevice physicalDevice,
2424 VkPhysicalDevicePerformance* pPerformance);
2425
2426VkResult VKAPI vkGetPhysicalDeviceQueueCount(
2427 VkPhysicalDevice physicalDevice,
2428 uint32_t* pCount);
2429
2430VkResult VKAPI vkGetPhysicalDeviceQueueProperties(
2431 VkPhysicalDevice physicalDevice,
2432 uint32_t count,
2433 VkPhysicalDeviceQueueProperties* pQueueProperties);
2434
2435VkResult VKAPI vkGetPhysicalDeviceMemoryProperties(
2436 VkPhysicalDevice physicalDevice,
2437 VkPhysicalDeviceMemoryProperties* pMemoryProperies);
2438
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002439// Extension discovery functions
Courtney Goeltzenleuchterda4a99e2015-04-23 17:49:22 -06002440
Tony Barbour426b9052015-06-24 16:06:58 -06002441VkResult VKAPI vkGetGlobalExtensionProperties(
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06002442 const char* pLayerName,
2443 uint32_t* pCount,
Tony Barbour426b9052015-06-24 16:06:58 -06002444 VkExtensionProperties* pProperties);
2445
Tony Barbour426b9052015-06-24 16:06:58 -06002446VkResult VKAPI vkGetPhysicalDeviceExtensionProperties(
2447 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06002448 const char* pLayerName,
2449 uint32_t* pCount,
Tony Barbour426b9052015-06-24 16:06:58 -06002450 VkExtensionProperties* pProperties);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002451
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -06002452VkResult VKAPI vkGetGlobalLayerProperties(
2453 uint32_t* pCount,
2454 VkLayerProperties* pProperties);
2455
2456VkResult VKAPI vkGetPhysicalDeviceLayerProperties(
2457 VkPhysicalDevice physicalDevice,
2458 uint32_t* pCount,
2459 VkLayerProperties* pProperties);
2460
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002461// Queue functions
2462
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002463VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002464 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002465 uint32_t queueNodeIndex,
2466 uint32_t queueIndex,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002467 VkQueue* pQueue);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002468
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002469VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002470 VkQueue queue,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002471 uint32_t cmdBufferCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002472 const VkCmdBuffer* pCmdBuffers,
2473 VkFence fence);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002474
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002475VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002476 VkQueue queue);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002477
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002478VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002479 VkDevice device);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002480
2481// Memory functions
2482
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002483VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002484 VkDevice device,
2485 const VkMemoryAllocInfo* pAllocInfo,
Tony Barbour8205d902015-04-16 15:59:00 -06002486 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002487
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002488VkResult VKAPI vkFreeMemory(
Mike Stroyan230e6252015-04-17 12:36:38 -06002489 VkDevice device,
Tony Barbour8205d902015-04-16 15:59:00 -06002490 VkDeviceMemory mem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002491
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002492VkResult VKAPI vkMapMemory(
Mike Stroyan230e6252015-04-17 12:36:38 -06002493 VkDevice device,
Tony Barbour8205d902015-04-16 15:59:00 -06002494 VkDeviceMemory mem,
Tony Barbour3e3420a2015-04-16 19:09:28 -06002495 VkDeviceSize offset,
2496 VkDeviceSize size,
Tony Barbour8205d902015-04-16 15:59:00 -06002497 VkMemoryMapFlags flags,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002498 void** ppData);
2499
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002500VkResult VKAPI vkUnmapMemory(
Mike Stroyan230e6252015-04-17 12:36:38 -06002501 VkDevice device,
Tony Barbour8205d902015-04-16 15:59:00 -06002502 VkDeviceMemory mem);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002503
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -06002504VkResult VKAPI vkFlushMappedMemoryRanges(
Mike Stroyan230e6252015-04-17 12:36:38 -06002505 VkDevice device,
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -06002506 uint32_t memRangeCount,
2507 const VkMappedMemoryRange* pMemRanges);
2508
2509VkResult VKAPI vkInvalidateMappedMemoryRanges(
2510 VkDevice device,
2511 uint32_t memRangeCount,
2512 const VkMappedMemoryRange* pMemRanges);
Tony Barbour859ceab2015-04-16 19:23:13 -06002513
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002514// Generic API object functions
2515
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002516VkResult VKAPI vkDestroyObject(
Mike Stroyan230e6252015-04-17 12:36:38 -06002517 VkDevice device,
2518 VkObjectType objType,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002519 VkObject object);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002520
Tony Barbour3e3420a2015-04-16 19:09:28 -06002521// Memory management API functions
Mark Lobodzinskicf26e072015-04-16 11:44:05 -05002522
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -05002523VkResult VKAPI vkBindObjectMemory(
2524 VkDevice device,
Mike Stroyan230e6252015-04-17 12:36:38 -06002525 VkObjectType objType,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002526 VkObject object,
Tony Barbour8205d902015-04-16 15:59:00 -06002527 VkDeviceMemory mem,
2528 VkDeviceSize memOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002529
Tony Barbour426b9052015-06-24 16:06:58 -06002530VkResult VKAPI vkGetObjectMemoryRequirements(
2531 VkDevice device,
2532 VkObjectType objType,
2533 VkObject object,
2534 VkMemoryRequirements* pMemoryRequirements);
2535
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06002536VkResult VKAPI vkGetImageSparseMemoryRequirements(
2537 VkDevice device,
2538 VkImage image,
2539 uint32_t* pNumRequirements,
2540 VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
2541
2542VkResult VKAPI vkGetPhysicalDeviceSparseImageFormatProperties(
2543 VkPhysicalDevice physicalDevice,
2544 VkFormat format,
2545 VkImageType type,
2546 uint32_t samples,
2547 VkImageUsageFlags usage,
2548 VkImageTiling tiling,
2549 uint32_t* pNumProperties,
2550 VkSparseImageFormatProperties* pProperties);
2551
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -05002552VkResult VKAPI vkQueueBindSparseBufferMemory(
Mark Lobodzinskicf26e072015-04-16 11:44:05 -05002553 VkQueue queue,
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -05002554 VkBuffer buffer,
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06002555 uint32_t numBindings,
2556 const VkSparseMemoryBindInfo* pBindInfo);
2557
2558VkResult VKAPI vkQueueBindSparseImageOpaqueMemory(
2559 VkQueue queue,
2560 VkImage image,
2561 uint32_t numBindings,
2562 const VkSparseMemoryBindInfo* pBindInfo);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002563
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -05002564VkResult VKAPI vkQueueBindSparseImageMemory(
Mark Lobodzinskicf26e072015-04-16 11:44:05 -05002565 VkQueue queue,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002566 VkImage image,
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -06002567 uint32_t numBindings,
2568 const VkSparseImageMemoryBindInfo* pBindInfo);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002569
2570// Fence functions
2571
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002572VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002573 VkDevice device,
2574 const VkFenceCreateInfo* pCreateInfo,
2575 VkFence* pFence);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002576
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002577VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002578 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002579 uint32_t fenceCount,
Courtney Goeltzenleuchterf2e33ad2015-06-18 17:28:20 -06002580 const VkFence* pFences);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002581
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002582VkResult VKAPI vkGetFenceStatus(
Mike Stroyan230e6252015-04-17 12:36:38 -06002583 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002584 VkFence fence);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002585
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002586VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002587 VkDevice device,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002588 uint32_t fenceCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002589 const VkFence* pFences,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002590 bool32_t waitAll,
2591 uint64_t timeout); // timeout in nanoseconds
2592
2593// Queue semaphore functions
2594
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002595VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002596 VkDevice device,
2597 const VkSemaphoreCreateInfo* pCreateInfo,
2598 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002599
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002600VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002601 VkQueue queue,
2602 VkSemaphore semaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002603
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002604VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002605 VkQueue queue,
2606 VkSemaphore semaphore);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002607
2608// Event functions
2609
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002610VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002611 VkDevice device,
2612 const VkEventCreateInfo* pCreateInfo,
2613 VkEvent* pEvent);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002614
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002615VkResult VKAPI vkGetEventStatus(
Mike Stroyan230e6252015-04-17 12:36:38 -06002616 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002617 VkEvent event);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002618
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002619VkResult VKAPI vkSetEvent(
Mike Stroyan230e6252015-04-17 12:36:38 -06002620 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002621 VkEvent event);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002622
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002623VkResult VKAPI vkResetEvent(
Mike Stroyan230e6252015-04-17 12:36:38 -06002624 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002625 VkEvent event);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002626
2627// Query functions
2628
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002629VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002630 VkDevice device,
2631 const VkQueryPoolCreateInfo* pCreateInfo,
2632 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002633
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002634VkResult VKAPI vkGetQueryPoolResults(
Mike Stroyan230e6252015-04-17 12:36:38 -06002635 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002636 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002637 uint32_t startQuery,
2638 uint32_t queryCount,
2639 size_t* pDataSize,
Tony Barbour8205d902015-04-16 15:59:00 -06002640 void* pData,
2641 VkQueryResultFlags flags);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002642
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002643// Buffer functions
2644
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002645VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002646 VkDevice device,
2647 const VkBufferCreateInfo* pCreateInfo,
2648 VkBuffer* pBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002649
2650// Buffer view functions
2651
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002652VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002653 VkDevice device,
2654 const VkBufferViewCreateInfo* pCreateInfo,
2655 VkBufferView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002656
2657// Image functions
2658
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002659VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002660 VkDevice device,
2661 const VkImageCreateInfo* pCreateInfo,
2662 VkImage* pImage);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002663
Tony Barbour426b9052015-06-24 16:06:58 -06002664VkResult VKAPI vkGetImageSubresourceLayout(
Mike Stroyan230e6252015-04-17 12:36:38 -06002665 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002666 VkImage image,
2667 const VkImageSubresource* pSubresource,
Tony Barbour426b9052015-06-24 16:06:58 -06002668 VkSubresourceLayout* pLayout);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002669
2670// Image view functions
2671
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002672VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002673 VkDevice device,
2674 const VkImageViewCreateInfo* pCreateInfo,
2675 VkImageView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002676
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002677VkResult VKAPI vkCreateColorAttachmentView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002678 VkDevice device,
2679 const VkColorAttachmentViewCreateInfo* pCreateInfo,
2680 VkColorAttachmentView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002681
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002682VkResult VKAPI vkCreateDepthStencilView(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002683 VkDevice device,
2684 const VkDepthStencilViewCreateInfo* pCreateInfo,
2685 VkDepthStencilView* pView);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002686
2687// Shader functions
2688
Courtney Goeltzenleuchter1d723102015-06-18 21:49:59 -06002689VkResult VKAPI vkCreateShaderModule(
2690 VkDevice device,
2691 const VkShaderModuleCreateInfo* pCreateInfo,
2692 VkShaderModule* pShaderModule);
2693
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002694VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002695 VkDevice device,
2696 const VkShaderCreateInfo* pCreateInfo,
2697 VkShader* pShader);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002698
2699// Pipeline functions
Jon Ashburn0d60d272015-07-09 15:02:25 -06002700VkResult VKAPI vkCreatePipelineCache(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002701 VkDevice device,
Jon Ashburn0d60d272015-07-09 15:02:25 -06002702 const VkPipelineCacheCreateInfo* pCreateInfo,
2703 VkPipelineCache* pPipelineCache);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002704
Jon Ashburn0d60d272015-07-09 15:02:25 -06002705VkResult VKAPI vkDestroyPipelineCache(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002706 VkDevice device,
Jon Ashburn0d60d272015-07-09 15:02:25 -06002707 VkPipelineCache pipelineCache);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002708
Jon Ashburn0d60d272015-07-09 15:02:25 -06002709size_t VKAPI vkGetPipelineCacheSize(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002710 VkDevice device,
Jon Ashburn0d60d272015-07-09 15:02:25 -06002711 VkPipelineCache pipelineCache);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002712
Jon Ashburn0d60d272015-07-09 15:02:25 -06002713VkResult VKAPI vkGetPipelineCacheData(
Mike Stroyan230e6252015-04-17 12:36:38 -06002714 VkDevice device,
Jon Ashburn0d60d272015-07-09 15:02:25 -06002715 VkPipelineCache pipelineCache,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002716 void* pData);
2717
Jon Ashburn0d60d272015-07-09 15:02:25 -06002718VkResult VKAPI vkMergePipelineCaches(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002719 VkDevice device,
Jon Ashburn0d60d272015-07-09 15:02:25 -06002720 VkPipelineCache destCache,
2721 uint32_t srcCacheCount,
2722 const VkPipelineCache* pSrcCaches);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002723
Jon Ashburn0d60d272015-07-09 15:02:25 -06002724VkResult VKAPI vkCreateGraphicsPipelines(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002725 VkDevice device,
Jon Ashburn0d60d272015-07-09 15:02:25 -06002726 VkPipelineCache pipelineCache,
2727 uint32_t count,
2728 const VkGraphicsPipelineCreateInfo* pCreateInfos,
2729 VkPipeline* pPipelines);
2730
2731VkResult VKAPI vkCreateComputePipelines(
2732 VkDevice device,
2733 VkPipelineCache pipelineCache,
2734 uint32_t count,
2735 const VkComputePipelineCreateInfo* pCreateInfos,
2736 VkPipeline* pPipelines);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002737
Mark Lobodzinski556f7212015-04-17 14:11:39 -05002738// Pipeline layout functions
2739
2740VkResult VKAPI vkCreatePipelineLayout(
2741 VkDevice device,
2742 const VkPipelineLayoutCreateInfo* pCreateInfo,
2743 VkPipelineLayout* pPipelineLayout);
2744
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002745// Sampler functions
2746
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002747VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002748 VkDevice device,
2749 const VkSamplerCreateInfo* pCreateInfo,
2750 VkSampler* pSampler);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002751
2752// Descriptor set functions
2753
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002754VkResult VKAPI vkCreateDescriptorSetLayout(
2755 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002756 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2757 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002758
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002759VkResult VKAPI vkCreateDescriptorPool(
2760 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002761 VkDescriptorPoolUsage poolUsage,
2762 uint32_t maxSets,
2763 const VkDescriptorPoolCreateInfo* pCreateInfo,
2764 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002765
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002766VkResult VKAPI vkResetDescriptorPool(
Mike Stroyan230e6252015-04-17 12:36:38 -06002767 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002768 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002769
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002770VkResult VKAPI vkAllocDescriptorSets(
Mike Stroyan230e6252015-04-17 12:36:38 -06002771 VkDevice device,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002772 VkDescriptorPool descriptorPool,
2773 VkDescriptorSetUsage setUsage,
2774 uint32_t count,
2775 const VkDescriptorSetLayout* pSetLayouts,
2776 VkDescriptorSet* pDescriptorSets,
2777 uint32_t* pCount);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002778
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08002779VkResult VKAPI vkUpdateDescriptorSets(
Mike Stroyan230e6252015-04-17 12:36:38 -06002780 VkDevice device,
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +08002781 uint32_t writeCount,
2782 const VkWriteDescriptorSet* pDescriptorWrites,
2783 uint32_t copyCount,
2784 const VkCopyDescriptorSet* pDescriptorCopies);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002785
2786// State object functions
2787
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002788VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002789 VkDevice device,
2790 const VkDynamicVpStateCreateInfo* pCreateInfo,
2791 VkDynamicVpState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002792
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002793VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002794 VkDevice device,
2795 const VkDynamicRsStateCreateInfo* pCreateInfo,
2796 VkDynamicRsState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002797
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002798VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002799 VkDevice device,
2800 const VkDynamicCbStateCreateInfo* pCreateInfo,
2801 VkDynamicCbState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002802
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002803VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002804 VkDevice device,
2805 const VkDynamicDsStateCreateInfo* pCreateInfo,
2806 VkDynamicDsState* pState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002807
2808// Command buffer functions
2809
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002810VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002811 VkDevice device,
2812 const VkCmdBufferCreateInfo* pCreateInfo,
2813 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002814
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002815VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002816 VkCmdBuffer cmdBuffer,
2817 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002818
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002819VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002820 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002821
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06002822VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002823 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002824
2825// Command buffer building functions
2826
2827void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002828 VkCmdBuffer cmdBuffer,
2829 VkPipelineBindPoint pipelineBindPoint,
2830 VkPipeline pipeline);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002831
2832void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002833 VkCmdBuffer cmdBuffer,
2834 VkStateBindPoint stateBindPoint,
2835 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002836
2837void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002838 VkCmdBuffer cmdBuffer,
2839 VkPipelineBindPoint pipelineBindPoint,
Mark Lobodzinskia65c4632015-06-15 13:21:21 -06002840 VkPipelineLayout layout,
Cody Northrop1a01b1d2015-04-16 13:41:56 -06002841 uint32_t firstSet,
2842 uint32_t setCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002843 const VkDescriptorSet* pDescriptorSets,
Cody Northrop1a01b1d2015-04-16 13:41:56 -06002844 uint32_t dynamicOffsetCount,
2845 const uint32_t* pDynamicOffsets);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002846
2847void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002848 VkCmdBuffer cmdBuffer,
2849 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002850 VkDeviceSize offset,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002851 VkIndexType indexType);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002852
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002853void VKAPI vkCmdBindVertexBuffers(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002854 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -06002855 uint32_t startBinding,
2856 uint32_t bindingCount,
2857 const VkBuffer* pBuffers,
Tony Barbour8205d902015-04-16 15:59:00 -06002858 const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002859
2860void VKAPI vkCmdDraw(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002861 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002862 uint32_t firstVertex,
2863 uint32_t vertexCount,
2864 uint32_t firstInstance,
2865 uint32_t instanceCount);
2866
2867void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002868 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002869 uint32_t firstIndex,
2870 uint32_t indexCount,
2871 int32_t vertexOffset,
2872 uint32_t firstInstance,
2873 uint32_t instanceCount);
2874
2875void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002876 VkCmdBuffer cmdBuffer,
2877 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002878 VkDeviceSize offset,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002879 uint32_t count,
2880 uint32_t stride);
2881
2882void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002883 VkCmdBuffer cmdBuffer,
2884 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002885 VkDeviceSize offset,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002886 uint32_t count,
2887 uint32_t stride);
2888
2889void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002890 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002891 uint32_t x,
2892 uint32_t y,
2893 uint32_t z);
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002894
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002895void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002896 VkCmdBuffer cmdBuffer,
2897 VkBuffer buffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002898 VkDeviceSize offset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002899
2900void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002901 VkCmdBuffer cmdBuffer,
2902 VkBuffer srcBuffer,
2903 VkBuffer destBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002904 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002905 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002906
2907void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002908 VkCmdBuffer cmdBuffer,
2909 VkImage srcImage,
2910 VkImageLayout srcImageLayout,
2911 VkImage destImage,
2912 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002913 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002914 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002915
2916void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002917 VkCmdBuffer cmdBuffer,
2918 VkImage srcImage,
2919 VkImageLayout srcImageLayout,
2920 VkImage destImage,
2921 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002922 uint32_t regionCount,
Mark Lobodzinski20f68592015-05-22 14:43:25 -05002923 const VkImageBlit* pRegions,
2924 VkTexFilter filter);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002925
2926void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002927 VkCmdBuffer cmdBuffer,
2928 VkBuffer srcBuffer,
2929 VkImage destImage,
2930 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002931 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002932 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002933
2934void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002935 VkCmdBuffer cmdBuffer,
2936 VkImage srcImage,
2937 VkImageLayout srcImageLayout,
2938 VkBuffer destBuffer,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002939 uint32_t regionCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002940 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002941
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002942void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002943 VkCmdBuffer cmdBuffer,
2944 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002945 VkDeviceSize destOffset,
2946 VkDeviceSize dataSize,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002947 const uint32_t* pData);
2948
2949void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002950 VkCmdBuffer cmdBuffer,
2951 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06002952 VkDeviceSize destOffset,
2953 VkDeviceSize fillSize,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002954 uint32_t data);
2955
2956void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002957 VkCmdBuffer cmdBuffer,
2958 VkImage image,
2959 VkImageLayout imageLayout,
Chris Forbese3105972015-06-24 14:34:53 +12002960 const VkClearColorValue* pColor,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002961 uint32_t rangeCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002962 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002963
Chris Forbes2951d7d2015-06-22 17:21:59 +12002964void VKAPI vkCmdClearDepthStencilImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002965 VkCmdBuffer cmdBuffer,
2966 VkImage image,
2967 VkImageLayout imageLayout,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002968 float depth,
2969 uint32_t stencil,
2970 uint32_t rangeCount,
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002971 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002972
Chris Forbes2951d7d2015-06-22 17:21:59 +12002973void VKAPI vkCmdClearColorAttachment(
2974 VkCmdBuffer cmdBuffer,
2975 uint32_t colorAttachment,
2976 VkImageLayout imageLayout,
Chris Forbese3105972015-06-24 14:34:53 +12002977 const VkClearColorValue* pColor,
Chris Forbes2951d7d2015-06-22 17:21:59 +12002978 uint32_t rectCount,
2979 const VkRect3D* pRects);
2980
2981void VKAPI vkCmdClearDepthStencilAttachment(
2982 VkCmdBuffer cmdBuffer,
2983 VkImageAspectFlags imageAspectMask,
2984 VkImageLayout imageLayout,
2985 float depth,
2986 uint32_t stencil,
2987 uint32_t rectCount,
2988 const VkRect3D* pRects);
2989
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002990void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06002991 VkCmdBuffer cmdBuffer,
2992 VkImage srcImage,
2993 VkImageLayout srcImageLayout,
2994 VkImage destImage,
2995 VkImageLayout destImageLayout,
Tony Barbour11f74372015-04-13 15:02:52 -06002996 uint32_t regionCount,
2997 const VkImageResolve* pRegions);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06002998
2999void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003000 VkCmdBuffer cmdBuffer,
3001 VkEvent event,
Tony Barbourc2e987e2015-06-29 16:20:35 -06003002 VkPipelineStageFlags stageMask);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003003
3004void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003005 VkCmdBuffer cmdBuffer,
3006 VkEvent event,
Tony Barbourc2e987e2015-06-29 16:20:35 -06003007 VkPipelineStageFlags stageMask);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003008
3009void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003010 VkCmdBuffer cmdBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06003011 uint32_t eventCount,
3012 const VkEvent* pEvents,
Tony Barbourc2e987e2015-06-29 16:20:35 -06003013 VkPipelineStageFlags sourceStageMask,
3014 VkPipelineStageFlags destStageMask,
Tony Barbour8205d902015-04-16 15:59:00 -06003015 uint32_t memBarrierCount,
3016 const void** ppMemBarriers);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003017
3018void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003019 VkCmdBuffer cmdBuffer,
Tony Barbourc2e987e2015-06-29 16:20:35 -06003020 VkPipelineStageFlags sourceStageMask,
3021 VkPipelineStageFlags destStageMask,
3022 bool32_t byRegion,
Tony Barbour8205d902015-04-16 15:59:00 -06003023 uint32_t memBarrierCount,
3024 const void** ppMemBarriers);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003025
3026void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003027 VkCmdBuffer cmdBuffer,
3028 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003029 uint32_t slot,
Tony Barbour8205d902015-04-16 15:59:00 -06003030 VkQueryControlFlags flags);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003031
3032void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003033 VkCmdBuffer cmdBuffer,
3034 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003035 uint32_t slot);
3036
3037void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003038 VkCmdBuffer cmdBuffer,
3039 VkQueryPool queryPool,
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003040 uint32_t startQuery,
3041 uint32_t queryCount);
3042
3043void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003044 VkCmdBuffer cmdBuffer,
3045 VkTimestampType timestampType,
3046 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06003047 VkDeviceSize destOffset);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003048
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06003049void VKAPI vkCmdCopyQueryPoolResults(
3050 VkCmdBuffer cmdBuffer,
3051 VkQueryPool queryPool,
3052 uint32_t startQuery,
3053 uint32_t queryCount,
3054 VkBuffer destBuffer,
Tony Barbour8205d902015-04-16 15:59:00 -06003055 VkDeviceSize destOffset,
3056 VkDeviceSize destStride,
Tony Barbour3e3420a2015-04-16 19:09:28 -06003057 VkQueryResultFlags flags);
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -06003058
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06003059VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003060 VkDevice device,
3061 const VkFramebufferCreateInfo* pCreateInfo,
3062 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003063
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06003064VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003065 VkDevice device,
3066 const VkRenderPassCreateInfo* pCreateInfo,
3067 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003068
3069void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003070 VkCmdBuffer cmdBuffer,
3071 const VkRenderPassBegin* pRenderPassBegin);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003072
3073void VKAPI vkCmdEndRenderPass(
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08003074 VkCmdBuffer cmdBuffer);
3075
3076void VKAPI vkCmdExecuteCommands(
Courtney Goeltzenleuchterf4f69592015-04-10 18:00:50 -06003077 VkCmdBuffer cmdBuffer,
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08003078 uint32_t cmdBuffersCount,
3079 const VkCmdBuffer* pCmdBuffers);
Courtney Goeltzenleuchter89e99e62015-04-08 18:04:29 -06003080
3081#endif // VK_PROTOTYPES
3082
3083#ifdef __cplusplus
3084} // extern "C"
3085#endif // __cplusplus
3086
3087#endif // __VULKAN_H__