blob: d738768fe8ec653a9f73d830206c80522ceb52e8 [file] [log] [blame]
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001//
2// File: vulkan.h
3//
4/*
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06005** Copyright (c) 2014-2015 The Khronos Group Inc.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06006**
7** Permission is hereby granted, free of charge, to any person obtaining a
8** copy of this software and/or associated documentation files (the
9** "Materials"), to deal in the Materials without restriction, including
10** without limitation the rights to use, copy, modify, merge, publish,
11** distribute, sublicense, and/or sell copies of the Materials, and to
12** permit persons to whom the Materials are furnished to do so, subject to
13** the following conditions:
14**
15** The above copyright notice and this permission notice shall be included
16** in all copies or substantial portions of the Materials.
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
25*/
26
27#ifndef __VULKAN_H__
28#define __VULKAN_H__
29
30#define VK_MAKE_VERSION(major, minor, patch) \
31 ((major << 22) | (minor << 12) | patch)
32
Courtney Goeltzenleuchterb0cedb82015-04-09 11:52:55 -060033#include "vk_platform.h"
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060034
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060035// Vulkan API version supported by this file
Courtney Goeltzenleuchtera0de9452015-07-10 09:47:49 -060036#define VK_API_VERSION VK_MAKE_VERSION(0, 127, 1)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060037
38#ifdef __cplusplus
39extern "C"
40{
41#endif // __cplusplus
42
43/*
44***************************************************************************************************
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -060045* Core Vulkan API
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060046***************************************************************************************************
47*/
48
Mike Stroyanb050c682015-04-17 12:36:38 -060049#if defined (__cplusplus) && (VK_UINTPTRLEAST64_MAX == UINTPTR_MAX)
50 #define VK_TYPE_SAFE_COMPATIBLE_HANDLES 1
51#endif
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -060052
Mike Stroyanb050c682015-04-17 12:36:38 -060053#if defined(VK_TYPE_SAFE_COMPATIBLE_HANDLES) && !defined(VK_DISABLE_TYPE_SAFE_HANDLES)
54 #define VK_DEFINE_PTR_HANDLE(_obj) struct _obj##_T { char _dummy; }; typedef _obj##_T* _obj;
55 #define VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base) struct _obj##_T : public _base##_T {}; typedef _obj##_T* _obj;
56
57 #define VK_DEFINE_BASE_HANDLE(_obj) VK_DEFINE_PTR_HANDLE(_obj)
58 #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base)
59 #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base)
60#else
61 #define VK_DEFINE_BASE_HANDLE(_obj) typedef VkUintPtrLeast64 _obj;
62 #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) typedef uintptr_t _obj;
63 #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) typedef VkUintPtrLeast64 _obj;
64#endif
65
66VK_DEFINE_BASE_HANDLE(VkObject)
67
68VK_DEFINE_DISP_SUBCLASS_HANDLE(VkInstance, VkObject)
69VK_DEFINE_DISP_SUBCLASS_HANDLE(VkPhysicalDevice, VkObject)
70VK_DEFINE_DISP_SUBCLASS_HANDLE(VkDevice, VkObject)
71VK_DEFINE_DISP_SUBCLASS_HANDLE(VkQueue, VkObject)
72VK_DEFINE_DISP_SUBCLASS_HANDLE(VkCmdBuffer, VkObject)
73
74VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkNonDispatchable, VkObject)
75VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkDeviceMemory, VkNonDispatchable)
76VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkBuffer, VkNonDispatchable)
77VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkBufferView, VkNonDispatchable)
78VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkImage, VkNonDispatchable)
79VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkImageView, VkNonDispatchable)
Chia-I Wu08accc62015-07-07 11:50:03 +080080VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkAttachmentView, VkNonDispatchable)
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -060081VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShaderModule, VkNonDispatchable)
Mike Stroyanb050c682015-04-17 12:36:38 -060082VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkShader, VkNonDispatchable)
Chia-I Wu08accc62015-07-07 11:50:03 +080083VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkRenderPass, VkNonDispatchable)
Mike Stroyanb050c682015-04-17 12:36:38 -060084VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipeline, VkNonDispatchable)
Jon Ashburnc669cc62015-07-09 15:02:25 -060085VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkPipelineCache, VkNonDispatchable)
Mike Stroyanb050c682015-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)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600101
Tony Barbourd1c35722015-04-16 15:59:00 -0600102#define VK_MAX_PHYSICAL_DEVICE_NAME 256
Mike Stroyanb050c682015-04-17 12:36:38 -0600103#define VK_MAX_EXTENSION_NAME 256
Mark Lobodzinskieb68f0e2015-07-03 10:26:22 -0600104#define VK_MAX_DESCRIPTION 256
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -0600105#define VK_MAX_MEMORY_TYPES 32
106#define VK_MAX_MEMORY_HEAPS 16
Jon Ashburnc669cc62015-07-09 15:02:25 -0600107#define VK_UUID_LENGTH 16
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -0600108#define VK_LOD_CLAMP_NONE MAX_FLOAT
109#define VK_LAST_MIP_LEVEL UINT32_MAX
110#define VK_LAST_ARRAY_SLICE UINT32_MAX
Courtney Goeltzenleuchter62b2d432015-06-04 11:35:43 -0600111
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600112
Tony Barbourd1c35722015-04-16 15:59:00 -0600113#define VK_WHOLE_SIZE UINT64_MAX
Chia-I Wu08accc62015-07-07 11:50:03 +0800114#define VK_ATTACHMENT_UNUSED UINT32_MAX
Tony Barbourd1c35722015-04-16 15:59:00 -0600115
Courtney Goeltzenleuchter64d1a712015-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 Barbourd1c35722015-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 Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600139
140// ------------------------------------------------------------------------------------------------
141// Enumerations
142
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600143typedef enum VkImageLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600144{
Courtney Goeltzenleuchterf53c3cb2015-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 Lobodzinski2b3fa3d2015-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 Barbour71a85122015-04-16 19:09:28 -0600153
Tony Barbourd1c35722015-04-16 15:59:00 -0600154 VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600155} VkImageLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600156
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600157typedef enum VkAttachmentLoadOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600158{
Courtney Goeltzenleuchterf53c3cb2015-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 Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600162
Tony Barbourd1c35722015-04-16 15:59:00 -0600163 VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600164} VkAttachmentLoadOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600165
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600166typedef enum VkAttachmentStoreOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600167{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600168 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
Chia-I Wu08accc62015-07-07 11:50:03 +0800169 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600170
Tony Barbourd1c35722015-04-16 15:59:00 -0600171 VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600172} VkAttachmentStoreOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600173
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600174typedef enum VkImageType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600175{
Tony Barbourd1c35722015-04-16 15:59:00 -0600176 VK_IMAGE_TYPE_1D = 0x00000000,
177 VK_IMAGE_TYPE_2D = 0x00000001,
178 VK_IMAGE_TYPE_3D = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600179
Tony Barbourd1c35722015-04-16 15:59:00 -0600180 VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600181} VkImageType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600182
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600183typedef enum VkImageTiling_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600184{
Tony Barbourd1c35722015-04-16 15:59:00 -0600185 VK_IMAGE_TILING_LINEAR = 0x00000000,
186 VK_IMAGE_TILING_OPTIMAL = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600187
Tony Barbourd1c35722015-04-16 15:59:00 -0600188 VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600189} VkImageTiling;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600190
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600191typedef enum VkImageViewType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600192{
Tony Barbourd1c35722015-04-16 15:59:00 -0600193 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
194 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
195 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
196 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
Mark Lobodzinskie3f66112015-07-02 09:53:03 -0600197 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
198 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
199 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600200
Mark Lobodzinskie3f66112015-07-02 09:53:03 -0600201 VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE_ARRAY)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600202} VkImageViewType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600203
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600204typedef enum VkImageAspect_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600205{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600206 VK_IMAGE_ASPECT_COLOR = 0x00000000,
207 VK_IMAGE_ASPECT_DEPTH = 0x00000001,
208 VK_IMAGE_ASPECT_STENCIL = 0x00000002,
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600209 VK_IMAGE_ASPECT_METADATA = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600210
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600211 VK_ENUM_RANGE(IMAGE_ASPECT, COLOR, METADATA)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600212} VkImageAspect;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600213
Tony Barbourd1c35722015-04-16 15:59:00 -0600214typedef enum VkBufferViewType_
215{
216 VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO)
217 VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, // Buffer with format (TBO, IBO)
218
219 VK_ENUM_RANGE(BUFFER_VIEW_TYPE, RAW, FORMATTED)
220} VkBufferViewType;
221
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600222typedef enum VkChannelSwizzle_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600223{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600224 VK_CHANNEL_SWIZZLE_ZERO = 0x00000000,
225 VK_CHANNEL_SWIZZLE_ONE = 0x00000001,
226 VK_CHANNEL_SWIZZLE_R = 0x00000002,
227 VK_CHANNEL_SWIZZLE_G = 0x00000003,
228 VK_CHANNEL_SWIZZLE_B = 0x00000004,
229 VK_CHANNEL_SWIZZLE_A = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600230
Tony Barbourd1c35722015-04-16 15:59:00 -0600231 VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600232} VkChannelSwizzle;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600233
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600234typedef enum VkDescriptorType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600235{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600236 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600237 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
238 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
239 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
240 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
241 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600242 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600243 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600244 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -0600245 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600246
Tony Barbourd1c35722015-04-16 15:59:00 -0600247 VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600248} VkDescriptorType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600249
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600250typedef enum VkDescriptorPoolUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600251{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600252 VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000,
253 VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600254
Tony Barbourd1c35722015-04-16 15:59:00 -0600255 VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600256} VkDescriptorPoolUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600257
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600258typedef enum VkDescriptorSetUsage_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600259{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600260 VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000,
261 VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600262
Tony Barbourd1c35722015-04-16 15:59:00 -0600263 VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600264} VkDescriptorSetUsage;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600265
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600266typedef enum VkQueryType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600267{
Tony Barbourd1c35722015-04-16 15:59:00 -0600268 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -0600269 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, // Optional
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600270
Tony Barbourd1c35722015-04-16 15:59:00 -0600271 VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600272} VkQueryType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600273
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600274typedef enum VkTimestampType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600275{
Tony Barbourd1c35722015-04-16 15:59:00 -0600276 VK_TIMESTAMP_TYPE_TOP = 0x00000000,
277 VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600278
Tony Barbourd1c35722015-04-16 15:59:00 -0600279 VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600280} VkTimestampType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600281
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800282typedef enum VkRenderPassContents_
283{
284 VK_RENDER_PASS_CONTENTS_INLINE = 0x00000000,
285 VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 0x00000001,
286
287 VK_ENUM_RANGE(RENDER_PASS_CONTENTS, INLINE, SECONDARY_CMD_BUFFERS)
288} VkRenderPassContents;
289
Tony Barbourd1c35722015-04-16 15:59:00 -0600290typedef enum VkBorderColor_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600291{
Tony Barbour26b17f82015-06-25 16:56:44 -0600292 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
293 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
294 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
295 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
296 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
297 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600298
Tony Barbour26b17f82015-06-25 16:56:44 -0600299 VK_ENUM_RANGE(BORDER_COLOR, FLOAT_TRANSPARENT_BLACK, INT_OPAQUE_WHITE)
Tony Barbourd1c35722015-04-16 15:59:00 -0600300} VkBorderColor;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600301
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600302typedef enum VkPipelineBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600303{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600304 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000,
305 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600306
Tony Barbourd1c35722015-04-16 15:59:00 -0600307 VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600308} VkPipelineBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600309
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600310typedef enum VkStateBindPoint_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600311{
Tony Barbourd1c35722015-04-16 15:59:00 -0600312 VK_STATE_BIND_POINT_VIEWPORT = 0x00000000,
313 VK_STATE_BIND_POINT_RASTER = 0x00000001,
314 VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002,
315 VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600316
Tony Barbourd1c35722015-04-16 15:59:00 -0600317 VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600318} VkStateBindPoint;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600319
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600320typedef enum VkPrimitiveTopology_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600321{
Tony Barbourd1c35722015-04-16 15:59:00 -0600322 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
323 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
324 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
325 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
326 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
327 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
328 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ = 0x00000006,
329 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ = 0x00000007,
330 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ = 0x00000008,
331 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ = 0x00000009,
332 VK_PRIMITIVE_TOPOLOGY_PATCH = 0x0000000a,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600333
Tony Barbourd1c35722015-04-16 15:59:00 -0600334 VK_ENUM_RANGE(PRIMITIVE_TOPOLOGY, POINT_LIST, PATCH)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600335} VkPrimitiveTopology;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600336
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800337typedef enum VkCmdBufferLevel_
338{
339 VK_CMD_BUFFER_LEVEL_PRIMARY = 0x00000000,
340 VK_CMD_BUFFER_LEVEL_SECONDARY = 0x00000001,
341
342 VK_ENUM_RANGE(CMD_BUFFER_LEVEL, PRIMARY, SECONDARY)
343} VkCmdBufferLevel;
344
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600345typedef enum VkIndexType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600346{
Mark Lobodzinski75721e82015-07-02 10:03:43 -0600347 VK_INDEX_TYPE_UINT16 = 0x00000000,
348 VK_INDEX_TYPE_UINT32 = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600349
Mark Lobodzinski75721e82015-07-02 10:03:43 -0600350 VK_ENUM_RANGE(INDEX_TYPE, UINT16, UINT32)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600351} VkIndexType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600352
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600353typedef enum VkTexFilter_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600354{
Tony Barbourd1c35722015-04-16 15:59:00 -0600355 VK_TEX_FILTER_NEAREST = 0x00000000,
356 VK_TEX_FILTER_LINEAR = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600357
Tony Barbourd1c35722015-04-16 15:59:00 -0600358 VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600359} VkTexFilter;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600360
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600361typedef enum VkTexMipmapMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600362{
Tony Barbourd1c35722015-04-16 15:59:00 -0600363 VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level
364 VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level
365 VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600366
Tony Barbourd1c35722015-04-16 15:59:00 -0600367 VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600368} VkTexMipmapMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600369
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600370typedef enum VkTexAddress_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600371{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600372 VK_TEX_ADDRESS_WRAP = 0x00000000,
373 VK_TEX_ADDRESS_MIRROR = 0x00000001,
374 VK_TEX_ADDRESS_CLAMP = 0x00000002,
375 VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003,
376 VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600377
Tony Barbourd1c35722015-04-16 15:59:00 -0600378 VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600379} VkTexAddress;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600380
Tony Barbourd1c35722015-04-16 15:59:00 -0600381typedef enum VkCompareOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600382{
Tony Barbourd1c35722015-04-16 15:59:00 -0600383 VK_COMPARE_OP_NEVER = 0x00000000,
384 VK_COMPARE_OP_LESS = 0x00000001,
385 VK_COMPARE_OP_EQUAL = 0x00000002,
386 VK_COMPARE_OP_LESS_EQUAL = 0x00000003,
387 VK_COMPARE_OP_GREATER = 0x00000004,
388 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
389 VK_COMPARE_OP_GREATER_EQUAL = 0x00000006,
390 VK_COMPARE_OP_ALWAYS = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600391
Tony Barbourd1c35722015-04-16 15:59:00 -0600392 VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS)
393} VkCompareOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600394
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600395typedef enum VkFillMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600396{
Tony Barbourd1c35722015-04-16 15:59:00 -0600397 VK_FILL_MODE_POINTS = 0x00000000,
398 VK_FILL_MODE_WIREFRAME = 0x00000001,
399 VK_FILL_MODE_SOLID = 0x00000002,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600400
Tony Barbourd1c35722015-04-16 15:59:00 -0600401 VK_ENUM_RANGE(FILL_MODE, POINTS, SOLID)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600402} VkFillMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600403
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600404typedef enum VkCullMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600405{
Tony Barbourd1c35722015-04-16 15:59:00 -0600406 VK_CULL_MODE_NONE = 0x00000000,
407 VK_CULL_MODE_FRONT = 0x00000001,
408 VK_CULL_MODE_BACK = 0x00000002,
409 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600410
Tony Barbourd1c35722015-04-16 15:59:00 -0600411 VK_ENUM_RANGE(CULL_MODE, NONE, FRONT_AND_BACK)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600412} VkCullMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600413
Tony Barbourd1c35722015-04-16 15:59:00 -0600414typedef enum VkFrontFace_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600415{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600416 VK_FRONT_FACE_CCW = 0x00000000,
417 VK_FRONT_FACE_CW = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600418
Tony Barbourd1c35722015-04-16 15:59:00 -0600419 VK_ENUM_RANGE(FRONT_FACE, CCW, CW)
420} VkFrontFace;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600421
Tony Barbourd1c35722015-04-16 15:59:00 -0600422typedef enum VkProvokingVertex_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600423{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600424 VK_PROVOKING_VERTEX_FIRST = 0x00000000,
425 VK_PROVOKING_VERTEX_LAST = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600426
Tony Barbourd1c35722015-04-16 15:59:00 -0600427 VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST)
428} VkProvokingVertex;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600429
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600430typedef enum VkCoordinateOrigin_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600431{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600432 VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
433 VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600434
Tony Barbourd1c35722015-04-16 15:59:00 -0600435 VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600436} VkCoordinateOrigin;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600437
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600438typedef enum VkDepthMode_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600439{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600440 VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000,
441 VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600442
Tony Barbourd1c35722015-04-16 15:59:00 -0600443 VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600444} VkDepthMode;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600445
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600446typedef enum VkBlend_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600447{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600448 VK_BLEND_ZERO = 0x00000000,
449 VK_BLEND_ONE = 0x00000001,
450 VK_BLEND_SRC_COLOR = 0x00000002,
451 VK_BLEND_ONE_MINUS_SRC_COLOR = 0x00000003,
452 VK_BLEND_DEST_COLOR = 0x00000004,
453 VK_BLEND_ONE_MINUS_DEST_COLOR = 0x00000005,
454 VK_BLEND_SRC_ALPHA = 0x00000006,
455 VK_BLEND_ONE_MINUS_SRC_ALPHA = 0x00000007,
456 VK_BLEND_DEST_ALPHA = 0x00000008,
457 VK_BLEND_ONE_MINUS_DEST_ALPHA = 0x00000009,
458 VK_BLEND_CONSTANT_COLOR = 0x0000000a,
459 VK_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
460 VK_BLEND_CONSTANT_ALPHA = 0x0000000c,
461 VK_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
462 VK_BLEND_SRC_ALPHA_SATURATE = 0x0000000e,
463 VK_BLEND_SRC1_COLOR = 0x0000000f,
464 VK_BLEND_ONE_MINUS_SRC1_COLOR = 0x00000010,
465 VK_BLEND_SRC1_ALPHA = 0x00000011,
466 VK_BLEND_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600467
Tony Barbourd1c35722015-04-16 15:59:00 -0600468 VK_ENUM_RANGE(BLEND, ZERO, ONE_MINUS_SRC1_ALPHA)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600469} VkBlend;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600470
Tony Barbourd1c35722015-04-16 15:59:00 -0600471typedef enum VkBlendOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600472{
Tony Barbourd1c35722015-04-16 15:59:00 -0600473 VK_BLEND_OP_ADD = 0x00000000,
474 VK_BLEND_OP_SUBTRACT = 0x00000001,
475 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
476 VK_BLEND_OP_MIN = 0x00000003,
477 VK_BLEND_OP_MAX = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600478
Tony Barbourd1c35722015-04-16 15:59:00 -0600479 VK_ENUM_RANGE(BLEND_OP, ADD, MAX)
480} VkBlendOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600481
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600482typedef enum VkStencilOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600483{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600484 VK_STENCIL_OP_KEEP = 0x00000000,
485 VK_STENCIL_OP_ZERO = 0x00000001,
486 VK_STENCIL_OP_REPLACE = 0x00000002,
487 VK_STENCIL_OP_INC_CLAMP = 0x00000003,
488 VK_STENCIL_OP_DEC_CLAMP = 0x00000004,
489 VK_STENCIL_OP_INVERT = 0x00000005,
490 VK_STENCIL_OP_INC_WRAP = 0x00000006,
491 VK_STENCIL_OP_DEC_WRAP = 0x00000007,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600492
Tony Barbourd1c35722015-04-16 15:59:00 -0600493 VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600494} VkStencilOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600495
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600496typedef enum VkLogicOp_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600497{
Tony Barbour6be764c2015-06-26 13:28:56 -0600498 VK_LOGIC_OP_CLEAR = 0x00000000,
499 VK_LOGIC_OP_AND = 0x00000001,
500 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
501 VK_LOGIC_OP_COPY = 0x00000003,
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600502 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
503 VK_LOGIC_OP_NOOP = 0x00000005,
504 VK_LOGIC_OP_XOR = 0x00000006,
505 VK_LOGIC_OP_OR = 0x00000007,
506 VK_LOGIC_OP_NOR = 0x00000008,
507 VK_LOGIC_OP_EQUIV = 0x00000009,
508 VK_LOGIC_OP_INVERT = 0x0000000a,
509 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
510 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
511 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
512 VK_LOGIC_OP_NAND = 0x0000000e,
513 VK_LOGIC_OP_SET = 0x0000000f,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600514
Tony Barbour6be764c2015-06-26 13:28:56 -0600515 VK_ENUM_RANGE(LOGIC_OP, CLEAR, SET)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600516} VkLogicOp;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600517
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600518typedef enum VkSystemAllocType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600519{
Tony Barbourd1c35722015-04-16 15:59:00 -0600520 VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000,
521 VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001,
522 VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002,
523 VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003,
524 VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600525
Tony Barbourd1c35722015-04-16 15:59:00 -0600526 VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600527} VkSystemAllocType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600528
Tony Barbourd1c35722015-04-16 15:59:00 -0600529typedef enum VkPhysicalDeviceType_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600530{
Tony Barbourd1c35722015-04-16 15:59:00 -0600531 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
532 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
533 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
534 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
535 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600536
Tony Barbourd1c35722015-04-16 15:59:00 -0600537 VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU)
538} VkPhysicalDeviceType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600539
Tony Barbourd1c35722015-04-16 15:59:00 -0600540typedef enum VkVertexInputStepRate_
541{
542 VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0,
543 VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1,
544 VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional
545
546 VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW)
547} VkVertexInputStepRate;
548
Tony Barbourd1c35722015-04-16 15:59:00 -0600549// Vulkan format definitions
550typedef enum VkFormat_
551{
552 VK_FORMAT_UNDEFINED = 0x00000000,
553 VK_FORMAT_R4G4_UNORM = 0x00000001,
554 VK_FORMAT_R4G4_USCALED = 0x00000002,
555 VK_FORMAT_R4G4B4A4_UNORM = 0x00000003,
556 VK_FORMAT_R4G4B4A4_USCALED = 0x00000004,
557 VK_FORMAT_R5G6B5_UNORM = 0x00000005,
558 VK_FORMAT_R5G6B5_USCALED = 0x00000006,
559 VK_FORMAT_R5G5B5A1_UNORM = 0x00000007,
560 VK_FORMAT_R5G5B5A1_USCALED = 0x00000008,
561 VK_FORMAT_R8_UNORM = 0x00000009,
562 VK_FORMAT_R8_SNORM = 0x0000000A,
563 VK_FORMAT_R8_USCALED = 0x0000000B,
564 VK_FORMAT_R8_SSCALED = 0x0000000C,
565 VK_FORMAT_R8_UINT = 0x0000000D,
566 VK_FORMAT_R8_SINT = 0x0000000E,
567 VK_FORMAT_R8_SRGB = 0x0000000F,
568 VK_FORMAT_R8G8_UNORM = 0x00000010,
569 VK_FORMAT_R8G8_SNORM = 0x00000011,
570 VK_FORMAT_R8G8_USCALED = 0x00000012,
571 VK_FORMAT_R8G8_SSCALED = 0x00000013,
572 VK_FORMAT_R8G8_UINT = 0x00000014,
573 VK_FORMAT_R8G8_SINT = 0x00000015,
574 VK_FORMAT_R8G8_SRGB = 0x00000016,
575 VK_FORMAT_R8G8B8_UNORM = 0x00000017,
576 VK_FORMAT_R8G8B8_SNORM = 0x00000018,
577 VK_FORMAT_R8G8B8_USCALED = 0x00000019,
578 VK_FORMAT_R8G8B8_SSCALED = 0x0000001A,
579 VK_FORMAT_R8G8B8_UINT = 0x0000001B,
580 VK_FORMAT_R8G8B8_SINT = 0x0000001C,
581 VK_FORMAT_R8G8B8_SRGB = 0x0000001D,
582 VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E,
583 VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F,
584 VK_FORMAT_R8G8B8A8_USCALED = 0x00000020,
585 VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021,
586 VK_FORMAT_R8G8B8A8_UINT = 0x00000022,
587 VK_FORMAT_R8G8B8A8_SINT = 0x00000023,
588 VK_FORMAT_R8G8B8A8_SRGB = 0x00000024,
589 VK_FORMAT_R10G10B10A2_UNORM = 0x00000025,
590 VK_FORMAT_R10G10B10A2_SNORM = 0x00000026,
591 VK_FORMAT_R10G10B10A2_USCALED = 0x00000027,
592 VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028,
593 VK_FORMAT_R10G10B10A2_UINT = 0x00000029,
594 VK_FORMAT_R10G10B10A2_SINT = 0x0000002A,
595 VK_FORMAT_R16_UNORM = 0x0000002B,
596 VK_FORMAT_R16_SNORM = 0x0000002C,
597 VK_FORMAT_R16_USCALED = 0x0000002D,
598 VK_FORMAT_R16_SSCALED = 0x0000002E,
599 VK_FORMAT_R16_UINT = 0x0000002F,
600 VK_FORMAT_R16_SINT = 0x00000030,
601 VK_FORMAT_R16_SFLOAT = 0x00000031,
602 VK_FORMAT_R16G16_UNORM = 0x00000032,
603 VK_FORMAT_R16G16_SNORM = 0x00000033,
604 VK_FORMAT_R16G16_USCALED = 0x00000034,
605 VK_FORMAT_R16G16_SSCALED = 0x00000035,
606 VK_FORMAT_R16G16_UINT = 0x00000036,
607 VK_FORMAT_R16G16_SINT = 0x00000037,
608 VK_FORMAT_R16G16_SFLOAT = 0x00000038,
609 VK_FORMAT_R16G16B16_UNORM = 0x00000039,
610 VK_FORMAT_R16G16B16_SNORM = 0x0000003A,
611 VK_FORMAT_R16G16B16_USCALED = 0x0000003B,
612 VK_FORMAT_R16G16B16_SSCALED = 0x0000003C,
613 VK_FORMAT_R16G16B16_UINT = 0x0000003D,
614 VK_FORMAT_R16G16B16_SINT = 0x0000003E,
615 VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F,
616 VK_FORMAT_R16G16B16A16_UNORM = 0x00000040,
617 VK_FORMAT_R16G16B16A16_SNORM = 0x00000041,
618 VK_FORMAT_R16G16B16A16_USCALED = 0x00000042,
619 VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043,
620 VK_FORMAT_R16G16B16A16_UINT = 0x00000044,
621 VK_FORMAT_R16G16B16A16_SINT = 0x00000045,
622 VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046,
623 VK_FORMAT_R32_UINT = 0x00000047,
624 VK_FORMAT_R32_SINT = 0x00000048,
625 VK_FORMAT_R32_SFLOAT = 0x00000049,
626 VK_FORMAT_R32G32_UINT = 0x0000004A,
627 VK_FORMAT_R32G32_SINT = 0x0000004B,
628 VK_FORMAT_R32G32_SFLOAT = 0x0000004C,
629 VK_FORMAT_R32G32B32_UINT = 0x0000004D,
630 VK_FORMAT_R32G32B32_SINT = 0x0000004E,
631 VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F,
632 VK_FORMAT_R32G32B32A32_UINT = 0x00000050,
633 VK_FORMAT_R32G32B32A32_SINT = 0x00000051,
634 VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052,
635 VK_FORMAT_R64_SFLOAT = 0x00000053,
636 VK_FORMAT_R64G64_SFLOAT = 0x00000054,
637 VK_FORMAT_R64G64B64_SFLOAT = 0x00000055,
638 VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056,
639 VK_FORMAT_R11G11B10_UFLOAT = 0x00000057,
640 VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058,
641 VK_FORMAT_D16_UNORM = 0x00000059,
642 VK_FORMAT_D24_UNORM = 0x0000005A,
643 VK_FORMAT_D32_SFLOAT = 0x0000005B,
644 VK_FORMAT_S8_UINT = 0x0000005C,
645 VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D,
646 VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E,
647 VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F,
648 VK_FORMAT_BC1_RGB_UNORM = 0x00000060,
649 VK_FORMAT_BC1_RGB_SRGB = 0x00000061,
650 VK_FORMAT_BC1_RGBA_UNORM = 0x00000062,
651 VK_FORMAT_BC1_RGBA_SRGB = 0x00000063,
652 VK_FORMAT_BC2_UNORM = 0x00000064,
653 VK_FORMAT_BC2_SRGB = 0x00000065,
654 VK_FORMAT_BC3_UNORM = 0x00000066,
655 VK_FORMAT_BC3_SRGB = 0x00000067,
656 VK_FORMAT_BC4_UNORM = 0x00000068,
657 VK_FORMAT_BC4_SNORM = 0x00000069,
658 VK_FORMAT_BC5_UNORM = 0x0000006A,
659 VK_FORMAT_BC5_SNORM = 0x0000006B,
660 VK_FORMAT_BC6H_UFLOAT = 0x0000006C,
661 VK_FORMAT_BC6H_SFLOAT = 0x0000006D,
662 VK_FORMAT_BC7_UNORM = 0x0000006E,
663 VK_FORMAT_BC7_SRGB = 0x0000006F,
664 VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070,
665 VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071,
666 VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072,
667 VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073,
668 VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074,
669 VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075,
670 VK_FORMAT_EAC_R11_UNORM = 0x00000076,
671 VK_FORMAT_EAC_R11_SNORM = 0x00000077,
672 VK_FORMAT_EAC_R11G11_UNORM = 0x00000078,
673 VK_FORMAT_EAC_R11G11_SNORM = 0x00000079,
674 VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A,
675 VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B,
676 VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C,
677 VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D,
678 VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E,
679 VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F,
680 VK_FORMAT_ASTC_6x5_UNORM = 0x00000080,
681 VK_FORMAT_ASTC_6x5_SRGB = 0x00000081,
682 VK_FORMAT_ASTC_6x6_UNORM = 0x00000082,
683 VK_FORMAT_ASTC_6x6_SRGB = 0x00000083,
684 VK_FORMAT_ASTC_8x5_UNORM = 0x00000084,
685 VK_FORMAT_ASTC_8x5_SRGB = 0x00000085,
686 VK_FORMAT_ASTC_8x6_UNORM = 0x00000086,
687 VK_FORMAT_ASTC_8x6_SRGB = 0x00000087,
688 VK_FORMAT_ASTC_8x8_UNORM = 0x00000088,
689 VK_FORMAT_ASTC_8x8_SRGB = 0x00000089,
690 VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A,
691 VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B,
692 VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C,
693 VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D,
694 VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E,
695 VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F,
696 VK_FORMAT_ASTC_10x10_UNORM = 0x00000090,
697 VK_FORMAT_ASTC_10x10_SRGB = 0x00000091,
698 VK_FORMAT_ASTC_12x10_UNORM = 0x00000092,
699 VK_FORMAT_ASTC_12x10_SRGB = 0x00000093,
700 VK_FORMAT_ASTC_12x12_UNORM = 0x00000094,
701 VK_FORMAT_ASTC_12x12_SRGB = 0x00000095,
702 VK_FORMAT_B4G4R4A4_UNORM = 0x00000096,
703 VK_FORMAT_B5G5R5A1_UNORM = 0x00000097,
704 VK_FORMAT_B5G6R5_UNORM = 0x00000098,
705 VK_FORMAT_B5G6R5_USCALED = 0x00000099,
706 VK_FORMAT_B8G8R8_UNORM = 0x0000009A,
707 VK_FORMAT_B8G8R8_SNORM = 0x0000009B,
708 VK_FORMAT_B8G8R8_USCALED = 0x0000009C,
709 VK_FORMAT_B8G8R8_SSCALED = 0x0000009D,
710 VK_FORMAT_B8G8R8_UINT = 0x0000009E,
711 VK_FORMAT_B8G8R8_SINT = 0x0000009F,
712 VK_FORMAT_B8G8R8_SRGB = 0x000000A0,
713 VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1,
714 VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2,
715 VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3,
716 VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4,
717 VK_FORMAT_B8G8R8A8_UINT = 0x000000A5,
718 VK_FORMAT_B8G8R8A8_SINT = 0x000000A6,
719 VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7,
720 VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8,
721 VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9,
722 VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA,
723 VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB,
724 VK_FORMAT_B10G10R10A2_UINT = 0x000000AC,
725 VK_FORMAT_B10G10R10A2_SINT = 0x000000AD,
726
727 VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT)
728} VkFormat;
729
730// Shader stage enumerant
731typedef enum VkShaderStage_
732{
733 VK_SHADER_STAGE_VERTEX = 0,
734 VK_SHADER_STAGE_TESS_CONTROL = 1,
735 VK_SHADER_STAGE_TESS_EVALUATION = 2,
736 VK_SHADER_STAGE_GEOMETRY = 3,
737 VK_SHADER_STAGE_FRAGMENT = 4,
738 VK_SHADER_STAGE_COMPUTE = 5,
739
740 VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE)
741} VkShaderStage;
742
743// Structure type enumerant
744typedef enum VkStructureType_
745{
Tony Barbour15fb0952015-06-26 15:02:35 -0600746 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
747 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1,
748 VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2,
749 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 3,
Chia-I Wu08accc62015-07-07 11:50:03 +0800750 VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO = 4,
751
Tony Barbour15fb0952015-06-26 15:02:35 -0600752 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 6,
753 VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 7,
754 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 8,
755 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 9,
756 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 10,
757 VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 11,
758 VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 12,
759 VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 13,
760 VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 14,
761 VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 15,
762 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 16,
763 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 17,
764 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 18,
765 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 19,
766 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 20,
767 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 21,
768 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 22,
769 VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 23,
770 VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 24,
771 VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 25,
772 VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 26,
773 VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 27,
774 VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 28,
775 VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 29,
776 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 30,
777 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 31,
778 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 32,
779 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 33,
780 VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 34,
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800781
Tony Barbour15fb0952015-06-26 15:02:35 -0600782 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 36,
783 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 37,
784 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 38,
785 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 39,
786 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 40,
787 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 41,
788 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 42,
789 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 43,
790 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 44,
Jon Ashburnc669cc62015-07-09 15:02:25 -0600791 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 45,
792 VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES = 46,
Tony Barbourd1c35722015-04-16 15:59:00 -0600793
Chia-I Wu08accc62015-07-07 11:50:03 +0800794 VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 47,
795 VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 48,
796 VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 49,
797 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 50,
798
799 VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, RENDER_PASS_BEGIN_INFO)
Tony Barbourd1c35722015-04-16 15:59:00 -0600800} VkStructureType;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600801
Mike Stroyanb050c682015-04-17 12:36:38 -0600802// Object type enumerant
803typedef enum VkObjectType_
804{
805 VK_OBJECT_TYPE_INSTANCE = 0,
806 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1,
807 VK_OBJECT_TYPE_DEVICE = 2,
808 VK_OBJECT_TYPE_QUEUE = 3,
809 VK_OBJECT_TYPE_COMMAND_BUFFER = 4,
810 VK_OBJECT_TYPE_DEVICE_MEMORY = 5,
811 VK_OBJECT_TYPE_BUFFER = 6,
812 VK_OBJECT_TYPE_BUFFER_VIEW = 7,
813 VK_OBJECT_TYPE_IMAGE = 8,
814 VK_OBJECT_TYPE_IMAGE_VIEW = 9,
Chia-I Wu08accc62015-07-07 11:50:03 +0800815 VK_OBJECT_TYPE_ATTACHMENT_VIEW = 10,
816
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -0600817 VK_OBJECT_TYPE_SHADER_MODULE = 12,
818 VK_OBJECT_TYPE_SHADER = 13,
819 VK_OBJECT_TYPE_PIPELINE = 14,
820 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 15,
821 VK_OBJECT_TYPE_SAMPLER = 16,
822 VK_OBJECT_TYPE_DESCRIPTOR_SET = 17,
823 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 18,
824 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 19,
825 VK_OBJECT_TYPE_DYNAMIC_VP_STATE = 20,
826 VK_OBJECT_TYPE_DYNAMIC_RS_STATE = 21,
827 VK_OBJECT_TYPE_DYNAMIC_CB_STATE = 22,
828 VK_OBJECT_TYPE_DYNAMIC_DS_STATE = 23,
829 VK_OBJECT_TYPE_FENCE = 24,
830 VK_OBJECT_TYPE_SEMAPHORE = 25,
831 VK_OBJECT_TYPE_EVENT = 26,
832 VK_OBJECT_TYPE_QUERY_POOL = 27,
833 VK_OBJECT_TYPE_FRAMEBUFFER = 28,
Jon Ashburnc669cc62015-07-09 15:02:25 -0600834 VK_OBJECT_TYPE_PIPELINE_CACHE = 29,
835 VK_OBJECT_TYPE_RENDER_PASS = 30,
Mike Stroyanb050c682015-04-17 12:36:38 -0600836
837 // Valid ranges for core Vulkan:
838 VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE,
839 VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_RENDER_PASS,
840 VK_NUM_OBJECT_TYPE = (VK_OBJECT_TYPE_END_RANGE - VK_OBJECT_TYPE_BEGIN_RANGE + 1),
841 VK_MAX_ENUM(VkObjectType)
842} VkObjectType;
843
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600844// ------------------------------------------------------------------------------------------------
845// Error and return codes
846
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600847typedef enum VkResult_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600848{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600849 // Return codes for successful operation execution (> = 0)
850 VK_SUCCESS = 0x0000000,
851 VK_UNSUPPORTED = 0x0000001,
852 VK_NOT_READY = 0x0000002,
853 VK_TIMEOUT = 0x0000003,
854 VK_EVENT_SET = 0x0000004,
855 VK_EVENT_RESET = 0x0000005,
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600856 VK_INCOMPLETE = 0x0000006,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600857
858 // Error codes (negative values)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600859 VK_ERROR_UNKNOWN = -(0x00000001),
860 VK_ERROR_UNAVAILABLE = -(0x00000002),
861 VK_ERROR_INITIALIZATION_FAILED = -(0x00000003),
Tony Barbourd1c35722015-04-16 15:59:00 -0600862 VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004),
863 VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005),
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600864 VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006),
865 VK_ERROR_DEVICE_LOST = -(0x00000007),
866 VK_ERROR_INVALID_POINTER = -(0x00000008),
867 VK_ERROR_INVALID_VALUE = -(0x00000009),
868 VK_ERROR_INVALID_HANDLE = -(0x0000000A),
869 VK_ERROR_INVALID_ORDINAL = -(0x0000000B),
870 VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C),
871 VK_ERROR_INVALID_EXTENSION = -(0x0000000D),
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600872 VK_ERROR_INVALID_LAYER = -(0x0000000E),
873 VK_ERROR_INVALID_FLAGS = -(0x0000000F),
874 VK_ERROR_INVALID_ALIGNMENT = -(0x00000010),
875 VK_ERROR_INVALID_FORMAT = -(0x00000011),
876 VK_ERROR_INVALID_IMAGE = -(0x00000012),
877 VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000013),
878 VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000014),
879 VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000015),
880 VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000016),
881 VK_ERROR_BAD_SHADER_CODE = -(0x00000017),
882 VK_ERROR_BAD_PIPELINE_DATA = -(0x00000018),
883 VK_ERROR_NOT_MAPPABLE = -(0x00000019),
884 VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A),
885 VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B),
886 VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C),
887 VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D),
888 VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E),
889 VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F),
890 VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020),
891 VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021),
Tony Barbourd1c35722015-04-16 15:59:00 -0600892
893 VK_MAX_ENUM(RESULT)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600894} VkResult;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600895
896// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600897// Flags
898
899// Device creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -0600900typedef VkFlags VkDeviceCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600901
902// Queue capabilities
Tony Barbourd1c35722015-04-16 15:59:00 -0600903typedef VkFlags VkQueueFlags;
904typedef enum VkQueueFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600905{
Tony Barbourd1c35722015-04-16 15:59:00 -0600906 VK_QUEUE_GRAPHICS_BIT = VK_BIT(0), // Queue supports graphics operations
907 VK_QUEUE_COMPUTE_BIT = VK_BIT(1), // Queue supports compute operations
908 VK_QUEUE_DMA_BIT = VK_BIT(2), // Queue supports DMA operations
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500909 VK_QUEUE_SPARSE_MEMMGR_BIT = VK_BIT(3), // Queue supports sparse resource memory management operations
Tony Barbourd1c35722015-04-16 15:59:00 -0600910 VK_QUEUE_EXTENDED_BIT = VK_BIT(30), // Extended queue
911} VkQueueFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600912
Tony Barbourd1c35722015-04-16 15:59:00 -0600913// Memory properties passed into vkAllocMemory().
914typedef VkFlags VkMemoryPropertyFlags;
915typedef enum VkMemoryPropertyFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600916{
Tony Barbourd1c35722015-04-16 15:59:00 -0600917 VK_MEMORY_PROPERTY_DEVICE_ONLY = 0, // If otherwise stated, then allocate memory on device
918 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = VK_BIT(0), // Memory should be mappable by host
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600919 VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT = VK_BIT(1), // Memory may not have i/o coherency so vkFlushMappedMemoryRanges and
920 // vkInvalidateMappedMemoryRanges must be used flush/invalidate host cache
Tony Barbourd1c35722015-04-16 15:59:00 -0600921 VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = VK_BIT(2), // Memory should not be cached by the host
922 VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = VK_BIT(3), // Memory should support host write combining
Tony Barbourd1c35722015-04-16 15:59:00 -0600923} VkMemoryPropertyFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600924
Tony Barbourd1c35722015-04-16 15:59:00 -0600925// Memory output flags passed to resource transition commands
926typedef VkFlags VkMemoryOutputFlags;
927typedef enum VkMemoryOutputFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600928{
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600929 VK_MEMORY_OUTPUT_HOST_WRITE_BIT = VK_BIT(0), // Controls output coherency of host writes
Tony Barbourd1c35722015-04-16 15:59:00 -0600930 VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes
931 VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes
932 VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes
933 VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations
934} VkMemoryOutputFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600935
Tony Barbourd1c35722015-04-16 15:59:00 -0600936// Memory input flags passed to resource transition commands
937typedef VkFlags VkMemoryInputFlags;
938typedef enum VkMemoryInputFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600939{
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600940 VK_MEMORY_INPUT_HOST_READ_BIT = VK_BIT(0), // Controls input coherency of host reads
Tony Barbourd1c35722015-04-16 15:59:00 -0600941 VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads
942 VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches
943 VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches
944 VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads
945 VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads
946 VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads
947 VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads
Chia-I Wu08accc62015-07-07 11:50:03 +0800948 VK_MEMORY_INPUT_ATTACHMENT_BIT = VK_BIT(8),
949 VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(9), // Controls input coherency of transfer operations
Tony Barbourd1c35722015-04-16 15:59:00 -0600950} VkMemoryInputFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600951
Tony Barbourd1c35722015-04-16 15:59:00 -0600952// Buffer usage flags
953typedef VkFlags VkBufferUsageFlags;
954typedef enum VkBufferUsageFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600955{
Tony Barbourd1c35722015-04-16 15:59:00 -0600956 VK_BUFFER_USAGE_GENERAL = 0, // No special usage
957 VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
958 VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
959 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(2), // Can be used as TBO
960 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(3), // Can be used as IBO
961 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = VK_BIT(4), // Can be used as UBO
962 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = VK_BIT(5), // Can be used as SSBO
963 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = VK_BIT(6), // Can be used as source of fixed function index fetch (index buffer)
964 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = VK_BIT(7), // Can be used as source of fixed function vertex fetch (VBO)
965 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = VK_BIT(8), // Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
966} VkBufferUsageFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600967
Tony Barbourd1c35722015-04-16 15:59:00 -0600968// Buffer creation flags
969typedef VkFlags VkBufferCreateFlags;
970typedef enum VkBufferCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600971{
Courtney Goeltzenleuchter908aa752015-06-18 17:01:41 -0600972 VK_BUFFER_CREATE_SPARSE_BIT = VK_BIT(0), // Buffer should support sparse backing
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600973 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = VK_BIT(1), // Buffer should support sparse backing with partial residency
974 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 Barbourd1c35722015-04-16 15:59:00 -0600975} VkBufferCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600976
Tony Barbourd1c35722015-04-16 15:59:00 -0600977// Shader stage flags
978typedef VkFlags VkShaderStageFlags;
979typedef enum VkShaderStageFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -0600980{
Tony Barbourd1c35722015-04-16 15:59:00 -0600981 VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0),
982 VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1),
983 VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2),
984 VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3),
985 VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4),
986 VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5),
987
988 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
989} VkShaderStageFlagBits;
990
991// Image usage flags
992typedef VkFlags VkImageUsageFlags;
993typedef enum VkImageUsageFlagBits_
994{
995 VK_IMAGE_USAGE_GENERAL = 0, // No special usage
996 VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = VK_BIT(0), // Can be used as a source of transfer operations
997 VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = VK_BIT(1), // Can be used as a destination of transfer operations
998 VK_IMAGE_USAGE_SAMPLED_BIT = VK_BIT(2), // Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
999 VK_IMAGE_USAGE_STORAGE_BIT = VK_BIT(3), // Can be used as storage image (STORAGE_IMAGE descriptor type)
1000 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = VK_BIT(4), // Can be used as framebuffer color attachment
1001 VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = VK_BIT(5), // Can be used as framebuffer depth/stencil attachment
1002 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = VK_BIT(6), // Image data not needed outside of rendering
Chia-I Wu08accc62015-07-07 11:50:03 +08001003 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = VK_BIT(7),
Tony Barbourd1c35722015-04-16 15:59:00 -06001004} VkImageUsageFlagBits;
1005
1006// Image creation flags
1007typedef VkFlags VkImageCreateFlags;
1008typedef enum VkImageCreateFlagBits_
1009{
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06001010 VK_IMAGE_CREATE_SPARSE_BIT = VK_BIT(0), // Image should support sparse backing
1011 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = VK_BIT(1), // Image should support sparse backing with partial residency
1012 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
1013 VK_IMAGE_CREATE_INVARIANT_DATA_BIT = VK_BIT(3),
1014 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = VK_BIT(4), // Allows image views to have different format than the base image
1015 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = VK_BIT(5), // Allows creating image views with cube type from the created image
Tony Barbourd1c35722015-04-16 15:59:00 -06001016} VkImageCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001017
1018// Depth-stencil view creation flags
Chia-I Wu08accc62015-07-07 11:50:03 +08001019typedef VkFlags VkAttachmentViewCreateFlags;
1020typedef enum VkAttachmentViewCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001021{
Chia-I Wu08accc62015-07-07 11:50:03 +08001022 VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_DEPTH_BIT = VK_BIT(0),
1023 VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_STENCIL_BIT = VK_BIT(1),
1024} VkAttachmentViewCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001025
1026// Pipeline creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001027typedef VkFlags VkPipelineCreateFlags;
1028typedef enum VkPipelineCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001029{
Tony Barbourd1c35722015-04-16 15:59:00 -06001030 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0),
1031 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1),
Jon Ashburnc669cc62015-07-09 15:02:25 -06001032 VK_PIPELINE_CREATE_DERIVATIVE_BIT = VK_BIT(2),
Tony Barbourd1c35722015-04-16 15:59:00 -06001033} VkPipelineCreateFlagBits;
1034
1035// Channel flags
1036typedef VkFlags VkChannelFlags;
1037typedef enum VkChannelFlagBits_
1038{
1039 VK_CHANNEL_R_BIT = VK_BIT(0),
1040 VK_CHANNEL_G_BIT = VK_BIT(1),
1041 VK_CHANNEL_B_BIT = VK_BIT(2),
1042 VK_CHANNEL_A_BIT = VK_BIT(3),
1043} VkChannelFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001044
1045// Fence creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001046typedef VkFlags VkFenceCreateFlags;
1047typedef enum VkFenceCreateFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001048{
Tony Barbourd1c35722015-04-16 15:59:00 -06001049 VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0),
1050} VkFenceCreateFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001051
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06001052// Sparse image format flags
1053typedef VkFlags VkSparseImageFormatFlags;
1054typedef enum VkSparseImageFormatFlagBits_
1055{
1056 VK_SPARSE_IMAGE_FMT_SINGLE_MIPTAIL_BIT = VK_BIT(0),
1057 VK_SPARSE_IMAGE_FMT_ALIGNED_MIP_SIZE_BIT = VK_BIT(1),
1058 VK_SPARSE_IMAGE_FMT_NONSTD_BLOCK_SIZE_BIT = VK_BIT(2),
1059} VkSparseImageFormatFlagBits;
1060
1061// Sparse memory bind flags
1062typedef VkFlags VkSparseMemoryBindFlags;
1063typedef enum VkSparseMemoryBindFlagBits_
1064{
1065 VK_SPARSE_MEMORY_BIND_REPLICATE_64KIB_BLOCK_BIT = VK_BIT(0),
1066} VkSparseMemoryBindFlagBits;
1067
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001068// Semaphore creation flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001069typedef VkFlags VkSemaphoreCreateFlags;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001070
1071// Format capability flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001072typedef VkFlags VkFormatFeatureFlags;
1073typedef enum VkFormatFeatureFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001074{
Tony Barbourd1c35722015-04-16 15:59:00 -06001075 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1076 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type)
1077 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images
1078 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs)
1079 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs)
1080 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers
1081 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs)
1082 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images
1083 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images
1084 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images
1085 VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits
1086} VkFormatFeatureFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001087
Chia-I Wu08accc62015-07-07 11:50:03 +08001088typedef VkFlags VkSubpassDescriptionFlags;
1089typedef enum VkSubpassDescriptionFlagBits_
1090{
1091 VK_SUBPASS_DESCRIPTION_NO_OVERDRAW_BIT = 0x00000001,
1092} VkSubpassDescriptionFlagBits;
1093
Tony Barbour0b2cfb22015-06-29 16:20:35 -06001094// Pipeline stage flags
1095typedef enum {
1096 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = VK_BIT(0),
1097 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = VK_BIT(1),
1098 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = VK_BIT(2),
1099 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = VK_BIT(3),
1100 VK_PIPELINE_STAGE_TESS_CONTROL_SHADER_BIT = VK_BIT(4),
1101 VK_PIPELINE_STAGE_TESS_EVALUATION_SHADER_BIT = VK_BIT(5),
1102 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = VK_BIT(6),
1103 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = VK_BIT(7),
1104 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = VK_BIT(8),
1105 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = VK_BIT(9),
1106 VK_PIPELINE_STAGE_ATTACHMENT_OUTPUT_BIT = VK_BIT(10),
1107 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = VK_BIT(11),
1108 VK_PIPELINE_STAGE_TRANSFER_BIT = VK_BIT(12),
1109 VK_PIPELINE_STAGE_HOST_BIT = VK_BIT(13),
1110 VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF,
1111 VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF,
1112} VkPipelineStageFlagBits;
1113
1114typedef VkFlags VkPipelineStageFlags;
1115
Chris Forbesd9be82b2015-06-22 17:21:59 +12001116// Image aspect flags
1117typedef VkFlags VkImageAspectFlags;
1118typedef enum VkImageAspectFlagBits_
1119{
1120 VK_IMAGE_ASPECT_COLOR_BIT = VK_BIT(0),
1121 VK_IMAGE_ASPECT_DEPTH_BIT = VK_BIT(1),
1122 VK_IMAGE_ASPECT_STENCIL_BIT = VK_BIT(2),
1123} VkImageAspectFlagBits;
1124
Tony Barbourd1c35722015-04-16 15:59:00 -06001125// Query control flags
1126typedef VkFlags VkQueryControlFlags;
1127typedef enum VkQueryControlFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001128{
Tony Barbourd1c35722015-04-16 15:59:00 -06001129 VK_QUERY_CONTROL_CONSERVATIVE_BIT = VK_BIT(0), // Allow conservative results to be collected by the query
1130} VkQueryControlFlagBits;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001131
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001132// Query result flags
Tony Barbourd1c35722015-04-16 15:59:00 -06001133typedef VkFlags VkQueryResultFlags;
1134typedef enum VkQueryResultFlagBits_
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001135{
Courtney Goeltzenleuchter48d7bac2015-06-09 08:45:23 -06001136 VK_QUERY_RESULT_DEFAULT = 0, // Results of the queries are immediately written to the destination buffer as 32-bit values
Tony Barbourd1c35722015-04-16 15:59:00 -06001137 VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values
Tony Barbourd1c35722015-04-16 15:59:00 -06001138 VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy
1139 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written
1140 VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available
1141} VkQueryResultFlagBits;
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001142
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06001143// Shader module creation flags
1144typedef VkFlags VkShaderModuleCreateFlags;
1145
Tony Barbourd1c35722015-04-16 15:59:00 -06001146// Shader creation flags
1147typedef VkFlags VkShaderCreateFlags;
1148
1149// Event creation flags
1150typedef VkFlags VkEventCreateFlags;
1151
1152// Command buffer creation flags
1153typedef VkFlags VkCmdBufferCreateFlags;
1154
1155// Command buffer optimization flags
1156typedef VkFlags VkCmdBufferOptimizeFlags;
1157typedef enum VkCmdBufferOptimizeFlagBits_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001158{
Tony Barbourd1c35722015-04-16 15:59:00 -06001159 VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0),
1160 VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1),
1161 VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2),
1162 VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3),
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001163 VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT = 0x00000010,
Tony Barbourd1c35722015-04-16 15:59:00 -06001164} VkCmdBufferOptimizeFlagBits;
1165
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06001166// Pipeline statistics flags
1167typedef VkFlags VkQueryPipelineStatisticFlags;
1168typedef enum VkQueryPipelineStatisticFlagBits_ {
1169 VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = VK_BIT(0), // Optional
1170 VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = VK_BIT(1), // Optional
1171 VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = VK_BIT(2), // Optional
1172 VK_QUERY_PIPELINE_STATISTIC_GS_INVOCATIONS_BIT = VK_BIT(3), // Optional
1173 VK_QUERY_PIPELINE_STATISTIC_GS_PRIMITIVES_BIT = VK_BIT(4), // Optional
1174 VK_QUERY_PIPELINE_STATISTIC_C_INVOCATIONS_BIT = VK_BIT(5), // Optional
1175 VK_QUERY_PIPELINE_STATISTIC_C_PRIMITIVES_BIT = VK_BIT(6), // Optional
1176 VK_QUERY_PIPELINE_STATISTIC_FS_INVOCATIONS_BIT = VK_BIT(7), // Optional
1177 VK_QUERY_PIPELINE_STATISTIC_TCS_PATCHES_BIT = VK_BIT(8), // Optional
1178 VK_QUERY_PIPELINE_STATISTIC_TES_INVOCATIONS_BIT = VK_BIT(9), // Optional
1179 VK_QUERY_PIPELINE_STATISTIC_CS_INVOCATIONS_BIT = VK_BIT(10), // Optional
1180} VkQueryPipelineStatisticFlagBits;
1181
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06001182// Memory mapping flags
1183typedef VkFlags VkMemoryMapFlags;
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06001184
Mark Lobodzinski3fbc9c22015-07-02 17:09:57 -06001185// Memory heap flags
1186typedef VkFlags VkMemoryHeapFlags;
1187typedef enum VkMemoryHeapFlagBits_ {
1188 VK_MEMORY_HEAP_HOST_LOCAL = VK_BIT(0), // If set, heap represents host memory
1189} VkMemoryHeapFlagBits;
1190
1191
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001192// ------------------------------------------------------------------------------------------------
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001193// Vulkan structures
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001194
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001195typedef struct VkOffset2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001196{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001197 int32_t x;
1198 int32_t y;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001199} VkOffset2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001200
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001201typedef struct VkOffset3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001202{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001203 int32_t x;
1204 int32_t y;
1205 int32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001206} VkOffset3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001207
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001208typedef struct VkExtent2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001209{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001210 int32_t width;
1211 int32_t height;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001212} VkExtent2D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001213
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001214typedef struct VkExtent3D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001215{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001216 int32_t width;
1217 int32_t height;
1218 int32_t depth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001219} VkExtent3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001220
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001221typedef struct VkViewport_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001222{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001223 float originX;
1224 float originY;
1225 float width;
1226 float height;
1227 float minDepth;
1228 float maxDepth;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001229} VkViewport;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001230
Chris Forbesd9be82b2015-06-22 17:21:59 +12001231typedef struct VkRect2D_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001232{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001233 VkOffset2D offset;
1234 VkExtent2D extent;
Chris Forbesd9be82b2015-06-22 17:21:59 +12001235} VkRect2D;
1236
1237typedef struct VkRect3D_
1238{
1239 VkOffset3D offset;
1240 VkExtent3D extent;
1241} VkRect3D;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001242
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001243typedef struct VkChannelMapping_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001244{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001245 VkChannelSwizzle r;
1246 VkChannelSwizzle g;
1247 VkChannelSwizzle b;
1248 VkChannelSwizzle a;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001249} VkChannelMapping;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001250
Tony Barbourd1c35722015-04-16 15:59:00 -06001251typedef struct VkPhysicalDeviceProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001252{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001253 uint32_t apiVersion;
1254 uint32_t driverVersion;
1255 uint32_t vendorId;
1256 uint32_t deviceId;
Tony Barbourd1c35722015-04-16 15:59:00 -06001257 VkPhysicalDeviceType deviceType;
1258 char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
Jon Ashburnc669cc62015-07-09 15:02:25 -06001259 uint8_t pipelineCacheUUID[VK_UUID_LENGTH];
Tony Barbourd1c35722015-04-16 15:59:00 -06001260} VkPhysicalDeviceProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001261
Chris Forbesbc0bb772015-06-21 22:55:02 +12001262typedef struct VkPhysicalDeviceFeatures_
1263{
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001264 VkBool32 robustBufferAccess;
1265 VkBool32 fullDrawIndexUint32;
1266 VkBool32 imageCubeArray;
1267 VkBool32 independentBlend;
1268 VkBool32 geometryShader;
1269 VkBool32 tessellationShader;
1270 VkBool32 sampleRateShading;
1271 VkBool32 dualSourceBlend;
1272 VkBool32 logicOp;
1273 VkBool32 instancedDrawIndirect;
1274 VkBool32 depthClip;
1275 VkBool32 depthBiasClamp;
1276 VkBool32 fillModeNonSolid;
1277 VkBool32 depthBounds;
1278 VkBool32 wideLines;
1279 VkBool32 largePoints;
1280 VkBool32 textureCompressionETC2;
1281 VkBool32 textureCompressionASTC_LDR;
1282 VkBool32 textureCompressionBC;
1283 VkBool32 pipelineStatisticsQuery;
1284 VkBool32 vertexSideEffects;
1285 VkBool32 tessellationSideEffects;
1286 VkBool32 geometrySideEffects;
1287 VkBool32 fragmentSideEffects;
1288 VkBool32 shaderTessellationPointSize;
1289 VkBool32 shaderGeometryPointSize;
1290 VkBool32 shaderTextureGatherExtended;
1291 VkBool32 shaderStorageImageExtendedFormats;
1292 VkBool32 shaderStorageImageMultisample;
1293 VkBool32 shaderStorageBufferArrayConstantIndexing;
1294 VkBool32 shaderStorageImageArrayConstantIndexing;
1295 VkBool32 shaderUniformBufferArrayDynamicIndexing;
1296 VkBool32 shaderSampledImageArrayDynamicIndexing;
1297 VkBool32 shaderStorageBufferArrayDynamicIndexing;
1298 VkBool32 shaderStorageImageArrayDynamicIndexing;
1299 VkBool32 shaderClipDistance;
1300 VkBool32 shaderCullDistance;
1301 VkBool32 shaderFloat64;
1302 VkBool32 shaderInt64;
1303 VkBool32 shaderFloat16;
1304 VkBool32 shaderInt16;
1305 VkBool32 shaderResourceResidency;
1306 VkBool32 shaderResourceMinLOD;
1307 VkBool32 sparse;
1308 VkBool32 sparseResidencyBuffer;
1309 VkBool32 sparseResidencyImage2D;
1310 VkBool32 sparseResidencyImage3D;
1311 VkBool32 sparseResidency2Samples;
1312 VkBool32 sparseResidency4Samples;
1313 VkBool32 sparseResidency8Samples;
1314 VkBool32 sparseResidency16Samples;
1315 VkBool32 sparseResidencyStandard2DBlockShape;
1316 VkBool32 sparseResidencyStandard2DMSBlockShape;
1317 VkBool32 sparseResidencyStandard3DBlockShape;
1318 VkBool32 sparseResidencyAlignedMipSize;
1319 VkBool32 sparseResidencyNonResident;
1320 VkBool32 sparseResidencyNonResidentStrict;
1321 VkBool32 sparseResidencyAliased;
Chris Forbesbc0bb772015-06-21 22:55:02 +12001322} VkPhysicalDeviceFeatures;
1323
1324typedef struct VkPhysicalDeviceLimits_
1325{
Chris Forbes658ec0d2015-06-21 20:09:12 +12001326 uint32_t maxImageDimension1D;
1327 uint32_t maxImageDimension2D;
1328 uint32_t maxImageDimension3D;
1329 uint32_t maxImageDimensionCube;
1330 uint32_t maxImageArrayLayers;
1331 uint32_t maxTexelBufferSize;
1332 uint32_t maxUniformBufferSize;
1333 uint32_t maxStorageBufferSize;
1334 uint32_t maxPushConstantsSize;
1335 uint32_t maxMemoryAllocationCount;
1336 VkDeviceSize maxInlineMemoryUpdateSize;
1337 uint32_t maxBoundDescriptorSets;
1338 uint32_t maxDescriptorSets;
1339 uint32_t maxPerStageDescriptorSamplers;
1340 uint32_t maxPerStageDescriptorUniformBuffers;
1341 uint32_t maxPerStageDescriptorStorageBuffers;
1342 uint32_t maxPerStageDescriptorSampledImages;
1343 uint32_t maxPerStageDescriptorStorageImages;
1344 uint32_t maxDescriptorSetSamplers;
1345 uint32_t maxDescriptorSetUniformBuffers;
1346 uint32_t maxDescriptorSetStorageBuffers;
1347 uint32_t maxDescriptorSetSampledImages;
1348 uint32_t maxDescriptorSetStorageImages;
1349 uint32_t maxVertexInputAttributes;
1350 uint32_t maxVertexInputAttributeOffset;
1351 uint32_t maxVertexInputBindingStride;
1352 uint32_t maxVertexOutputComponents;
1353 uint32_t maxTessGenLevel;
1354 uint32_t maxTessPatchSize;
1355 uint32_t maxTessControlPerVertexInputComponents;
1356 uint32_t maxTessControlPerVertexOutputComponents;
1357 uint32_t maxTessControlPerPatchOutputComponents;
1358 uint32_t maxTessControlTotalOutputComponents;
1359 uint32_t maxTessEvaluationInputComponents;
1360 uint32_t maxTessEvaluationOutputComponents;
1361 uint32_t maxGeometryShaderInvocations;
1362 uint32_t maxGeometryInputComponents;
1363 uint32_t maxGeometryOutputComponents;
1364 uint32_t maxGeometryOutputVertices;
1365 uint32_t maxGeometryTotalOutputComponents;
1366 uint32_t maxFragmentInputComponents;
1367 uint32_t maxFragmentOutputBuffers;
1368 uint32_t maxFragmentDualSourceBuffers;
1369 uint32_t maxFragmentCombinedOutputResources;
1370 uint32_t maxComputeSharedMemorySize;
1371 uint32_t maxComputeWorkGroupCount[3];
1372 uint32_t maxComputeWorkGroupInvocations;
1373 uint32_t maxComputeWorkGroupSize[3];
1374 uint32_t subPixelPrecisionBits;
1375 uint32_t subTexelPrecisionBits;
1376 uint32_t mipmapPrecisionBits;
1377 uint32_t maxDrawIndexedIndexValue;
1378 uint32_t maxDrawIndirectInstanceCount;
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001379 VkBool32 primitiveRestartForPatches;
Chris Forbes658ec0d2015-06-21 20:09:12 +12001380 float maxSamplerLodBias;
1381 uint32_t maxSamplerAnisotropy;
1382 uint32_t maxViewports;
1383 uint32_t maxDynamicViewportStates;
1384 uint32_t maxViewportDimensions[2];
1385 float viewportBoundsRange[2];
1386 uint32_t viewportSubPixelBits;
1387 uint32_t minMemoryMapAlignment;
1388 uint32_t minTexelBufferOffsetAlignment;
1389 uint32_t minUniformBufferOffsetAlignment;
1390 uint32_t minStorageBufferOffsetAlignment;
1391 uint32_t minTexelOffset;
1392 uint32_t maxTexelOffset;
1393 uint32_t minTexelGatherOffset;
1394 uint32_t maxTexelGatherOffset;
1395 uint32_t minInterpolationOffset;
1396 uint32_t maxInterpolationOffset;
1397 uint32_t subPixelInterpolationOffsetBits;
1398 uint32_t maxFramebufferWidth;
1399 uint32_t maxFramebufferHeight;
1400 uint32_t maxFramebufferLayers;
1401 uint32_t maxFramebufferColorSamples;
1402 uint32_t maxFramebufferDepthSamples;
1403 uint32_t maxFramebufferStencilSamples;
1404 uint32_t maxColorAttachments;
1405 uint32_t maxSampledImageColorSamples;
1406 uint32_t maxSampledImageDepthSamples;
1407 uint32_t maxSampledImageIntegerSamples;
1408 uint32_t maxStorageImageSamples;
1409 uint32_t maxSampleMaskWords;
1410 uint64_t timestampFrequency;
1411 uint32_t maxClipDistances;
1412 uint32_t maxCullDistances;
1413 uint32_t maxCombinedClipAndCullDistances;
1414 float pointSizeRange[2];
1415 float lineWidthRange[2];
1416 float pointSizeGranularity;
1417 float lineWidthGranularity;
Chris Forbesbc0bb772015-06-21 22:55:02 +12001418} VkPhysicalDeviceLimits;
1419
1420
Tony Barbourd1c35722015-04-16 15:59:00 -06001421typedef struct VkPhysicalDevicePerformance_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001422{
Tony Barbourd1c35722015-04-16 15:59:00 -06001423 float maxDeviceClock;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001424 float aluPerClock;
1425 float texPerClock;
1426 float primsPerClock;
1427 float pixelsPerClock;
Tony Barbourd1c35722015-04-16 15:59:00 -06001428} VkPhysicalDevicePerformance;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001429
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001430typedef struct VkExtensionProperties_
1431{
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001432 char extName[VK_MAX_EXTENSION_NAME]; // extension name
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001433 uint32_t version; // version of the extension specification
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001434 uint32_t specVersion; // version number constructed via VK_API_VERSION
Jon Ashburn9fd4cc42015-04-10 14:33:07 -06001435} VkExtensionProperties;
1436
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001437typedef struct VkLayerProperties_
1438{
1439 char layerName[VK_MAX_EXTENSION_NAME]; // extension name
1440 uint32_t specVersion; // version of spec this layer is compatible with
1441 uint32_t implVersion; // version of the layer
1442 char description[VK_MAX_DESCRIPTION]; // additional description
1443} VkLayerProperties;
1444
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001445typedef struct VkApplicationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001446{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001447 VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001448 const void* pNext; // Next structure in chain
1449 const char* pAppName;
1450 uint32_t appVersion;
1451 const char* pEngineName;
1452 uint32_t engineVersion;
1453 uint32_t apiVersion;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001454} VkApplicationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001455
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001456typedef void* (VKAPI *PFN_vkAllocFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001457 void* pUserData,
1458 size_t size,
1459 size_t alignment,
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001460 VkSystemAllocType allocType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001461
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001462typedef void (VKAPI *PFN_vkFreeFunction)(
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001463 void* pUserData,
1464 void* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001465
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001466typedef struct VkAllocCallbacks_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001467{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001468 void* pUserData;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001469 PFN_vkAllocFunction pfnAlloc;
1470 PFN_vkFreeFunction pfnFree;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001471} VkAllocCallbacks;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001472
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001473typedef struct VkDeviceQueueCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001474{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001475 uint32_t queueNodeIndex;
1476 uint32_t queueCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001477} VkDeviceQueueCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001478
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001479typedef struct VkDeviceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001480{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001481 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001482 const void* pNext; // Pointer to next structure
1483 uint32_t queueRecordCount;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001484 const VkDeviceQueueCreateInfo* pRequestedQueues;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001485 uint32_t layerCount;
1486 const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001487 uint32_t extensionCount;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001488 const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value
Chris Forbesbc0bb772015-06-21 22:55:02 +12001489 const VkPhysicalDeviceFeatures* pEnabledFeatures;
Tony Barbourd1c35722015-04-16 15:59:00 -06001490 VkDeviceCreateFlags flags; // Device creation flags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001491} VkDeviceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001492
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001493typedef struct VkInstanceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001494{
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001495 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001496 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchterbb594ba2015-04-16 21:42:44 -06001497 const VkApplicationInfo* pAppInfo;
1498 const VkAllocCallbacks* pAllocCb;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001499 uint32_t layerCount;
1500 const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001501 uint32_t extensionCount;
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06001502 const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001503} VkInstanceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001504
Tony Barbourd1c35722015-04-16 15:59:00 -06001505typedef struct VkPhysicalDeviceQueueProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001506{
Tony Barbourd1c35722015-04-16 15:59:00 -06001507 VkQueueFlags queueFlags; // Queue flags
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001508 uint32_t queueCount;
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001509 VkBool32 supportsTimestamps;
Tony Barbourd1c35722015-04-16 15:59:00 -06001510} VkPhysicalDeviceQueueProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001511
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001512typedef struct VkMemoryType_
1513{
1514 VkMemoryPropertyFlags propertyFlags; // Memory properties of this memory type
1515 uint32_t heapIndex; // Index of the memory heap allocations of this memory type are taken from
1516} VkMemoryType;
1517
1518typedef struct VkMemoryHeap_
1519{
1520 VkDeviceSize size; // Available memory in the heap
Mark Lobodzinski3fbc9c22015-07-02 17:09:57 -06001521 VkMemoryHeapFlags flags; // Flags for the heap
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001522} VkMemoryHeap;
1523
Tony Barbourd1c35722015-04-16 15:59:00 -06001524typedef struct VkPhysicalDeviceMemoryProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001525{
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001526 uint32_t memoryTypeCount;
1527 VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
1528 uint32_t memoryHeapCount;
1529 VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
Tony Barbourd1c35722015-04-16 15:59:00 -06001530} VkPhysicalDeviceMemoryProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001531
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001532typedef struct VkMemoryAllocInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001533{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001534 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001535 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001536 VkDeviceSize allocationSize; // Size of memory allocation
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001537 uint32_t memoryTypeIndex; // Index of the memory type to allocate from
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001538} VkMemoryAllocInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001539
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06001540typedef struct VkMappedMemoryRange_
1541{
1542 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
1543 const void* pNext; // Pointer to next structure
1544 VkDeviceMemory mem; // Mapped memory object
1545 VkDeviceSize offset; // Offset within the mapped memory the range starts from
1546 VkDeviceSize size; // Size of the range within the mapped memory
1547} VkMappedMemoryRange;
1548
Mark Lobodzinskib3fbcd92015-07-02 16:49:40 -06001549typedef struct VkMemoryRequirements_
1550{
1551 VkDeviceSize size; // Specified in bytes
1552 VkDeviceSize alignment; // Specified in bytes
1553 VkDeviceSize granularity; // Granularity at which memory can be bound to resource sub-ranges specified in bytes (usually the page size)
1554 uint32_t memoryTypeBits; // Bitfield of the allowed memory type indices into memoryTypes[] for this object
1555} VkMemoryRequirements;
1556
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06001557typedef struct VkSparseImageFormatProperties_
1558{
1559 VkImageAspect aspect;
1560 VkExtent3D imageGranularity;
1561 VkSparseImageFormatFlags flags;
1562} VkSparseImageFormatProperties;
1563
1564typedef struct VkSparseImageMemoryRequirements_
1565{
1566 VkSparseImageFormatProperties formatProps;
1567 uint32_t imageMipTailStartLOD;
1568 VkDeviceSize imageMipTailSize;
1569 VkDeviceSize imageMipTailOffset;
1570 VkDeviceSize imageMipTailStride;
1571} VkSparseImageMemoryRequirements;
1572
1573typedef struct VkImageSubresource_
1574{
1575 VkImageAspect aspect;
1576 uint32_t mipLevel;
1577 uint32_t arraySlice;
1578} VkImageSubresource;
1579
1580typedef struct VkSparseMemoryBindInfo
1581{
1582 VkDeviceSize offset;
1583 VkDeviceSize memOffset;
1584 VkDeviceMemory mem;
1585 VkSparseMemoryBindFlags flags;
1586} VkSparseMemoryBindInfo;
1587
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001588typedef struct VkFormatProperties_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001589{
Tony Barbourd1c35722015-04-16 15:59:00 -06001590 VkFormatFeatureFlags linearTilingFeatures; // Format features in case of linear tiling
1591 VkFormatFeatureFlags optimalTilingFeatures; // Format features in case of optimal tiling
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001592} VkFormatProperties;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001593
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001594typedef struct VkDescriptorInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001595{
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001596 VkBufferView bufferView; // Buffer view to write to the descriptor (in case it's a buffer descriptor, otherwise should be VK_NULL_HANDLE)
1597 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)
1598 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)
Chia-I Wu08accc62015-07-07 11:50:03 +08001599 VkAttachmentView attachmentView;
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001600 VkImageLayout imageLayout; // Layout the image is expected to be in when accessed using this descriptor (only used if <imageView> is not VK_NULL_HANDLE)
1601} VkDescriptorInfo;
1602
1603typedef struct VkWriteDescriptorSet_
1604{
1605 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001606 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001607
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001608 VkDescriptorSet destSet; // Destination descriptor set
1609 uint32_t destBinding; // Binding within the destination descriptor set to write
1610 uint32_t destArrayElement; // Array element within the destination binding to write
1611
1612 uint32_t count; // Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
1613
1614 VkDescriptorType descriptorType; // Descriptor type to write (determines which fields of the array pointed by <pDescriptors> are going to be used)
1615 const VkDescriptorInfo* pDescriptors; // Array of info structures describing the descriptors to write
1616} VkWriteDescriptorSet;
1617
1618typedef struct VkCopyDescriptorSet_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001619{
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001620 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001621 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001622
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001623 VkDescriptorSet srcSet; // Source descriptor set
1624 uint32_t srcBinding; // Binding within the source descriptor set to copy from
1625 uint32_t srcArrayElement; // Array element within the source binding to copy from
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001626
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001627 VkDescriptorSet destSet; // Destination descriptor set
1628 uint32_t destBinding; // Binding within the destination descriptor set to copy to
1629 uint32_t destArrayElement; // Array element within the destination binding to copy to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001630
Chia-I Wu9d00ed72015-05-25 16:27:55 +08001631 uint32_t count; // Number of descriptors to copy
1632} VkCopyDescriptorSet;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001633
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001634typedef struct VkBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001635{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001636 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001637 const void* pNext; // Pointer to next structure.
Tony Barbourd1c35722015-04-16 15:59:00 -06001638 VkDeviceSize size; // Specified in bytes
1639 VkBufferUsageFlags usage; // Buffer usage flags
1640 VkBufferCreateFlags flags; // Buffer creation flags
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001641} VkBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001642
Courtney Goeltzenleuchter4b140cb2015-04-10 17:59:44 -06001643typedef struct VkBufferViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001644{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001645 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001646 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001647 VkBuffer buffer;
1648 VkBufferViewType viewType;
1649 VkFormat format; // Optionally specifies format of elements
Tony Barbourd1c35722015-04-16 15:59:00 -06001650 VkDeviceSize offset; // Specified in bytes
1651 VkDeviceSize range; // View size specified in bytes
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -06001652} VkBufferViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001653
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001654typedef struct VkImageSubresourceRange_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001655{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001656 VkImageAspect aspect;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001657 uint32_t baseMipLevel;
1658 uint32_t mipLevels;
1659 uint32_t baseArraySlice;
1660 uint32_t arraySize;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001661} VkImageSubresourceRange;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001662
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001663typedef struct VkMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001664{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001665 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001666 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001667
Tony Barbourd1c35722015-04-16 15:59:00 -06001668 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1669 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001670} VkMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001671
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001672typedef struct VkBufferMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001673{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001674 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001675 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001676
Tony Barbourd1c35722015-04-16 15:59:00 -06001677 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1678 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001679
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001680 VkBuffer buffer; // Buffer to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001681
Tony Barbourd1c35722015-04-16 15:59:00 -06001682 VkDeviceSize offset; // Offset within the buffer to sync
1683 VkDeviceSize size; // Amount of bytes to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001684} VkBufferMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001685
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001686typedef struct VkImageMemoryBarrier_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001687{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001688 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001689 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001690
Tony Barbourd1c35722015-04-16 15:59:00 -06001691 VkMemoryOutputFlags outputMask; // Outputs the barrier should sync
1692 VkMemoryInputFlags inputMask; // Inputs the barrier should sync to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001693
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001694 VkImageLayout oldLayout; // Current layout of the image
1695 VkImageLayout newLayout; // New layout to transition the image to
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001696
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001697 VkImage image; // Image to sync
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001698
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001699 VkImageSubresourceRange subresourceRange; // Subresource range to sync
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001700} VkImageMemoryBarrier;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001701
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001702typedef struct VkImageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001703{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001704 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001705 const void* pNext; // Pointer to next structure.
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001706 VkImageType imageType;
1707 VkFormat format;
1708 VkExtent3D extent;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001709 uint32_t mipLevels;
1710 uint32_t arraySize;
1711 uint32_t samples;
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001712 VkImageTiling tiling;
Tony Barbourd1c35722015-04-16 15:59:00 -06001713 VkImageUsageFlags usage; // Image usage flags
1714 VkImageCreateFlags flags; // Image creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001715} VkImageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001716
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001717typedef struct VkSubresourceLayout_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001718{
Tony Barbourd1c35722015-04-16 15:59:00 -06001719 VkDeviceSize offset; // Specified in bytes
1720 VkDeviceSize size; // Specified in bytes
1721 VkDeviceSize rowPitch; // Specified in bytes
1722 VkDeviceSize depthPitch; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001723} VkSubresourceLayout;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001724
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001725typedef struct VkImageViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001726{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001727 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001728 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001729 VkImage image;
1730 VkImageViewType viewType;
1731 VkFormat format;
1732 VkChannelMapping channels;
1733 VkImageSubresourceRange subresourceRange;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001734} VkImageViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001735
Chia-I Wu08accc62015-07-07 11:50:03 +08001736typedef struct VkAttachmentViewCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001737{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001738 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001739 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001740 VkImage image;
1741 VkFormat format;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001742 uint32_t mipLevel;
1743 uint32_t baseArraySlice;
1744 uint32_t arraySize;
Chia-I Wu08accc62015-07-07 11:50:03 +08001745 VkAttachmentViewCreateFlags flags; // attachment view flags
1746} VkAttachmentViewCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001747
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001748typedef struct VkBufferCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001749{
Tony Barbourd1c35722015-04-16 15:59:00 -06001750 VkDeviceSize srcOffset; // Specified in bytes
1751 VkDeviceSize destOffset; // Specified in bytes
1752 VkDeviceSize copySize; // Specified in bytes
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001753} VkBufferCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001754
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06001755typedef struct VkSparseImageMemoryBindInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001756{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001757 VkImageSubresource subresource;
1758 VkOffset3D offset;
1759 VkExtent3D extent;
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06001760 VkDeviceSize memOffset;
1761 VkDeviceMemory mem;
1762 VkSparseMemoryBindFlags flags;
1763} VkSparseImageMemoryBindInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001764
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001765typedef struct VkImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001766{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001767 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001768 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001769 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001770 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1771 VkExtent3D extent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001772} VkImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001773
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001774typedef struct VkImageBlit_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001775{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001776 VkImageSubresource srcSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001777 VkOffset3D srcOffset; // Specified in pixels for both compressed and uncompressed images
1778 VkExtent3D srcExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001779 VkImageSubresource destSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001780 VkOffset3D destOffset; // Specified in pixels for both compressed and uncompressed images
1781 VkExtent3D destExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001782} VkImageBlit;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001783
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001784typedef struct VkBufferImageCopy_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001785{
Tony Barbourd1c35722015-04-16 15:59:00 -06001786 VkDeviceSize bufferOffset; // Specified in bytes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001787 VkImageSubresource imageSubresource;
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001788 VkOffset3D imageOffset; // Specified in pixels for both compressed and uncompressed images
1789 VkExtent3D imageExtent; // Specified in pixels for both compressed and uncompressed images
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001790} VkBufferImageCopy;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001791
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001792typedef struct VkImageResolve_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001793{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001794 VkImageSubresource srcSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001795 VkOffset3D srcOffset;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001796 VkImageSubresource destSubresource;
Tony Barbour2e64be82015-04-13 13:11:12 -06001797 VkOffset3D destOffset;
1798 VkExtent3D extent;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001799} VkImageResolve;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001800
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06001801typedef struct VkShaderModuleCreateInfo_
1802{
1803 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
1804 const void* pNext; // Pointer to next structure
1805 size_t codeSize; // Specified in bytes
1806 const void* pCode; // Binary code of size codeSize
1807 VkShaderModuleCreateFlags flags; // Reserved
1808} VkShaderModuleCreateInfo;
1809
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001810typedef struct VkShaderCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001811{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001812 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SHADER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001813 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06001814 VkShaderModule module; // Module containing entry point
Courtney Goeltzenleuchteree4027d2015-06-28 13:01:17 -06001815 const char* pName; // Null-terminate entry point name
Tony Barbourd1c35722015-04-16 15:59:00 -06001816 VkShaderCreateFlags flags; // Reserved
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001817} VkShaderCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001818
Jon Ashburnc669cc62015-07-09 15:02:25 -06001819typedef struct VkPipelineCacheCreateInfo_
1820{
1821 VkStructureType sType;
1822 const void* pNext;
1823 size_t initialSize;
1824 const void* initialData;
1825 size_t maxSize;
1826} VkPipelineCacheCreateInfo;
1827
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001828typedef struct VkDescriptorSetLayoutBinding_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001829{
Tony Barbourd1c35722015-04-16 15:59:00 -06001830 VkDescriptorType descriptorType; // Type of the descriptors in this binding
Chia-I Wu712bb5d2015-05-25 16:22:52 +08001831 uint32_t arraySize; // Number of descriptors in this binding
Tony Barbourd1c35722015-04-16 15:59:00 -06001832 VkShaderStageFlags stageFlags; // Shader stages this binding is visible to
1833 const VkSampler* pImmutableSamplers; // Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001834} VkDescriptorSetLayoutBinding;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001835
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001836typedef struct VkDescriptorSetLayoutCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001837{
Tony Barbourd1c35722015-04-16 15:59:00 -06001838 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
1839 const void* pNext; // Pointer to next structure
1840 uint32_t count; // Number of bindings in the descriptor set layout
1841 const VkDescriptorSetLayoutBinding* pBinding; // Array of descriptor set layout bindings
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001842} VkDescriptorSetLayoutCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001843
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001844typedef struct VkDescriptorTypeCount_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001845{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001846 VkDescriptorType type;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001847 uint32_t count;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001848} VkDescriptorTypeCount;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001849
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001850typedef struct VkDescriptorPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001851{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001852 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001853 const void* pNext; // Pointer to next structure
1854 uint32_t count;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001855 const VkDescriptorTypeCount* pTypeCount;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001856} VkDescriptorPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001857
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001858typedef struct VkLinkConstBuffer_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001859{
1860 uint32_t bufferId;
1861 size_t bufferSize;
1862 const void* pBufferData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001863} VkLinkConstBuffer;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001864
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001865typedef struct VkSpecializationMapEntry_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001866{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001867 uint32_t constantId; // The SpecConstant ID specified in the BIL
1868 uint32_t offset; // Offset of the value in the data block
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001869} VkSpecializationMapEntry;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001870
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001871typedef struct VkSpecializationInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001872{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001873 uint32_t mapEntryCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001874 const VkSpecializationMapEntry* pMap; // mapEntryCount entries
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001875 const void* pData;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001876} VkSpecializationInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001877
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001878typedef struct VkPipelineShaderStageCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001879{
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001880 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
1881 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001882 VkShaderStage stage;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001883 VkShader shader;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001884 uint32_t linkConstBufferCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001885 const VkLinkConstBuffer* pLinkConstBufferInfo;
1886 const VkSpecializationInfo* pSpecializationInfo;
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001887} VkPipelineShaderStageCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001888
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001889typedef struct VkComputePipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001890{
Tony Barbourd1c35722015-04-16 15:59:00 -06001891 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
1892 const void* pNext; // Pointer to next structure
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001893 VkPipelineShaderStageCreateInfo cs;
Tony Barbourd1c35722015-04-16 15:59:00 -06001894 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001895 VkPipelineLayout layout; // Interface layout of the pipeline
Jon Ashburnc669cc62015-07-09 15:02:25 -06001896 VkPipeline basePipelineHandle;
1897 int32_t basePipelineIndex;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001898} VkComputePipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001899
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001900typedef struct VkVertexInputBindingDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001901{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001902 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchterb9776ab2015-04-15 15:29:59 -06001903 uint32_t strideInBytes; // Distance between vertices in bytes (0 = no advancement)
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001904
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001905 VkVertexInputStepRate stepRate; // Rate at which binding is incremented
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001906} VkVertexInputBindingDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001907
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001908typedef struct VkVertexInputAttributeDescription_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001909{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001910 uint32_t location; // location of the shader vertex attrib
1911 uint32_t binding; // Vertex buffer binding id
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001912
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001913 VkFormat format; // format of source data
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001914
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001915 uint32_t offsetInBytes; // Offset of first element in bytes from base of vertex
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001916} VkVertexInputAttributeDescription;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001917
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001918typedef struct VkPipelineVertexInputStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001919{
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001920 VkStructureType sType; // Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001921 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001922
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001923 uint32_t bindingCount; // number of bindings
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001924 const VkVertexInputBindingDescription* pVertexBindingDescriptions;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001925
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001926 uint32_t attributeCount; // number of attributes
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001927 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06001928} VkPipelineVertexInputStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001929
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001930typedef struct VkPipelineIaStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001931{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001932 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001933 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001934 VkPrimitiveTopology topology;
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001935 VkBool32 disableVertexReuse; // optional
1936 VkBool32 primitiveRestartEnable;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001937 uint32_t primitiveRestartIndex; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001938} VkPipelineIaStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001939
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001940typedef struct VkPipelineTessStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001941{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001942 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001943 const void* pNext; // Pointer to next structure
1944 uint32_t patchControlPoints;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001945} VkPipelineTessStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001946
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001947typedef struct VkPipelineVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001948{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001949 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001950 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06001951 uint32_t viewportCount;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001952 VkCoordinateOrigin clipOrigin; // optional (GL45)
1953 VkDepthMode depthMode; // optional (GL45)
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001954} VkPipelineVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001955
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001956typedef struct VkPipelineRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001957{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001958 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001959 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001960 VkBool32 depthClipEnable;
1961 VkBool32 rasterizerDiscardEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001962 VkCoordinateOrigin pointOrigin; // optional (GL45)
Tony Barbourd1c35722015-04-16 15:59:00 -06001963 VkProvokingVertex provokingVertex; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001964 VkFillMode fillMode; // optional (GL45)
1965 VkCullMode cullMode;
Tony Barbourd1c35722015-04-16 15:59:00 -06001966 VkFrontFace frontFace;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001967} VkPipelineRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001968
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001969typedef struct VkPipelineMsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001970{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001971 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001972 const void* pNext; // Pointer to next structure
Tony Barbourdfd533a2015-06-26 10:18:34 -06001973 uint32_t rasterSamples;
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001974 VkBool32 multisampleEnable; // optional (GL45)
1975 VkBool32 sampleShadingEnable; // optional (GL45)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001976 float minSampleShading; // optional (GL45)
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001977 VkSampleMask sampleMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001978} VkPipelineMsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001979
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001980typedef struct VkPipelineCbAttachmentState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001981{
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001982 VkBool32 blendEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001983 VkFormat format;
1984 VkBlend srcBlendColor;
1985 VkBlend destBlendColor;
Tony Barbourd1c35722015-04-16 15:59:00 -06001986 VkBlendOp blendOpColor;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001987 VkBlend srcBlendAlpha;
1988 VkBlend destBlendAlpha;
Tony Barbourd1c35722015-04-16 15:59:00 -06001989 VkBlendOp blendOpAlpha;
1990 VkChannelFlags channelWriteMask;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001991} VkPipelineCbAttachmentState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001992
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001993typedef struct VkPipelineCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06001994{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06001995 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001996 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06001997 VkBool32 alphaToCoverageEnable;
1998 VkBool32 logicOpEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06001999 VkLogicOp logicOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002000 uint32_t attachmentCount; // # of pAttachments
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002001 const VkPipelineCbAttachmentState* pAttachments;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002002} VkPipelineCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002003
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002004typedef struct VkStencilOpState_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002005{
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002006 VkStencilOp stencilFailOp;
2007 VkStencilOp stencilPassOp;
2008 VkStencilOp stencilDepthFailOp;
Tony Barbourd1c35722015-04-16 15:59:00 -06002009 VkCompareOp stencilCompareOp;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002010} VkStencilOpState;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002011
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002012typedef struct VkPipelineDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002013{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002014 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002015 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06002016 VkBool32 depthTestEnable;
2017 VkBool32 depthWriteEnable;
Tony Barbourd1c35722015-04-16 15:59:00 -06002018 VkCompareOp depthCompareOp;
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06002019 VkBool32 depthBoundsEnable; // optional (depth_bounds_test)
2020 VkBool32 stencilTestEnable;
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002021 VkStencilOpState front;
2022 VkStencilOpState back;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002023} VkPipelineDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002024
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002025typedef struct VkGraphicsPipelineCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002026{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002027 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002028 const void* pNext; // Pointer to next structure
Mark Lobodzinskid5732f32015-06-23 15:11:57 -06002029 uint32_t stageCount;
2030 const VkPipelineShaderStageCreateInfo* pStages; // One entry for each active shader stage
2031 const VkPipelineVertexInputStateCreateInfo* pVertexInputState;
2032 const VkPipelineIaStateCreateInfo* pIaState;
2033 const VkPipelineTessStateCreateInfo* pTessState;
2034 const VkPipelineVpStateCreateInfo* pVpState;
2035 const VkPipelineRsStateCreateInfo* pRsState;
2036 const VkPipelineMsStateCreateInfo* pMsState;
2037 const VkPipelineDsStateCreateInfo* pDsState;
2038 const VkPipelineCbStateCreateInfo* pCbState;
Tony Barbourd1c35722015-04-16 15:59:00 -06002039 VkPipelineCreateFlags flags; // Pipeline creation flags
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002040 VkPipelineLayout layout; // Interface layout of the pipeline
Chia-I Wu08accc62015-07-07 11:50:03 +08002041 VkRenderPass renderPass;
2042 uint32_t subpass;
Jon Ashburnc669cc62015-07-09 15:02:25 -06002043 VkPipeline basePipelineHandle;
2044 int32_t basePipelineIndex;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002045} VkGraphicsPipelineCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002046
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002047typedef struct VkPipelineLayoutCreateInfo_
2048{
2049 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2050 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter07fd6b62015-04-17 20:48:17 -06002051
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002052 uint32_t descriptorSetCount; // Number of descriptor sets interfaced by the pipeline
2053 const VkDescriptorSetLayout* pSetLayouts; // Array of <setCount> number of descriptor set layout objects defining the layout of the
2054} VkPipelineLayoutCreateInfo;
2055
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002056typedef struct VkSamplerCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002057{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002058 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002059 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002060 VkTexFilter magFilter; // Filter mode for magnification
2061 VkTexFilter minFilter; // Filter mode for minifiation
2062 VkTexMipmapMode mipMode; // Mipmap selection mode
2063 VkTexAddress addressU;
2064 VkTexAddress addressV;
2065 VkTexAddress addressW;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002066 float mipLodBias;
2067 uint32_t maxAnisotropy;
Tony Barbourd1c35722015-04-16 15:59:00 -06002068 VkCompareOp compareOp;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002069 float minLod;
2070 float maxLod;
Tony Barbourd1c35722015-04-16 15:59:00 -06002071 VkBorderColor borderColor;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002072} VkSamplerCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002073
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002074typedef struct VkDynamicVpStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002075{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002076 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002077 const void* pNext; // Pointer to next structure
2078 uint32_t viewportAndScissorCount; // number of entries in pViewports and pScissors
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002079 const VkViewport* pViewports;
Chris Forbesd9be82b2015-06-22 17:21:59 +12002080 const VkRect2D* pScissors;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002081} VkDynamicVpStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002082
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002083typedef struct VkDynamicRsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002084{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002085 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002086 const void* pNext; // Pointer to next structure
2087 float depthBias;
2088 float depthBiasClamp;
2089 float slopeScaledDepthBias;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002090 float lineWidth; // optional (GL45) - Width of lines
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002091} VkDynamicRsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002092
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002093typedef struct VkDynamicCbStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002094{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002095 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002096 const void* pNext; // Pointer to next structure
2097 float blendConst[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002098} VkDynamicCbStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002099
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002100typedef struct VkDynamicDsStateCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002101{
Mark Lobodzinski365feea2015-06-12 11:14:17 -06002102 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
2103 const void* pNext; // Pointer to next structure
2104 float minDepthBounds; // optional (depth_bounds_test)
2105 float maxDepthBounds; // optional (depth_bounds_test)
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002106 uint32_t stencilReadMask;
2107 uint32_t stencilWriteMask;
2108 uint32_t stencilFrontRef;
2109 uint32_t stencilBackRef;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002110} VkDynamicDsStateCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002111
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002112typedef struct VkCmdBufferCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002113{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002114 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002115 const void* pNext; // Pointer to next structure
2116 uint32_t queueNodeIndex;
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002117 VkCmdBufferLevel level;
Tony Barbourd1c35722015-04-16 15:59:00 -06002118 VkCmdBufferCreateFlags flags; // Command buffer creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002119} VkCmdBufferCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002120
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002121typedef struct VkCmdBufferBeginInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002122{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002123 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002124 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002125
Tony Barbourd1c35722015-04-16 15:59:00 -06002126 VkCmdBufferOptimizeFlags flags; // Command buffer optimization flags
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002127
2128 VkRenderPass renderPass;
2129 VkFramebuffer framebuffer;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002130} VkCmdBufferBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002131
Chris Forbesf0796e12015-06-24 14:34:53 +12002132// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on format.
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002133typedef union VkClearColorValue_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002134{
Chris Forbesf0796e12015-06-24 14:34:53 +12002135 float f32[4];
2136 int32_t s32[4];
2137 uint32_t u32[4];
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002138} VkClearColorValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002139
Chia-I Wu08accc62015-07-07 11:50:03 +08002140typedef struct VkAttachmentBindInfo_
2141{
2142 VkAttachmentView view;
2143 VkImageLayout layout;
2144} VkAttachmentBindInfo;
2145
2146typedef struct VkFramebufferCreateInfo_
2147{
2148 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
2149 const void* pNext; // Pointer to next structure
2150
2151 VkRenderPass renderPass;
2152 uint32_t attachmentCount;
2153 const VkAttachmentBindInfo* pAttachments;
2154
2155 uint32_t width;
2156 uint32_t height;
2157 uint32_t layers;
2158} VkFramebufferCreateInfo;
2159
2160typedef struct VkAttachmentDescription_
2161{
2162 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION
2163 const void* pNext; // Pointer to next structure
2164
2165 VkFormat format;
2166 uint32_t samples;
2167 VkAttachmentLoadOp loadOp;
2168 VkAttachmentStoreOp storeOp;
2169 VkAttachmentLoadOp stencilLoadOp;
2170 VkAttachmentStoreOp stencilStoreOp;
2171 VkImageLayout initialLayout;
2172 VkImageLayout finalLayout;
2173} VkAttachmentDescription;
2174
2175typedef struct VkAttachmentReference_
2176{
2177 uint32_t attachment;
2178 VkImageLayout layout;
2179} VkAttachmentReference;
2180
2181typedef struct VkSubpassDescription_
2182{
2183 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION
2184 const void* pNext;
2185
2186 VkPipelineBindPoint pipelineBindPoint;
2187 VkSubpassDescriptionFlags flags;
2188 uint32_t inputCount;
2189 const VkAttachmentReference* inputAttachments;
2190 uint32_t colorCount;
2191 const VkAttachmentReference* colorAttachments;
2192 const VkAttachmentReference* resolveAttachments;
2193 VkAttachmentReference depthStencilAttachment;
2194 uint32_t preserveCount;
2195 const VkAttachmentReference* preserveAttachments;
2196} VkSubpassDescription;
2197
2198typedef struct VkSubpassDependency_
2199{
2200 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY
2201 const void* pNext;
2202 uint32_t srcSubpass;
2203 uint32_t destSubpass;
2204 VkPipelineStageFlags srcStageMask;
2205 VkPipelineStageFlags destStageMask;
2206 VkMemoryOutputFlags outputMask;
2207 VkMemoryInputFlags inputMask;
2208 VkBool32 byRegion;
2209} VkSubpassDependency;
2210
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002211typedef struct VkRenderPassCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002212{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002213 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002214 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002215
Chia-I Wu08accc62015-07-07 11:50:03 +08002216 uint32_t attachmentCount;
2217 const VkAttachmentDescription* pAttachments;
2218 uint32_t subpassCount;
2219 const VkSubpassDescription* pSubpasses;
2220 uint32_t dependencyCount;
2221 const VkSubpassDependency* pDependencies;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002222} VkRenderPassCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002223
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002224typedef struct VkEventCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002225{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002226 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002227 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002228 VkEventCreateFlags flags; // Event creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002229} VkEventCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002230
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002231typedef struct VkFenceCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002232{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002233 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002234 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002235 VkFenceCreateFlags flags; // Fence creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002236} VkFenceCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002237
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002238typedef struct VkSemaphoreCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002239{
Courtney Goeltzenleuchter548c4bc2015-04-10 16:34:21 -06002240 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002241 const void* pNext; // Pointer to next structure
Tony Barbourd1c35722015-04-16 15:59:00 -06002242 VkSemaphoreCreateFlags flags; // Semaphore creation flags
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002243} VkSemaphoreCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002244
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002245typedef struct VkQueryPoolCreateInfo_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002246{
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06002247 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
2248 const void* pNext; // Pointer to next structure
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002249 VkQueryType queryType;
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002250 uint32_t slots;
Courtney Goeltzenleuchterf6d8f7b2015-04-16 09:13:59 -06002251 VkQueryPipelineStatisticFlags pipelineStatistics; // Optional
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002252} VkQueryPoolCreateInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002253
Chia-I Wu08accc62015-07-07 11:50:03 +08002254typedef struct VkClearDepthStencilValue_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002255{
Chia-I Wu08accc62015-07-07 11:50:03 +08002256 float depth;
2257 uint32_t stencil;
2258} VkClearDepthStencilValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002259
Chia-I Wu08accc62015-07-07 11:50:03 +08002260typedef union VkClearValue_
2261{
2262 VkClearColorValue color;
2263 VkClearDepthStencilValue ds;
2264} VkClearValue;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002265
Chia-I Wu08accc62015-07-07 11:50:03 +08002266typedef struct VkRenderPassBeginInfo_
2267{
2268 VkStructureType sType; // Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2269 const void* pNext; // Pointer to next structure
2270
2271 VkRenderPass renderPass;
2272 VkFramebuffer framebuffer;
2273 VkRect2D renderArea;
2274 uint32_t attachmentCount;
2275 const VkClearValue* pAttachmentClearValues;
2276} VkRenderPassBeginInfo;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002277
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002278typedef struct VkDrawIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002279{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002280 uint32_t vertexCount;
2281 uint32_t instanceCount;
2282 uint32_t firstVertex;
2283 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002284} VkDrawIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002285
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002286typedef struct VkDrawIndexedIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002287{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002288 uint32_t indexCount;
2289 uint32_t instanceCount;
2290 uint32_t firstIndex;
2291 int32_t vertexOffset;
2292 uint32_t firstInstance;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002293} VkDrawIndexedIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002294
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002295typedef struct VkDispatchIndirectCmd_
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002296{
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06002297 uint32_t x;
2298 uint32_t y;
2299 uint32_t z;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002300} VkDispatchIndirectCmd;
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002301
2302// ------------------------------------------------------------------------------------------------
2303// API functions
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002304typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance);
2305typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance);
Tony Barbourd1c35722015-04-16 15:59:00 -06002306typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
Chris Forbesbc0bb772015-06-21 22:55:02 +12002307typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
2308typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatInfo)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatInfo);
2309typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
Jon Ashburnb0fbe912015-05-06 10:15:07 -06002310typedef void * (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char * pName);
Jon Ashburn8d1b0b52015-05-18 13:20:15 -06002311typedef void * (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char * pName);
Tony Barbourd1c35722015-04-16 15:59:00 -06002312typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002313typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device);
Tony Barbour59a47322015-06-24 16:06:58 -06002314typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
2315typedef VkResult (VKAPI *PFN_vkGetPhysicalDevicePerformance)(VkPhysicalDevice physicalDevice, VkPhysicalDevicePerformance* pPerformance);
2316typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount);
2317typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties);
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06002318typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002319typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char * pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties);
2320typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t *pCount, VkExtensionProperties* pProperties);
2321typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties);
2322typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties* pProperties);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002323typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue);
2324typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002325typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
2326typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
Tony Barbourd1c35722015-04-16 15:59:00 -06002327typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
Mike Stroyanb050c682015-04-17 12:36:38 -06002328typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem);
Mike Stroyanb050c682015-04-17 12:36:38 -06002329typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
2330typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06002331typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
2332typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
Mike Stroyanb050c682015-04-17 12:36:38 -06002333typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkDevice device, VkObjectType objType, VkObject object);
Tony Barbour59a47322015-06-24 16:06:58 -06002334typedef VkResult (VKAPI *PFN_vkGetObjectMemoryRequirements)(VkDevice device, VkObjectType objType, VkObject object, VkMemoryRequirements* pMemoryRequirements);
Mark Lobodzinski23065352015-05-29 09:32:35 -05002335typedef VkResult (VKAPI *PFN_vkBindObjectMemory)(VkDevice device, VkObjectType objType, VkObject object, VkDeviceMemory mem, VkDeviceSize offset);
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06002336typedef VkResult (VKAPI *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pNumRequirements, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
2337typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, uint32_t samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pNumProperties, VkSparseImageFormatProperties* pProperties);
2338typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuffer buffer, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo);
2339typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageOpaqueMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo);
2340typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002341typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -06002342typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
Mike Stroyanb050c682015-04-17 12:36:38 -06002343typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06002344typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002345typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore);
2346typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore);
2347typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore);
2348typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent);
Mike Stroyanb050c682015-04-17 12:36:38 -06002349typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
2350typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event);
2351typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002352typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
Mike Stroyanb050c682015-04-17 12:36:38 -06002353typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002354typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
2355typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
2356typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage);
Tony Barbour59a47322015-06-24 16:06:58 -06002357typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002358typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
Chia-I Wu08accc62015-07-07 11:50:03 +08002359typedef VkResult (VKAPI *PFN_vkCreateAttachmentView)(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView);
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06002360typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002361typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
Jon Ashburnc669cc62015-07-09 15:02:25 -06002362typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache);
2363typedef VkResult (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache);
2364typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache);
2365typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData);
2366typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches);
2367typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines);
2368typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines);
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002369typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002370typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler);
2371typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002372typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
Mike Stroyanb050c682015-04-17 12:36:38 -06002373typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
2374typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
Chia-I Wu9d00ed72015-05-25 16:27:55 +08002375typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06002376typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState);
2377typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState);
2378typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState);
2379typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002380typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
2381typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
2382typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
2383typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002384typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
2385typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
Mark Lobodzinskif2093b62015-06-15 13:21:21 -06002386typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
Tony Barbourd1c35722015-04-16 15:59:00 -06002387typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
2388typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002389typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
2390typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount);
Tony Barbourd1c35722015-04-16 15:59:00 -06002391typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
2392typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002393typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
Tony Barbourd1c35722015-04-16 15:59:00 -06002394typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002395typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
2396typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -05002397typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002398typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
2399typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
Tony Barbourd1c35722015-04-16 15:59:00 -06002400typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
2401typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
Chris Forbesf0796e12015-06-24 14:34:53 +12002402typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Chris Forbesd9be82b2015-06-22 17:21:59 +12002403typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Chris Forbesf0796e12015-06-24 14:34:53 +12002404typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
Chris Forbesd9be82b2015-06-22 17:21:59 +12002405typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects);
Tony Barbour6865d4a2015-04-13 15:02:52 -06002406typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Tony Barbour0b2cfb22015-06-29 16:20:35 -06002407typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
2408typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
2409typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void** ppMemBarriers);
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06002410typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, VkBool32 byRegion, uint32_t memBarrierCount, const void** ppMemBarriers);
Tony Barbourd1c35722015-04-16 15:59:00 -06002411typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002412typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
2413typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
Tony Barbourd1c35722015-04-16 15:59:00 -06002414typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
Tony Barbour71a85122015-04-16 19:09:28 -06002415typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags);
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002416typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
2417typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
Chia-I Wu08accc62015-07-07 11:50:03 +08002418typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkRenderPassContents contents);
2419typedef void (VKAPI *PFN_vkCmdNextSubpass)(VkCmdBuffer cmdBuffer, VkRenderPassContents contents);
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08002420typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer);
2421typedef void (VKAPI *PFN_vkCmdExecuteCommands)(VkCmdBuffer cmdBuffer, uint32_t cmdBuffersCount, const VkCmdBuffer* pCmdBuffers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002422
2423#ifdef VK_PROTOTYPES
2424
Tony Barbourd1c35722015-04-16 15:59:00 -06002425// Device initialization
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002426
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002427VkResult VKAPI vkCreateInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002428 const VkInstanceCreateInfo* pCreateInfo,
2429 VkInstance* pInstance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002430
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002431VkResult VKAPI vkDestroyInstance(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002432 VkInstance instance);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002433
Jon Ashburn83a64252015-04-15 11:31:12 -06002434VkResult VKAPI vkEnumeratePhysicalDevices(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002435 VkInstance instance,
Jon Ashburn83a64252015-04-15 11:31:12 -06002436 uint32_t* pPhysicalDeviceCount,
Tony Barbourd1c35722015-04-16 15:59:00 -06002437 VkPhysicalDevice* pPhysicalDevices);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002438
Chris Forbesbc0bb772015-06-21 22:55:02 +12002439VkResult VKAPI vkGetPhysicalDeviceFeatures(
2440 VkPhysicalDevice physicalDevice,
2441 VkPhysicalDeviceFeatures* pFeatures);
2442
2443VkResult VKAPI vkGetPhysicalDeviceFormatInfo(
2444 VkPhysicalDevice physicalDevice,
2445 VkFormat format,
2446 VkFormatProperties* pFormatInfo);
2447
2448VkResult VKAPI vkGetPhysicalDeviceLimits(
2449 VkPhysicalDevice physicalDevice,
2450 VkPhysicalDeviceLimits* pLimits);
2451
Jon Ashburnb0fbe912015-05-06 10:15:07 -06002452void * VKAPI vkGetInstanceProcAddr(
2453 VkInstance instance,
2454 const char* pName);
2455
Jon Ashburn8d1b0b52015-05-18 13:20:15 -06002456void * VKAPI vkGetDeviceProcAddr(
2457 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002458 const char* pName);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002459// Device functions
2460
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002461VkResult VKAPI vkCreateDevice(
Tony Barbourd1c35722015-04-16 15:59:00 -06002462 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002463 const VkDeviceCreateInfo* pCreateInfo,
2464 VkDevice* pDevice);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002465
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002466VkResult VKAPI vkDestroyDevice(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002467 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002468
Tony Barbour59a47322015-06-24 16:06:58 -06002469VkResult VKAPI vkGetPhysicalDeviceProperties(
2470 VkPhysicalDevice physicalDevice,
2471 VkPhysicalDeviceProperties* pProperties);
2472
2473VkResult VKAPI vkGetPhysicalDevicePerformance(
2474 VkPhysicalDevice physicalDevice,
2475 VkPhysicalDevicePerformance* pPerformance);
2476
2477VkResult VKAPI vkGetPhysicalDeviceQueueCount(
2478 VkPhysicalDevice physicalDevice,
2479 uint32_t* pCount);
2480
2481VkResult VKAPI vkGetPhysicalDeviceQueueProperties(
2482 VkPhysicalDevice physicalDevice,
2483 uint32_t count,
2484 VkPhysicalDeviceQueueProperties* pQueueProperties);
2485
2486VkResult VKAPI vkGetPhysicalDeviceMemoryProperties(
2487 VkPhysicalDevice physicalDevice,
2488 VkPhysicalDeviceMemoryProperties* pMemoryProperies);
2489
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002490// Extension discovery functions
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -06002491
Tony Barbour59a47322015-06-24 16:06:58 -06002492VkResult VKAPI vkGetGlobalExtensionProperties(
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002493 const char* pLayerName,
2494 uint32_t* pCount,
Tony Barbour59a47322015-06-24 16:06:58 -06002495 VkExtensionProperties* pProperties);
2496
Tony Barbour59a47322015-06-24 16:06:58 -06002497VkResult VKAPI vkGetPhysicalDeviceExtensionProperties(
2498 VkPhysicalDevice physicalDevice,
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002499 const char* pLayerName,
2500 uint32_t* pCount,
Tony Barbour59a47322015-06-24 16:06:58 -06002501 VkExtensionProperties* pProperties);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002502
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -06002503VkResult VKAPI vkGetGlobalLayerProperties(
2504 uint32_t* pCount,
2505 VkLayerProperties* pProperties);
2506
2507VkResult VKAPI vkGetPhysicalDeviceLayerProperties(
2508 VkPhysicalDevice physicalDevice,
2509 uint32_t* pCount,
2510 VkLayerProperties* pProperties);
2511
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002512// Queue functions
2513
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002514VkResult VKAPI vkGetDeviceQueue(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002515 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002516 uint32_t queueNodeIndex,
2517 uint32_t queueIndex,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002518 VkQueue* pQueue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002519
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002520VkResult VKAPI vkQueueSubmit(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002521 VkQueue queue,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002522 uint32_t cmdBufferCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002523 const VkCmdBuffer* pCmdBuffers,
2524 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002525
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002526VkResult VKAPI vkQueueWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002527 VkQueue queue);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002528
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002529VkResult VKAPI vkDeviceWaitIdle(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002530 VkDevice device);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002531
2532// Memory functions
2533
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002534VkResult VKAPI vkAllocMemory(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002535 VkDevice device,
2536 const VkMemoryAllocInfo* pAllocInfo,
Tony Barbourd1c35722015-04-16 15:59:00 -06002537 VkDeviceMemory* pMem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002538
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002539VkResult VKAPI vkFreeMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002540 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002541 VkDeviceMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002542
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002543VkResult VKAPI vkMapMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002544 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002545 VkDeviceMemory mem,
Tony Barbour71a85122015-04-16 19:09:28 -06002546 VkDeviceSize offset,
2547 VkDeviceSize size,
Tony Barbourd1c35722015-04-16 15:59:00 -06002548 VkMemoryMapFlags flags,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002549 void** ppData);
2550
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002551VkResult VKAPI vkUnmapMemory(
Mike Stroyanb050c682015-04-17 12:36:38 -06002552 VkDevice device,
Tony Barbourd1c35722015-04-16 15:59:00 -06002553 VkDeviceMemory mem);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002554
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06002555VkResult VKAPI vkFlushMappedMemoryRanges(
Mike Stroyanb050c682015-04-17 12:36:38 -06002556 VkDevice device,
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -06002557 uint32_t memRangeCount,
2558 const VkMappedMemoryRange* pMemRanges);
2559
2560VkResult VKAPI vkInvalidateMappedMemoryRanges(
2561 VkDevice device,
2562 uint32_t memRangeCount,
2563 const VkMappedMemoryRange* pMemRanges);
Tony Barbourb1250542015-04-16 19:23:13 -06002564
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002565// Generic API object functions
2566
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002567VkResult VKAPI vkDestroyObject(
Mike Stroyanb050c682015-04-17 12:36:38 -06002568 VkDevice device,
2569 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002570 VkObject object);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002571
Tony Barbour71a85122015-04-16 19:09:28 -06002572// Memory management API functions
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002573
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002574VkResult VKAPI vkBindObjectMemory(
2575 VkDevice device,
Mike Stroyanb050c682015-04-17 12:36:38 -06002576 VkObjectType objType,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002577 VkObject object,
Tony Barbourd1c35722015-04-16 15:59:00 -06002578 VkDeviceMemory mem,
2579 VkDeviceSize memOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002580
Tony Barbour59a47322015-06-24 16:06:58 -06002581VkResult VKAPI vkGetObjectMemoryRequirements(
2582 VkDevice device,
2583 VkObjectType objType,
2584 VkObject object,
2585 VkMemoryRequirements* pMemoryRequirements);
2586
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06002587VkResult VKAPI vkGetImageSparseMemoryRequirements(
2588 VkDevice device,
2589 VkImage image,
2590 uint32_t* pNumRequirements,
2591 VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
2592
2593VkResult VKAPI vkGetPhysicalDeviceSparseImageFormatProperties(
2594 VkPhysicalDevice physicalDevice,
2595 VkFormat format,
2596 VkImageType type,
2597 uint32_t samples,
2598 VkImageUsageFlags usage,
2599 VkImageTiling tiling,
2600 uint32_t* pNumProperties,
2601 VkSparseImageFormatProperties* pProperties);
2602
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002603VkResult VKAPI vkQueueBindSparseBufferMemory(
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002604 VkQueue queue,
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002605 VkBuffer buffer,
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06002606 uint32_t numBindings,
2607 const VkSparseMemoryBindInfo* pBindInfo);
2608
2609VkResult VKAPI vkQueueBindSparseImageOpaqueMemory(
2610 VkQueue queue,
2611 VkImage image,
2612 uint32_t numBindings,
2613 const VkSparseMemoryBindInfo* pBindInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002614
Mark Lobodzinski942b1722015-05-11 17:21:15 -05002615VkResult VKAPI vkQueueBindSparseImageMemory(
Mark Lobodzinski40f7f402015-04-16 11:44:05 -05002616 VkQueue queue,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002617 VkImage image,
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -06002618 uint32_t numBindings,
2619 const VkSparseImageMemoryBindInfo* pBindInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002620
2621// Fence functions
2622
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002623VkResult VKAPI vkCreateFence(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002624 VkDevice device,
2625 const VkFenceCreateInfo* pCreateInfo,
2626 VkFence* pFence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002627
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002628VkResult VKAPI vkResetFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002629 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002630 uint32_t fenceCount,
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -06002631 const VkFence* pFences);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002632
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002633VkResult VKAPI vkGetFenceStatus(
Mike Stroyanb050c682015-04-17 12:36:38 -06002634 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002635 VkFence fence);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002636
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002637VkResult VKAPI vkWaitForFences(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002638 VkDevice device,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002639 uint32_t fenceCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002640 const VkFence* pFences,
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06002641 VkBool32 waitAll,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002642 uint64_t timeout); // timeout in nanoseconds
2643
2644// Queue semaphore functions
2645
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002646VkResult VKAPI vkCreateSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002647 VkDevice device,
2648 const VkSemaphoreCreateInfo* pCreateInfo,
2649 VkSemaphore* pSemaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002650
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002651VkResult VKAPI vkQueueSignalSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002652 VkQueue queue,
2653 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002654
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002655VkResult VKAPI vkQueueWaitSemaphore(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002656 VkQueue queue,
2657 VkSemaphore semaphore);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002658
2659// Event functions
2660
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002661VkResult VKAPI vkCreateEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002662 VkDevice device,
2663 const VkEventCreateInfo* pCreateInfo,
2664 VkEvent* pEvent);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002665
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002666VkResult VKAPI vkGetEventStatus(
Mike Stroyanb050c682015-04-17 12:36:38 -06002667 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002668 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002669
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002670VkResult VKAPI vkSetEvent(
Mike Stroyanb050c682015-04-17 12:36:38 -06002671 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002672 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002673
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002674VkResult VKAPI vkResetEvent(
Mike Stroyanb050c682015-04-17 12:36:38 -06002675 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002676 VkEvent event);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002677
2678// Query functions
2679
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002680VkResult VKAPI vkCreateQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002681 VkDevice device,
2682 const VkQueryPoolCreateInfo* pCreateInfo,
2683 VkQueryPool* pQueryPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002684
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002685VkResult VKAPI vkGetQueryPoolResults(
Mike Stroyanb050c682015-04-17 12:36:38 -06002686 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002687 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002688 uint32_t startQuery,
2689 uint32_t queryCount,
2690 size_t* pDataSize,
Tony Barbourd1c35722015-04-16 15:59:00 -06002691 void* pData,
2692 VkQueryResultFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002693
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002694// Buffer functions
2695
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002696VkResult VKAPI vkCreateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002697 VkDevice device,
2698 const VkBufferCreateInfo* pCreateInfo,
2699 VkBuffer* pBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002700
2701// Buffer view functions
2702
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002703VkResult VKAPI vkCreateBufferView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002704 VkDevice device,
2705 const VkBufferViewCreateInfo* pCreateInfo,
2706 VkBufferView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002707
2708// Image functions
2709
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002710VkResult VKAPI vkCreateImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002711 VkDevice device,
2712 const VkImageCreateInfo* pCreateInfo,
2713 VkImage* pImage);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002714
Tony Barbour59a47322015-06-24 16:06:58 -06002715VkResult VKAPI vkGetImageSubresourceLayout(
Mike Stroyanb050c682015-04-17 12:36:38 -06002716 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002717 VkImage image,
2718 const VkImageSubresource* pSubresource,
Tony Barbour59a47322015-06-24 16:06:58 -06002719 VkSubresourceLayout* pLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002720
2721// Image view functions
2722
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002723VkResult VKAPI vkCreateImageView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002724 VkDevice device,
2725 const VkImageViewCreateInfo* pCreateInfo,
2726 VkImageView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002727
Chia-I Wu08accc62015-07-07 11:50:03 +08002728VkResult VKAPI vkCreateAttachmentView(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002729 VkDevice device,
Chia-I Wu08accc62015-07-07 11:50:03 +08002730 const VkAttachmentViewCreateInfo* pCreateInfo,
2731 VkAttachmentView* pView);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002732
2733// Shader functions
2734
Courtney Goeltzenleuchtera607df12015-06-18 21:49:59 -06002735VkResult VKAPI vkCreateShaderModule(
2736 VkDevice device,
2737 const VkShaderModuleCreateInfo* pCreateInfo,
2738 VkShaderModule* pShaderModule);
2739
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002740VkResult VKAPI vkCreateShader(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002741 VkDevice device,
2742 const VkShaderCreateInfo* pCreateInfo,
2743 VkShader* pShader);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002744
2745// Pipeline functions
Jon Ashburnc669cc62015-07-09 15:02:25 -06002746VkResult VKAPI vkCreatePipelineCache(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002747 VkDevice device,
Jon Ashburnc669cc62015-07-09 15:02:25 -06002748 const VkPipelineCacheCreateInfo* pCreateInfo,
2749 VkPipelineCache* pPipelineCache);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002750
Jon Ashburnc669cc62015-07-09 15:02:25 -06002751VkResult VKAPI vkDestroyPipelineCache(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002752 VkDevice device,
Jon Ashburnc669cc62015-07-09 15:02:25 -06002753 VkPipelineCache pipelineCache);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002754
Jon Ashburnc669cc62015-07-09 15:02:25 -06002755size_t VKAPI vkGetPipelineCacheSize(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002756 VkDevice device,
Jon Ashburnc669cc62015-07-09 15:02:25 -06002757 VkPipelineCache pipelineCache);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002758
Jon Ashburnc669cc62015-07-09 15:02:25 -06002759VkResult VKAPI vkGetPipelineCacheData(
Mike Stroyanb050c682015-04-17 12:36:38 -06002760 VkDevice device,
Jon Ashburnc669cc62015-07-09 15:02:25 -06002761 VkPipelineCache pipelineCache,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002762 void* pData);
2763
Jon Ashburnc669cc62015-07-09 15:02:25 -06002764VkResult VKAPI vkMergePipelineCaches(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002765 VkDevice device,
Jon Ashburnc669cc62015-07-09 15:02:25 -06002766 VkPipelineCache destCache,
2767 uint32_t srcCacheCount,
2768 const VkPipelineCache* pSrcCaches);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002769
Jon Ashburnc669cc62015-07-09 15:02:25 -06002770VkResult VKAPI vkCreateGraphicsPipelines(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002771 VkDevice device,
Jon Ashburnc669cc62015-07-09 15:02:25 -06002772 VkPipelineCache pipelineCache,
2773 uint32_t count,
2774 const VkGraphicsPipelineCreateInfo* pCreateInfos,
2775 VkPipeline* pPipelines);
2776
2777VkResult VKAPI vkCreateComputePipelines(
2778 VkDevice device,
2779 VkPipelineCache pipelineCache,
2780 uint32_t count,
2781 const VkComputePipelineCreateInfo* pCreateInfos,
2782 VkPipeline* pPipelines);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002783
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05002784// Pipeline layout functions
2785
2786VkResult VKAPI vkCreatePipelineLayout(
2787 VkDevice device,
2788 const VkPipelineLayoutCreateInfo* pCreateInfo,
2789 VkPipelineLayout* pPipelineLayout);
2790
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002791// Sampler functions
2792
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002793VkResult VKAPI vkCreateSampler(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002794 VkDevice device,
2795 const VkSamplerCreateInfo* pCreateInfo,
2796 VkSampler* pSampler);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002797
2798// Descriptor set functions
2799
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002800VkResult VKAPI vkCreateDescriptorSetLayout(
2801 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002802 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
2803 VkDescriptorSetLayout* pSetLayout);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002804
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002805VkResult VKAPI vkCreateDescriptorPool(
2806 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002807 VkDescriptorPoolUsage poolUsage,
2808 uint32_t maxSets,
2809 const VkDescriptorPoolCreateInfo* pCreateInfo,
2810 VkDescriptorPool* pDescriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002811
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002812VkResult VKAPI vkResetDescriptorPool(
Mike Stroyanb050c682015-04-17 12:36:38 -06002813 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002814 VkDescriptorPool descriptorPool);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002815
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002816VkResult VKAPI vkAllocDescriptorSets(
Mike Stroyanb050c682015-04-17 12:36:38 -06002817 VkDevice device,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002818 VkDescriptorPool descriptorPool,
2819 VkDescriptorSetUsage setUsage,
2820 uint32_t count,
2821 const VkDescriptorSetLayout* pSetLayouts,
2822 VkDescriptorSet* pDescriptorSets,
2823 uint32_t* pCount);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002824
Chia-I Wu9d00ed72015-05-25 16:27:55 +08002825VkResult VKAPI vkUpdateDescriptorSets(
Mike Stroyanb050c682015-04-17 12:36:38 -06002826 VkDevice device,
Chia-I Wu9d00ed72015-05-25 16:27:55 +08002827 uint32_t writeCount,
2828 const VkWriteDescriptorSet* pDescriptorWrites,
2829 uint32_t copyCount,
2830 const VkCopyDescriptorSet* pDescriptorCopies);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002831
2832// State object functions
2833
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002834VkResult VKAPI vkCreateDynamicViewportState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002835 VkDevice device,
2836 const VkDynamicVpStateCreateInfo* pCreateInfo,
2837 VkDynamicVpState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002838
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002839VkResult VKAPI vkCreateDynamicRasterState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002840 VkDevice device,
2841 const VkDynamicRsStateCreateInfo* pCreateInfo,
2842 VkDynamicRsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002843
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002844VkResult VKAPI vkCreateDynamicColorBlendState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002845 VkDevice device,
2846 const VkDynamicCbStateCreateInfo* pCreateInfo,
2847 VkDynamicCbState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002848
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002849VkResult VKAPI vkCreateDynamicDepthStencilState(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002850 VkDevice device,
2851 const VkDynamicDsStateCreateInfo* pCreateInfo,
2852 VkDynamicDsState* pState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002853
2854// Command buffer functions
2855
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002856VkResult VKAPI vkCreateCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002857 VkDevice device,
2858 const VkCmdBufferCreateInfo* pCreateInfo,
2859 VkCmdBuffer* pCmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002860
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002861VkResult VKAPI vkBeginCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002862 VkCmdBuffer cmdBuffer,
2863 const VkCmdBufferBeginInfo* pBeginInfo);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002864
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002865VkResult VKAPI vkEndCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002866 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002867
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06002868VkResult VKAPI vkResetCommandBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002869 VkCmdBuffer cmdBuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002870
2871// Command buffer building functions
2872
2873void VKAPI vkCmdBindPipeline(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002874 VkCmdBuffer cmdBuffer,
2875 VkPipelineBindPoint pipelineBindPoint,
2876 VkPipeline pipeline);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002877
2878void VKAPI vkCmdBindDynamicStateObject(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002879 VkCmdBuffer cmdBuffer,
2880 VkStateBindPoint stateBindPoint,
2881 VkDynamicStateObject dynamicState);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002882
2883void VKAPI vkCmdBindDescriptorSets(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002884 VkCmdBuffer cmdBuffer,
2885 VkPipelineBindPoint pipelineBindPoint,
Mark Lobodzinskif2093b62015-06-15 13:21:21 -06002886 VkPipelineLayout layout,
Cody Northropd4c1a502015-04-16 13:41:56 -06002887 uint32_t firstSet,
2888 uint32_t setCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002889 const VkDescriptorSet* pDescriptorSets,
Cody Northropd4c1a502015-04-16 13:41:56 -06002890 uint32_t dynamicOffsetCount,
2891 const uint32_t* pDynamicOffsets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002892
2893void VKAPI vkCmdBindIndexBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002894 VkCmdBuffer cmdBuffer,
2895 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002896 VkDeviceSize offset,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002897 VkIndexType indexType);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002898
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002899void VKAPI vkCmdBindVertexBuffers(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002900 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -06002901 uint32_t startBinding,
2902 uint32_t bindingCount,
2903 const VkBuffer* pBuffers,
Tony Barbourd1c35722015-04-16 15:59:00 -06002904 const VkDeviceSize* pOffsets);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002905
2906void VKAPI vkCmdDraw(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002907 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002908 uint32_t firstVertex,
2909 uint32_t vertexCount,
2910 uint32_t firstInstance,
2911 uint32_t instanceCount);
2912
2913void VKAPI vkCmdDrawIndexed(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002914 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002915 uint32_t firstIndex,
2916 uint32_t indexCount,
2917 int32_t vertexOffset,
2918 uint32_t firstInstance,
2919 uint32_t instanceCount);
2920
2921void VKAPI vkCmdDrawIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002922 VkCmdBuffer cmdBuffer,
2923 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002924 VkDeviceSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002925 uint32_t count,
2926 uint32_t stride);
2927
2928void VKAPI vkCmdDrawIndexedIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002929 VkCmdBuffer cmdBuffer,
2930 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002931 VkDeviceSize offset,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002932 uint32_t count,
2933 uint32_t stride);
2934
2935void VKAPI vkCmdDispatch(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002936 VkCmdBuffer cmdBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002937 uint32_t x,
2938 uint32_t y,
2939 uint32_t z);
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002940
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002941void VKAPI vkCmdDispatchIndirect(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002942 VkCmdBuffer cmdBuffer,
2943 VkBuffer buffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002944 VkDeviceSize offset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002945
2946void VKAPI vkCmdCopyBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002947 VkCmdBuffer cmdBuffer,
2948 VkBuffer srcBuffer,
2949 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002950 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002951 const VkBufferCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002952
2953void VKAPI vkCmdCopyImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002954 VkCmdBuffer cmdBuffer,
2955 VkImage srcImage,
2956 VkImageLayout srcImageLayout,
2957 VkImage destImage,
2958 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002959 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002960 const VkImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002961
2962void VKAPI vkCmdBlitImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002963 VkCmdBuffer cmdBuffer,
2964 VkImage srcImage,
2965 VkImageLayout srcImageLayout,
2966 VkImage destImage,
2967 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002968 uint32_t regionCount,
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -05002969 const VkImageBlit* pRegions,
2970 VkTexFilter filter);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002971
2972void VKAPI vkCmdCopyBufferToImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002973 VkCmdBuffer cmdBuffer,
2974 VkBuffer srcBuffer,
2975 VkImage destImage,
2976 VkImageLayout destImageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002977 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002978 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002979
2980void VKAPI vkCmdCopyImageToBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002981 VkCmdBuffer cmdBuffer,
2982 VkImage srcImage,
2983 VkImageLayout srcImageLayout,
2984 VkBuffer destBuffer,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002985 uint32_t regionCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002986 const VkBufferImageCopy* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002987
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002988void VKAPI vkCmdUpdateBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002989 VkCmdBuffer cmdBuffer,
2990 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002991 VkDeviceSize destOffset,
2992 VkDeviceSize dataSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06002993 const uint32_t* pData);
2994
2995void VKAPI vkCmdFillBuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06002996 VkCmdBuffer cmdBuffer,
2997 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06002998 VkDeviceSize destOffset,
2999 VkDeviceSize fillSize,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003000 uint32_t data);
3001
3002void VKAPI vkCmdClearColorImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003003 VkCmdBuffer cmdBuffer,
3004 VkImage image,
3005 VkImageLayout imageLayout,
Chris Forbesf0796e12015-06-24 14:34:53 +12003006 const VkClearColorValue* pColor,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003007 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003008 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003009
Chris Forbesd9be82b2015-06-22 17:21:59 +12003010void VKAPI vkCmdClearDepthStencilImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003011 VkCmdBuffer cmdBuffer,
3012 VkImage image,
3013 VkImageLayout imageLayout,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003014 float depth,
3015 uint32_t stencil,
3016 uint32_t rangeCount,
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003017 const VkImageSubresourceRange* pRanges);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003018
Chris Forbesd9be82b2015-06-22 17:21:59 +12003019void VKAPI vkCmdClearColorAttachment(
3020 VkCmdBuffer cmdBuffer,
3021 uint32_t colorAttachment,
3022 VkImageLayout imageLayout,
Chris Forbesf0796e12015-06-24 14:34:53 +12003023 const VkClearColorValue* pColor,
Chris Forbesd9be82b2015-06-22 17:21:59 +12003024 uint32_t rectCount,
3025 const VkRect3D* pRects);
3026
3027void VKAPI vkCmdClearDepthStencilAttachment(
3028 VkCmdBuffer cmdBuffer,
3029 VkImageAspectFlags imageAspectMask,
3030 VkImageLayout imageLayout,
3031 float depth,
3032 uint32_t stencil,
3033 uint32_t rectCount,
3034 const VkRect3D* pRects);
3035
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003036void VKAPI vkCmdResolveImage(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003037 VkCmdBuffer cmdBuffer,
3038 VkImage srcImage,
3039 VkImageLayout srcImageLayout,
3040 VkImage destImage,
3041 VkImageLayout destImageLayout,
Tony Barbour6865d4a2015-04-13 15:02:52 -06003042 uint32_t regionCount,
3043 const VkImageResolve* pRegions);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003044
3045void VKAPI vkCmdSetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003046 VkCmdBuffer cmdBuffer,
3047 VkEvent event,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06003048 VkPipelineStageFlags stageMask);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003049
3050void VKAPI vkCmdResetEvent(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003051 VkCmdBuffer cmdBuffer,
3052 VkEvent event,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06003053 VkPipelineStageFlags stageMask);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003054
3055void VKAPI vkCmdWaitEvents(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003056 VkCmdBuffer cmdBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06003057 uint32_t eventCount,
3058 const VkEvent* pEvents,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06003059 VkPipelineStageFlags sourceStageMask,
3060 VkPipelineStageFlags destStageMask,
Tony Barbourd1c35722015-04-16 15:59:00 -06003061 uint32_t memBarrierCount,
3062 const void** ppMemBarriers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003063
3064void VKAPI vkCmdPipelineBarrier(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003065 VkCmdBuffer cmdBuffer,
Tony Barbour0b2cfb22015-06-29 16:20:35 -06003066 VkPipelineStageFlags sourceStageMask,
3067 VkPipelineStageFlags destStageMask,
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -06003068 VkBool32 byRegion,
Tony Barbourd1c35722015-04-16 15:59:00 -06003069 uint32_t memBarrierCount,
3070 const void** ppMemBarriers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003071
3072void VKAPI vkCmdBeginQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003073 VkCmdBuffer cmdBuffer,
3074 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003075 uint32_t slot,
Tony Barbourd1c35722015-04-16 15:59:00 -06003076 VkQueryControlFlags flags);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003077
3078void VKAPI vkCmdEndQuery(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003079 VkCmdBuffer cmdBuffer,
3080 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003081 uint32_t slot);
3082
3083void VKAPI vkCmdResetQueryPool(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003084 VkCmdBuffer cmdBuffer,
3085 VkQueryPool queryPool,
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003086 uint32_t startQuery,
3087 uint32_t queryCount);
3088
3089void VKAPI vkCmdWriteTimestamp(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003090 VkCmdBuffer cmdBuffer,
3091 VkTimestampType timestampType,
3092 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06003093 VkDeviceSize destOffset);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003094
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06003095void VKAPI vkCmdCopyQueryPoolResults(
3096 VkCmdBuffer cmdBuffer,
3097 VkQueryPool queryPool,
3098 uint32_t startQuery,
3099 uint32_t queryCount,
3100 VkBuffer destBuffer,
Tony Barbourd1c35722015-04-16 15:59:00 -06003101 VkDeviceSize destOffset,
3102 VkDeviceSize destStride,
Tony Barbour71a85122015-04-16 19:09:28 -06003103 VkQueryResultFlags flags);
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06003104
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06003105VkResult VKAPI vkCreateFramebuffer(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003106 VkDevice device,
3107 const VkFramebufferCreateInfo* pCreateInfo,
3108 VkFramebuffer* pFramebuffer);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003109
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06003110VkResult VKAPI vkCreateRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003111 VkDevice device,
3112 const VkRenderPassCreateInfo* pCreateInfo,
3113 VkRenderPass* pRenderPass);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003114
3115void VKAPI vkCmdBeginRenderPass(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003116 VkCmdBuffer cmdBuffer,
Chia-I Wu08accc62015-07-07 11:50:03 +08003117 const VkRenderPassBeginInfo* pRenderPassBegin,
3118 VkRenderPassContents contents);
3119
3120void VKAPI vkCmdNextSubpass(
3121 VkCmdBuffer cmdBuffer,
3122 VkRenderPassContents contents);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003123
3124void VKAPI vkCmdEndRenderPass(
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08003125 VkCmdBuffer cmdBuffer);
3126
3127void VKAPI vkCmdExecuteCommands(
Courtney Goeltzenleuchteraa58f672015-04-10 18:00:50 -06003128 VkCmdBuffer cmdBuffer,
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08003129 uint32_t cmdBuffersCount,
3130 const VkCmdBuffer* pCmdBuffers);
Courtney Goeltzenleuchter64d1a712015-04-08 18:04:29 -06003131
3132#endif // VK_PROTOTYPES
3133
3134#ifdef __cplusplus
3135} // extern "C"
3136#endif // __cplusplus
3137
3138#endif // __VULKAN_H__