blob: 2bbe5e6caae4c2bbbf58845ef5cfa11093ecedfb [file] [log] [blame]
Jesse Halld27f6aa2015-08-15 17:58:48 -07001// Copyright (c) 2015 The Khronos Group Inc.
2//
3// Permission is hereby granted, free of charge, to any person obtaining a
4// copy of this software and/or associated documentation files (the
5// "Materials"), to deal in the Materials without restriction, including
6// without limitation the rights to use, copy, modify, merge, publish,
7// distribute, sublicense, and/or sell copies of the Materials, and to
8// permit persons to whom the Materials are furnished to do so, subject to
9// the following conditions:
10//
11// The above copyright notice and this permission notice shall be included
12// in all copies or substantial portions of the Materials.
13//
14// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
21
22import platform "platform.api"
23
24///////////////
25// Constants //
26///////////////
27
28// API version (major.minor.patch)
Jesse Hall3dd678a2016-01-08 21:52:01 -080029define VERSION_MAJOR 1
Daniel Koch09f7bf92017-10-05 00:26:58 -040030define VERSION_MINOR 1
Jesse Hall076f95d2017-09-20 11:34:47 -070031define VERSION_PATCH 61
Jesse Halld27f6aa2015-08-15 17:58:48 -070032
33// API limits
Jesse Hall65ab5522015-11-30 00:07:16 -080034define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
35define VK_UUID_SIZE 16
36define VK_MAX_EXTENSION_NAME_SIZE 256
37define VK_MAX_DESCRIPTION_SIZE 256
38define VK_MAX_MEMORY_TYPES 32
39define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types.
Ian Elliott28bd2c32017-10-13 09:21:12 -060040@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -040041define VK_MAX_DEVICE_GROUP_SIZE 32
42define VK_LUID_SIZE 8
43define VK_QUEUE_FAMILY_EXTERNAL -2
Jesse Halld27f6aa2015-08-15 17:58:48 -070044
45// API keywords
46define VK_TRUE 1
47define VK_FALSE 0
Jesse Hall5ae3abb2015-10-08 14:00:22 -070048
49// API keyword, but needs special handling by some templates
50define NULL_HANDLE 0
Jesse Halld27f6aa2015-08-15 17:58:48 -070051
Jesse Halleb02c472017-02-24 15:13:45 -080052// 1
Jesse Hall33faaad2016-01-24 21:00:49 -080053@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080054@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080055
Jesse Halleb02c472017-02-24 15:13:45 -080056// 2
Daniel Koch09f7bf92017-10-05 00:26:58 -040057@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080058@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080059
Jesse Halleb02c472017-02-24 15:13:45 -080060// 3
Jesse Hall543a7ff2016-01-08 16:38:30 -080061@extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080062@extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
Jesse Hall1356b0d2015-11-23 17:24:58 -080063
Jesse Halleb02c472017-02-24 15:13:45 -080064// 4
Jesse Hall543a7ff2016-01-08 16:38:30 -080065@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
Jesse Hall0e74f002015-11-30 11:37:59 -080066@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080067
Jesse Halleb02c472017-02-24 15:13:45 -080068// 5
Jesse Hall543a7ff2016-01-08 16:38:30 -080069@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080070@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080071
Jesse Halleb02c472017-02-24 15:13:45 -080072// 6
Jesse Hall543a7ff2016-01-08 16:38:30 -080073@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080074@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080075
Jesse Halleb02c472017-02-24 15:13:45 -080076// 7
Jesse Hallfdc8ab32017-03-10 21:01:57 -080077@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080078@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080079
Jesse Halleb02c472017-02-24 15:13:45 -080080// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080081@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080082@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080083
Jesse Halleb02c472017-02-24 15:13:45 -080084// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080085@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080086@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080087
Jesse Halleb02c472017-02-24 15:13:45 -080088// 10
Jesse Hall7ba0ac72017-07-07 17:13:23 -070089@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080090@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080091
Jesse Halleb02c472017-02-24 15:13:45 -080092// 11
Chris Forbes1d4e5542017-02-15 19:38:50 +130093@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7
Chia-I Wub262ddc2016-03-22 07:38:20 +080094@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer"
95
Jesse Halleb02c472017-02-24 15:13:45 -080096// 12
Daniel Koch09f7bf92017-10-05 00:26:58 -040097@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
Jesse Hall715b86a2016-01-16 16:34:29 -080098@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
99
Jesse Halleb02c472017-02-24 15:13:45 -0800100// 13
Jesse Hall26763382016-05-20 07:13:52 -0700101@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
102@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
103
Jesse Hall77726222017-09-19 14:49:27 -0500104// 14
105@extension("VK_EXT_depth_range_unrestricted") define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
106@extension("VK_EXT_depth_range_unrestricted") define VK_EXT_DEPTH_RANGE_UNRESTRICTED_NAME "VK_EXT_depth_range_unrestricted"
107
Jesse Halleb02c472017-02-24 15:13:45 -0800108// 15
Jesse Hall26763382016-05-20 07:13:52 -0700109@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
110@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
111
Jesse Halleb02c472017-02-24 15:13:45 -0800112// 16
Jesse Hall26763382016-05-20 07:13:52 -0700113@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
114@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
115
Jesse Halleb02c472017-02-24 15:13:45 -0800116// 19
Jesse Hall26763382016-05-20 07:13:52 -0700117@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
118@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
119
Jesse Halleb02c472017-02-24 15:13:45 -0800120// 21
Jesse Hall56d386a2016-07-26 15:20:40 -0700121@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
122@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
123
Jesse Halleb02c472017-02-24 15:13:45 -0800124// 22
Jesse Hall56d386a2016-07-26 15:20:40 -0700125@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
126@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
127
Jesse Halleb02c472017-02-24 15:13:45 -0800128// 23
Jesse Hall8f49fcb2017-03-06 16:02:58 -0800129@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
Jesse Hall26763382016-05-20 07:13:52 -0700130@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker"
131
Jesse Halleb02c472017-02-24 15:13:45 -0800132// 26
Jesse Hall56d386a2016-07-26 15:20:40 -0700133@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1
134@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
135
Jesse Halleb02c472017-02-24 15:13:45 -0800136// 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700137@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
138@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
139
Jesse Halleb02c472017-02-24 15:13:45 -0800140// 28
Chris Forbes289cb792016-12-30 15:03:55 +1300141@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
142@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
143
Jesse Halleb02c472017-02-24 15:13:45 -0800144// 34
145@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
146@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
147
148// 36
149@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
150@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
151
152// 37
153@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
154@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
155
156// 38
157@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
158@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
159
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700160// 42
161@extension("VK_AMD_texture_gather_bias_lod") define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
162@extension("VK_AMD_texture_gather_bias_lod") define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
163
Jesse Hallad250842017-03-10 18:35:38 -0800164// 54
Daniel Koch09f7bf92017-10-05 00:26:58 -0400165@extension("VK_KHR_multiview") define VK_KHR_MULTIVIEW_SPEC_VERSION 1
166@extension("VK_KHR_multiview") define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview"
Jesse Hallad250842017-03-10 18:35:38 -0800167
Jesse Halleb02c472017-02-24 15:13:45 -0800168// 56
Chris Forbes289cb792016-12-30 15:03:55 +1300169@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
170@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
171
Jesse Halleb02c472017-02-24 15:13:45 -0800172// 57
Chris Forbes289cb792016-12-30 15:03:55 +1300173@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
174@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
175
Jesse Halleb02c472017-02-24 15:13:45 -0800176// 58
Chris Forbes289cb792016-12-30 15:03:55 +1300177@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
178@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
179
Jesse Halleb02c472017-02-24 15:13:45 -0800180// 59
Chris Forbes289cb792016-12-30 15:03:55 +1300181@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
182@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
183
Jesse Hall889cd9a2017-02-25 22:12:23 -0800184// 60
185@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
186@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
187
Jesse Hallad250842017-03-10 18:35:38 -0800188// 61
Daniel Koch09f7bf92017-10-05 00:26:58 -0400189@extension("VK_KHR_device_group") define VK_KHR_DEVICE_GROUP_SPEC_VERSION 3
190@extension("VK_KHR_device_group") define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group"
Jesse Hallad250842017-03-10 18:35:38 -0800191
Jesse Halleb02c472017-02-24 15:13:45 -0800192// 62
Chris Forbes289cb792016-12-30 15:03:55 +1300193@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
194@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
195
Jesse Hall77ad05b2017-03-10 22:02:20 -0800196// 63
197@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1
198@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
199
200// 64
201@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
202@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
203
204// 65
205@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
206@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
207
208// 66
209@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
210@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
211
212// 70
213@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
214@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
215
Jesse Hallad250842017-03-10 18:35:38 -0800216// 71
Daniel Koch09f7bf92017-10-05 00:26:58 -0400217@extension("VK_KHR_device_group_creation") define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1
218@extension("VK_KHR_device_group_creation") define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation"
Jesse Hallad250842017-03-10 18:35:38 -0800219
220// 72
Jesse Hall9492f992017-08-28 12:10:06 -0700221@extension("VK_KHR_external_memory_capabilities") define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
222@extension("VK_KHR_external_memory_capabilities") define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities"
Jesse Hallad250842017-03-10 18:35:38 -0800223
224// 73
Jesse Hall9492f992017-08-28 12:10:06 -0700225@extension("VK_KHR_external_memory") define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
226@extension("VK_KHR_external_memory") define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
Jesse Hallad250842017-03-10 18:35:38 -0800227
228// 74
Jesse Hall9492f992017-08-28 12:10:06 -0700229@extension("VK_KHR_external_memory_win32") define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
230@extension("VK_KHR_external_memory_win32") define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
Jesse Hallad250842017-03-10 18:35:38 -0800231
232// 75
Jesse Hall9492f992017-08-28 12:10:06 -0700233@extension("VK_KHR_external_memory_fd") define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
234@extension("VK_KHR_external_memory_fd") define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd"
Jesse Hallad250842017-03-10 18:35:38 -0800235
236// 76
Jesse Hall9492f992017-08-28 12:10:06 -0700237@extension("VK_KHR_win32_keyed_mutex") define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
238@extension("VK_KHR_win32_keyed_mutex") define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
Jesse Hallad250842017-03-10 18:35:38 -0800239
240// 77
Jesse Hall9492f992017-08-28 12:10:06 -0700241@extension("VK_KHR_external_semaphore_capabilities") define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
242@extension("VK_KHR_external_semaphore_capabilities") define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities"
Jesse Hallad250842017-03-10 18:35:38 -0800243
244// 78
Jesse Hall9492f992017-08-28 12:10:06 -0700245@extension("VK_KHR_external_semaphore") define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
246@extension("VK_KHR_external_semaphore") define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore"
Jesse Hallad250842017-03-10 18:35:38 -0800247
248// 79
Jesse Hall9492f992017-08-28 12:10:06 -0700249@extension("VK_KHR_external_semaphore_win32") define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
250@extension("VK_KHR_external_semaphore_win32") define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
Jesse Hallad250842017-03-10 18:35:38 -0800251
252// 80
Jesse Hall9492f992017-08-28 12:10:06 -0700253@extension("VK_KHR_external_semaphore_fd") define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
254@extension("VK_KHR_external_semaphore_fd") define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd"
Jesse Hallad250842017-03-10 18:35:38 -0800255
256// 81
Daniel Koch09f7bf92017-10-05 00:26:58 -0400257@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2
Jesse Hallad250842017-03-10 18:35:38 -0800258@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
259
Jesse Hall9492f992017-08-28 12:10:06 -0700260// 84
261@extension("VK_KHR_16bit_storage") define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
262@extension("VK_KHR_16bit_storage") define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
263
Jesse Hall889cd9a2017-02-25 22:12:23 -0800264// 85
265@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700266@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800267
Jesse Hallad250842017-03-10 18:35:38 -0800268// 86
269@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
270@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
271
Jesse Halleb02c472017-02-24 15:13:45 -0800272// 87
Jesse Hall77726222017-09-19 14:49:27 -0500273@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3
Chris Forbes289cb792016-12-30 15:03:55 +1300274@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
275
Jesse Hallad250842017-03-10 18:35:38 -0800276// 88
277@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
278@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
279
Jesse Hall77ad05b2017-03-10 22:02:20 -0800280// 89
281@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
282@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
283
284// 90
285@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
286@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
287
288// 91
289@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
290@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
291
292// 92
293@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
294@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
295
Jesse Hall889cd9a2017-02-25 22:12:23 -0800296// 93
297@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
Jesse Hallfdc8ab32017-03-10 21:01:57 -0800298@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800299
Jesse Hallad250842017-03-10 18:35:38 -0800300// 95
301@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
302@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
303
304// 96
305@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
306@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
307
308// 97
309@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
310@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
311
312// 98
313@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
314@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
315
316// 99
317@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
318@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
319
320// 100
321@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
322@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
323
Jesse Hall77ad05b2017-03-10 22:02:20 -0800324// 105
Jesse Hall77726222017-09-19 14:49:27 -0500325@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 3
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700326@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
Jesse Hall77ad05b2017-03-10 22:02:20 -0800327
Jesse Hall889cd9a2017-02-25 22:12:23 -0800328// 106
329@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
330@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
331
332// 112
Chris Forbes1d5f68c2017-01-31 10:17:01 +1300333@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
334@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
Chris Forbes2e12cb82017-01-18 11:45:17 +1300335
Jesse Hall9492f992017-08-28 12:10:06 -0700336// 113
337@extension("VK_KHR_external_fence_capabilities") define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
338@extension("VK_KHR_external_fence_capabilities") define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities"
339
340// 114
341@extension("VK_KHR_external_fence") define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1
342@extension("VK_KHR_external_fence") define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence"
343
344// 115
345@extension("VK_KHR_external_fence_win32") define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
346@extension("VK_KHR_external_fence_win32") define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
347
348// 116
349@extension("VK_KHR_external_fence_fd") define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1
350@extension("VK_KHR_external_fence_fd") define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd"
351
Jesse Hall076f95d2017-09-20 11:34:47 -0700352// 118
353@extension("VK_KHR_maintenance2") define VK_KHR_MAINTENANCE2_SPEC_VERSION 1
354@extension("VK_KHR_maintenance2") define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2"
355
Jesse Hall05556b12017-05-18 17:40:25 -0700356// 120
Chris Forbese2d3ee12017-03-16 16:10:15 +1300357@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
358@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
359
Jesse Hall9492f992017-08-28 12:10:06 -0700360// 121
361@extension("VK_KHR_variable_pointers") define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
362@extension("VK_KHR_variable_pointers") define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
363
Jesse Hallad250842017-03-10 18:35:38 -0800364// 123
365@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
366@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
367
368// 124
369@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
370@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
371
Jesse Hall9492f992017-08-28 12:10:06 -0700372// 128
Jesse Hall77726222017-09-19 14:49:27 -0500373@extension("VK_KHR_dedicated_allocation") define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3
Jesse Hall9492f992017-08-28 12:10:06 -0700374@extension("VK_KHR_dedicated_allocation") define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
375
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700376// 131
377@extension("VK_EXT_sampler_filter_minmax") define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
378@extension("VK_EXT_sampler_filter_minmax") define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
379
Jesse Hall9492f992017-08-28 12:10:06 -0700380// 132
381@extension("VK_KHR_storage_buffer_storage_class") define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
382@extension("VK_KHR_storage_buffer_storage_class") define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
383
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700384// 133
385@extension("VK_AMD_gpu_shader_int16") define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
386@extension("VK_AMD_gpu_shader_int16") define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
387
Jesse Hall77726222017-09-19 14:49:27 -0500388// 137
389@extension("VK_AMD_mixed_attachment_samples") define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
390@extension("VK_AMD_mixed_attachment_samples") define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples"
391
392// 138
393@extension("VK_AMD_shader_fragment_mask") define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1
394@extension("VK_AMD_shader_fragment_mask") define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask"
395
396// 141
397@extension("VK_EXT_shader_stencil_export") define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
398@extension("VK_EXT_shader_stencil_export") define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export"
399
400// 144
401@extension("VK_EXT_sample_locations") define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1
402@extension("VK_EXT_sample_locations") define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations"
403
404// 145
405@extension("VK_KHR_relaxed_block_layout") define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1
406@extension("VK_KHR_relaxed_block_layout") define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout"
407
Jesse Hall9492f992017-08-28 12:10:06 -0700408// 147
409@extension("VK_KHR_get_memory_requirements2") define VK_KHR_GET_MEMORY_REQUIREMENTS2_SPEC_VERSION 1
410@extension("VK_KHR_get_memory_requirements2") define VK_KHR_GET_MEMORY_REQUIREMENTS2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
411
Jesse Hall076f95d2017-09-20 11:34:47 -0700412// 148
413@extension("VK_KHR_image_format_list") define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1
414@extension("VK_KHR_image_format_list") define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list"
415
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700416// 149
417@extension("VK_EXT_blend_operation_advanced") define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
418@extension("VK_EXT_blend_operation_advanced") define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
419
420// 150
421@extension("VK_NV_fragment_coverage_to_color") define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
422@extension("VK_NV_fragment_coverage_to_color") define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
423
424// 153
425@extension("VK_NV_framebuffer_mixed_samples") define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
426@extension("VK_NV_framebuffer_mixed_samples") define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
427
428// 154
429@extension("VK_NV_fill_rectangle") define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
430@extension("VK_NV_fill_rectangle") define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
431
Jesse Hall77726222017-09-19 14:49:27 -0500432// 156
433@extension("VK_EXT_post_depth_coverage") define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
434@extension("VK_EXT_post_depth_coverage") define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage"
435
Jesse Hall076f95d2017-09-20 11:34:47 -0700436// 157
437@extension("VK_KHR_sampler_ycbcr_conversion") define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1
438@extension("VK_KHR_sampler_ycbcr_conversion") define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion"
439
440// 158
441@extension("VK_KHR_bind_memory2") define VK_KHR_BIND_MEMORY2_SPEC_VERSION 1
442@extension("VK_KHR_bind_memory2") define VK_KHR_BIND_MEMORY2_EXTENSION_NAME "VK_KHR_bind_memory2"
443
Jesse Hall77726222017-09-19 14:49:27 -0500444// 161
445@extension("VK_EXT_validation_cache") define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1
446@extension("VK_EXT_validation_cache") define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache"
447
448// 165
449@extension("VK_EXT_shader_viewport_index_layer") define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
450@extension("VK_EXT_shader_viewport_index_layer") define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer"
451
Daniel Koch09f7bf92017-10-05 00:26:58 -0400452// 169
453@extension("VK_KHR_maintenance3") define VK_KHR_MAINTENANCE3_SPEC_VERSION 1
454@extension("VK_KHR_maintenance3") define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3"
455
Jesse Halld27f6aa2015-08-15 17:58:48 -0700456/////////////
457// Types //
458/////////////
459
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700460type u32 VkBool32
461type u32 VkFlags
462type u64 VkDeviceSize
463type u32 VkSampleMask
464
Jesse Halld27f6aa2015-08-15 17:58:48 -0700465/// Dispatchable handle types.
466@dispatchHandle type u64 VkInstance
467@dispatchHandle type u64 VkPhysicalDevice
468@dispatchHandle type u64 VkDevice
469@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800470@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700471
472/// Non dispatchable handle types.
473@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800474@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700475@nonDispatchHandle type u64 VkBuffer
476@nonDispatchHandle type u64 VkBufferView
477@nonDispatchHandle type u64 VkImage
478@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700479@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700480@nonDispatchHandle type u64 VkPipeline
481@nonDispatchHandle type u64 VkPipelineLayout
482@nonDispatchHandle type u64 VkSampler
483@nonDispatchHandle type u64 VkDescriptorSet
484@nonDispatchHandle type u64 VkDescriptorSetLayout
485@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700486@nonDispatchHandle type u64 VkFence
487@nonDispatchHandle type u64 VkSemaphore
488@nonDispatchHandle type u64 VkEvent
489@nonDispatchHandle type u64 VkQueryPool
490@nonDispatchHandle type u64 VkFramebuffer
491@nonDispatchHandle type u64 VkRenderPass
492@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800493
Ian Elliott28bd2c32017-10-13 09:21:12 -0600494@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -0400495@nonDispatchHandle type u64 VkSamplerYcbcrConversion
496@nonDispatchHandle type u64 VkDescriptorUpdateTemplate
497
Jesse Hallad250842017-03-10 18:35:38 -0800498// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800499@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800500
Jesse Hallad250842017-03-10 18:35:38 -0800501// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800502@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800503
Jesse Hallad250842017-03-10 18:35:38 -0800504// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800505@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
506@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700507
Jesse Hallad250842017-03-10 18:35:38 -0800508// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800509@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
510
Jesse Hallad250842017-03-10 18:35:38 -0800511// 86
512@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
513
514// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300515@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
516@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
517
Jesse Hall076f95d2017-09-20 11:34:47 -0700518// 157
519@extension("VK_KHR_sampler_ycbcr_conversion") @nonDispatchHandle type u64 VkSamplerYcbcrConversionKHR
520
Jesse Hall77726222017-09-19 14:49:27 -0500521// 161
522@extension("VK_EXT_validation_cache") @nonDispatchHandle type u64 VkValidationCacheEXT
Jesse Halld27f6aa2015-08-15 17:58:48 -0700523
524/////////////
525// Enums //
526/////////////
527
528enum VkImageLayout {
529 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
530 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
531 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
532 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
533 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
534 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, /// Optimal layout when image is used for read only shader access
Jesse Hall3fbc8562015-11-29 22:10:52 -0800535 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
536 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 0x00000007, /// Optimal layout when image is used only as destination of transfer operations
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700537 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800538
Ian Elliott28bd2c32017-10-13 09:21:12 -0600539 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -0400540 VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
541 VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
542
Jesse Hallad250842017-03-10 18:35:38 -0800543 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800544 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Chris Forbesaf3a1112017-01-31 15:37:03 +1300545
Jesse Hall05556b12017-05-18 17:40:25 -0700546 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbesaf3a1112017-01-31 15:37:03 +1300547 VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
Jesse Hall076f95d2017-09-20 11:34:47 -0700548
549 //@extension("VK_KHR_maintenance2") // 118
550 VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000117000,
551 VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000117001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700552}
553
554enum VkAttachmentLoadOp {
555 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
556 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
557 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
558}
559
560enum VkAttachmentStoreOp {
561 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
562 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
563}
564
565enum VkImageType {
566 VK_IMAGE_TYPE_1D = 0x00000000,
567 VK_IMAGE_TYPE_2D = 0x00000001,
568 VK_IMAGE_TYPE_3D = 0x00000002,
569}
570
571enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800572 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
573 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700574}
575
576enum VkImageViewType {
577 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
578 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
579 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
580 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
581 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
582 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
583 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
584}
585
Jesse Hall3fbc8562015-11-29 22:10:52 -0800586enum VkCommandBufferLevel {
587 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
588 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700589}
590
Jesse Hall65ab5522015-11-30 00:07:16 -0800591enum VkComponentSwizzle {
592 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
593 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
594 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
595 VK_COMPONENT_SWIZZLE_R = 0x00000003,
596 VK_COMPONENT_SWIZZLE_G = 0x00000004,
597 VK_COMPONENT_SWIZZLE_B = 0x00000005,
598 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700599}
600
601enum VkDescriptorType {
602 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
603 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
604 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
605 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
606 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
607 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
608 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
609 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
610 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
611 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
612 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
613}
614
Jesse Halld27f6aa2015-08-15 17:58:48 -0700615enum VkQueryType {
616 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
617 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800618 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700619}
620
Jesse Halld27f6aa2015-08-15 17:58:48 -0700621enum VkBorderColor {
622 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
623 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
624 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
625 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
626 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
627 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
628}
629
630enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800631 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
632 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700633}
634
635enum VkPrimitiveTopology {
636 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
637 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
638 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
639 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
640 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
641 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800642 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
643 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
644 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
645 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800646 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700647}
648
649enum VkSharingMode {
650 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
651 VK_SHARING_MODE_CONCURRENT = 0x00000001,
652}
653
654enum VkIndexType {
655 VK_INDEX_TYPE_UINT16 = 0x00000000,
656 VK_INDEX_TYPE_UINT32 = 0x00000001,
657}
658
Jesse Hall23ff73f2015-11-29 14:36:39 -0800659enum VkFilter {
660 VK_FILTER_NEAREST = 0x00000000,
661 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700662
Jesse Hallad250842017-03-10 18:35:38 -0800663 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700664 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700665}
666
Jesse Hall23ff73f2015-11-29 14:36:39 -0800667enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800668 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
669 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700670}
671
Jesse Hall23ff73f2015-11-29 14:36:39 -0800672enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800673 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
674 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
675 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
676 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
677 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700678}
679
680enum VkCompareOp {
681 VK_COMPARE_OP_NEVER = 0x00000000,
682 VK_COMPARE_OP_LESS = 0x00000001,
683 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800684 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700685 VK_COMPARE_OP_GREATER = 0x00000004,
686 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800687 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700688 VK_COMPARE_OP_ALWAYS = 0x00000007,
689}
690
Jesse Hall65ab5522015-11-30 00:07:16 -0800691enum VkPolygonMode {
692 VK_POLYGON_MODE_FILL = 0x00000000,
693 VK_POLYGON_MODE_LINE = 0x00000001,
694 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700695
696 //@extension("VK_NV_fill_rectangle") // 154
697 VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700698}
699
700enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800701 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
702 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700703}
704
Jesse Hall65ab5522015-11-30 00:07:16 -0800705enum VkBlendFactor {
706 VK_BLEND_FACTOR_ZERO = 0x00000000,
707 VK_BLEND_FACTOR_ONE = 0x00000001,
708 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
709 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
710 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
711 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
712 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
713 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
714 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
715 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
716 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
717 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
718 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
719 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
720 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
721 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
722 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
723 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
724 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700725}
726
727enum VkBlendOp {
728 VK_BLEND_OP_ADD = 0x00000000,
729 VK_BLEND_OP_SUBTRACT = 0x00000001,
730 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
731 VK_BLEND_OP_MIN = 0x00000003,
732 VK_BLEND_OP_MAX = 0x00000004,
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700733
734 //@extension("VK_EXT_blend_operation_advanced") // 149
735 VK_BLEND_OP_ZERO_EXT = 1000148000,
736 VK_BLEND_OP_SRC_EXT = 1000148001,
737 VK_BLEND_OP_DST_EXT = 1000148002,
738 VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
739 VK_BLEND_OP_DST_OVER_EXT = 1000148004,
740 VK_BLEND_OP_SRC_IN_EXT = 1000148005,
741 VK_BLEND_OP_DST_IN_EXT = 1000148006,
742 VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
743 VK_BLEND_OP_DST_OUT_EXT = 1000148008,
744 VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
745 VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
746 VK_BLEND_OP_XOR_EXT = 1000148011,
747 VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
748 VK_BLEND_OP_SCREEN_EXT = 1000148013,
749 VK_BLEND_OP_OVERLAY_EXT = 1000148014,
750 VK_BLEND_OP_DARKEN_EXT = 1000148015,
751 VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
752 VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
753 VK_BLEND_OP_COLORBURN_EXT = 1000148018,
754 VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
755 VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
756 VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
757 VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
758 VK_BLEND_OP_INVERT_EXT = 1000148023,
759 VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
760 VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
761 VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
762 VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
763 VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
764 VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
765 VK_BLEND_OP_HARDMIX_EXT = 1000148030,
766 VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
767 VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
768 VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
769 VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
770 VK_BLEND_OP_PLUS_EXT = 1000148035,
771 VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
772 VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
773 VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
774 VK_BLEND_OP_MINUS_EXT = 1000148039,
775 VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
776 VK_BLEND_OP_CONTRAST_EXT = 1000148041,
777 VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
778 VK_BLEND_OP_RED_EXT = 1000148043,
779 VK_BLEND_OP_GREEN_EXT = 1000148044,
780 VK_BLEND_OP_BLUE_EXT = 1000148045,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700781}
782
783enum VkStencilOp {
784 VK_STENCIL_OP_KEEP = 0x00000000,
785 VK_STENCIL_OP_ZERO = 0x00000001,
786 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800787 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
788 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700789 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800790 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
791 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700792}
793
794enum VkLogicOp {
795 VK_LOGIC_OP_CLEAR = 0x00000000,
796 VK_LOGIC_OP_AND = 0x00000001,
797 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
798 VK_LOGIC_OP_COPY = 0x00000003,
799 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800800 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700801 VK_LOGIC_OP_XOR = 0x00000006,
802 VK_LOGIC_OP_OR = 0x00000007,
803 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800804 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700805 VK_LOGIC_OP_INVERT = 0x0000000a,
806 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
807 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
808 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
809 VK_LOGIC_OP_NAND = 0x0000000e,
810 VK_LOGIC_OP_SET = 0x0000000f,
811}
812
Jesse Hall3fbc8562015-11-29 22:10:52 -0800813enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800814 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800815 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
816 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
817 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
818 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800819}
820
Jesse Hall3fbc8562015-11-29 22:10:52 -0800821enum VkInternalAllocationType {
822 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700823}
824
825enum VkPhysicalDeviceType {
826 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
827 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
828 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
829 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
830 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
831}
832
Jesse Hall65ab5522015-11-30 00:07:16 -0800833enum VkVertexInputRate {
834 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
835 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700836}
837
838/// Vulkan format definitions
839enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800840 VK_FORMAT_UNDEFINED = 0,
841 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
842 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
843 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
844 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
845 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
846 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
847 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
848 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
849 VK_FORMAT_R8_UNORM = 9,
850 VK_FORMAT_R8_SNORM = 10,
851 VK_FORMAT_R8_USCALED = 11,
852 VK_FORMAT_R8_SSCALED = 12,
853 VK_FORMAT_R8_UINT = 13,
854 VK_FORMAT_R8_SINT = 14,
855 VK_FORMAT_R8_SRGB = 15,
856 VK_FORMAT_R8G8_UNORM = 16,
857 VK_FORMAT_R8G8_SNORM = 17,
858 VK_FORMAT_R8G8_USCALED = 18,
859 VK_FORMAT_R8G8_SSCALED = 19,
860 VK_FORMAT_R8G8_UINT = 20,
861 VK_FORMAT_R8G8_SINT = 21,
862 VK_FORMAT_R8G8_SRGB = 22,
863 VK_FORMAT_R8G8B8_UNORM = 23,
864 VK_FORMAT_R8G8B8_SNORM = 24,
865 VK_FORMAT_R8G8B8_USCALED = 25,
866 VK_FORMAT_R8G8B8_SSCALED = 26,
867 VK_FORMAT_R8G8B8_UINT = 27,
868 VK_FORMAT_R8G8B8_SINT = 28,
869 VK_FORMAT_R8G8B8_SRGB = 29,
870 VK_FORMAT_B8G8R8_UNORM = 30,
871 VK_FORMAT_B8G8R8_SNORM = 31,
872 VK_FORMAT_B8G8R8_USCALED = 32,
873 VK_FORMAT_B8G8R8_SSCALED = 33,
874 VK_FORMAT_B8G8R8_UINT = 34,
875 VK_FORMAT_B8G8R8_SINT = 35,
876 VK_FORMAT_B8G8R8_SRGB = 36,
877 VK_FORMAT_R8G8B8A8_UNORM = 37,
878 VK_FORMAT_R8G8B8A8_SNORM = 38,
879 VK_FORMAT_R8G8B8A8_USCALED = 39,
880 VK_FORMAT_R8G8B8A8_SSCALED = 40,
881 VK_FORMAT_R8G8B8A8_UINT = 41,
882 VK_FORMAT_R8G8B8A8_SINT = 42,
883 VK_FORMAT_R8G8B8A8_SRGB = 43,
884 VK_FORMAT_B8G8R8A8_UNORM = 44,
885 VK_FORMAT_B8G8R8A8_SNORM = 45,
886 VK_FORMAT_B8G8R8A8_USCALED = 46,
887 VK_FORMAT_B8G8R8A8_SSCALED = 47,
888 VK_FORMAT_B8G8R8A8_UINT = 48,
889 VK_FORMAT_B8G8R8A8_SINT = 49,
890 VK_FORMAT_B8G8R8A8_SRGB = 50,
891 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
892 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
893 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
894 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
895 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
896 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
897 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
898 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
899 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
900 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
901 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
902 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
903 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
904 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
905 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
906 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
907 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
908 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
909 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
910 VK_FORMAT_R16_UNORM = 70,
911 VK_FORMAT_R16_SNORM = 71,
912 VK_FORMAT_R16_USCALED = 72,
913 VK_FORMAT_R16_SSCALED = 73,
914 VK_FORMAT_R16_UINT = 74,
915 VK_FORMAT_R16_SINT = 75,
916 VK_FORMAT_R16_SFLOAT = 76,
917 VK_FORMAT_R16G16_UNORM = 77,
918 VK_FORMAT_R16G16_SNORM = 78,
919 VK_FORMAT_R16G16_USCALED = 79,
920 VK_FORMAT_R16G16_SSCALED = 80,
921 VK_FORMAT_R16G16_UINT = 81,
922 VK_FORMAT_R16G16_SINT = 82,
923 VK_FORMAT_R16G16_SFLOAT = 83,
924 VK_FORMAT_R16G16B16_UNORM = 84,
925 VK_FORMAT_R16G16B16_SNORM = 85,
926 VK_FORMAT_R16G16B16_USCALED = 86,
927 VK_FORMAT_R16G16B16_SSCALED = 87,
928 VK_FORMAT_R16G16B16_UINT = 88,
929 VK_FORMAT_R16G16B16_SINT = 89,
930 VK_FORMAT_R16G16B16_SFLOAT = 90,
931 VK_FORMAT_R16G16B16A16_UNORM = 91,
932 VK_FORMAT_R16G16B16A16_SNORM = 92,
933 VK_FORMAT_R16G16B16A16_USCALED = 93,
934 VK_FORMAT_R16G16B16A16_SSCALED = 94,
935 VK_FORMAT_R16G16B16A16_UINT = 95,
936 VK_FORMAT_R16G16B16A16_SINT = 96,
937 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
938 VK_FORMAT_R32_UINT = 98,
939 VK_FORMAT_R32_SINT = 99,
940 VK_FORMAT_R32_SFLOAT = 100,
941 VK_FORMAT_R32G32_UINT = 101,
942 VK_FORMAT_R32G32_SINT = 102,
943 VK_FORMAT_R32G32_SFLOAT = 103,
944 VK_FORMAT_R32G32B32_UINT = 104,
945 VK_FORMAT_R32G32B32_SINT = 105,
946 VK_FORMAT_R32G32B32_SFLOAT = 106,
947 VK_FORMAT_R32G32B32A32_UINT = 107,
948 VK_FORMAT_R32G32B32A32_SINT = 108,
949 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
950 VK_FORMAT_R64_UINT = 110,
951 VK_FORMAT_R64_SINT = 111,
952 VK_FORMAT_R64_SFLOAT = 112,
953 VK_FORMAT_R64G64_UINT = 113,
954 VK_FORMAT_R64G64_SINT = 114,
955 VK_FORMAT_R64G64_SFLOAT = 115,
956 VK_FORMAT_R64G64B64_UINT = 116,
957 VK_FORMAT_R64G64B64_SINT = 117,
958 VK_FORMAT_R64G64B64_SFLOAT = 118,
959 VK_FORMAT_R64G64B64A64_UINT = 119,
960 VK_FORMAT_R64G64B64A64_SINT = 120,
961 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
962 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
963 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
964 VK_FORMAT_D16_UNORM = 124,
965 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
966 VK_FORMAT_D32_SFLOAT = 126,
967 VK_FORMAT_S8_UINT = 127,
968 VK_FORMAT_D16_UNORM_S8_UINT = 128,
969 VK_FORMAT_D24_UNORM_S8_UINT = 129,
970 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
971 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
972 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
973 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
974 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
975 VK_FORMAT_BC2_UNORM_BLOCK = 135,
976 VK_FORMAT_BC2_SRGB_BLOCK = 136,
977 VK_FORMAT_BC3_UNORM_BLOCK = 137,
978 VK_FORMAT_BC3_SRGB_BLOCK = 138,
979 VK_FORMAT_BC4_UNORM_BLOCK = 139,
980 VK_FORMAT_BC4_SNORM_BLOCK = 140,
981 VK_FORMAT_BC5_UNORM_BLOCK = 141,
982 VK_FORMAT_BC5_SNORM_BLOCK = 142,
983 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
984 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
985 VK_FORMAT_BC7_UNORM_BLOCK = 145,
986 VK_FORMAT_BC7_SRGB_BLOCK = 146,
987 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
988 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
989 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
990 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
991 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
992 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
993 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
994 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
995 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
996 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
997 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
998 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
999 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
1000 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
1001 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
1002 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
1003 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
1004 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
1005 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
1006 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
1007 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
1008 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
1009 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
1010 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
1011 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
1012 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
1013 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
1014 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
1015 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
1016 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
1017 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
1018 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
1019 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
1020 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
1021 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
1022 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
1023 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
1024 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Chris Forbes289cb792016-12-30 15:03:55 +13001025
Ian Elliott28bd2c32017-10-13 09:21:12 -06001026 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001027 VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
1028 VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
1029 VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
1030 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
1031 VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
1032 VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
1033 VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
1034 VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,
1035 VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,
1036 VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
1037 VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
1038 VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
1039 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
1040 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
1041 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
1042 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
1043 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
1044 VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,
1045 VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,
1046 VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
1047 VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
1048 VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
1049 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
1050 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
1051 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
1052 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
1053 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
1054 VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,
1055 VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,
1056 VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,
1057 VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,
1058 VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,
1059 VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,
1060 VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033,
1061
Jesse Hallad250842017-03-10 18:35:38 -08001062 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -08001063 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
1064 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
1065 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
1066 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
1067 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
1068 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
1069 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
1070 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Hall076f95d2017-09-20 11:34:47 -07001071
1072 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1073 VK_FORMAT_G8B8G8R8_422_UNORM_KHR = 1000156000,
1074 VK_FORMAT_B8G8R8G8_422_UNORM_KHR = 1000156001,
1075 VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002,
1076 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003,
1077 VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004,
1078 VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005,
1079 VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006,
1080 VK_FORMAT_R10X6_UNORM_PACK16_KHR = 1000156007,
1081 VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = 1000156008,
1082 VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009,
1083 VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010,
1084 VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011,
1085 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012,
1086 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013,
1087 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014,
1088 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015,
1089 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016,
1090 VK_FORMAT_R12X4_UNORM_PACK16_KHR = 1000156017,
1091 VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = 1000156018,
1092 VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019,
1093 VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020,
1094 VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021,
1095 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022,
1096 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023,
1097 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024,
1098 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025,
1099 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026,
1100 VK_FORMAT_G16B16G16R16_422_UNORM_KHR = 1000156027,
1101 VK_FORMAT_B16G16R16G16_422_UNORM_KHR = 1000156028,
1102 VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029,
1103 VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030,
1104 VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031,
1105 VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032,
1106 VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001107}
1108
Jesse Halld27f6aa2015-08-15 17:58:48 -07001109/// Structure type enumerant
1110enum VkStructureType {
1111 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -08001112 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
1113 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
1114 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
1115 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001116 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -08001117 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
1118 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
1119 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
1120 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001121 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -08001122 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
1123 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
1124 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
1125 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
1126 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
1127 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001128 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
1129 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
1130 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
1131 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
1132 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
1133 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
1134 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
1135 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
1136 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
1137 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
1138 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
1139 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
1140 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
1141 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
1142 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
1143 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
1144 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001145 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001146 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
1147 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
1148 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
1149 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
1150 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001151 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -08001152 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
1153 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
1154 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
1155 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
1156 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
1157 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
1158 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
1159 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001160
Ian Elliott28bd2c32017-10-13 09:21:12 -06001161 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001162 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
1163 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
1164 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
1165 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
1166 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
1167 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
1168 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
1169 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
1170 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
1171 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
1172 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
1173 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
1174 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
1175 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
1176 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
1177 VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
1178 VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
1179 VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
1180 VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
1181 VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
1182 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
1183 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
1184 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
1185 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
1186 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
1187 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
1188 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
1189 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
1190 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
1191 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
1192 VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
1193 VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
1194 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
1195 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
1196 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
1197 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
1198 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000,
1199 VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
1200 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
1201 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
1202 VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
1203 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
1204 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
1205 VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
1206 VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
1207 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
1208 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
1209 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
1210 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
1211 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
1212 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
1213 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
1214 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
1215 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
1216 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
1217 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
1218 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
1219 VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
1220 VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
1221 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
1222 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
1223 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
1224 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
1225 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
1226 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000,
1227 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
1228
Jesse Hallad250842017-03-10 18:35:38 -08001229 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001230 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
1231 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Daniel Koch09f7bf92017-10-05 00:26:58 -04001232 // added as interaction from VK_KHR_device_group / VK 1.1
1233 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
1234 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
1235 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
1236 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
1237 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001238
Jesse Hallad250842017-03-10 18:35:38 -08001239 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -08001240 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
1241 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001242
Jesse Hallad250842017-03-10 18:35:38 -08001243 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001244 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001245
Jesse Hallad250842017-03-10 18:35:38 -08001246 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001247 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
1248
Jesse Hallad250842017-03-10 18:35:38 -08001249 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001250 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
1251
Jesse Hallad250842017-03-10 18:35:38 -08001252 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001253 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
1254
Jesse Hallad250842017-03-10 18:35:38 -08001255 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001256 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
1257
Jesse Hallad250842017-03-10 18:35:38 -08001258 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001259 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
1260
Jesse Hallad250842017-03-10 18:35:38 -08001261 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001262 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -08001263
Jesse Hallad250842017-03-10 18:35:38 -08001264 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08001265 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
Chris Forbes8e4438b2016-12-07 16:26:49 +13001266 VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001,
Chris Forbes1d4e5542017-02-15 19:38:50 +13001267 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002,
Chia-I Wub262ddc2016-03-22 07:38:20 +08001268
Jesse Hallad250842017-03-10 18:35:38 -08001269 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -07001270 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
1271
Jesse Hallad250842017-03-10 18:35:38 -08001272 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001273 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
1274
Jesse Hallad250842017-03-10 18:35:38 -08001275 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07001276 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -07001277 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -07001278 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall56d386a2016-07-26 15:20:40 -07001279
Jesse Hallad250842017-03-10 18:35:38 -08001280 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07001281 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall56d386a2016-07-26 15:20:40 -07001282 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall56d386a2016-07-26 15:20:40 -07001283 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Chris Forbes289cb792016-12-30 15:03:55 +13001284
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001285 //@extension("VK_AMD_texture_gather_bias_lod") // 42
1286 VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
1287
Daniel Koch09f7bf92017-10-05 00:26:58 -04001288 //@extension("VK_KHR_multiview") // 54
1289 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = 1000053000,
1290 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = 1000053001,
1291 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = 1000053002,
Jesse Hallad250842017-03-10 18:35:38 -08001292
1293 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08001294 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
1295 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
Chris Forbes289cb792016-12-30 15:03:55 +13001296
Jesse Hallad250842017-03-10 18:35:38 -08001297 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08001298 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
1299 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
Chris Forbes289cb792016-12-30 15:03:55 +13001300
Jesse Hallad250842017-03-10 18:35:38 -08001301 //@extension("VK_NV_win32_keyed_mutex") // 59
Chris Forbes289cb792016-12-30 15:03:55 +13001302 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
1303
Jesse Hallad250842017-03-10 18:35:38 -08001304 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall889cd9a2017-02-25 22:12:23 -08001305 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
1306 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
1307 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
1308 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
1309 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
1310 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
1311 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
1312 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
Chris Forbes1194ede2016-12-30 16:29:25 +13001313 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
1314
Daniel Koch09f7bf92017-10-05 00:26:58 -04001315 //@extension("VK_KHR_device_group") // 61
1316 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = 1000060000,
1317 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = 1000060003,
1318 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = 1000060004,
1319 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = 1000060005,
1320 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = 1000060006,
1321 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
1322 // tokens 08-12 are listed with VK_KHR_swapchain
1323 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060013,
1324 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060014,
Jesse Hallad250842017-03-10 18:35:38 -08001325
1326 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08001327 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
Chris Forbes289cb792016-12-30 15:03:55 +13001328
Jesse Hallad250842017-03-10 18:35:38 -08001329 //@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001330 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
1331
Daniel Koch09f7bf92017-10-05 00:26:58 -04001332 //@extension("VK_KHR_device_group_creation") // 71
1333 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = 1000070000,
1334 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = 1000070001,
Jesse Hallad250842017-03-10 18:35:38 -08001335
Jesse Hall9492f992017-08-28 12:10:06 -07001336 //@extension("VK_KHR_external_memory_capabilities") // 72
1337 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000,
1338 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001,
1339 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002,
1340 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003,
1341 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004,
Jesse Hallad250842017-03-10 18:35:38 -08001342
Jesse Hall9492f992017-08-28 12:10:06 -07001343 //@extension("VK_KHR_external_memory") // 73
1344 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000,
1345 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001,
1346 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002,
Jesse Hallad250842017-03-10 18:35:38 -08001347
Jesse Hall9492f992017-08-28 12:10:06 -07001348 //@extension("VK_KHR_external_memory_win32") // 74
1349 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
1350 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
1351 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
Jesse Hallad250842017-03-10 18:35:38 -08001352
Jesse Hall9492f992017-08-28 12:10:06 -07001353 //@extension("VK_KHR_external_memory_fd") // 75
1354 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
1355 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
Jesse Hallad250842017-03-10 18:35:38 -08001356
Jesse Hall9492f992017-08-28 12:10:06 -07001357 //@extension("VK_KHR_win32_keyed_mutex") // 76
1358 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
Jesse Hallad250842017-03-10 18:35:38 -08001359
Jesse Hall9492f992017-08-28 12:10:06 -07001360 //@extension("VK_KHR_external_semaphore_capabilities") // 77
1361 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000,
1362 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001,
Jesse Hallad250842017-03-10 18:35:38 -08001363
Jesse Hall9492f992017-08-28 12:10:06 -07001364 //@extension("VK_KHR_external_semaphore") // 78
1365 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000,
Jesse Hallad250842017-03-10 18:35:38 -08001366
Jesse Hall9492f992017-08-28 12:10:06 -07001367 //@extension("VK_KHR_external_semaphore_win32") // 79
1368 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
1369 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
1370 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
Jesse Hallad250842017-03-10 18:35:38 -08001371
Jesse Hall9492f992017-08-28 12:10:06 -07001372 //@extension("VK_KHR_external_semaphore_fd") // 80
1373 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
1374 VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
Jesse Hallad250842017-03-10 18:35:38 -08001375
1376 //@extension("VK_KHR_push_descriptor") // 81
1377 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1378
Jesse Hall9492f992017-08-28 12:10:06 -07001379 //@extension("VK_KHR_16bit_storage") // 84
1380 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000,
1381
Jesse Hallad250842017-03-10 18:35:38 -08001382 //@extension("VK_KHR_incremental_present") // 85
Jesse Hall889cd9a2017-02-25 22:12:23 -08001383 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
Chris Forbes289cb792016-12-30 15:03:55 +13001384
Jesse Hallad250842017-03-10 18:35:38 -08001385 //@extension("VK_KHR_descriptor_update_template") // 86
1386 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1387
1388 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001389 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1390 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1391 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1392 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1393 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1394 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001395
Jesse Hallad250842017-03-10 18:35:38 -08001396 //@extension("VK_NV_clip_space_w_scaling") // 88
1397 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1398
1399 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77726222017-09-19 14:49:27 -05001400 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001401
Jesse Hallad250842017-03-10 18:35:38 -08001402 //@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001403 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1404 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1405 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1406 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Hallad250842017-03-10 18:35:38 -08001407
1408 //@extension("VK_GOOGLE_display_timing") // 93
1409 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1410
1411 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1412 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1413
1414 //@extension("VK_NV_viewport_swizzle") // 99
1415 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1416
1417 //@extension("VK_EXT_discard_rectangles") // 100
1418 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1419 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1420
Jesse Hallfdc8ab32017-03-10 21:01:57 -08001421 //@extension("VK_EXT_hdr_metadata") // 106
1422 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1423
Jesse Hall05556b12017-05-18 17:40:25 -07001424 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13001425 VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
1426
Jesse Hall9492f992017-08-28 12:10:06 -07001427 //@extension("VK_KHR_external_fence_capabilities") // 113
1428 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000,
1429 VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001,
1430
1431 //@extension("VK_KHR_external_fence") // 114
1432 VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = 1000113000,
1433
1434 //@extension("VK_KHR_external_fence_win32") // 115
1435 VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
1436 VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
1437 VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
1438
1439 //@extension("VK_KHR_external_fence_fd") // 117
1440 VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
1441 VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
1442
Jesse Hall076f95d2017-09-20 11:34:47 -07001443 //@extension("VK_KHR_maintenance2") // 118
1444 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = 1000117000,
1445 VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = 1000117001,
1446 VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = 1000117002,
1447 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = 1000117003,
1448
Jesse Hall05556b12017-05-18 17:40:25 -07001449 //@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13001450 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
1451 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
1452 VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
1453
Jesse Hall9492f992017-08-28 12:10:06 -07001454 //@extension("VK_KHR_variable_pointers") // 121
1455 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = 1000120000,
1456
Jesse Hallad250842017-03-10 18:35:38 -08001457 //@extension("VK_MVK_ios_surface") // 123
1458 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1459
1460 //@extension("VK_MVK_macos_surface") // 124
1461 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001462
Jesse Hall9492f992017-08-28 12:10:06 -07001463 //@extension("VK_KHR_dedicated_allocation") // 128
1464 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000,
1465 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001,
1466
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001467 //@extension("VK_EXT_sampler_filter_minmax") // 131
1468 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
1469 VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
1470
Jesse Hall77726222017-09-19 14:49:27 -05001471 //@extension("VK_EXT_sample_locations") // 144
1472 VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
1473 VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
1474 VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
1475 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003,
1476 VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004,
1477
Jesse Hall9492f992017-08-28 12:10:06 -07001478 //@extension("VK_KHR_get_memory_requirements2") // 147
1479 VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000,
1480 VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001,
1481 VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002,
1482 VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = 1000146003,
1483 VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004,
1484
Jesse Hall076f95d2017-09-20 11:34:47 -07001485 //@extension("VK_KHR_image_format_list") // 148
1486 VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000,
1487
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001488 //@extension("VK_EXT_blend_operation_advanced") // 149
1489 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
1490 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
1491 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
1492
1493 //@extension("VK_NV_fragment_coverage_to_color") // 150
1494 VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
1495
Jesse Hall77726222017-09-19 14:49:27 -05001496 //@extension("VK_NV_framebuffer_mixed_samples") // 153
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001497 VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
Jesse Hall77726222017-09-19 14:49:27 -05001498
Jesse Hall076f95d2017-09-20 11:34:47 -07001499 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1500 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000,
1501 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001,
1502 VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002,
1503 VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003,
1504 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004,
1505 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005,
1506
1507 //@extension("VK_KHR_bind_memory2") // 158
1508 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = 1000157000,
1509 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = 1000157001,
1510
Jesse Hall77726222017-09-19 14:49:27 -05001511 //@extension("VK_EXT_validation_cache") // 161
1512 VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
1513 VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
Daniel Koch09f7bf92017-10-05 00:26:58 -04001514
1515 //@extension("VK_KHR_maintenance3") // 169
1516 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = 1000168000,
1517 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = 1000168001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001518}
1519
Jesse Hall65ab5522015-11-30 00:07:16 -08001520enum VkSubpassContents {
1521 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1522 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001523}
1524
Jesse Hall543a7ff2016-01-08 16:38:30 -08001525enum VkPipelineCacheHeaderVersion {
1526 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1527}
1528
Jesse Hallbd888842015-11-30 21:44:14 -08001529@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001530/// Error and return codes
1531enum VkResult {
1532 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001533 VK_SUCCESS = 0,
1534 VK_NOT_READY = 1,
1535 VK_TIMEOUT = 2,
1536 VK_EVENT_SET = 3,
1537 VK_EVENT_RESET = 4,
1538 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001539
Jesse Hallad250842017-03-10 18:35:38 -08001540 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001541 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001542
Jesse Halld27f6aa2015-08-15 17:58:48 -07001543 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001544 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1545 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1546 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1547 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1548 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1549 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1550 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1551 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1552 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1553 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1554 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001555 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001556
Ian Elliott28bd2c32017-10-13 09:21:12 -06001557 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001558 VK_ERROR_OUT_OF_POOL_MEMORY = 0xC4642878, // -1000069000
1559 VK_ERROR_INVALID_EXTERNAL_HANDLE = 0xC4641CBD, // -1000072003
1560
Jesse Hallad250842017-03-10 18:35:38 -08001561 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001562 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001563 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001564
Jesse Hallad250842017-03-10 18:35:38 -08001565 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001566 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001567
Jesse Hallad250842017-03-10 18:35:38 -08001568 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001569 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001570
Jesse Hallad250842017-03-10 18:35:38 -08001571 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001572 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001573
Jesse Hallad250842017-03-10 18:35:38 -08001574 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001575 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001576
Jesse Hallad250842017-03-10 18:35:38 -08001577 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001578 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001579
Jesse Hall9492f992017-08-28 12:10:06 -07001580 //@extension("VK_KHR_external_memory") // 73
1581 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001582}
1583
1584enum VkDynamicState {
1585 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1586 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1587 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1588 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1589 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1590 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1591 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1592 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1593 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001594
1595 //@extension("VK_NV_clip_space_w_scaling") // 88
1596 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1597
1598 //@extension("VK_EXT_discard_rectangles") // 100
1599 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Hall77726222017-09-19 14:49:27 -05001600
1601 //@extension("VK_EXT_sample_locations") // 144
1602 VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001603}
1604
Jesse Hall05556b12017-05-18 17:40:25 -07001605enum VkObjectType {
1606 VK_OBJECT_TYPE_UNKNOWN = 0,
1607 VK_OBJECT_TYPE_INSTANCE = 1,
1608 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
1609 VK_OBJECT_TYPE_DEVICE = 3,
1610 VK_OBJECT_TYPE_QUEUE = 4,
1611 VK_OBJECT_TYPE_SEMAPHORE = 5,
1612 VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
1613 VK_OBJECT_TYPE_FENCE = 7,
1614 VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
1615 VK_OBJECT_TYPE_BUFFER = 9,
1616 VK_OBJECT_TYPE_IMAGE = 10,
1617 VK_OBJECT_TYPE_EVENT = 11,
1618 VK_OBJECT_TYPE_QUERY_POOL = 12,
1619 VK_OBJECT_TYPE_BUFFER_VIEW = 13,
1620 VK_OBJECT_TYPE_IMAGE_VIEW = 14,
1621 VK_OBJECT_TYPE_SHADER_MODULE = 15,
1622 VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
1623 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
1624 VK_OBJECT_TYPE_RENDER_PASS = 18,
1625 VK_OBJECT_TYPE_PIPELINE = 19,
1626 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
1627 VK_OBJECT_TYPE_SAMPLER = 21,
1628 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
1629 VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
1630 VK_OBJECT_TYPE_FRAMEBUFFER = 24,
1631 VK_OBJECT_TYPE_COMMAND_POOL = 25,
1632
Ian Elliott28bd2c32017-10-13 09:21:12 -06001633 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001634 VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,
1635 VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,
1636
Jesse Hall05556b12017-05-18 17:40:25 -07001637 //@extension("VK_KHR_surface") // 1
1638 VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
1639
1640 //@extension("VK_KHR_swapchain") // 2
1641 VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
1642
1643 //@extension("VK_KHR_display") // 3
1644 VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000,
1645 VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001,
1646
1647 //@extension("VK_KHR_debug_report") // 12
1648 VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000,
1649
1650 //@extension("VK_KHR_descriptor_update_template") // 86
1651 VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
1652
1653 //@extension("VK_NVX_device_generated_commands") // 87
1654 VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000,
1655 VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001,
Jesse Hall77726222017-09-19 14:49:27 -05001656
Jesse Hall076f95d2017-09-20 11:34:47 -07001657 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1658 VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = 1000156000,
1659
Jesse Hall77726222017-09-19 14:49:27 -05001660 //@extension("VK_EXT_validation_cache") // 161
1661 VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000,
Jesse Hall05556b12017-05-18 17:40:25 -07001662}
1663
Daniel Koch09f7bf92017-10-05 00:26:58 -04001664
Ian Elliott28bd2c32017-10-13 09:21:12 -06001665//@vulkan1_1 enums
Daniel Koch09f7bf92017-10-05 00:26:58 -04001666
1667enum VkPointClippingBehavior {
1668 VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
1669 VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1,
1670}
1671
1672enum VkTessellationDomainOrigin {
1673 VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
1674 VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1,
1675}
1676
1677enum VkSamplerYcbcrModelConversion {
1678 VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
1679 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
1680 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
1681 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
1682 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4,
1683}
1684
1685enum VkSamplerYcbcrRange {
1686 VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
1687 VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1,
1688}
1689
1690enum VkChromaLocation {
1691 VK_CHROMA_LOCATION_COSITED_EVEN = 0,
1692 VK_CHROMA_LOCATION_MIDPOINT = 1,
1693}
1694
1695enum VkDescriptorUpdateTemplateType {
1696 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0,
1697 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1698}
1699
Jesse Hallad250842017-03-10 18:35:38 -08001700@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001701enum VkPresentModeKHR {
1702 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1703 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1704 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001705 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001706
Jesse Hall05556b12017-05-18 17:40:25 -07001707 //@extension("VK_KHR_shared_presentable_image") // 112
Jesse Hall77ad05b2017-03-10 22:02:20 -08001708 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1709 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001710}
1711
Jesse Hallad250842017-03-10 18:35:38 -08001712@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001713enum VkColorSpaceKHR {
Daniel Koch09f7bf92017-10-05 00:26:58 -04001714 VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001715
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001716 //@extension("VK_EXT_swapchain_colorspace") // 105
1717 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
1718 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
1719 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
1720 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
1721 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
1722 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
1723 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
1724 VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
1725 VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
1726 VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001727 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1728 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001729 VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
Jesse Hall77726222017-09-19 14:49:27 -05001730 VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
Michael Lentine88594d72015-11-12 12:49:45 -08001731}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001732
Jesse Hallad250842017-03-10 18:35:38 -08001733@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001734enum VkDebugReportObjectTypeEXT {
1735 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1736 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1737 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1738 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1739 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1740 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1741 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1742 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1743 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1744 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1745 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1746 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1747 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1748 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1749 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1750 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1751 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1752 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1753 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1754 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1755 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1756 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1757 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1758 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1759 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1760 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1761 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1762 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001763 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001764 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1765 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1766 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1767 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001768
Jesse Hall77726222017-09-19 14:49:27 -05001769 //extension("VK_EXT_validation_cache") // 161
1770 VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33,
1771
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001772 //extension("VK_KHR_descriptor_update_template") // 86
1773 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall77726222017-09-19 14:49:27 -05001774
Jesse Hall076f95d2017-09-20 11:34:47 -07001775 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1776 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001777}
1778
Jesse Hallad250842017-03-10 18:35:38 -08001779@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001780enum VkRasterizationOrderAMD {
1781 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1782 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1783}
1784
Jesse Hallad250842017-03-10 18:35:38 -08001785@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001786enum VkValidationCheckEXT {
1787 VK_VALIDATION_CHECK_ALL_EXT = 0,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001788 VK_VALIDATION_CHECK_SHADERS_EXT = 1,
Chris Forbes289cb792016-12-30 15:03:55 +13001789}
1790
Jesse Hallad250842017-03-10 18:35:38 -08001791@extension("VK_KHR_descriptor_update_template") // 86
1792enum VkDescriptorUpdateTemplateTypeKHR {
1793 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1794 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1795}
1796
1797@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001798enum VkIndirectCommandsTokenTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001799 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0,
1800 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1,
1801 VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2,
1802 VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3,
1803 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4,
1804 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5,
1805 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6,
1806 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001807}
1808
Jesse Hallad250842017-03-10 18:35:38 -08001809@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001810enum VkObjectEntryTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001811 VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0,
1812 VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1,
1813 VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2,
1814 VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3,
1815 VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001816}
Jesse Hall715b86a2016-01-16 16:34:29 -08001817
Jesse Hallad250842017-03-10 18:35:38 -08001818@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001819enum VkDisplayPowerStateEXT {
1820 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1821 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1822 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1823}
1824
Jesse Hallad250842017-03-10 18:35:38 -08001825@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001826enum VkDeviceEventTypeEXT {
1827 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1828}
1829
Jesse Hallad250842017-03-10 18:35:38 -08001830@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001831enum VkDisplayEventTypeEXT {
1832 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1833}
1834
Jesse Hallad250842017-03-10 18:35:38 -08001835@extension("VK_NV_viewport_swizzle") // 99
1836enum VkViewportCoordinateSwizzleNV {
1837 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1838 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1839 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1840 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1841 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1842 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1843 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1844 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1845}
1846
1847@extension("VK_EXT_discard_rectangles") // 100
1848enum VkDiscardRectangleModeEXT {
1849 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1850 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1851}
1852
Jesse Hall076f95d2017-09-20 11:34:47 -07001853@extension("VK_KHR_maintenance2") // 118
1854enum VkPointClippingBehaviorKHR {
1855 VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = 0,
1856 VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = 1,
1857}
1858
1859@extension("VK_KHR_maintenance2") // 118
1860enum VkTessellationDomainOriginKHR {
1861 VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = 0,
1862 VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = 1,
1863}
1864
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001865@extension("VK_EXT_sampler_filter_minmax") // 131
1866enum VkSamplerReductionModeEXT {
1867 VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
1868 VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
1869 VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
1870}
1871
1872@extension("VK_EXT_blend_operation_advanced") // 149
1873enum VkBlendOverlapEXT {
1874 VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
1875 VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
1876 VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
1877}
1878
1879@extension("VK_NV_framebuffer_mixed_samples") // 153
1880enum VkCoverageModulationModeNV {
1881 VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
1882 VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
1883 VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
1884 VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
1885}
1886
Jesse Hall076f95d2017-09-20 11:34:47 -07001887@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1888enum VkSamplerYcbcrModelConversionKHR {
1889 VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = 0,
1890 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = 1,
1891 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = 2,
1892 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = 3,
1893 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = 4,
1894}
1895
1896@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1897enum VkSamplerYcbcrRangeKHR {
1898 VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = 0,
1899 VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = 1,
1900}
1901
1902@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1903enum VkChromaLocationKHR {
1904 VK_CHROMA_LOCATION_COSITED_EVEN_KHR = 0,
1905 VK_CHROMA_LOCATION_MIDPOINT_KHR = 1,
1906}
1907
Jesse Hall77726222017-09-19 14:49:27 -05001908@extension("VK_EXT_validation_cache") // 161
1909enum VkValidationCacheHeaderVersionEXT {
1910 VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1,
1911}
1912
Jesse Halld27f6aa2015-08-15 17:58:48 -07001913/////////////////
1914// Bitfields //
1915/////////////////
1916
Jesse Halld27f6aa2015-08-15 17:58:48 -07001917/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001918type VkFlags VkQueueFlags
1919bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001920 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1921 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001922 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001923 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Daniel Koch09f7bf92017-10-05 00:26:58 -04001924
Ian Elliott28bd2c32017-10-13 09:21:12 -06001925 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001926 VK_QUEUE_PROTECTED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001927}
1928
1929/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001930type VkFlags VkMemoryPropertyFlags
1931bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001932 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1933 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1934 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1935 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1936 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Daniel Koch09f7bf92017-10-05 00:26:58 -04001937
Ian Elliott28bd2c32017-10-13 09:21:12 -06001938 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001939 VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001940}
1941
1942/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001943type VkFlags VkMemoryHeapFlags
1944bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001945 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001946
Ian Elliott28bd2c32017-10-13 09:21:12 -06001947 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04001948 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002,
1949
1950 //@extension("VK_KHR_device_group_creation") // 71
1951 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001952}
1953
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001954/// Access flags
1955type VkFlags VkAccessFlags
1956bitfield VkAccessFlagBits {
1957 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1958 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1959 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1960 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1961 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1962 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1963 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1964 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1965 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1966 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1967 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1968 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1969 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1970 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1971 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1972 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1973 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001974
Jesse Hallad250842017-03-10 18:35:38 -08001975 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001976 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001977 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001978
1979 //@extension("VK_EXT_blend_operation_advanced") // 149
1980 VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001981}
1982
1983/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001984type VkFlags VkBufferUsageFlags
1985bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001986 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1987 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001988 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1989 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1990 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1991 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1992 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1993 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1994 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1995}
1996
1997/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001998type VkFlags VkBufferCreateFlags
1999bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002000 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07002001 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
2002 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
Daniel Koch09f7bf92017-10-05 00:26:58 -04002003
Ian Elliott28bd2c32017-10-13 09:21:12 -06002004 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002005 VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002006}
2007
2008/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08002009type VkFlags VkShaderStageFlags
2010bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002011 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08002012 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
2013 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002014 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
2015 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
2016 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08002017 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002018
2019 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
2020}
2021
Jesse Hallfbf97b02015-11-20 14:17:03 -08002022/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08002023type VkFlags VkDescriptorPoolCreateFlags
2024bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08002025 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
2026}
2027
2028/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08002029type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08002030//bitfield VkDescriptorPoolResetFlagBits {
2031//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08002032
Jesse Halld27f6aa2015-08-15 17:58:48 -07002033/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08002034type VkFlags VkImageUsageFlags
2035bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08002036 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
2037 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07002038 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
2039 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
2040 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002041 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002042 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
2043 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
2044}
2045
2046/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002047type VkFlags VkImageCreateFlags
2048bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002049 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07002050 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
2051 VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Image should support constent data access to physical memory blocks mapped into multiple locations of sparse images
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002052 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
2053 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image
Jesse Hall77ad05b2017-03-10 22:02:20 -08002054
Ian Elliott28bd2c32017-10-13 09:21:12 -06002055 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002056 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020,
Ian Elliott28bd2c32017-10-13 09:21:12 -06002057 VK_IMAGE_CREATE_BIND_SFR_BIT = 0x00000040,
Daniel Koch09f7bf92017-10-05 00:26:58 -04002058 VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080,
2059 VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100,
Daniel Koch09f7bf92017-10-05 00:26:58 -04002060 VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200,
Ian Elliott28bd2c32017-10-13 09:21:12 -06002061 VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400,
2062 VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800,
Daniel Koch09f7bf92017-10-05 00:26:58 -04002063
Jesse Hallad250842017-03-10 18:35:38 -08002064 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002065 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08002066
Daniel Koch09f7bf92017-10-05 00:26:58 -04002067 //@extension("VK_KHR_device_group") // 61
2068 VK_IMAGE_CREATE_BIND_SFR_BIT_KHR = 0x00000040,
Jesse Hall77726222017-09-19 14:49:27 -05002069
Jesse Hall076f95d2017-09-20 11:34:47 -07002070 //@extension("VK_KHR_maintenance2") // 118
2071 VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 0x00000080,
2072 VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = 0x00000100,
2073
2074 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
2075 VK_IMAGE_CREATE_DISJOINT_BIT_KHR = 0x00000200,
2076
2077 //@extension("VK_KHR_bind_memory2") // 158
2078 VK_IMAGE_CREATE_ALIAS_BIT_KHR = 0x00000400,
Ian Elliott28bd2c32017-10-13 09:21:12 -06002079
2080 //@extension("VK_EXT_sample_locations") // 144
2081 VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002082}
2083
Jesse Hallb00daad2015-11-29 19:46:20 -08002084/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002085type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08002086//bitfield VkImageViewCreateFlagBits {
2087//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002088
2089/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002090type VkFlags VkPipelineCreateFlags
2091bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002092 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
2093 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
2094 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08002095
Ian Elliott28bd2c32017-10-13 09:21:12 -06002096 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002097 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008,
2098 VK_PIPELINE_CREATE_DISPATCH_BASE = 0x00000010,
2099
2100 //@extension("VK_KHR_device_group") // 61
2101 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008,
2102 VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002103}
2104
Jesse Hall65ab5522015-11-30 00:07:16 -08002105/// Color component flags
2106type VkFlags VkColorComponentFlags
2107bitfield VkColorComponentFlagBits {
2108 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
2109 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
2110 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
2111 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002112}
2113
2114/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002115type VkFlags VkFenceCreateFlags
2116bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002117 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
2118}
2119
2120/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002121type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08002122//bitfield VkSemaphoreCreateFlagBits {
2123//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002124
2125/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08002126type VkFlags VkFormatFeatureFlags
2127bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002128 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
2129 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
2130 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
2131 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
2132 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
2133 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
2134 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
2135 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
2136 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
2137 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08002138 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
2139 VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, /// Format can be used as the destination image of blits with vkCommandBlitImage
Jesse Hall33faaad2016-01-24 21:00:49 -08002140 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07002141
Ian Elliott28bd2c32017-10-13 09:21:12 -06002142 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002143 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000,
2144 VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000,
2145 VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000,
2146 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000,
2147 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000,
2148 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000,
2149 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000,
2150 VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000,
2151 VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000,
2152
Jesse Hallad250842017-03-10 18:35:38 -08002153 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07002154 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08002155
Jesse Hallad250842017-03-10 18:35:38 -08002156 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002157 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
2158 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07002159
2160 //@extension("VK_EXT_sampler_filter_minmax") // 131
2161 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
Jesse Hall076f95d2017-09-20 11:34:47 -07002162
2163 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
2164 VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000,
2165 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000,
2166 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000,
2167 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000,
2168 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000,
2169 VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = 0x00400000,
2170 VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002171}
2172
2173/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08002174type VkFlags VkQueryControlFlags
2175bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08002176 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002177}
2178
2179/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08002180type VkFlags VkQueryResultFlags
2181bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002182 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
2183 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
2184 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
2185 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
2186}
2187
2188/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002189type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08002190//bitfield VkShaderModuleCreateFlagBits {
2191//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002192
Jesse Halld27f6aa2015-08-15 17:58:48 -07002193/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002194type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08002195//bitfield VkEventCreateFlagBits {
2196//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002197
Jesse Halla15a4bf2015-11-19 22:48:02 -08002198/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002199type VkFlags VkCommandBufferUsageFlags
2200bitfield VkCommandBufferUsageFlagBits {
2201 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
2202 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
2203 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002204}
2205
2206/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08002207type VkFlags VkQueryPipelineStatisticFlags
2208bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08002209 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
2210 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
2211 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
2212 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
2213 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
2214 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
2215 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
2216 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
2217 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
2218 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
2219 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07002220}
2221
2222/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08002223type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08002224//bitfield VkMemoryMapFlagBits {
2225//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002226
2227/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08002228type VkFlags VkImageAspectFlags
2229bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002230 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
2231 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
2232 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
2233 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
Jesse Hall076f95d2017-09-20 11:34:47 -07002234
Ian Elliott28bd2c32017-10-13 09:21:12 -06002235 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002236 VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010,
2237 VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020,
2238 VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040,
2239
Jesse Hall076f95d2017-09-20 11:34:47 -07002240 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
2241 VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = 0x00000010,
2242 VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = 0x00000020,
2243 VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002244}
2245
2246/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08002247type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002248bitfield VkSparseMemoryBindFlagBits {
2249 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
2250}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002251
2252/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08002253type VkFlags VkSparseImageFormatFlags
2254bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08002255 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
2256 VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002, /// Image requires mip levels to be an exact multiple of the sparse iamge block size for non-mip-tail levels.
2257 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07002258}
2259
2260/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08002261type VkFlags VkPipelineStageFlags
2262bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002263 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
2264 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
2265 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
2266 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08002267 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
2268 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07002269 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
2270 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
2271 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
2272 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
2273 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
2274 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
2275 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08002276 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
2277 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07002278
Jesse Hall543a7ff2016-01-08 16:38:30 -08002279 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
2280 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13002281
Jesse Hallad250842017-03-10 18:35:38 -08002282 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002283 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002284}
2285
2286/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08002287type VkFlags VkAttachmentDescriptionFlags
2288bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002289 VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, /// The attachment may alias physical memory of another attachment in the same renderpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002290}
2291
2292/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08002293type VkFlags VkSubpassDescriptionFlags
2294bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08002295 //@extension("VK_NVX_multiview_per_view_attributes") // 98
2296 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
2297 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002298}
2299
2300/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002301type VkFlags VkCommandPoolCreateFlags
2302bitfield VkCommandPoolCreateFlagBits {
2303 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
2304 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Daniel Koch09f7bf92017-10-05 00:26:58 -04002305
Ian Elliott28bd2c32017-10-13 09:21:12 -06002306 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002307 VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002308}
2309
2310/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002311type VkFlags VkCommandPoolResetFlags
2312bitfield VkCommandPoolResetFlagBits {
2313 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07002314}
2315
Jesse Hall3fbc8562015-11-29 22:10:52 -08002316type VkFlags VkCommandBufferResetFlags
2317bitfield VkCommandBufferResetFlagBits {
2318 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002319}
2320
Jesse Halld8bade02015-11-24 10:24:18 -08002321type VkFlags VkSampleCountFlags
2322bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002323 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
2324 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
2325 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
2326 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
2327 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
2328 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
2329 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
2330}
2331
Jesse Halld8bade02015-11-24 10:24:18 -08002332type VkFlags VkStencilFaceFlags
2333bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002334 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
2335 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08002336 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002337}
2338
Jesse Halla6429252015-11-29 18:59:42 -08002339/// Instance creation flags
2340type VkFlags VkInstanceCreateFlags
2341//bitfield VkInstanceCreateFlagBits {
2342//}
2343
2344/// Device creation flags
2345type VkFlags VkDeviceCreateFlags
2346//bitfield VkDeviceCreateFlagBits {
2347//}
2348
2349/// Device queue creation flags
2350type VkFlags VkDeviceQueueCreateFlags
Ian Elliott28bd2c32017-10-13 09:21:12 -06002351@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002352bitfield VkDeviceQueueCreateFlagBits {
2353 VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001,
2354}
Jesse Halla6429252015-11-29 18:59:42 -08002355
2356/// Query pool creation flags
2357type VkFlags VkQueryPoolCreateFlags
2358//bitfield VkQueryPoolCreateFlagBits {
2359//}
2360
2361/// Buffer view creation flags
2362type VkFlags VkBufferViewCreateFlags
2363//bitfield VkBufferViewCreateFlagBits {
2364//}
2365
2366/// Pipeline cache creation flags
2367type VkFlags VkPipelineCacheCreateFlags
2368//bitfield VkPipelineCacheCreateFlagBits {
2369//}
2370
2371/// Pipeline shader stage creation flags
2372type VkFlags VkPipelineShaderStageCreateFlags
2373//bitfield VkPipelineShaderStageCreateFlagBits {
2374//}
2375
2376/// Descriptor set layout creation flags
2377type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08002378bitfield VkDescriptorSetLayoutCreateFlagBits {
2379 //@extension("VK_KHR_push_descriptor") // 81
2380 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
2381}
Jesse Halla6429252015-11-29 18:59:42 -08002382
2383/// Pipeline vertex input state creation flags
2384type VkFlags VkPipelineVertexInputStateCreateFlags
2385//bitfield VkPipelineVertexInputStateCreateFlagBits {
2386//}
2387
2388/// Pipeline input assembly state creation flags
2389type VkFlags VkPipelineInputAssemblyStateCreateFlags
2390//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
2391//}
2392
2393/// Tessellation state creation flags
2394type VkFlags VkPipelineTessellationStateCreateFlags
2395//bitfield VkPipelineTessellationStateCreateFlagBits {
2396//}
2397
2398/// Viewport state creation flags
2399type VkFlags VkPipelineViewportStateCreateFlags
2400//bitfield VkPipelineViewportStateCreateFlagBits {
2401//}
2402
Jesse Hall3fbc8562015-11-29 22:10:52 -08002403/// Rasterization state creation flags
2404type VkFlags VkPipelineRasterizationStateCreateFlags
2405//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08002406//}
2407
2408/// Multisample state creation flags
2409type VkFlags VkPipelineMultisampleStateCreateFlags
2410//bitfield VkPipelineMultisampleStateCreateFlagBits {
2411//}
2412
2413/// Color blend state creation flags
2414type VkFlags VkPipelineColorBlendStateCreateFlags
2415//bitfield VkPipelineColorBlendStateCreateFlagBits {
2416//}
2417
2418/// Depth/stencil state creation flags
2419type VkFlags VkPipelineDepthStencilStateCreateFlags
2420//bitfield VkPipelineDepthStencilStateCreateFlagBits {
2421//}
2422
2423/// Dynamic state creation flags
2424type VkFlags VkPipelineDynamicStateCreateFlags
2425//bitfield VkPipelineDynamicStateCreateFlagBits {
2426//}
2427
2428/// Pipeline layout creation flags
2429type VkFlags VkPipelineLayoutCreateFlags
2430//bitfield VkPipelineLayoutCreateFlagBits {
2431//}
2432
2433/// Sampler creation flags
2434type VkFlags VkSamplerCreateFlags
2435//bitfield VkSamplerCreateFlagBits {
2436//}
2437
2438/// Render pass creation flags
2439type VkFlags VkRenderPassCreateFlags
2440//bitfield VkRenderPassCreateFlagBits {
2441//}
2442
2443/// Framebuffer creation flags
2444type VkFlags VkFramebufferCreateFlags
2445//bitfield VkFramebufferCreateFlagBits {
2446//}
2447
Jesse Halldc6d36c2015-11-29 19:12:15 -08002448/// Dependency flags
2449type VkFlags VkDependencyFlags
2450bitfield VkDependencyFlagBits {
2451 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002452
Ian Elliott28bd2c32017-10-13 09:21:12 -06002453 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002454 VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004,
2455 VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002,
Jesse Hallad250842017-03-10 18:35:38 -08002456
Daniel Koch09f7bf92017-10-05 00:26:58 -04002457 //@extension("VK_KHR_multiview") // 54
2458 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = 0x00000002,
2459
2460 //@extension("VK_KHR_device_group") // 61
2461 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08002462}
2463
Jesse Hallc7467b72015-11-29 21:05:26 -08002464/// Cull mode flags
2465type VkFlags VkCullModeFlags
2466bitfield VkCullModeFlagBits {
2467 VK_CULL_MODE_NONE = 0x00000000,
2468 VK_CULL_MODE_FRONT_BIT = 0x00000001,
2469 VK_CULL_MODE_BACK_BIT = 0x00000002,
2470 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
2471}
2472
Ian Elliott28bd2c32017-10-13 09:21:12 -06002473//@vulkan1_1 flags
Daniel Koch09f7bf92017-10-05 00:26:58 -04002474
2475/// Subgroup feature flags
2476type VkFlags VkSubgroupFeatureFlags
2477bitfield VkSubgroupFeatureFlagBits {
2478 VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001,
2479 VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002,
2480 VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004,
2481 VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008,
2482 VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010,
2483 VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020,
2484 VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040,
2485 VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080,
2486}
2487
2488/// Peer memory feature flags
2489type VkFlags VkPeerMemoryFeatureFlags
2490bitfield VkPeerMemoryFeatureFlagBits {
2491 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001,
2492 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002,
2493 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004,
2494 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008,
2495}
2496
2497/// Memory allocation flags
2498type VkFlags VkMemoryAllocateFlags
2499bitfield VkMemoryAllocateFlagBits {
2500 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
2501}
2502
2503type VkFlags VkCommandPoolTrimFlags
2504//bitfield VkCommandPoolTrimFlagBits {
2505//}
2506
2507type VkFlags VkDescriptorUpdateTemplateCreateFlags
2508//bitfield VkDescriptorUpdateTemplateCreateFlagBits {
2509//}
2510
2511/// External memory handle type flags
2512type VkFlags VkExternalMemoryHandleTypeFlags
2513bitfield VkExternalMemoryHandleTypeFlagBits {
2514 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
2515 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
2516 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
2517 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008,
2518 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010,
2519 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020,
2520 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040,
2521}
2522
2523/// External memory feature flags
2524type VkFlags VkExternalMemoryFeatureFlags
2525bitfield VkExternalMemoryFeatureFlagBits {
2526 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001,
2527 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002,
2528 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004,
2529}
2530
2531/// External fence handle type flags
2532type VkFlags VkExternalFenceHandleTypeFlags
2533bitfield VkExternalFenceHandleTypeFlagBits {
2534 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
2535 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
2536 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
2537 VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008,
2538}
2539
2540/// External fence feature flags
2541type VkFlags VkExternalFenceFeatureFlags
2542bitfield VkExternalFenceFeatureFlagBits {
2543 VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001,
2544 VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002,
2545}
2546
2547/// Fence import flags
2548type VkFlags VkFenceImportFlags
2549bitfield VkFenceImportFlagBits {
2550 VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001,
2551}
2552
2553/// Semaphore import flags
2554type VkFlags VkSemaphoreImportFlags
2555bitfield VkSemaphoreImportFlagBits {
2556 VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001,
2557}
2558
2559/// External semaphore handle type flags
2560type VkFlags VkExternalSemaphoreHandleTypeFlags
2561bitfield VkExternalSemaphoreHandleTypeFlagBits {
2562 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
2563 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
2564 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
2565 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008,
2566 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010,
2567}
2568
2569/// External semaphore feature flags
2570type VkFlags VkExternalSemaphoreFeatureFlags
2571bitfield VkExternalSemaphoreFeatureFlagBits {
2572 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001,
2573 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002,
2574}
2575
Jesse Hallad250842017-03-10 18:35:38 -08002576@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002577type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002578@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002579bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002580 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002581 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
2582 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
2583 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
2584 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
2585 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
2586 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
2587 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
2588 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08002589}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002590
Jesse Hallad250842017-03-10 18:35:38 -08002591@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002592type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002593@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002594bitfield VkCompositeAlphaFlagBitsKHR {
2595 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2596 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
2597 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
2598 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
2599}
2600
Jesse Hallad250842017-03-10 18:35:38 -08002601@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002602type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002603@extension("VK_KHR_swapchain") // 2
2604bitfield VkSwapchainCreateFlagBitsKHR {
Ian Elliott28bd2c32017-10-13 09:21:12 -06002605 //@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002606 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHR = 0x00000001,
2607 VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002,
2608}
2609
Ian Elliott28bd2c32017-10-13 09:21:12 -06002610@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002611@extension("VK_KHR_swapchain") // 2
2612type VkFlags VkDeviceGroupPresentModeFlagsKHR
Ian Elliott28bd2c32017-10-13 09:21:12 -06002613@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04002614@extension("VK_KHR_swapchain") // 2
2615bitfield VkDeviceGroupPresentModeFlagBitsKHR {
2616 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001,
2617 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002,
2618 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004,
2619 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08002620}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002621
Jesse Hallad250842017-03-10 18:35:38 -08002622@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002623type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002624@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002625bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002626 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2627 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
2628 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
2629 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08002630}
2631
Jesse Hallad250842017-03-10 18:35:38 -08002632@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002633type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002634//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002635//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
2636//}
2637
Jesse Hallad250842017-03-10 18:35:38 -08002638@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002639type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002640//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002641//bitfield VkDisplayModeCreateFlagBitsKHR {
2642//}
2643
Jesse Hallad250842017-03-10 18:35:38 -08002644@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002645type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002646//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002647//bitfield VkXlibSurfaceCreateFlagBitsKHR {
2648//}
2649
Jesse Hallad250842017-03-10 18:35:38 -08002650@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002651type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002652//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002653//bitfield VkXcbSurfaceCreateFlagBitsKHR {
2654//}
2655
Jesse Hallad250842017-03-10 18:35:38 -08002656@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002657type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002658//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002659//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
2660//}
2661
Jesse Hallad250842017-03-10 18:35:38 -08002662@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002663type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002664//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002665//bitfield VkMirSurfaceCreateFlagBitsKHR {
2666//}
2667
Jesse Hallad250842017-03-10 18:35:38 -08002668@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002669type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002670//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002671//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
2672//}
2673
Jesse Hallad250842017-03-10 18:35:38 -08002674@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002675type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002676//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002677//bitfield VkWin32SurfaceCreateFlagBitsKHR {
2678//}
2679
Jesse Hallad250842017-03-10 18:35:38 -08002680@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002681type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08002682@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002683bitfield VkSwapchainImageUsageFlagBitsANDROID {
2684 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
2685}
2686
Jesse Hallad250842017-03-10 18:35:38 -08002687@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002688type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002689@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002690bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08002691 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
2692 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
2693 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08002694 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
2695 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
2696}
2697
Jesse Hallad250842017-03-10 18:35:38 -08002698@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002699type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002700@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002701bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002702 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
2703 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
2704 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
2705 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002706}
2707
Jesse Hallad250842017-03-10 18:35:38 -08002708@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002709type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002710@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002711bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002712 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
2713 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
2714 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13002715}
2716
Daniel Koch09f7bf92017-10-05 00:26:58 -04002717@extension("VK_KHR_device_group") // 61
2718type VkFlags VkPeerMemoryFeatureFlagsKHR
2719@extension("VK_KHR_device_group") // 61
2720bitfield VkPeerMemoryFeatureFlagBitsKHR {
2721 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = 0x00000001,
2722 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = 0x00000002,
2723 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = 0x00000004,
2724 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08002725}
2726
Daniel Koch09f7bf92017-10-05 00:26:58 -04002727@extension("VK_KHR_device_group") // 61
2728type VkFlags VkMemoryAllocateFlagsKHR
2729@extension("VK_KHR_device_group") // 61
2730bitfield VkMemoryAllocateFlagBitsKHR {
2731 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002732}
2733
2734@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002735type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08002736//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002737//bitfield VkViSurfaceCreateFlagBitsNN {
2738//}
2739
Jesse Hallad250842017-03-10 18:35:38 -08002740@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002741type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002742//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002743//bitfield VkCommandPoolTrimFlagBitsKHR {
2744//}
2745
Jesse Hall9492f992017-08-28 12:10:06 -07002746@extension("VK_KHR_external_memory_capabilities") // 72
2747type VkFlags VkExternalMemoryHandleTypeFlagsKHR
2748@extension("VK_KHR_external_memory_capabilities") // 72
2749bitfield VkExternalMemoryHandleTypeFlagBitsKHR {
2750 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2751 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2752 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2753 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = 0x00000008,
2754 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010,
2755 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020,
2756 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040,
Jesse Hallad250842017-03-10 18:35:38 -08002757}
2758
Jesse Hall9492f992017-08-28 12:10:06 -07002759@extension("VK_KHR_external_memory_capabilities") // 72
2760type VkFlags VkExternalMemoryFeatureFlagsKHR
2761@extension("VK_KHR_external_memory_capabilities") // 72
2762bitfield VkExternalMemoryFeatureFlagBitsKHR {
2763 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = 0x00000001,
2764 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = 0x00000002,
2765 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08002766}
2767
Jesse Hall9492f992017-08-28 12:10:06 -07002768@extension("VK_KHR_external_semaphore_capabilities") // 77
2769type VkFlags VkExternalSemaphoreHandleTypeFlagsKHR
2770@extension("VK_KHR_external_semaphore_capabilities") // 77
2771bitfield VkExternalSemaphoreHandleTypeFlagBitsKHR {
2772 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001
2773 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002
2774 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004
2775 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = 0x00000008
2776 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHR = 0x00000010
Jesse Hallad250842017-03-10 18:35:38 -08002777}
2778
Jesse Hall9492f992017-08-28 12:10:06 -07002779@extension("VK_KHR_external_semaphore_capabilities") // 77
2780type VkFlags VkExternalSemaphoreFeatureFlagsKHR
2781@extension("VK_KHR_external_semaphore_capabilities") // 77
2782bitfield VkExternalSemaphoreFeatureFlagBitsKHR {
2783 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2784 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2785}
2786
2787@extension("VK_KHR_external_semaphore") // 78
2788type VkFlags VkSemaphoreImportFlagsKHR
2789@extension("VK_KHR_external_semaphore") // 78
2790bitfield VkSemaphoreImportFlagBitsKHR {
2791 VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002792}
2793
2794@extension("VK_KHR_descriptor_update_template") // 86
2795type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2796//@extension("VK_KHR_descriptor_update_template") // 86
2797//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2798//}
2799
2800@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002801type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002802@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002803bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002804 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2805 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2806 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2807 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002808}
2809
Jesse Hallad250842017-03-10 18:35:38 -08002810@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002811type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002812@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002813bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002814 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2815 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002816}
2817
Jesse Hallad250842017-03-10 18:35:38 -08002818@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002819type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002820@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002821bitfield VkSurfaceCounterFlagBitsEXT {
2822 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2823}
2824
Jesse Hallad250842017-03-10 18:35:38 -08002825@extension("VK_NV_viewport_swizzle") // 99
2826type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2827//@extension("VK_NV_viewport_swizzle") // 99
2828//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2829//}
2830
2831@extension("VK_EXT_discard_rectangles") // 100
2832type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2833//@extension("VK_EXT_discard_rectangles") // 100
2834//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2835//}
2836
Jesse Hall9492f992017-08-28 12:10:06 -07002837@extension("VK_KHR_external_fence_capabilities") // 113
2838type VkFlags VkExternalFenceHandleTypeFlagsKHR
2839@extension("VK_KHR_external_fence_capabilities") // 113
2840bitfield VkExternalFenceHandleTypeFlagBitsKHR {
2841 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2842 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2843 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2844 VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000008,
2845}
2846
2847@extension("VK_KHR_external_fence_capabilities") // 113
2848type VkFlags VkExternalFenceFeatureFlagsKHR
2849@extension("VK_KHR_external_fence_capabilities") // 113
2850bitfield VkExternalFenceFeatureFlagBitsKHR {
2851 VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2852 VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2853}
2854
2855@extension("VK_KHR_external_fence") // 114
2856type VkFlags VkFenceImportFlagsKHR
2857@extension("VK_KHR_external_fence") // 114
2858bitfield VkFenceImportFlagBitsKHR {
2859 VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
2860}
2861
Jesse Hallad250842017-03-10 18:35:38 -08002862@extension("VK_MVK_ios_surface") // 123
2863type VkFlags VkIOSSurfaceCreateFlagsMVK
2864//@extension("VK_MVK_ios_surface") // 123
2865//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2866//}
2867
2868@extension("VK_MVK_macos_surface") // 124
2869type VkFlags VkMacOSSurfaceCreateFlagsMVK
2870//@extension("VK_MVK_macos_surface") // 124
2871//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2872//}
2873
Jesse Hall7ba0ac72017-07-07 17:13:23 -07002874@extension("VK_NV_fragment_coverage_to_color") // 150
2875type VkFlags VkPipelineCoverageToColorStateCreateFlagsNV
2876@extension("VK_NV_fragment_coverage_to_color") // 150
2877//bitfield VkPipelineCoverageToColorStateCreateFlagBitsNV {
2878//}
2879
2880@extension("VK_NV_framebuffer_mixed_samples") // 153
2881type VkFlags VkPipelineCoverageModulationStateCreateFlagsNV
2882@extension("VK_NV_framebuffer_mixed_samples") // 153
2883//bitfield VkPipelineCoverageModulationStateCreateFlagBitsNV {
2884//}
2885
Jesse Hall77726222017-09-19 14:49:27 -05002886@extension("VK_EXT_validation_cache") // 161
2887type VkFlags VkValidationCacheCreateFlagsEXT
2888@extension("VK_EXT_validation_cache") // 161
2889//bitfield VkValidationCacheCreateFlagBitsEXT {
2890//}
2891
Jesse Halld27f6aa2015-08-15 17:58:48 -07002892//////////////////
2893// Structures //
2894//////////////////
2895
2896class VkOffset2D {
2897 s32 x
2898 s32 y
2899}
2900
2901class VkOffset3D {
2902 s32 x
2903 s32 y
2904 s32 z
2905}
2906
2907class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002908 u32 width
2909 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002910}
2911
2912class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002913 u32 width
2914 u32 height
2915 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002916}
2917
2918class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002919 f32 x
2920 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002921 f32 width
2922 f32 height
2923 f32 minDepth
2924 f32 maxDepth
2925}
2926
2927class VkRect2D {
2928 VkOffset2D offset
2929 VkExtent2D extent
2930}
2931
Jesse Halla15a4bf2015-11-19 22:48:02 -08002932class VkClearRect {
2933 VkRect2D rect
2934 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002935 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002936}
2937
Jesse Hall65ab5522015-11-30 00:07:16 -08002938class VkComponentMapping {
2939 VkComponentSwizzle r
2940 VkComponentSwizzle g
2941 VkComponentSwizzle b
2942 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002943}
2944
2945class VkPhysicalDeviceProperties {
2946 u32 apiVersion
2947 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002948 u32 vendorID
2949 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002950 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002951 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2952 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002953 VkPhysicalDeviceLimits limits
2954 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002955}
2956
2957class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002958 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002959 u32 specVersion /// version of the extension specification implemented
2960}
2961
2962class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002963 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002964 u32 specVersion /// version of the layer specification implemented
2965 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002966 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002967}
2968
Jesse Halla366a512015-11-19 22:30:07 -08002969class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002970 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2971 const void* pNext /// Next structure in chain
2972 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002973 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002974 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002975 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002976 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002977 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002978 const VkSemaphore* pSignalSemaphores
2979}
2980
Jesse Halld27f6aa2015-08-15 17:58:48 -07002981class VkApplicationInfo {
2982 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2983 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002984 const char* pApplicationName
2985 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002986 const char* pEngineName
2987 u32 engineVersion
2988 u32 apiVersion
2989}
2990
Jesse Hall3fbc8562015-11-29 22:10:52 -08002991class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002992 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002993 PFN_vkAllocationFunction pfnAllocation
2994 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002995 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002996 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002997 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002998}
2999
3000class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003001 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
3002 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003003 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003004 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08003005 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08003006 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07003007}
3008
3009class VkDeviceCreateInfo {
3010 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
3011 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003012 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08003013 u32 queueCreateInfoCount
3014 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08003015 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003016 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08003017 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003018 const char* const* ppEnabledExtensionNames
3019 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07003020}
3021
3022class VkInstanceCreateInfo {
3023 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
3024 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003025 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08003026 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08003027 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003028 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08003029 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003030 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
3031}
3032
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003033class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003034 VkQueueFlags queueFlags /// Queue flags
3035 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08003036 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08003037 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07003038}
3039
3040class VkPhysicalDeviceMemoryProperties {
3041 u32 memoryTypeCount
3042 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
3043 u32 memoryHeapCount
3044 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
3045}
3046
Jesse Hall3fbc8562015-11-29 22:10:52 -08003047class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003048 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003049 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003050 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07003051 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
3052}
3053
3054class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003055 VkDeviceSize size /// Specified in bytes
3056 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003057 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
3058}
3059
3060class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003061 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003062 VkExtent3D imageGranularity
3063 VkSparseImageFormatFlags flags
3064}
3065
3066class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08003067 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003068 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003069 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
3070 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
3071 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07003072}
3073
3074class VkMemoryType {
3075 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
3076 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
3077}
3078
3079class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003080 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07003081 VkMemoryHeapFlags flags /// Flags for the heap
3082}
3083
3084class VkMappedMemoryRange {
3085 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
3086 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003087 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003088 VkDeviceSize offset /// Offset within the mapped memory the range starts from
3089 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07003090}
3091
3092class VkFormatProperties {
3093 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
3094 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003095 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07003096}
3097
3098class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003099 VkExtent3D maxExtent /// max image dimensions for this resource type
3100 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08003101 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003102 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
3103 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
3104}
3105
Jesse Halla15a4bf2015-11-19 22:48:02 -08003106class VkDescriptorImageInfo {
3107 VkSampler sampler
3108 VkImageView imageView
3109 VkImageLayout imageLayout
3110}
3111
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003112class VkDescriptorBufferInfo {
3113 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
3114 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
3115 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07003116}
3117
Jesse Halld27f6aa2015-08-15 17:58:48 -07003118class VkWriteDescriptorSet {
3119 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
3120 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003121 VkDescriptorSet dstSet /// Destination descriptor set
3122 u32 dstBinding /// Binding within the destination descriptor set to write
3123 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08003124 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003125 VkDescriptorType descriptorType /// Descriptor type to write (determines which fields of the array pointed by <pDescriptors> are going to be used)
Jesse Hallfbf97b02015-11-20 14:17:03 -08003126 const VkDescriptorImageInfo* pImageInfo
3127 const VkDescriptorBufferInfo* pBufferInfo
3128 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07003129}
3130
3131class VkCopyDescriptorSet {
3132 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
3133 const void* pNext /// Pointer to next structure
3134 VkDescriptorSet srcSet /// Source descriptor set
3135 u32 srcBinding /// Binding within the source descriptor set to copy from
3136 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08003137 VkDescriptorSet dstSet /// Destination descriptor set
3138 u32 dstBinding /// Binding within the destination descriptor set to copy to
3139 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08003140 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07003141}
3142
3143class VkBufferCreateInfo {
3144 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
3145 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08003146 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003147 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003148 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003149 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003150 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003151 const u32* pQueueFamilyIndices
3152}
3153
3154class VkBufferViewCreateInfo {
3155 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
3156 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08003157 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003158 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07003159 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003160 VkDeviceSize offset /// Specified in bytes
3161 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003162}
3163
3164class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003165 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003166 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003167 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07003168}
3169
3170class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003171 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003172 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08003173 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003174 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08003175 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003176}
3177
3178class VkMemoryBarrier {
3179 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
3180 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003181 VkAccessFlags srcAccessMask
3182 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003183}
3184
3185class VkBufferMemoryBarrier {
3186 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
3187 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003188 VkAccessFlags srcAccessMask
3189 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003190 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08003191 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07003192 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003193 VkDeviceSize offset /// Offset within the buffer to sync
3194 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07003195}
3196
3197class VkImageMemoryBarrier {
3198 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
3199 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003200 VkAccessFlags srcAccessMask
3201 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003202 VkImageLayout oldLayout /// Current layout of the image
3203 VkImageLayout newLayout /// New layout to transition the image to
3204 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08003205 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07003206 VkImage image /// Image to sync
3207 VkImageSubresourceRange subresourceRange /// Subresource range to sync
3208}
3209
3210class VkImageCreateInfo {
3211 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
3212 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08003213 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003214 VkImageType imageType
3215 VkFormat format
3216 VkExtent3D extent
3217 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08003218 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08003219 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07003220 VkImageTiling tiling
3221 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003222 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003223 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07003224 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003225 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003226}
3227
3228class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003229 VkDeviceSize offset /// Specified in bytes
3230 VkDeviceSize size /// Specified in bytes
3231 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08003232 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003233 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003234}
3235
3236class VkImageViewCreateInfo {
3237 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
3238 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003239 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003240 VkImage image
3241 VkImageViewType viewType
3242 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08003243 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07003244 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07003245}
3246
3247class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003248 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08003249 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08003250 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003251}
3252
Jesse Halla6429252015-11-29 18:59:42 -08003253class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08003254 VkDeviceSize resourceOffset /// Specified in bytes
3255 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08003256 VkDeviceMemory memory
3257 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003258 VkSparseMemoryBindFlags flags
3259}
3260
Jesse Halla6429252015-11-29 18:59:42 -08003261class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003262 VkImageSubresource subresource
3263 VkOffset3D offset
3264 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08003265 VkDeviceMemory memory
3266 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003267 VkSparseMemoryBindFlags flags
3268}
3269
Jesse Halla6429252015-11-29 18:59:42 -08003270class VkSparseBufferMemoryBindInfo {
3271 VkBuffer buffer
3272 u32 bindCount
3273 const VkSparseMemoryBind* pBinds
3274}
3275
3276class VkSparseImageOpaqueMemoryBindInfo {
3277 VkImage image
3278 u32 bindCount
3279 const VkSparseMemoryBind* pBinds
3280}
3281
3282class VkSparseImageMemoryBindInfo {
3283 VkImage image
3284 u32 bindCount
3285 const VkSparseMemoryBind* pBinds
3286}
3287
3288class VkBindSparseInfo {
3289 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
3290 const void* pNext
3291 u32 waitSemaphoreCount
3292 const VkSemaphore* pWaitSemaphores
3293 u32 numBufferBinds
3294 const VkSparseBufferMemoryBindInfo* pBufferBinds
3295 u32 numImageOpaqueBinds
3296 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
3297 u32 numImageBinds
3298 const VkSparseImageMemoryBindInfo* pImageBinds
3299 u32 signalSemaphoreCount
3300 const VkSemaphore* pSignalSemaphores
3301}
3302
Jesse Hall65ab5522015-11-30 00:07:16 -08003303class VkImageSubresourceLayers {
3304 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003305 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08003306 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08003307 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003308}
3309
Jesse Halld27f6aa2015-08-15 17:58:48 -07003310class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08003311 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07003312 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08003313 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08003314 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07003315 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
3316}
3317
3318class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08003319 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08003320 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08003321 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08003322 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07003323}
3324
3325class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003326 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003327 u32 bufferRowLength /// Specified in texels
3328 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08003329 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07003330 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
3331 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
3332}
3333
3334class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08003335 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07003336 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08003337 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08003338 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003339 VkExtent3D extent
3340}
3341
3342class VkShaderModuleCreateInfo {
3343 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
3344 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003345 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07003346 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08003347 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003348}
3349
Jesse Halld27f6aa2015-08-15 17:58:48 -07003350class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08003351 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07003352 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08003353 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07003354 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
3355 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
3356}
3357
3358class VkDescriptorSetLayoutCreateInfo {
3359 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
3360 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003361 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08003362 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08003363 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07003364}
3365
Jesse Hall65ab5522015-11-30 00:07:16 -08003366class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003367 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08003368 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003369}
3370
3371class VkDescriptorPoolCreateInfo {
3372 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
3373 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08003374 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003375 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08003376 u32 poolSizeCount
3377 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003378}
3379
Jesse Hall3fbc8562015-11-29 22:10:52 -08003380class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003381 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08003382 const void* pNext /// Pointer to next structure
3383 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08003384 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08003385 const VkDescriptorSetLayout* pSetLayouts
3386}
3387
Jesse Halld27f6aa2015-08-15 17:58:48 -07003388class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08003389 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07003390 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08003391 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07003392}
3393
3394class VkSpecializationInfo {
3395 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08003396 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003397 platform.size_t dataSize /// Size in bytes of pData
3398 const void* pData /// Pointer to SpecConstant data
3399}
3400
3401class VkPipelineShaderStageCreateInfo {
3402 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
3403 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003404 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003405 VkShaderStageFlagBits stage
3406 VkShaderModule module
3407 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07003408 const VkSpecializationInfo* pSpecializationInfo
3409}
3410
3411class VkComputePipelineCreateInfo {
3412 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
3413 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07003414 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08003415 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07003416 VkPipelineLayout layout /// Interface layout of the pipeline
3417 VkPipeline basePipelineHandle /// If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of
3418 s32 basePipelineIndex /// If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of
3419}
3420
3421class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08003422 u32 binding /// Vertex buffer binding id
3423 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08003424 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07003425}
3426
3427class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08003428 u32 location /// location of the shader vertex attrib
3429 u32 binding /// Vertex buffer binding id
3430 VkFormat format /// format of source data
3431 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07003432}
3433
3434class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08003435 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
3436 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003437 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08003438 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07003439 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08003440 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003441 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
3442}
3443
3444class VkPipelineInputAssemblyStateCreateInfo {
3445 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
3446 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003447 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003448 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003449 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003450}
3451
3452class VkPipelineTessellationStateCreateInfo {
3453 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
3454 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003455 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003456 u32 patchControlPoints
3457}
3458
3459class VkPipelineViewportStateCreateInfo {
3460 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
3461 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003462 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003463 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003464 const VkViewport* pViewports
3465 u32 scissorCount
3466 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07003467}
3468
Jesse Hall3fbc8562015-11-29 22:10:52 -08003469class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08003470 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003471 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003472 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08003473 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003474 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08003475 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08003476 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07003477 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003478 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08003479 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003480 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08003481 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003482 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07003483}
3484
3485class VkPipelineMultisampleStateCreateInfo {
3486 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
3487 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003488 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08003489 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003490 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003491 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003492 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08003493 VkBool32 alphaToCoverageEnable
3494 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003495}
3496
3497class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003498 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08003499 VkBlendFactor srcColorBlendFactor
3500 VkBlendFactor dstColorBlendFactor
3501 VkBlendOp colorBlendOp
3502 VkBlendFactor srcAlphaBlendFactor
3503 VkBlendFactor dstAlphaBlendFactor
3504 VkBlendOp alphaBlendOp
3505 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003506}
3507
3508class VkPipelineColorBlendStateCreateInfo {
3509 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
3510 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003511 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003512 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003513 VkLogicOp logicOp
3514 u32 attachmentCount /// # of pAttachments
3515 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08003516 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07003517}
3518
3519class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08003520 VkStencilOp failOp
3521 VkStencilOp passOp
3522 VkStencilOp depthFailOp
3523 VkCompareOp compareOp
3524 u32 compareMask
3525 u32 writeMask
3526 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07003527}
3528
3529class VkPipelineDepthStencilStateCreateInfo {
3530 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
3531 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003532 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003533 VkBool32 depthTestEnable
3534 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003535 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003536 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
3537 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003538 VkStencilOpState front
3539 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003540 f32 minDepthBounds
3541 f32 maxDepthBounds
3542}
3543
3544class VkPipelineDynamicStateCreateInfo {
3545 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
3546 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003547 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003548 u32 dynamicStateCount
3549 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003550}
3551
3552class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08003553 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
3554 const void* pNext /// Pointer to next structure
3555 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003556 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08003557 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07003558 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
3559 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
3560 const VkPipelineTessellationStateCreateInfo* pTessellationState
3561 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08003562 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07003563 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
3564 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
3565 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003566 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08003567 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003568 VkRenderPass renderPass
3569 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08003570 VkPipeline basePipelineHandle /// If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of
3571 s32 basePipelineIndex /// If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of
Jesse Halld27f6aa2015-08-15 17:58:48 -07003572}
3573
3574class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08003575 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
3576 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003577 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08003578 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
3579 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07003580}
3581
3582class VkPushConstantRange {
3583 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08003584 u32 offset /// Start of the range, in bytes
3585 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003586}
3587
3588class VkPipelineLayoutCreateInfo {
3589 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
3590 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003591 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08003592 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003593 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
3594 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
3595 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
3596}
3597
3598class VkSamplerCreateInfo {
3599 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
3600 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003601 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08003602 VkFilter magFilter /// Filter mode for magnification
3603 VkFilter minFilter /// Filter mode for minifiation
3604 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
3605 VkSamplerAddressMode addressModeU
3606 VkSamplerAddressMode addressModeV
3607 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07003608 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003609 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003610 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003611 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003612 VkCompareOp compareOp
3613 f32 minLod
3614 f32 maxLod
3615 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003616 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003617}
3618
Jesse Hall3fbc8562015-11-29 22:10:52 -08003619class VkCommandPoolCreateInfo {
3620 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003621 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003622 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08003623 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07003624}
3625
Jesse Hall3fbc8562015-11-29 22:10:52 -08003626class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003627 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003628 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003629 VkCommandPool commandPool
3630 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08003631 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003632}
3633
Jesse Hall3dd678a2016-01-08 21:52:01 -08003634class VkCommandBufferInheritanceInfo {
3635 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003636 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07003637 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003638 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003639 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003640 VkBool32 occlusionQueryEnable
3641 VkQueryControlFlags queryFlags
3642 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003643}
3644
Jesse Hall3dd678a2016-01-08 21:52:01 -08003645class VkCommandBufferBeginInfo {
3646 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
3647 const void* pNext /// Pointer to next structure
3648 VkCommandBufferUsageFlags flags /// Command buffer usage flags
3649 const VkCommandBufferInheritanceInfo* pInheritanceInfo
3650}
3651
Jesse Halld27f6aa2015-08-15 17:58:48 -07003652class VkRenderPassBeginInfo {
3653 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
3654 const void* pNext /// Pointer to next structure
3655 VkRenderPass renderPass
3656 VkFramebuffer framebuffer
3657 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003658 u32 clearValueCount
3659 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07003660}
3661
3662@union
3663/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
3664class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003665 f32[4] float32
3666 s32[4] int32
3667 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07003668}
3669
3670class VkClearDepthStencilValue {
3671 f32 depth
3672 u32 stencil
3673}
3674
3675@union
3676/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
3677class VkClearValue {
3678 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003679 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07003680}
3681
Jesse Hallae38f732015-11-19 21:32:50 -08003682class VkClearAttachment {
3683 VkImageAspectFlags aspectMask
3684 u32 colorAttachment
3685 VkClearValue clearValue
3686}
3687
Jesse Halld27f6aa2015-08-15 17:58:48 -07003688class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08003689 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003690 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08003691 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07003692 VkAttachmentLoadOp loadOp /// Load op for color or depth data
3693 VkAttachmentStoreOp storeOp /// Store op for color or depth data
3694 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
3695 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
3696 VkImageLayout initialLayout
3697 VkImageLayout finalLayout
3698}
3699
3700class VkAttachmentReference {
3701 u32 attachment
3702 VkImageLayout layout
3703}
3704
3705class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003706 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08003707 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08003708 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003709 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08003710 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003711 const VkAttachmentReference* pColorAttachments
3712 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08003713 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08003714 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08003715 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003716}
3717
3718class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003719 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08003720 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003721 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08003722 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003723 VkAccessFlags srcAccessMask
3724 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08003725 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003726}
3727
3728class VkRenderPassCreateInfo {
3729 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
3730 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003731 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003732 u32 attachmentCount
3733 const VkAttachmentDescription* pAttachments
3734 u32 subpassCount
3735 const VkSubpassDescription* pSubpasses
3736 u32 dependencyCount
3737 const VkSubpassDependency* pDependencies
3738}
3739
3740class VkEventCreateInfo {
3741 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
3742 const void* pNext /// Pointer to next structure
3743 VkEventCreateFlags flags /// Event creation flags
3744}
3745
3746class VkFenceCreateInfo {
3747 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
3748 const void* pNext /// Pointer to next structure
3749 VkFenceCreateFlags flags /// Fence creation flags
3750}
3751
3752class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003753 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
3754 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
3755 VkBool32 imageCubeArray /// image views which are arrays of cube maps
3756 VkBool32 independentBlend /// blending operations are controlled per-attachment
3757 VkBool32 geometryShader /// geometry stage
3758 VkBool32 tessellationShader /// tessellation control and evaluation stage
3759 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08003760 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003761 VkBool32 logicOp /// logic operations
3762 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08003763 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08003764 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003765 VkBool32 depthBiasClamp /// depth bias clamping
3766 VkBool32 fillModeNonSolid /// point and wireframe fill modes
3767 VkBool32 depthBounds /// depth bounds test
3768 VkBool32 wideLines /// lines with width greater than 1
3769 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08003770 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
3771 VkBool32 multiViewport
3772 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003773 VkBool32 textureCompressionETC2 /// ETC texture compression formats
3774 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
3775 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08003776 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003777 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08003778 VkBool32 vertexPipelineStoresAndAtomics
3779 VkBool32 fragmentStoresAndAtomics
3780 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003781 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
3782 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
3783 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08003784 VkBool32 shaderStorageImageReadWithoutFormat
3785 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003786 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
3787 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
3788 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
3789 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
3790 VkBool32 shaderClipDistance /// clip distance in shaders
3791 VkBool32 shaderCullDistance /// cull distance in shaders
3792 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
3793 VkBool32 shaderInt64 /// 64-bit integers in shaders
3794 VkBool32 shaderInt16 /// 16-bit integers in shaders
3795 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08003796 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003797 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
3798 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
3799 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
3800 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
3801 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
3802 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
3803 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
3804 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
3805 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08003806 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003807 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003808}
3809
3810class VkPhysicalDeviceLimits {
3811 /// resource maximum sizes
3812 u32 maxImageDimension1D /// max 1D image dimension
3813 u32 maxImageDimension2D /// max 2D image dimension
3814 u32 maxImageDimension3D /// max 3D image dimension
3815 u32 maxImageDimensionCube /// max cubemap image dimension
3816 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08003817 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08003818 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
3819 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003820 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
3821 /// memory limits
3822 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003823 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003824 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3825 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003826 /// descriptor set limits
3827 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003828 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3829 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3830 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3831 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3832 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003833 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003834 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003835 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3836 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003837 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003838 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003839 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003840 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3841 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003842 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003843 /// vertex stage limits
3844 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003845 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003846 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3847 u32 maxVertexInputBindingStride /// max vertex input binding stride
3848 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3849 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003850 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003851 u32 maxTessellationPatchSize /// max patch size (vertices)
3852 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3853 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3854 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3855 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3856 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3857 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003858 /// geometry stage limits
3859 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3860 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3861 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3862 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3863 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3864 /// fragment stage limits
3865 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003866 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003867 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003868 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3869 /// compute stage limits
3870 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3871 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3872 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3873 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3874
3875 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3876 u32 subTexelPrecisionBits /// num bits of subtexel precision
3877 u32 mipmapPrecisionBits /// num bits of mipmap precision
3878
3879 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003880 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003881
3882 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3883 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3884
3885 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003886 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3887 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3888 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3889
Jesse Halldc6d36c2015-11-29 19:12:15 -08003890 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3891 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3892 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3893 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003894
Jesse Hallfbf97b02015-11-20 14:17:03 -08003895 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003896 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003897 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003898 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3899 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3900 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3901 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3902
3903 u32 maxFramebufferWidth /// max width for a framebuffer
3904 u32 maxFramebufferHeight /// max height for a framebuffer
3905 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003906 VkSampleCountFlags framebufferColorSampleCounts
3907 VkSampleCountFlags framebufferDepthSampleCounts
3908 VkSampleCountFlags framebufferStencilSampleCounts
3909 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003910 u32 maxColorAttachments /// max num of framebuffer color attachments
3911
Jesse Hall091ed9e2015-11-30 00:55:29 -08003912 VkSampleCountFlags sampledImageColorSampleCounts
3913 VkSampleCountFlags sampledImageIntegerSampleCounts
3914 VkSampleCountFlags sampledImageDepthSampleCounts
3915 VkSampleCountFlags sampledImageStencilSampleCounts
3916 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003917 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003918 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003919
Jesse Halla9bb62b2015-11-21 19:31:56 -08003920 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003921
3922 u32 maxClipDistances /// max number of clip distances
3923 u32 maxCullDistances /// max number of cull distances
3924 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3925
Jesse Hallfbf97b02015-11-20 14:17:03 -08003926 u32 discreteQueuePriorities
3927
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003928 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3929 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003930 f32 pointSizeGranularity /// granularity of supported point sizes
3931 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003932 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003933 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003934
Jesse Hall65ab5522015-11-30 00:07:16 -08003935 VkDeviceSize optimalBufferCopyOffsetAlignment
3936 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003937 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003938}
3939
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003940class VkPhysicalDeviceSparseProperties {
3941 VkBool32 residencyStandard2DBlockShape /// Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format)
Jesse Hallb00daad2015-11-29 19:46:20 -08003942 VkBool32 residencyStandard2DMultisampleBlockShape /// Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003943 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3944 VkBool32 residencyAlignedMipSize /// Sparse resources support: Images with mip-level dimensions that are NOT a multiple of the block size will be placed in the mip tail
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003945 VkBool32 residencyNonResidentStrict /// Sparse resources support: GPU can safely access non-resident regions of a resource, all reads return as if data is 0, writes are discarded
3946}
3947
Jesse Halld27f6aa2015-08-15 17:58:48 -07003948class VkSemaphoreCreateInfo {
3949 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3950 const void* pNext /// Pointer to next structure
3951 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3952}
3953
3954class VkQueryPoolCreateInfo {
3955 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3956 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003957 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003958 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003959 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003960 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3961}
3962
3963class VkFramebufferCreateInfo {
3964 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3965 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003966 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003967 VkRenderPass renderPass
3968 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003969 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003970 u32 width
3971 u32 height
3972 u32 layers
3973}
3974
Jesse Hall3fbc8562015-11-29 22:10:52 -08003975class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003976 u32 vertexCount
3977 u32 instanceCount
3978 u32 firstVertex
3979 u32 firstInstance
3980}
3981
Jesse Hall3fbc8562015-11-29 22:10:52 -08003982class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003983 u32 indexCount
3984 u32 instanceCount
3985 u32 firstIndex
3986 s32 vertexOffset
3987 u32 firstInstance
3988}
3989
Jesse Hall3fbc8562015-11-29 22:10:52 -08003990class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003991 u32 x
3992 u32 y
3993 u32 z
3994}
3995
Ian Elliott28bd2c32017-10-13 09:21:12 -06003996//@vulkan1_1 structures
Daniel Koch09f7bf92017-10-05 00:26:58 -04003997
3998class VkPhysicalDeviceSubgroupProperties {
3999 VkStructureType sType
4000 void* pNext
4001 u32 subgroupSize
4002 VkShaderStageFlags supportedStages
4003 VkSubgroupFeatureFlags supportedOperations
4004 VkBool32 quadOperationsInAllStages
4005}
4006
4007class VkBindBufferMemoryInfo {
4008 VkStructureType sType
4009 const void* pNext
4010 VkBuffer buffer
4011 VkDeviceMemory memory
4012 VkDeviceSize memoryOffset
4013}
4014
4015class VkBindImageMemoryInfo {
4016 VkStructureType sType
4017 const void* pNext
4018 VkImage image
4019 VkDeviceMemory memory
4020 VkDeviceSize memoryOffset
4021}
4022
4023class VkPhysicalDevice16BitStorageFeatures {
4024 VkStructureType sType
4025 void* pNext
4026 VkBool32 storageBuffer16BitAccess
4027 VkBool32 uniformAndStorageBuffer16BitAccess
4028 VkBool32 storagePushConstant16
4029 VkBool32 storageInputOutput16
4030}
4031
4032class VkMemoryDedicatedRequirements {
4033 VkStructureType sType
4034 void* pNext
4035 VkBool32 prefersDedicatedAllocation
4036 VkBool32 requiresDedicatedAllocation
4037}
4038
4039class VkMemoryDedicatedAllocateInfo {
4040 VkStructureType sType
4041 const void* pNext
4042 VkImage image
4043 VkBuffer buffer
4044}
4045
4046class VkMemoryAllocateFlagsInfo {
4047 VkStructureType sType
4048 const void* pNext
4049 VkMemoryAllocateFlags flags
4050 u32 deviceMask
4051}
4052
4053class VkDeviceGroupRenderPassBeginInfo {
4054 VkStructureType sType
4055 const void* pNext
4056 u32 deviceMask
4057 u32 deviceRenderAreaCount
4058 const VkRect2D* pDeviceRenderAreas
4059}
4060
4061class VkDeviceGroupCommandBufferBeginInfo {
4062 VkStructureType sType
4063 const void* pNext
4064 u32 deviceMask
4065}
4066
4067class VkDeviceGroupSubmitInfo {
4068 VkStructureType sType
4069 const void* pNext
4070 u32 waitSemaphoreCount
4071 const u32* pWaitSemaphoreDeviceIndices
4072 u32 commandBufferCount
4073 const u32* pCommandBufferDeviceMasks
4074 u32 signalSemaphoreCount
4075 const u32* pSignalSemaphoreDeviceIndices
4076}
4077
4078class VkDeviceGroupBindSparseInfo {
4079 VkStructureType sType
4080 const void* pNext
4081 u32 resourceDeviceIndex
4082 u32 memoryDeviceIndex
4083}
4084
4085class VkBindBufferMemoryDeviceGroupInfo {
4086 VkStructureType sType
4087 const void* pNext
4088 u32 deviceIndexCount
4089 const u32* pDeviceIndices
4090}
4091
4092class VkBindImageMemoryDeviceGroupInfo {
4093 VkStructureType sType
4094 const void* pNext
4095 u32 deviceIndexCount
4096 const u32* pDeviceIndices
4097 u32 SFRRectCount
4098 const VkRect2D* pSFRRects
4099}
4100
4101class VkPhysicalDeviceGroupProperties {
4102 VkStructureType sType
4103 void* pNext
4104 u32 physicalDeviceCount
4105 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE] physicalDevices
4106 VkBool32 subsetAllocation
4107}
4108
4109class VkDeviceGroupDeviceCreateInfo {
4110 VkStructureType sType
4111 const void* pNext
4112 u32 physicalDeviceCount
4113 const VkPhysicalDevice* pPhysicalDevices
4114}
4115
4116class VkBufferMemoryRequirementsInfo2 {
4117 VkStructureType sType
4118 const void* pNext
4119 VkBuffer buffer
4120}
4121
4122class VkImageMemoryRequirementsInfo2 {
4123 VkStructureType sType
4124 const void* pNext
4125 VkImage image
4126}
4127
4128class VkImageSparseMemoryRequirementsInfo2 {
4129 VkStructureType sType
4130 const void* pNext
4131 VkImage image
4132}
4133
4134class VkMemoryRequirements2 {
4135 VkStructureType sType
4136 void* pNext
4137 VkMemoryRequirements memoryRequirements
4138}
4139
4140class VkSparseImageMemoryRequirements2 {
4141 VkStructureType sType
4142 void* pNext
4143 VkSparseImageMemoryRequirements memoryRequirements
4144}
4145
4146class VkPhysicalDeviceFeatures2 {
4147 VkStructureType sType
4148 void* pNext
4149 VkPhysicalDeviceFeatures features
4150}
4151
4152class VkPhysicalDeviceProperties2 {
4153 VkStructureType sType
4154 void* pNext
4155 VkPhysicalDeviceProperties properties
4156}
4157
4158class VkFormatProperties2 {
4159 VkStructureType sType
4160 void* pNext
4161 VkFormatProperties formatProperties
4162}
4163
4164class VkImageFormatProperties2 {
4165 VkStructureType sType
4166 void* pNext
4167 VkImageFormatProperties imageFormatProperties
4168}
4169
4170class VkPhysicalDeviceImageFormatInfo2 {
4171 VkStructureType sType
4172 const void* pNext
4173 VkFormat format
4174 VkImageType type
4175 VkImageTiling tiling
4176 VkImageUsageFlags usage
4177 VkImageCreateFlags flags
4178}
4179
4180class VkQueueFamilyProperties2 {
4181 VkStructureType sType
4182 void* pNext
4183 VkQueueFamilyProperties queueFamilyProperties
4184}
4185
4186class VkPhysicalDeviceMemoryProperties2 {
4187 VkStructureType sType
4188 void* pNext
4189 VkPhysicalDeviceMemoryProperties memoryProperties
4190}
4191
4192class VkSparseImageFormatProperties2 {
4193 VkStructureType sType
4194 void* pNext
4195 VkSparseImageFormatProperties properties
4196}
4197
4198class VkPhysicalDeviceSparseImageFormatInfo2 {
4199 VkStructureType sType
4200 const void* pNext
4201 VkFormat format
4202 VkImageType type
4203 VkSampleCountFlagBits samples
4204 VkImageUsageFlags usage
4205 VkImageTiling tiling
4206}
4207
4208class VkPhysicalDevicePointClippingProperties {
4209 VkStructureType sType
4210 void* pNext
4211 VkPointClippingBehavior pointClippingBehavior
4212}
4213
4214class VkInputAttachmentAspectReference {
4215 u32 subpass
4216 u32 inputAttachmentIndex
4217 VkImageAspectFlags aspectMask
4218}
4219
4220class VkRenderPassInputAttachmentAspectCreateInfo {
4221 VkStructureType sType
4222 const void* pNext
4223 u32 aspectReferenceCount
4224 const VkInputAttachmentAspectReference* pAspectReferences
4225}
4226
4227class VkImageViewUsageCreateInfo {
4228 VkStructureType sType
4229 const void* pNext
4230 VkImageUsageFlags usage
4231}
4232
4233class VkPipelineTessellationDomainOriginStateCreateInfo {
4234 VkStructureType sType
4235 const void* pNext
4236 VkTessellationDomainOrigin domainOrigin
4237}
4238
4239class VkRenderPassMultiviewCreateInfo {
4240 VkStructureType sType
4241 const void* pNext
4242 u32 subpassCount
4243 const u32* pViewMasks
4244 u32 dependencyCount
4245 const s32* pViewOffsets
4246 u32 correlationMaskCount
4247 const u32* pCorrelationMasks
4248}
4249
4250class VkPhysicalDeviceMultiviewFeatures {
4251 VkStructureType sType
4252 void* pNext
4253 VkBool32 multiview
4254 VkBool32 multiviewGeometryShader
4255 VkBool32 multiviewTessellationShader
4256}
4257
4258class VkPhysicalDeviceMultiviewProperties {
4259 VkStructureType sType
4260 void* pNext
4261 u32 maxMultiviewViewCount
4262 u32 maxMultiviewInstanceIndex
4263}
4264
4265class VkPhysicalDeviceVariablePointerFeatures {
4266 VkStructureType sType
4267 void* pNext
4268 VkBool32 variablePointersStorageBuffer
4269 VkBool32 variablePointers
4270}
4271
4272class VkPhysicalDeviceProtectedMemoryFeatures {
4273 VkStructureType sType
4274 void* pNext
4275 VkBool32 protectedMemory
4276}
4277
4278class VkPhysicalDeviceProtectedMemoryProperties {
4279 VkStructureType sType
4280 void* pNext
4281 VkBool32 protectedNoFault
4282}
4283
4284class VkDeviceQueueInfo2 {
4285 VkStructureType sType
4286 const void* pNext
4287 VkDeviceQueueCreateFlags flags
4288 u32 queueFamilyIndex
4289 u32 queueIndex
4290}
4291
4292class VkProtectedSubmitInfo {
4293 VkStructureType sType
4294 const void* pNext
4295 VkBool32 protectedSubmit
4296}
4297
4298class VkSamplerYcbcrConversionCreateInfo {
4299 VkStructureType sType
4300 const void* pNext
4301 VkFormat format
4302 VkSamplerYcbcrModelConversion ycbcrModel
4303 VkSamplerYcbcrRange ycbcrRange
4304 VkComponentMapping components
4305 VkChromaLocation xChromaOffset
4306 VkChromaLocation yChromaOffset
4307 VkFilter chromaFilter
4308 VkBool32 forceExplicitReconstruction
4309}
4310
4311class VkSamplerYcbcrConversionInfo {
4312 VkStructureType sType
4313 const void* pNext
4314 VkSamplerYcbcrConversion conversion
4315}
4316
4317class VkBindImagePlaneMemoryInfo {
4318 VkStructureType sType
4319 const void* pNext
4320 VkImageAspectFlagBits planeAspect
4321}
4322
4323class VkImagePlaneMemoryRequirementsInfo {
4324 VkStructureType sType
4325 const void* pNext
4326 VkImageAspectFlagBits planeAspect
4327}
4328
4329class VkPhysicalDeviceSamplerYcbcrConversionFeatures {
4330 VkStructureType sType
4331 void* pNext
4332 VkBool32 samplerYcbcrConversion
4333}
4334
4335class VkSamplerYcbcrConversionImageFormatProperties {
4336 VkStructureType sType
4337 void* pNext
4338 u32 combinedImageSamplerDescriptorCount
4339}
4340
4341class VkDescriptorUpdateTemplateEntry {
4342 u32 dstBinding
4343 u32 dstArrayElement
4344 u32 descriptorCount
4345 VkDescriptorType descriptorType
4346 platform.size_t offset
4347 platform.size_t stride
4348}
4349
4350class VkDescriptorUpdateTemplateCreateInfo {
4351 VkStructureType sType
4352 void* pNext
4353 VkDescriptorUpdateTemplateCreateFlags flags
4354 u32 descriptorUpdateEntryCount
4355 const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntries
4356 VkDescriptorUpdateTemplateType templateType
4357 VkDescriptorSetLayout descriptorSetLayout
4358 VkPipelineBindPoint pipelineBindPoint
4359 VkPipelineLayout pipelineLayout
4360 u32 set
4361}
4362
4363class VkExternalMemoryProperties {
4364 VkExternalMemoryFeatureFlags externalMemoryFeatures
4365 VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes
4366 VkExternalMemoryHandleTypeFlags compatibleHandleTypes
4367}
4368
4369class VkPhysicalDeviceExternalImageFormatInfo {
4370 VkStructureType sType
4371 const void* pNext
4372 VkExternalMemoryHandleTypeFlagBits handleType
4373}
4374
4375class VkExternalImageFormatProperties {
4376 VkStructureType sType
4377 void* pNext
4378 VkExternalMemoryProperties externalMemoryProperties
4379}
4380
4381class VkPhysicalDeviceExternalBufferInfo {
4382 VkStructureType sType
4383 const void* pNext
4384 VkBufferCreateFlags flags
4385 VkBufferUsageFlags usage
4386 VkExternalMemoryHandleTypeFlagBits handleType
4387}
4388
4389class VkExternalBufferProperties {
4390 VkStructureType sType
4391 void* pNext
4392 VkExternalMemoryProperties externalMemoryProperties
4393}
4394
4395class VkPhysicalDeviceIDProperties {
4396 VkStructureType sType
4397 void* pNext
4398 u8[VK_UUID_SIZE] deviceUUID
4399 u8[VK_UUID_SIZE] driverUUID
4400 u8[VK_LUID_SIZE] deviceLUID
4401 u32 deviceNodeMask
4402 VkBool32 deviceLUIDValid
4403}
4404
4405class VkExternalMemoryImageCreateInfo {
4406 VkStructureType sType
4407 const void* pNext
4408 VkExternalMemoryHandleTypeFlags handleTypes
4409}
4410
4411class VkExternalMemoryBufferCreateInfo {
4412 VkStructureType sType
4413 const void* pNext
4414 VkExternalMemoryHandleTypeFlags handleTypes
4415}
4416
4417class VkExportMemoryAllocateInfo {
4418 VkStructureType sType
4419 const void* pNext
4420 VkExternalMemoryHandleTypeFlags handleTypes
4421}
4422
4423class VkPhysicalDeviceExternalFenceInfo {
4424 VkStructureType sType
4425 const void* pNext
4426 VkExternalFenceHandleTypeFlagBits handleType
4427}
4428
4429class VkExternalFenceProperties {
4430 VkStructureType sType
4431 void* pNext
4432 VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes
4433 VkExternalFenceHandleTypeFlags compatibleHandleTypes
4434 VkExternalFenceFeatureFlags externalFenceFeatures
4435}
4436
4437class VkExportFenceCreateInfo {
4438 VkStructureType sType
4439 const void* pNext
4440 VkExternalFenceHandleTypeFlags handleTypes
4441}
4442
4443class VkExportSemaphoreCreateInfo {
4444 VkStructureType sType
4445 const void* pNext
4446 VkExternalSemaphoreHandleTypeFlags handleTypes
4447}
4448
4449class VkPhysicalDeviceExternalSemaphoreInfo {
4450 VkStructureType sType
4451 const void* pNext
4452 VkExternalSemaphoreHandleTypeFlagBits handleType
4453}
4454
4455class VkExternalSemaphoreProperties {
4456 VkStructureType sType
4457 void* pNext
4458 VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes
4459 VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes
4460 VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures
4461}
4462
4463class VkPhysicalDeviceMaintenance3Properties {
4464 VkStructureType sType
4465 void* pNext
4466 u32 maxPerSetDescriptors
4467 VkDeviceSize maxMemoryAllocationSize
4468}
4469
4470class VkDescriptorSetLayoutSupport {
4471 VkStructureType sType
4472 void* pNext
4473 VkBool32 supported
4474}
4475
4476class VkPhysicalDeviceShaderDrawParameterFeatures {
4477 VkStructureType sType
4478 void* pNext
4479 VkBool32 shaderDrawParameters
4480}
4481
4482
Jesse Hallad250842017-03-10 18:35:38 -08004483@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08004484class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004485 u32 minImageCount
4486 u32 maxImageCount
4487 VkExtent2D currentExtent
4488 VkExtent2D minImageExtent
4489 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004490 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08004491 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004492 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08004493 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08004494 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08004495}
4496
Jesse Hallad250842017-03-10 18:35:38 -08004497@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08004498class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004499 VkFormat format
4500 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08004501}
4502
Jesse Hallad250842017-03-10 18:35:38 -08004503@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08004504class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004505 VkStructureType sType
4506 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004507 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08004508 VkSurfaceKHR surface
4509 u32 minImageCount
4510 VkFormat imageFormat
4511 VkColorSpaceKHR imageColorSpace
4512 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004513 u32 imageArrayLayers
4514 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08004515 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08004516 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08004517 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004518 VkSurfaceTransformFlagBitsKHR preTransform
4519 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08004520 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08004521 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004522 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08004523}
4524
Jesse Hallad250842017-03-10 18:35:38 -08004525@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08004526class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004527 VkStructureType sType
4528 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08004529 u32 waitSemaphoreCount
4530 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08004531 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08004532 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004533 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08004534 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08004535}
4536
Ian Elliott28bd2c32017-10-13 09:21:12 -06004537@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04004538@extension("VK_KHR_swapchain") // 2
4539class VkImageSwapchainCreateInfoKHR {
4540 VkStructureType sType
4541 const void* pNext
4542 VkSwapchainKHR swapchain
4543}
4544
Ian Elliott28bd2c32017-10-13 09:21:12 -06004545@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04004546@extension("VK_KHR_swapchain") // 2
4547class VkBindImageMemorySwapchainInfoKHR {
4548 VkStructureType sType
4549 const void* pNext
4550 VkSwapchainKHR swapchain
4551 u32 imageIndex
4552}
4553
Ian Elliott28bd2c32017-10-13 09:21:12 -06004554@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04004555@extension("VK_KHR_swapchain") // 2
4556class VkAcquireNextImageInfoKHR {
4557 VkStructureType sType
4558 const void* pNext
4559 VkSwapchainKHR swapchain
4560 u64 timeout
4561 VkSemaphore semaphore
4562 VkFence fence
4563 u32 deviceMask
4564}
4565
Ian Elliott28bd2c32017-10-13 09:21:12 -06004566@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04004567@extension("VK_KHR_swapchain") // 2
4568class VkDeviceGroupPresentCapabilitiesKHR {
4569 VkStructureType sType
4570 const void* pNext
4571 u32[VK_MAX_DEVICE_GROUP_SIZE] presentMask
4572 VkDeviceGroupPresentModeFlagsKHR modes
4573}
4574
Ian Elliott28bd2c32017-10-13 09:21:12 -06004575@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04004576@extension("VK_KHR_swapchain") // 2
4577class VkDeviceGroupPresentInfoKHR {
4578 VkStructureType sType
4579 const void* pNext
4580 u32 swapchainCount
4581 const u32* pDeviceMasks
4582 VkDeviceGroupPresentModeFlagBitsKHR mode
4583}
4584
Ian Elliott28bd2c32017-10-13 09:21:12 -06004585@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04004586@extension("VK_KHR_swapchain") // 2
4587class VkDeviceGroupSwapchainCreateInfoKHR {
4588 VkStructureType sType
4589 const void* pNext
4590 VkDeviceGroupPresentModeFlagsKHR modes
4591}
4592
Jesse Hallad250842017-03-10 18:35:38 -08004593@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004594class VkDisplayPropertiesKHR {
4595 VkDisplayKHR display
4596 const char* displayName
4597 VkExtent2D physicalDimensions
4598 VkExtent2D physicalResolution
4599 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08004600 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08004601 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08004602}
4603
Jesse Hallad250842017-03-10 18:35:38 -08004604@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08004605class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004606 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08004607 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08004608}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004609
Jesse Hallad250842017-03-10 18:35:38 -08004610@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004611class VkDisplayModePropertiesKHR {
4612 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08004613 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08004614}
4615
Jesse Hallad250842017-03-10 18:35:38 -08004616@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004617class VkDisplayModeCreateInfoKHR {
4618 VkStructureType sType
4619 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08004620 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08004621 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08004622}
4623
Jesse Hallad250842017-03-10 18:35:38 -08004624@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004625class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08004626 VkDisplayKHR currentDisplay
4627 u32 currentStackIndex
4628}
4629
Jesse Hallad250842017-03-10 18:35:38 -08004630@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08004631class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004632 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
4633 VkOffset2D minSrcPosition
4634 VkOffset2D maxSrcPosition
4635 VkExtent2D minSrcExtent
4636 VkExtent2D maxSrcExtent
4637 VkOffset2D minDstPosition
4638 VkOffset2D maxDstPosition
4639 VkExtent2D minDstExtent
4640 VkExtent2D maxDstExtent
4641}
4642
Jesse Hallad250842017-03-10 18:35:38 -08004643@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08004644class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004645 VkStructureType sType
4646 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004647 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08004648 VkDisplayModeKHR displayMode
4649 u32 planeIndex
4650 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004651 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08004652 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004653 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
4654 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08004655}
4656
Jesse Hallad250842017-03-10 18:35:38 -08004657@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08004658class VkDisplayPresentInfoKHR {
4659 VkStructureType sType
4660 const void* pNext
4661 VkRect2D srcRect
4662 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08004663 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08004664}
4665
Jesse Hallad250842017-03-10 18:35:38 -08004666@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004667class VkXlibSurfaceCreateInfoKHR {
4668 VkStructureType sType
4669 const void* pNext
4670 VkXlibSurfaceCreateFlagsKHR flags
4671 platform.Display* dpy
4672 platform.Window window
4673}
4674
Jesse Hallad250842017-03-10 18:35:38 -08004675@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004676class VkXcbSurfaceCreateInfoKHR {
4677 VkStructureType sType
4678 const void* pNext
4679 VkXcbSurfaceCreateFlagsKHR flags
4680 platform.xcb_connection_t* connection
4681 platform.xcb_window_t window
4682}
4683
Jesse Hallad250842017-03-10 18:35:38 -08004684@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004685class VkWaylandSurfaceCreateInfoKHR {
4686 VkStructureType sType
4687 const void* pNext
4688 VkWaylandSurfaceCreateFlagsKHR flags
4689 platform.wl_display* display
4690 platform.wl_surface* surface
4691}
4692
Jesse Hallad250842017-03-10 18:35:38 -08004693@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004694class VkMirSurfaceCreateInfoKHR {
4695 VkStructureType sType
4696 const void* pNext
4697 VkMirSurfaceCreateFlagsKHR flags
4698 platform.MirConnection* connection
4699 platform.MirSurface* mirSurface
4700}
4701
Jesse Hallad250842017-03-10 18:35:38 -08004702@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004703class VkAndroidSurfaceCreateInfoKHR {
4704 VkStructureType sType
4705 const void* pNext
4706 VkAndroidSurfaceCreateFlagsKHR flags
4707 platform.ANativeWindow* window
4708}
4709
Jesse Hallad250842017-03-10 18:35:38 -08004710@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004711class VkWin32SurfaceCreateInfoKHR {
4712 VkStructureType sType
4713 const void* pNext
4714 VkWin32SurfaceCreateFlagsKHR flags
4715 platform.HINSTANCE hinstance
4716 platform.HWND hwnd
4717}
4718
Jesse Hallad250842017-03-10 18:35:38 -08004719@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08004720@internal class Gralloc1Usage {
4721 u64 consumer
4722 u64 producer
4723}
4724
Jesse Hallad250842017-03-10 18:35:38 -08004725@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08004726class VkNativeBufferANDROID {
4727 VkStructureType sType
4728 const void* pNext
4729 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08004730 s32 stride
4731 s32 format
4732 s32 usage
4733 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08004734}
4735
Jesse Hallad250842017-03-10 18:35:38 -08004736@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13004737class VkSwapchainImageCreateInfoANDROID {
4738 VkStructureType sType
4739 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13004740 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13004741}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07004742
Jesse Hallad250842017-03-10 18:35:38 -08004743@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13004744class VkPhysicalDevicePresentationPropertiesANDROID {
4745 VkStructureType sType
4746 void* pNext
4747 VkBool32 sharedImage
4748}
4749
Jesse Hallad250842017-03-10 18:35:38 -08004750@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08004751class VkDebugReportCallbackCreateInfoEXT {
4752 VkStructureType sType
4753 const void* pNext
4754 VkDebugReportFlagsEXT flags
4755 PFN_vkDebugReportCallbackEXT pfnCallback
4756 void* pUserData
4757}
4758
Jesse Hallad250842017-03-10 18:35:38 -08004759@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07004760class VkPipelineRasterizationStateRasterizationOrderAMD {
4761 VkStructureType sType
4762 const void* pNext
4763 VkRasterizationOrderAMD rasterizationOrder
4764}
4765
Jesse Hallad250842017-03-10 18:35:38 -08004766@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07004767class VkDebugMarkerObjectNameInfoEXT {
4768 VkStructureType sType
4769 const void* pNext
4770 VkDebugReportObjectTypeEXT objectType
4771 u64 object
4772 const char* pObjectName
4773}
4774
Jesse Hallad250842017-03-10 18:35:38 -08004775@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07004776class VkDebugMarkerObjectTagInfoEXT {
4777 VkStructureType sType
4778 const void* pNext
4779 VkDebugReportObjectTypeEXT objectType
4780 u64 object
4781 u64 tagName
4782 platform.size_t tagSize
4783 const void* pTag
4784}
4785
Jesse Hallad250842017-03-10 18:35:38 -08004786@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07004787class VkDebugMarkerMarkerInfoEXT {
4788 VkStructureType sType
4789 const void* pNext
4790 const char* pMarkerName
4791 f32[4] color
4792}
4793
Jesse Hallad250842017-03-10 18:35:38 -08004794@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07004795class VkDedicatedAllocationImageCreateInfoNV {
4796 VkStructureType sType
4797 const void* pNext
4798 VkBool32 dedicatedAllocation
4799}
4800
Jesse Hallad250842017-03-10 18:35:38 -08004801@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07004802class VkDedicatedAllocationBufferCreateInfoNV {
4803 VkStructureType sType
4804 const void* pNext
4805 VkBool32 dedicatedAllocation
4806}
4807
Jesse Hallad250842017-03-10 18:35:38 -08004808@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07004809class VkDedicatedAllocationMemoryAllocateInfoNV {
4810 VkStructureType sType
4811 const void* pNext
4812 VkImage image
4813 VkBuffer buffer
4814}
4815
Jesse Hall7ba0ac72017-07-07 17:13:23 -07004816@extension("VK_AMD_texture_gather_bias_lod") // 42
4817class VkTextureLODGatherFormatPropertiesAMD {
4818 VkStructureType sType
4819 void* pNext
4820 VkBool32 supportsTextureGatherLODBiasAMD
4821}
4822
Daniel Koch09f7bf92017-10-05 00:26:58 -04004823@extension("VK_KHR_multiview") // 54
4824class VkRenderPassMultiviewCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004825 VkStructureType sType
4826 const void* pNext
4827 u32 subpassCount
4828 const u32* pViewMasks
4829 u32 dependencyCount
4830 const s32* pViewOffsets
4831 u32 correlationMaskCount
4832 const u32* pCorrelationMasks
4833}
4834
Daniel Koch09f7bf92017-10-05 00:26:58 -04004835@extension("VK_KHR_multiview") // 54
4836class VkPhysicalDeviceMultiviewFeaturesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004837 VkStructureType sType
4838 void* pNext
4839 VkBool32 multiview
4840 VkBool32 multiviewGeometryShader
4841 VkBool32 multiviewTessellationShader
4842}
4843
Daniel Koch09f7bf92017-10-05 00:26:58 -04004844@extension("VK_KHR_multiview") // 54
4845class VkPhysicalDeviceMultiviewPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004846 VkStructureType sType
4847 void* pNext
4848 u32 maxMultiviewViewCount
4849 u32 maxMultiviewInstanceIndex
4850}
4851
4852@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08004853class VkExternalImageFormatPropertiesNV {
4854 VkImageFormatProperties imageFormatProperties
4855 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
4856 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
4857 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
4858}
4859
Jesse Hallad250842017-03-10 18:35:38 -08004860@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08004861class VkExternalMemoryImageCreateInfoNV {
4862 VkStructureType sType
4863 const void* pNext
4864 VkExternalMemoryHandleTypeFlagsNV handleTypes
4865}
4866
Jesse Hallad250842017-03-10 18:35:38 -08004867@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08004868class VkExportMemoryAllocateInfoNV {
4869 VkStructureType sType
4870 const void* pNext
4871 VkExternalMemoryHandleTypeFlagsNV handleTypes
4872}
4873
Jesse Hallad250842017-03-10 18:35:38 -08004874@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08004875class VkImportMemoryWin32HandleInfoNV {
4876 VkStructureType sType
4877 const void* pNext
4878 VkExternalMemoryHandleTypeFlagsNV handleType
4879 platform.HANDLE handle
4880}
4881
Jesse Hallad250842017-03-10 18:35:38 -08004882@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08004883class VkExportMemoryWin32HandleInfoNV {
4884 VkStructureType sType
4885 const void* pNext
4886 const platform.SECURITY_ATTRIBUTES* pAttributes
4887 platform.DWORD dwAccess
4888}
4889
Jesse Hallad250842017-03-10 18:35:38 -08004890@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08004891class VkWin32KeyedMutexAcquireReleaseInfoNV {
4892 VkStructureType sType
4893 const void* pNext
4894 u32 acquireCount
4895 const VkDeviceMemory* pAcquireSyncs
4896 const u64* pAcquireKeys
4897 const u32* pAcquireTimeoutMilliseconds
4898 u32 releaseCount
4899 const VkDeviceMemory* pReleaseSyncs
4900 const u64* pReleaseKeys
4901}
4902
Jesse Hallad250842017-03-10 18:35:38 -08004903@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004904class VkPhysicalDeviceFeatures2KHR {
4905 VkStructureType sType
4906 void* pNext
4907 VkPhysicalDeviceFeatures features
4908}
4909
Jesse Hallad250842017-03-10 18:35:38 -08004910@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004911class VkPhysicalDeviceProperties2KHR {
4912 VkStructureType sType
4913 void* pNext
4914 VkPhysicalDeviceProperties properties
4915}
4916
Jesse Hallad250842017-03-10 18:35:38 -08004917@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004918class VkFormatProperties2KHR {
4919 VkStructureType sType
4920 void* pNext
4921 VkFormatProperties formatProperties
4922}
4923
Jesse Hallad250842017-03-10 18:35:38 -08004924@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004925class VkImageFormatProperties2KHR {
4926 VkStructureType sType
4927 void* pNext
4928 VkImageFormatProperties imageFormatProperties
4929}
4930
Jesse Hallad250842017-03-10 18:35:38 -08004931@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004932class VkPhysicalDeviceImageFormatInfo2KHR {
4933 VkStructureType sType
4934 const void* pNext
4935 VkFormat format
4936 VkImageType type
4937 VkImageTiling tiling
4938 VkImageUsageFlags usage
4939 VkImageCreateFlags flags
4940}
4941
Jesse Hallad250842017-03-10 18:35:38 -08004942@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004943class VkQueueFamilyProperties2KHR {
4944 VkStructureType sType
4945 void* pNext
4946 VkQueueFamilyProperties queueFamilyProperties
4947}
4948
Jesse Hallad250842017-03-10 18:35:38 -08004949@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004950class VkPhysicalDeviceMemoryProperties2KHR {
4951 VkStructureType sType
4952 void* pNext
4953 VkPhysicalDeviceMemoryProperties memoryProperties
4954}
4955
Jesse Hallad250842017-03-10 18:35:38 -08004956@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004957class VkSparseImageFormatProperties2KHR {
4958 VkStructureType sType
4959 void* pNext
4960 VkSparseImageFormatProperties properties
4961}
4962
Jesse Hallad250842017-03-10 18:35:38 -08004963@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004964class VkPhysicalDeviceSparseImageFormatInfo2KHR {
4965 VkStructureType sType
4966 const void* pNext
4967 VkFormat format
4968 VkImageType type
4969 VkSampleCountFlagBits samples
4970 VkImageUsageFlags usage
4971 VkImageTiling tiling
4972}
4973
Daniel Koch09f7bf92017-10-05 00:26:58 -04004974@extension("VK_KHR_device_group") // 61
4975class VkMemoryAllocateFlagsInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004976 VkStructureType sType
4977 const void* pNext
Daniel Koch09f7bf92017-10-05 00:26:58 -04004978 VkMemoryAllocateFlagsKHR flags
Jesse Hallad250842017-03-10 18:35:38 -08004979 u32 deviceMask
4980}
4981
Daniel Koch09f7bf92017-10-05 00:26:58 -04004982@extension("VK_KHR_device_group") // 61
4983class VkBindBufferMemoryDeviceGroupInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004984 VkStructureType sType
4985 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004986 u32 deviceIndexCount
4987 const u32* pDeviceIndices
4988}
4989
Daniel Koch09f7bf92017-10-05 00:26:58 -04004990@extension("VK_KHR_device_group") // 61
4991class VkBindImageMemoryDeviceGroupInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004992 VkStructureType sType
4993 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004994 u32 deviceIndexCount
4995 const u32* pDeviceIndices
4996 u32 SFRRectCount
4997 const VkRect2D* pSFRRects
4998}
4999
Daniel Koch09f7bf92017-10-05 00:26:58 -04005000@extension("VK_KHR_device_group") // 61
5001class VkDeviceGroupRenderPassBeginInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005002 VkStructureType sType
5003 const void* pNext
5004 u32 deviceMask
5005 u32 deviceRenderAreaCount
5006 const VkRect2D* pDeviceRenderAreas
5007}
5008
Daniel Koch09f7bf92017-10-05 00:26:58 -04005009@extension("VK_KHR_device_group") // 61
5010class VkDeviceGroupCommandBufferBeginInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005011 VkStructureType sType
5012 const void* pNext
5013 u32 deviceMask
5014}
5015
Daniel Koch09f7bf92017-10-05 00:26:58 -04005016@extension("VK_KHR_device_group") // 61
5017class VkDeviceGroupSubmitInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005018 VkStructureType sType
5019 const void* pNext
5020 u32 waitSemaphoreCount
5021 const u32* pWaitSemaphoreDeviceIndices
5022 u32 commandBufferCount
5023 const u32* pCommandBufferDeviceMasks
5024 u32 signalSemaphoreCount
5025 const u32* pSignalSemaphoreDeviceIndices
5026}
5027
Daniel Koch09f7bf92017-10-05 00:26:58 -04005028@extension("VK_KHR_device_group") // 61
5029class VkDeviceGroupBindSparseInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005030 VkStructureType sType
5031 const void* pNext
5032 u32 resourceDeviceIndex
5033 u32 memoryDeviceIndex
5034}
5035
Jesse Hallad250842017-03-10 18:35:38 -08005036@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13005037class VkValidationFlagsEXT {
5038 VkStructureType sType
5039 const void* pNext
5040 u32 disabledValidationCheckCount
5041 VkValidationCheckEXT* pDisabledValidationChecks
5042}
5043
Jesse Hallad250842017-03-10 18:35:38 -08005044@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08005045class VkViSurfaceCreateInfoNN {
5046 VkStructureType sType
5047 const void* pNext
5048 VkViSurfaceCreateFlagsNN flags
5049 void* window
5050}
5051
Daniel Koch09f7bf92017-10-05 00:26:58 -04005052@extension("VK_KHR_device_group_creation") // 71
5053class VkPhysicalDeviceGroupPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005054 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07005055 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08005056 u32 physicalDeviceCount
Daniel Koch09f7bf92017-10-05 00:26:58 -04005057 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE] physicalDevices
Jesse Hallad250842017-03-10 18:35:38 -08005058 VkBool32 subsetAllocation
5059}
5060
Daniel Koch09f7bf92017-10-05 00:26:58 -04005061@extension("VK_KHR_device_group_creation") // 71
5062class VkDeviceGroupDeviceCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005063 VkStructureType sType
5064 const void* pNext
5065 u32 physicalDeviceCount
5066 const VkPhysicalDevice* pPhysicalDevices
5067}
5068
Jesse Hall9492f992017-08-28 12:10:06 -07005069@extension("VK_KHR_external_memory_capabilities") // 72
5070class VkExternalMemoryPropertiesKHR {
5071 VkExternalMemoryFeatureFlagsKHR externalMemoryFeatures
5072 VkExternalMemoryHandleTypeFlagsKHR exportFromImportedHandleTypes
5073 VkExternalMemoryHandleTypeFlagsKHR compatibleHandleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005074}
5075
Jesse Hall9492f992017-08-28 12:10:06 -07005076@extension("VK_KHR_external_memory_capabilities") // 72
5077class VkPhysicalDeviceExternalImageFormatInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005078 VkStructureType sType
5079 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005080 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005081}
5082
Jesse Hall9492f992017-08-28 12:10:06 -07005083@extension("VK_KHR_external_memory_capabilities") // 72
5084class VkExternalImageFormatPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005085 VkStructureType sType
5086 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005087 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08005088}
5089
Jesse Hall9492f992017-08-28 12:10:06 -07005090@extension("VK_KHR_external_memory_capabilities") // 72
5091class VkPhysicalDeviceExternalBufferInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005092 VkStructureType sType
5093 const void* pNext
5094 VkBufferCreateFlags flags
5095 VkBufferUsageFlags usage
Jesse Hall9492f992017-08-28 12:10:06 -07005096 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005097}
5098
Jesse Hall9492f992017-08-28 12:10:06 -07005099@extension("VK_KHR_external_memory_capabilities") // 72
5100class VkExternalBufferPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005101 VkStructureType sType
5102 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005103 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08005104}
5105
Jesse Hall9492f992017-08-28 12:10:06 -07005106@extension("VK_KHR_external_memory_capabilities") // 72
5107class VkPhysicalDeviceIDPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005108 VkStructureType sType
5109 void* pNext
5110 u8[VK_UUID_SIZE] deviceUUID
5111 u8[VK_UUID_SIZE] driverUUID
Daniel Koch09f7bf92017-10-05 00:26:58 -04005112 u8[VK_LUID_SIZE] deviceLUID
Jesse Hall9492f992017-08-28 12:10:06 -07005113 u32 deviceNodeMask
Jesse Hallad250842017-03-10 18:35:38 -08005114 VkBool32 deviceLUIDValid
5115}
5116
Jesse Hall9492f992017-08-28 12:10:06 -07005117@extension("VK_KHR_external_memory") // 73
5118class VkExternalMemoryImageCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005119 VkStructureType sType
5120 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005121 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005122}
5123
Jesse Hall9492f992017-08-28 12:10:06 -07005124@extension("VK_KHR_external_memory") // 73
5125class VkExternalMemoryBufferCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005126 VkStructureType sType
5127 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005128 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005129}
5130
Jesse Hall9492f992017-08-28 12:10:06 -07005131@extension("VK_KHR_external_memory") // 73
5132class VkExportMemoryAllocateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005133 VkStructureType sType
5134 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005135 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005136}
5137
Jesse Hall9492f992017-08-28 12:10:06 -07005138@extension("VK_KHR_external_memory_win32") // 74
5139class VkImportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005140 VkStructureType sType
5141 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005142 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005143 platform.HANDLE handle
Jesse Hall9492f992017-08-28 12:10:06 -07005144 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08005145}
5146
Jesse Hall9492f992017-08-28 12:10:06 -07005147@extension("VK_KHR_external_memory_win32") // 74
5148class VkExportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005149 VkStructureType sType
5150 const void* pNext
5151 const platform.SECURITY_ATTRIBUTES* pAttributes
5152 platform.DWORD dwAccess
5153 platform.LPCWSTR name
5154}
5155
Jesse Hall9492f992017-08-28 12:10:06 -07005156@extension("VK_KHR_external_memory_win32") // 74
5157class VkMemoryWin32HandlePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005158 VkStructureType sType
5159 void* pNext
5160 u32 memoryTypeBits
5161}
5162
Jesse Hall9492f992017-08-28 12:10:06 -07005163@extension("VK_KHR_external_memory_win32") // 74
5164class VkMemoryGetWin32HandleInfoKHR {
5165 VkStructureType sType
5166 void* pNext
5167 VkDeviceMemory memory
5168 VkExternalMemoryHandleTypeFlagBitsKHR handleType
5169}
5170
5171@extension("VK_KHR_external_memory_fd") // 75
5172class VkImportMemoryFdInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005173 VkStructureType sType
5174 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005175 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005176 int fd
5177}
5178
Jesse Hall9492f992017-08-28 12:10:06 -07005179@extension("VK_KHR_external_memory_fd") // 75
5180class VkMemoryFdPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005181 VkStructureType sType
5182 void* pNext
5183 u32 memoryTypeBits
5184}
5185
Jesse Hall9492f992017-08-28 12:10:06 -07005186@extension("VK_KHR_external_memory_fd") // 75
5187class VkMemoryGetFdInfoKHR {
5188 VkStructureType sType
5189 void* pNext
5190 VkDeviceMemory memory
5191 VkExternalMemoryHandleTypeFlagBitsKHR handleType
5192}
5193
5194@extension("VK_KHR_win32_keyed_mutex") // 76
5195class VkWin32KeyedMutexAcquireReleaseInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005196 VkStructureType sType
5197 const void* pNext
5198 u32 acquireCount
5199 const VkDeviceMemory* pAcquireSyncs
5200 const u64* pAcquireKeys
5201 const u32* pAcquireTimeouts
5202 u32 releaseCount
5203 const VkDeviceMemory* pReleaseSyncs
5204 const u64* pReleaseKeys
5205}
5206
Jesse Hall9492f992017-08-28 12:10:06 -07005207@extension("VK_KHR_external_semaphore_capabilities") // 77
5208class VkPhysicalDeviceExternalSemaphoreInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005209 VkStructureType sType
5210 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005211 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005212}
5213
Jesse Hall9492f992017-08-28 12:10:06 -07005214@extension("VK_KHR_external_semaphore_capabilities") // 77
5215class VkExternalSemaphorePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005216 VkStructureType sType
5217 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005218 VkExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes
5219 VkExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes
5220 VkExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures
Jesse Hallad250842017-03-10 18:35:38 -08005221}
5222
Jesse Hall9492f992017-08-28 12:10:06 -07005223@extension("VK_KHR_external_semaphore") // 78
5224class VkExportSemaphoreCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005225 VkStructureType sType
5226 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005227 VkExternalSemaphoreHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005228}
5229
Jesse Hall9492f992017-08-28 12:10:06 -07005230@extension("VK_KHR_external_semaphore_win32") // 79
5231class VkImportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005232 VkStructureType sType
5233 const void* pNext
5234 VkSemaphore semaphore
Jesse Hall9492f992017-08-28 12:10:06 -07005235 VkSemaphoreImportFlagsKHR flags
5236 VkExternalSemaphoreHandleTypeFlagsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005237 platform.HANDLE handle
Jesse Hall9492f992017-08-28 12:10:06 -07005238 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08005239}
5240
Jesse Hall9492f992017-08-28 12:10:06 -07005241@extension("VK_KHR_external_semaphore_win32") // 79
5242class VkExportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005243 VkStructureType sType
5244 const void* pNext
5245 const platform.SECURITY_ATTRIBUTES* pAttributes
5246 platform.DWORD dwAccess
5247 platform.LPCWSTR name
5248}
5249
Jesse Hall9492f992017-08-28 12:10:06 -07005250@extension("VK_KHR_external_semaphore_win32") // 79
5251class VkD3D12FenceSubmitInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005252 VkStructureType sType
5253 const void* pNext
5254 u32 waitSemaphoreValuesCount
5255 const u64* pWaitSemaphoreValues
5256 u32 signalSemaphoreValuesCount
5257 const u64* pSignalSemaphoreValues
5258}
5259
Jesse Hall9492f992017-08-28 12:10:06 -07005260@extension("VK_KHR_external_semaphore_win32") // 79
5261class VkSemaphoreGetWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005262 VkStructureType sType
5263 const void* pNext
5264 VkSemaphore semaphore
Jesse Hall9492f992017-08-28 12:10:06 -07005265 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
5266}
5267
5268@extension("VK_KHR_external_semaphore_fd") // 80
5269class VkImportSemaphoreFdInfoKHR {
5270 VkStructureType sType
5271 const void* pNext
5272 VkSemaphore semaphore
5273 VkSemaphoreImportFlagsKHR flags
5274 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005275 s32 fd
5276}
5277
Jesse Hall9492f992017-08-28 12:10:06 -07005278@extension("VK_KHR_external_semaphore_fd") // 80
5279class VkSemaphoreGetFdInfoKHR {
5280 VkStructureType sType
5281 const void* pNext
5282 VkSemaphore semaphore
5283 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
5284}
5285
Jesse Hallad250842017-03-10 18:35:38 -08005286@extension("VK_KHR_push_descriptor") // 81
5287class VkPhysicalDevicePushDescriptorPropertiesKHR {
5288 VkStructureType sType
5289 void* pNext
5290 u32 maxPushDescriptors
5291}
5292
Jesse Hall9492f992017-08-28 12:10:06 -07005293@extension("VK_KHR_16bit_storage") // 84
5294class VkPhysicalDevice16BitStorageFeaturesKHR {
5295 VkStructureType sType
5296 void* pNext
5297 VkBool32 storageBuffer16BitAccess
5298 VkBool32 uniformAndStorageBuffer16BitAccess
5299 VkBool32 storagePushConstant16
5300 VkBool32 storageInputOutput16
5301}
5302
Jesse Hallad250842017-03-10 18:35:38 -08005303@extension("VK_KHR_incremental_present") // 85
5304class VkRectLayerKHR {
5305 VkOffset2D offset
5306 VkExtent2D extent
5307 u32 layer
5308}
5309
5310@extension("VK_KHR_incremental_present") // 85
5311class VkPresentRegionKHR {
5312 u32 rectangleCount
5313 const VkRectLayerKHR* pRectangles
5314}
5315
5316@extension("VK_KHR_incremental_present") // 85
5317class VkPresentRegionsKHR {
5318 VkStructureType sType
5319 const void* pNext
5320 u32 swapchainCount
5321 const VkPresentRegionKHR* pRegions
5322}
5323
5324@extension("VK_KHR_descriptor_update_template") // 86
5325class VkDescriptorUpdateTemplateEntryKHR {
5326 u32 dstBinding
5327 u32 dstArrayElement
5328 u32 descriptorCount
5329 VkDescriptorType descriptorType
5330 platform.size_t offset
5331 platform.size_t stride
5332}
5333
5334@extension("VK_KHR_descriptor_update_template") // 86
5335class VkDescriptorUpdateTemplateCreateInfoKHR {
5336 VkStructureType sType
5337 void* pNext
5338 VkDescriptorUpdateTemplateCreateFlagsKHR flags
5339 u32 descriptorUpdateEntryCount
5340 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
5341 VkDescriptorUpdateTemplateTypeKHR templateType
5342 VkDescriptorSetLayout descriptorSetLayout
5343 VkPipelineBindPoint pipelineBindPoint
5344 VkPipelineLayout pipelineLayout
5345 u32 set
5346}
5347
5348@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005349class VkDeviceGeneratedCommandsFeaturesNVX {
5350 VkStructureType sType
5351 const void* pNext
5352 VkBool32 computeBindingPointSupport
5353}
5354
Jesse Hallad250842017-03-10 18:35:38 -08005355@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005356class VkDeviceGeneratedCommandsLimitsNVX {
5357 VkStructureType sType
5358 const void* pNext
5359 u32 maxIndirectCommandsLayoutTokenCount
5360 u32 maxObjectEntryCounts
5361 u32 minSequenceCountBufferOffsetAlignment
5362 u32 minSequenceIndexBufferOffsetAlignment
5363 u32 minCommandsTokenBufferOffsetAlignment
5364}
5365
Jesse Hallad250842017-03-10 18:35:38 -08005366@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005367class VkIndirectCommandsTokenNVX {
5368 VkIndirectCommandsTokenTypeNVX tokenType
5369 VkBuffer buffer
5370 VkDeviceSize offset
5371}
5372
Jesse Hallad250842017-03-10 18:35:38 -08005373@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005374class VkIndirectCommandsLayoutTokenNVX {
5375 VkIndirectCommandsTokenTypeNVX tokenType
5376 u32 bindingUnit
5377 u32 dynamicCount
5378 u32 divisor
5379}
5380
Jesse Hallad250842017-03-10 18:35:38 -08005381@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005382class VkIndirectCommandsLayoutCreateInfoNVX {
5383 VkStructureType sType
5384 const void* pNext
5385 VkPipelineBindPoint pipelineBindPoint
5386 VkIndirectCommandsLayoutUsageFlagsNVX flags
5387 u32 tokenCount
5388 const VkIndirectCommandsLayoutTokenNVX* pTokens
5389}
5390
Jesse Hallad250842017-03-10 18:35:38 -08005391@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005392class VkCmdProcessCommandsInfoNVX {
5393 VkStructureType sType
5394 const void* pNext
5395 VkObjectTableNVX objectTable
5396 VkIndirectCommandsLayoutNVX indirectCommandsLayout
5397 u32 indirectCommandsTokenCount
5398 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
5399 u32 maxSequencesCount
5400 VkCommandBuffer targetCommandBuffer
5401 VkBuffer sequencesCountBuffer
5402 VkDeviceSize sequencesCountOffset
5403 VkBuffer sequencesIndexBuffer
5404 VkDeviceSize sequencesIndexOffset
5405}
5406
Jesse Hallad250842017-03-10 18:35:38 -08005407@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005408class VkCmdReserveSpaceForCommandsInfoNVX {
5409 VkStructureType sType
5410 const void* pNext
5411 VkObjectTableNVX objectTable
5412 VkIndirectCommandsLayoutNVX indirectCommandsLayout
5413 u32 maxSequencesCount
5414}
5415
Jesse Hallad250842017-03-10 18:35:38 -08005416@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005417class VkObjectTableCreateInfoNVX {
5418 VkStructureType sType
5419 const void* pNext
5420 u32 objectCount
5421 const VkObjectEntryTypeNVX* pObjectEntryTypes
5422 const u32* pObjectEntryCounts
5423 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
5424 u32 maxUniformBuffersPerDescriptor
5425 u32 maxStorageBuffersPerDescriptor
5426 u32 maxStorageImagesPerDescriptor
5427 u32 maxSampledImagesPerDescriptor
5428 u32 maxPipelineLayouts
5429}
5430
Jesse Hallad250842017-03-10 18:35:38 -08005431@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005432class VkObjectTableEntryNVX {
5433 VkObjectEntryTypeNVX type
5434 VkObjectEntryUsageFlagsNVX flags
5435}
5436
Jesse Hallad250842017-03-10 18:35:38 -08005437@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005438class VkObjectTablePipelineEntryNVX {
5439 VkObjectEntryTypeNVX type
5440 VkObjectEntryUsageFlagsNVX flags
5441 VkPipeline pipeline
5442}
5443
Jesse Hallad250842017-03-10 18:35:38 -08005444@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005445class VkObjectTableDescriptorSetEntryNVX {
5446 VkObjectEntryTypeNVX type
5447 VkObjectEntryUsageFlagsNVX flags
5448 VkPipelineLayout pipelineLayout
5449 VkDescriptorSet descriptorSet
5450}
5451
Jesse Hallad250842017-03-10 18:35:38 -08005452@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005453class VkObjectTableVertexBufferEntryNVX {
5454 VkObjectEntryTypeNVX type
5455 VkObjectEntryUsageFlagsNVX flags
5456 VkBuffer buffer
5457}
5458
Jesse Hallad250842017-03-10 18:35:38 -08005459@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005460class VkObjectTableIndexBufferEntryNVX {
5461 VkObjectEntryTypeNVX type
5462 VkObjectEntryUsageFlagsNVX flags
5463 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08005464 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13005465}
5466
Jesse Hallad250842017-03-10 18:35:38 -08005467@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005468class VkObjectTablePushConstantEntryNVX {
5469 VkObjectEntryTypeNVX type
5470 VkObjectEntryUsageFlagsNVX flags
5471 VkPipelineLayout pipelineLayout
5472 VkShaderStageFlags stageFlags
5473}
5474
Jesse Hallad250842017-03-10 18:35:38 -08005475@extension("VK_NV_clip_space_w_scaling") // 88
5476class VkViewportWScalingNV {
5477 f32 xcoeff
5478 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08005479}
5480
Jesse Hallad250842017-03-10 18:35:38 -08005481@extension("VK_NV_clip_space_w_scaling") // 88
5482class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08005483 VkStructureType sType
5484 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08005485 VkBool32 viewportWScalingEnable
5486 u32 viewportCount
5487 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08005488}
5489
Jesse Hallad250842017-03-10 18:35:38 -08005490@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08005491class VkSurfaceCapabilities2EXT {
5492 VkStructureType sType
5493 void* pNext
5494 u32 minImageCount
5495 u32 maxImageCount
5496 VkExtent2D currentExtent
5497 VkExtent2D minImageExtent
5498 VkExtent2D maxImageExtent
5499 u32 maxImageArrayLayers
5500 VkSurfaceTransformFlagsKHR supportedTransforms
5501 VkSurfaceTransformFlagBitsKHR currentTransform
5502 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
5503 VkImageUsageFlags supportedUsageFlags
5504 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
5505}
5506
Jesse Hallad250842017-03-10 18:35:38 -08005507@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005508class VkDisplayPowerInfoEXT {
5509 VkStructureType sType
5510 const void* pNext
5511 VkDisplayPowerStateEXT powerState
5512}
5513
Jesse Hallad250842017-03-10 18:35:38 -08005514@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005515class VkDeviceEventInfoEXT {
5516 VkStructureType sType
5517 const void* pNext
5518 VkDeviceEventTypeEXT deviceEvent
5519}
5520
Jesse Hallad250842017-03-10 18:35:38 -08005521@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005522class VkDisplayEventInfoEXT {
5523 VkStructureType sType
5524 const void* pNext
5525 VkDisplayEventTypeEXT displayEvent
5526}
5527
Jesse Hallad250842017-03-10 18:35:38 -08005528@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005529class VkSwapchainCounterCreateInfoEXT {
5530 VkStructureType sType
5531 const void* pNext
5532 VkSurfaceCounterFlagsEXT surfaceCounters
5533}
5534
Jesse Hallad250842017-03-10 18:35:38 -08005535@extension("VK_GOOGLE_display_timing") // 93
5536class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005537 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08005538}
5539
5540@extension("VK_GOOGLE_display_timing") // 93
5541class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005542 u32 presentID
5543 u64 desiredPresentTime
5544 u64 actualPresentTime
5545 u64 earliestPresentTime
5546 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08005547}
5548
5549@extension("VK_GOOGLE_display_timing") // 93
5550class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005551 u32 presentID
5552 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08005553}
5554
5555@extension("VK_GOOGLE_display_timing") // 93
5556class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005557 VkStructureType sType
5558 const void* pNext
5559 u32 swapchainCount
5560 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08005561}
5562
5563@extension("VK_NVX_multiview_per_view_attributes") // 98
5564class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
5565 VkStructureType sType
5566 void* pNext
5567 VkBool32 perViewPositionAllComponents
5568}
5569
5570@extension("VK_NV_viewport_swizzle") // 99
5571class VkViewportSwizzleNV {
5572 VkViewportCoordinateSwizzleNV x
5573 VkViewportCoordinateSwizzleNV y
5574 VkViewportCoordinateSwizzleNV z
5575 VkViewportCoordinateSwizzleNV w
5576}
5577
5578@extension("VK_NV_viewport_swizzle") // 99
5579class VkPipelineViewportSwizzleStateCreateInfoNV {
5580 VkStructureType sType
5581 const void* pNext
5582 VkPipelineViewportSwizzleStateCreateFlagsNV flags
5583 u32 viewportCount
5584 const VkViewportSwizzleNV* pViewportSwizzles
5585}
5586
5587@extension("VK_EXT_discard_rectangles") // 100
5588class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
5589 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07005590 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08005591 u32 maxDiscardRectangles
5592}
5593
5594@extension("VK_EXT_discard_rectangles") // 100
5595class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005596 VkStructureType sType
5597 const void* pNext
5598 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
5599 VkDiscardRectangleModeEXT discardRectangleMode
5600 u32 discardRectangleCount
5601 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08005602}
5603
5604@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005605class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005606 f32 x
5607 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005608}
5609
Jesse Hallad250842017-03-10 18:35:38 -08005610@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005611class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005612 VkStructureType sType
5613 const void* pNext
5614 VkXYColorEXT displayPrimaryRed
5615 VkXYColorEXT displayPrimaryGreen
5616 VkXYColorEXT displayPrimaryBlue
5617 VkXYColorEXT whitePoint
5618 f32 maxLuminance
5619 f32 minLuminance
5620 f32 maxContentLightLevel
5621 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005622}
5623
Jesse Hall05556b12017-05-18 17:40:25 -07005624@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13005625class VkSharedPresentSurfaceCapabilitiesKHR {
5626 VkStructureType sType
5627 const void* pNext
5628 VkImageUsageFlags sharedPresentSupportedUsageFlags
5629}
5630
Jesse Hall9492f992017-08-28 12:10:06 -07005631@extension("VK_KHR_external_fence_capabilities") // 113
5632class VkPhysicalDeviceExternalFenceInfoKHR {
5633 VkStructureType sType
5634 const void* pNext
5635 VkExternalFenceHandleTypeFlagBitsKHR handleType
5636}
5637
5638@extension("VK_KHR_external_fence_capabilities") // 113
5639class VkExternalFencePropertiesKHR {
5640 VkStructureType sType
5641 void* pNext
5642 VkExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes
5643 VkExternalFenceHandleTypeFlagsKHR compatibleHandleTypes
5644 VkExternalFenceFeatureFlagsKHR externalFenceFeatures
5645}
5646
5647@extension("VK_KHR_external_fence") // 114
5648class VkExportFenceCreateInfoKHR {
5649 VkStructureType sType
5650 const void* pNext
5651 VkExternalFenceHandleTypeFlagsKHR handleTypes
5652}
5653
5654@extension("VK_KHR_external_fence_win32") // 115
5655class VkImportFenceWin32HandleInfoKHR {
5656 VkStructureType sType
5657 const void* pNext
5658 VkFence fence
5659 VkFenceImportFlagsKHR flags
5660 VkExternalFenceHandleTypeFlagBitsKHR handleType
5661 platform.HANDLE handle
5662 platform.LPCWSTR name
5663}
5664
5665@extension("VK_KHR_external_fence_win32") // 115
5666class VkExportFenceWin32HandleInfoKHR {
5667 VkStructureType sType
5668 const void* pNext
5669 const platform.SECURITY_ATTRIBUTES* pAttributes
5670 platform.DWORD dwAccess
5671 platform.LPCWSTR name
5672}
5673
5674@extension("VK_KHR_external_fence_win32") // 115
5675class VkFenceGetWin32HandleInfoKHR {
5676 VkStructureType sType
5677 const void* pNext
5678 VkFence fence
5679 VkExternalFenceHandleTypeFlagBitsKHR handleType
5680}
5681
5682@extension("VK_KHR_external_fence_fd") // 116
5683class VkImportFenceFdInfoKHR {
5684 VkStructureType sType
5685 const void* pNext
5686 VkFence fence
5687 VkFenceImportFlagsKHR flags
5688 VkExternalFenceHandleTypeFlagBitsKHR handleType
5689 int fd
5690}
5691
5692@extension("VK_KHR_external_fence_fd") // 116
5693class VkFenceGetFdInfoKHR {
5694 VkStructureType sType
5695 const void* pNext
5696 VkFence fence
5697 VkExternalFenceHandleTypeFlagBitsKHR handleType
5698}
5699
Jesse Hall076f95d2017-09-20 11:34:47 -07005700@extension("VK_KHR_maintenance2") // 118
5701class VkPhysicalDevicePointClippingPropertiesKHR {
5702 VkStructureType sType
5703 void* pNext
5704 VkPointClippingBehaviorKHR pointClippingBehavior
5705}
5706
5707@extension("VK_KHR_maintenance2") // 118
5708class VkInputAttachmentAspectReferenceKHR {
5709 u32 subpass
5710 u32 inputAttachmentIndex
5711 VkImageAspectFlags aspectMask
5712}
5713
5714@extension("VK_KHR_maintenance2") // 118
5715class VkRenderPassInputAttachmentAspectCreateInfoKHR {
5716 VkStructureType sType
5717 const void* pNext
5718 u32 aspectReferenceCount
5719 const VkInputAttachmentAspectReferenceKHR* pAspectReferences
5720}
5721
5722@extension("VK_KHR_maintenance2") // 118
5723class VkImageViewUsageCreateInfoKHR {
5724 VkStructureType sType
5725 const void* pNext
5726 VkImageUsageFlags usage
5727}
5728
5729@extension("VK_KHR_maintenance2") // 118
5730class VkPipelineTessellationDomainOriginStateCreateInfoKHR {
5731 VkStructureType sType
5732 const void* pNext
5733 VkTessellationDomainOriginKHR domainOrigin
5734}
5735
Jesse Hall05556b12017-05-18 17:40:25 -07005736@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13005737class VkPhysicalDeviceSurfaceInfo2KHR {
5738 VkStructureType sType
5739 const void* pNext
5740 VkSurfaceKHR surface
5741}
5742
Jesse Hall05556b12017-05-18 17:40:25 -07005743@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13005744class VkSurfaceCapabilities2KHR {
5745 VkStructureType sType
5746 void* pNext
5747 VkSurfaceCapabilitiesKHR surfaceCapabilities
5748}
5749
Jesse Hall05556b12017-05-18 17:40:25 -07005750@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13005751class VkSurfaceFormat2KHR {
5752 VkStructureType sType
5753 void* pNext
5754 VkSurfaceFormatKHR surfaceFormat
5755}
5756
Jesse Hall9492f992017-08-28 12:10:06 -07005757@extension("VK_KHR_variable_pointers") // 121
5758class VkPhysicalDeviceVariablePointerFeaturesKHR {
5759 VkStructureType sType
5760 void* pNext
5761 VkBool32 variablePointersStorageBuffer
5762 VkBool32 variablePointers
5763}
5764
Jesse Hallad250842017-03-10 18:35:38 -08005765@extension("VK_MVK_ios_surface") // 123
5766class VkIOSSurfaceCreateInfoMVK {
5767 VkStructureType sType
5768 const void* pNext
5769 VkIOSSurfaceCreateFlagsMVK flags
5770 const void* pView
5771}
5772
5773@extension("VK_MVK_macos_surface") // 124
5774class VkMacOSSurfaceCreateInfoMVK {
5775 VkStructureType sType
5776 const void* pNext
5777 VkMacOSSurfaceCreateFlagsMVK flags
5778 const void* pView
5779}
5780
Jesse Hall9492f992017-08-28 12:10:06 -07005781@extension("VK_KHR_dedicated_allocation") // 128
5782class VkMemoryDedicatedRequirementsKHR {
5783 VkStructureType sType
5784 void* pNext
5785 VkBool32 prefersDedicatedAllocation
5786 VkBool32 requiresDedicatedAllocation
5787}
5788
5789@extension("VK_KHR_dedicated_allocation") // 128
5790class VkMemoryDedicatedAllocateInfoKHR {
5791 VkStructureType sType
5792 const void* pNext
5793 VkImage image
5794 VkBuffer buffer
5795}
5796
Jesse Hall7ba0ac72017-07-07 17:13:23 -07005797@extension("VK_EXT_sampler_filter_minmax") // 131
5798class VkSamplerReductionModeCreateInfoEXT {
5799 VkStructureType sType
5800 const void* pNext
5801 VkSamplerReductionModeEXT reductionMode
5802}
5803
5804@extension("VK_EXT_sampler_filter_minmax") // 131
5805class VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
5806 VkStructureType sType
5807 void* pNext
5808 VkBool32 filterMinmaxSingleComponentFormats
5809 VkBool32 filterMinmaxImageComponentMapping
5810}
5811
Jesse Hall77726222017-09-19 14:49:27 -05005812@extension("VK_EXT_sample_locations") // 144
5813class VkSampleLocationEXT {
5814 f32 x
5815 f32 y
5816}
5817
5818@extension("VK_EXT_sample_locations") // 144
5819class VkSampleLocationsInfoEXT {
5820 VkStructureType sType
5821 const void* pNext
5822 VkSampleCountFlagBits sampleLocationsPerPixel
5823 VkExtent2D sampleLocationGridSize
5824 u32 sampleLocationsCount
5825 const VkSampleLocationEXT* pSampleLocations
5826}
5827
5828@extension("VK_EXT_sample_locations") // 144
5829class VkAttachmentSampleLocationsEXT {
5830 u32 attachmentIndex
5831 VkSampleLocationsInfoEXT sampleLocationsInfo
5832}
5833
5834@extension("VK_EXT_sample_locations") // 144
5835class VkSubpassSampleLocationsEXT {
5836 u32 subpassIndex
5837 VkSampleLocationsInfoEXT sampleLocationsInfo
5838}
5839
5840@extension("VK_EXT_sample_locations") // 144
5841class VkRenderPassSampleLocationsBeginInfoEXT {
5842 VkStructureType sType
5843 const void* pNext
5844 u32 attachmentInitialSampleLocationsCount
5845 const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations
5846 u32 postSubpassSampleLocationsCount
5847 const VkSubpassSampleLocationsEXT* pSubpassSampleLocations
5848}
5849
5850@extension("VK_EXT_sample_locations") // 144
5851class VkPipelineSampleLocationsStateCreateInfoEXT {
5852 VkStructureType sType
5853 const void* pNext
5854 VkBool32 sampleLocationsEnable
5855 VkSampleLocationsInfoEXT sampleLocationsInfo
5856}
5857
5858@extension("VK_EXT_sample_locations") // 144
5859class VkPhysicalDeviceSampleLocationsPropertiesEXT {
5860 VkStructureType sType
5861 void* pNext
5862 VkSampleCountFlags sampleLocationSampleCounts
5863 VkExtent2D maxSampleLocationGridSize
5864 f32[2] sampleLocationCoordinateRange
5865 u32 sampleLocationSubPixelBits
5866 VkBool32 variableSampleLocations
5867}
5868
5869@extension("VK_EXT_sample_locations") // 144
5870class VkMultisamplePropertiesEXT {
5871 VkStructureType sType
5872 void* pNext
5873 VkExtent2D maxSampleLocationGridSize
5874}
5875
Jesse Hall9492f992017-08-28 12:10:06 -07005876@extension("VK_KHR_get_memory_requirements2") // 147
5877class VkBufferMemoryRequirementsInfo2KHR {
5878 VkStructureType sType
5879 const void* pNext
5880 VkBuffer buffer
5881}
5882
5883@extension("VK_KHR_get_memory_requirements2") // 147
5884class VkImageMemoryRequirementsInfo2KHR {
5885 VkStructureType sType
5886 const void* pNext
5887 VkImage image
5888}
5889
5890@extension("VK_KHR_get_memory_requirements2") // 147
5891class VkImageSparseMemoryRequirementsInfo2KHR {
5892 VkStructureType sType
5893 const void* pNext
5894 VkImage image
5895}
5896
5897@extension("VK_KHR_get_memory_requirements2") // 147
5898class VkMemoryRequirements2KHR {
5899 VkStructureType sType
5900 void* pNext
5901 VkMemoryRequirements memoryRequirements
5902}
5903
5904@extension("VK_KHR_get_memory_requirements2") // 147
5905class VkSparseImageMemoryRequirements2KHR {
5906 VkStructureType sType
5907 void* pNext
5908 VkSparseImageMemoryRequirements memoryRequirements
5909}
5910
Jesse Hall076f95d2017-09-20 11:34:47 -07005911@extension("VK_KHR_image_format_list") // 148
5912class VkImageFormatListCreateInfoKHR {
5913 VkStructureType sType
5914 const void* pNext
5915 u32 viewFormatCount
5916 const VkFormat* pViewFormats
5917}
5918
Jesse Hall7ba0ac72017-07-07 17:13:23 -07005919@extension("VK_EXT_blend_operation_advanced") // 149
5920class VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
5921 VkStructureType sType
5922 void* pNext
5923 VkBool32 advancedBlendCoherentOperations
5924}
5925
5926@extension("VK_EXT_blend_operation_advanced") // 149
5927class VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT {
5928 VkStructureType sType
5929 void* pNext
5930 u32 advancedBlendMaxColorAttachments
5931 VkBool32 advancedBlendIndependentBlend
5932 VkBool32 advancedBlendNonPremultipliedSrcColor
5933 VkBool32 advancedBlendNonPremultipliedDstColor
5934 VkBool32 advancedBlendCorrelatedOverlap
5935 VkBool32 advancedBlendAllOperations
5936}
5937
5938@extension("VK_EXT_blend_operation_advanced") // 149
5939class VkPipelineColorBlendAdvancedStateCreateInfoEXT {
5940 VkStructureType sType
5941 const void* pNext
5942 VkBool32 srcPremultiplied
5943 VkBool32 dstPremultiplied
5944 VkBlendOverlapEXT blendOverlap
5945}
5946
5947@extension("VK_NV_fragment_coverage_to_color") // 150
5948class VkPipelineCoverageToColorStateCreateInfoNV {
5949 VkStructureType sType
5950 const void* pNext
5951 VkPipelineCoverageToColorStateCreateFlagsNV flags
5952 VkBool32 coverageToColorEnable
5953 u32 coverageToColorLocation
5954}
5955
5956@extension("VK_NV_framebuffer_mixed_samples") // 153
5957class VkPipelineCoverageModulationStateCreateInfoNV {
5958 VkStructureType sType
5959 const void* pNext
5960 VkPipelineCoverageModulationStateCreateFlagsNV flags
5961 VkCoverageModulationModeNV coverageModulationMode
5962 VkBool32 coverageModulationTableEnable
5963 u32 coverageModulationTableCount
5964 const f32* pCoverageModulationTable
5965}
5966
Jesse Hall076f95d2017-09-20 11:34:47 -07005967@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5968class VkSamplerYcbcrConversionCreateInfoKHR {
5969 VkStructureType sType
5970 const void* pNext
5971 VkFormat format
5972 VkSamplerYcbcrModelConversionKHR ycbcrModel
5973 VkSamplerYcbcrRangeKHR ycbcrRange
5974 VkComponentMapping components
5975 VkChromaLocationKHR xChromaOffset
5976 VkChromaLocationKHR yChromaOffset
5977 VkFilter chromaFilter
5978 VkBool32 forceExplicitReconstruction
5979}
5980
5981@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5982class VkSamplerYcbcrConversionInfoKHR {
5983 VkStructureType sType
5984 const void* pNext
5985 VkSamplerYcbcrConversionKHR conversion
5986}
5987
5988@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5989class VkBindImagePlaneMemoryInfoKHR {
5990 VkStructureType sType
5991 const void* pNext
5992 VkImageAspectFlagBits planeAspect
5993}
5994
5995@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5996class VkImagePlaneMemoryRequirementsInfoKHR {
5997 VkStructureType sType
5998 const void* pNext
5999 VkImageAspectFlagBits planeAspect
6000}
6001
6002@extension("VK_KHR_sampler_ycbcr_conversion") // 157
6003class VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR {
6004 VkStructureType sType
6005 void* pNext
6006 VkBool32 samplerYcbcrConversion
6007}
6008
6009@extension("VK_KHR_sampler_ycbcr_conversion") // 157
6010class VkSamplerYcbcrConversionImageFormatPropertiesKHR {
6011 VkStructureType sType
6012 void* pNext
6013 u32 combinedImageSamplerDescriptorCount
6014}
6015
6016@extension("VK_KHR_bind_memory2") // 158
6017class VkBindBufferMemoryInfoKHR {
6018 VkStructureType sType
6019 const void* pNext
6020 VkBuffer buffer
6021 VkDeviceMemory memory
6022 VkDeviceSize memoryOffset
6023}
6024
6025@extension("VK_KHR_bind_memory2") // 158
6026class VkBindImageMemoryInfoKHR {
6027 VkStructureType sType
6028 const void* pNext
6029 VkImage image
6030 VkDeviceMemory memory
6031 VkDeviceSize memoryOffset
6032}
6033
Jesse Hall77726222017-09-19 14:49:27 -05006034@extension("VK_EXT_validation_cache") // 161
6035class VkValidationCacheCreateInfoEXT {
6036 VkStructureType sType
6037 const void* pNext
6038 VkValidationCacheCreateFlagsEXT flags
6039 platform.size_t initialDataSize
6040 const void* pInitialData
6041}
6042
6043@extension("VK_EXT_validation_cache") // 161
6044class VkShaderModuleValidationCacheCreateInfoEXT {
6045 VkStructureType sType
6046 const void* pNext
6047 VkValidationCacheEXT validationCache
6048}
6049
Daniel Koch09f7bf92017-10-05 00:26:58 -04006050@extension("VK_KHR_maintenance3") // 169
6051class VkPhysicalDeviceMaintenance3PropertiesKHR {
6052 VkStructureType sType
6053 void* pNext
6054 u32 maxPerSetDescriptors
6055 VkDeviceSize maxMemoryAllocationSize
6056}
6057
6058@extension("VK_KHR_maintenance3") // 169
6059class VkDescriptorSetLayoutSupportKHR {
6060 VkStructureType sType
6061 void* pNext
6062 VkBool32 supported
6063}
6064
6065
Jesse Halld27f6aa2015-08-15 17:58:48 -07006066////////////////
6067// Commands //
6068////////////////
6069
6070// Function pointers. TODO: add support for function pointers.
6071
6072@external type void* PFN_vkVoidFunction
6073@pfn cmd void vkVoidFunction() {
6074}
6075
Jesse Hall3fbc8562015-11-29 22:10:52 -08006076@external type void* PFN_vkAllocationFunction
6077@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006078 void* pUserData,
6079 platform.size_t size,
6080 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006081 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08006082 return ?
6083}
6084
Jesse Hall3fbc8562015-11-29 22:10:52 -08006085@external type void* PFN_vkReallocationFunction
6086@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006087 void* pUserData,
6088 void* pOriginal,
6089 platform.size_t size,
6090 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006091 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006092 return ?
6093}
6094
6095@external type void* PFN_vkFreeFunction
6096@pfn cmd void vkFreeFunction(
6097 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006098 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006099}
6100
Jesse Hall3fbc8562015-11-29 22:10:52 -08006101@external type void* PFN_vkInternalAllocationNotification
6102@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006103 void* pUserData,
6104 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006105 VkInternalAllocationType allocationType,
6106 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08006107}
6108
6109@external type void* PFN_vkInternalFreeNotification
6110@pfn cmd void vkInternalFreeNotification(
6111 void* pUserData,
6112 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006113 VkInternalAllocationType allocationType,
6114 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08006115}
Jesse Halld27f6aa2015-08-15 17:58:48 -07006116
6117// Global functions
6118
6119@threadSafety("system")
6120cmd VkResult vkCreateInstance(
6121 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006122 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006123 VkInstance* pInstance) {
6124 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
6125
6126 instance := ?
6127 pInstance[0] = instance
6128 State.Instances[instance] = new!InstanceObject()
6129
Jesse Hall3dd678a2016-01-08 21:52:01 -08006130 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
6131 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07006132
6133 return ?
6134}
6135
6136@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006137cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006138 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006139 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006140 instanceObject := GetInstance(instance)
6141
6142 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006143}
6144
6145@threadSafety("system")
6146cmd VkResult vkEnumeratePhysicalDevices(
6147 VkInstance instance,
6148 u32* pPhysicalDeviceCount,
6149 VkPhysicalDevice* pPhysicalDevices) {
6150 instanceObject := GetInstance(instance)
6151
6152 physicalDeviceCount := as!u32(?)
6153 pPhysicalDeviceCount[0] = physicalDeviceCount
6154 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
6155
6156 for i in (0 .. physicalDeviceCount) {
6157 physicalDevice := ?
6158 physicalDevices[i] = physicalDevice
6159 if !(physicalDevice in State.PhysicalDevices) {
6160 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
6161 }
6162 }
6163
6164 return ?
6165}
6166
6167cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
6168 VkDevice device,
6169 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006170 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006171 device := GetDevice(device)
6172 }
6173
6174 return ?
6175}
6176
6177cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
6178 VkInstance instance,
6179 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006180 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006181 instanceObject := GetInstance(instance)
6182 }
6183
6184 return ?
6185}
6186
Jesse Hall606a54e2015-11-19 22:17:28 -08006187cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006188 VkPhysicalDevice physicalDevice,
6189 VkPhysicalDeviceProperties* pProperties) {
6190 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6191
6192 properties := ?
6193 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07006194}
6195
Jesse Hall606a54e2015-11-19 22:17:28 -08006196cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006197 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006198 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006199 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006200 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006201 // TODO: Figure out how to express fetch-count-or-properties
6202 // This version fails 'apic validate' with 'fence not allowed in
6203 // *semantic.Branch'. Other attempts have failed with the same or other
6204 // errors.
6205 // if pQueueFamilyProperties != null {
6206 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
6207 // for i in (0 .. pCount[0]) {
6208 // queueProperties := as!VkQueueFamilyProperties(?)
6209 // queuesProperties[i] = queueProperties
6210 // }
6211 // } else {
6212 // count := ?
6213 // pCount[0] = count
6214 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006215}
6216
Jesse Hall606a54e2015-11-19 22:17:28 -08006217cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006218 VkPhysicalDevice physicalDevice,
6219 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
6220 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6221
6222 memoryProperties := ?
6223 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07006224}
6225
Jesse Hall606a54e2015-11-19 22:17:28 -08006226cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006227 VkPhysicalDevice physicalDevice,
6228 VkPhysicalDeviceFeatures* pFeatures) {
6229 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6230
6231 features := ?
6232 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07006233}
6234
Jesse Hall606a54e2015-11-19 22:17:28 -08006235cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006236 VkPhysicalDevice physicalDevice,
6237 VkFormat format,
6238 VkFormatProperties* pFormatProperties) {
6239 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6240
6241 formatProperties := ?
6242 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07006243}
6244
Jesse Halla9e57032015-11-30 01:03:10 -08006245cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006246 VkPhysicalDevice physicalDevice,
6247 VkFormat format,
6248 VkImageType type,
6249 VkImageTiling tiling,
6250 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006251 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006252 VkImageFormatProperties* pImageFormatProperties) {
6253 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6254
6255 imageFormatProperties := ?
6256 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08006257
6258 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07006259}
6260
Jesse Halld27f6aa2015-08-15 17:58:48 -07006261
6262// Device functions
6263
6264@threadSafety("system")
6265cmd VkResult vkCreateDevice(
6266 VkPhysicalDevice physicalDevice,
6267 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006268 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006269 VkDevice* pDevice) {
6270 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
6271 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6272
6273 device := ?
6274 pDevice[0] = device
6275 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
6276
6277 return ?
6278}
6279
6280@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006281cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006282 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006283 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006284 deviceObject := GetDevice(device)
6285
6286 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006287}
6288
6289
6290// Extension discovery functions
6291
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006292cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006293 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006294 VkLayerProperties* pProperties) {
6295 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006296 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006297
6298 properties := pProperties[0:count]
6299 for i in (0 .. count) {
6300 property := ?
6301 properties[i] = property
6302 }
6303
6304 return ?
6305}
6306
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006307cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006308 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006309 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006310 VkExtensionProperties* pProperties) {
6311 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006312 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006313
6314 properties := pProperties[0:count]
6315 for i in (0 .. count) {
6316 property := ?
6317 properties[i] = property
6318 }
6319
6320 return ?
6321}
6322
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006323cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006324 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006325 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006326 VkLayerProperties* pProperties) {
6327 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6328 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006329 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006330
6331 properties := pProperties[0:count]
6332 for i in (0 .. count) {
6333 property := ?
6334 properties[i] = property
6335 }
6336
6337 return ?
6338}
6339
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006340cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006341 VkPhysicalDevice physicalDevice,
6342 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006343 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006344 VkExtensionProperties* pProperties) {
6345 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6346
6347 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006348 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006349
6350 properties := pProperties[0:count]
6351 for i in (0 .. count) {
6352 property := ?
6353 properties[i] = property
6354 }
6355
6356 return ?
6357}
6358
6359
6360// Queue functions
6361
6362@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08006363cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006364 VkDevice device,
6365 u32 queueFamilyIndex,
6366 u32 queueIndex,
6367 VkQueue* pQueue) {
6368 deviceObject := GetDevice(device)
6369
6370 queue := ?
6371 pQueue[0] = queue
6372
6373 if !(queue in State.Queues) {
6374 State.Queues[queue] = new!QueueObject(device: device)
6375 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006376}
6377
6378@threadSafety("app")
6379cmd VkResult vkQueueSubmit(
6380 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08006381 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08006382 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006383 VkFence fence) {
6384 queueObject := GetQueue(queue)
6385
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006386 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006387 fenceObject := GetFence(fence)
6388 assert(fenceObject.device == queueObject.device)
6389 }
6390
Jesse Hall3fbc8562015-11-29 22:10:52 -08006391 // commandBuffers := pcommandBuffers[0:commandBufferCount]
6392 // for i in (0 .. commandBufferCount) {
6393 // commandBuffer := commandBuffers[i]
6394 // commandBufferObject := GetCommandBuffer(commandBuffer)
6395 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08006396 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08006397 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
6398 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08006399 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006400
6401 return ?
6402}
6403
6404@threadSafety("system")
6405cmd VkResult vkQueueWaitIdle(
6406 VkQueue queue) {
6407 queueObject := GetQueue(queue)
6408
6409 return ?
6410}
6411
6412@threadSafety("system")
6413cmd VkResult vkDeviceWaitIdle(
6414 VkDevice device) {
6415 deviceObject := GetDevice(device)
6416
6417 return ?
6418}
6419
6420
6421// Memory functions
6422
6423@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006424cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006425 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006426 const VkMemoryAllocateInfo* pAllocateInfo,
6427 const VkAllocationCallbacks* pAllocator,
6428 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006429 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006430 deviceObject := GetDevice(device)
6431
Jesse Hall3fbc8562015-11-29 22:10:52 -08006432 memory := ?
6433 pMemory[0] = memory
6434 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006435 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006436 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006437
6438 return ?
6439}
6440
6441@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006442cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006443 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006444 VkDeviceMemory memory,
6445 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006446 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006447 memoryObject := GetDeviceMemory(memory)
6448 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006449
6450 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006451 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006452 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006453 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
6454 "vkFreeMemory: commandBuffers still bound")
6455 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006456}
6457
6458@threadSafety("app")
6459cmd VkResult vkMapMemory(
6460 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006461 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006462 VkDeviceSize offset,
6463 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006464 VkMemoryMapFlags flags,
6465 void** ppData) {
6466 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006467 memoryObject := GetDeviceMemory(memory)
6468 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006469
6470 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08006471 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006472
6473 return ?
6474}
6475
6476@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006477cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006478 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006479 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006480 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006481 memoryObject := GetDeviceMemory(memory)
6482 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006483}
6484
6485cmd VkResult vkFlushMappedMemoryRanges(
6486 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006487 u32 memoryRangeCount
6488 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006489 deviceObject := GetDevice(device)
6490
Jesse Hall3fbc8562015-11-29 22:10:52 -08006491 memoryRanges := pMemoryRanges[0:memoryRangeCount]
6492 for i in (0 .. memoryRangeCount) {
6493 memoryRange := memoryRanges[i]
6494 memoryObject := GetDeviceMemory(memoryRange.memory)
6495 assert(memoryObject.device == device)
6496 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006497 }
6498
6499 return ?
6500}
6501
6502cmd VkResult vkInvalidateMappedMemoryRanges(
6503 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006504 u32 memoryRangeCount,
6505 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006506 deviceObject := GetDevice(device)
6507
Jesse Hall3fbc8562015-11-29 22:10:52 -08006508 memoryRanges := pMemoryRanges[0:memoryRangeCount]
6509 for i in (0 .. memoryRangeCount) {
6510 memoryRange := memoryRanges[i]
6511 memoryObject := GetDeviceMemory(memoryRange.memory)
6512 assert(memoryObject.device == device)
6513 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006514 }
6515
6516 return ?
6517}
6518
6519
6520// Memory management API functions
6521
Jesse Hall606a54e2015-11-19 22:17:28 -08006522cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006523 VkDevice device,
6524 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006525 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006526 deviceObject := GetDevice(device)
6527
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006528 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006529 memoryObject := GetDeviceMemory(memory)
6530 assert(memoryObject.device == device)
6531 }
6532
6533 committedMemoryInBytes := ?
6534 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07006535}
6536
Jesse Hall606a54e2015-11-19 22:17:28 -08006537cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006538 VkDevice device,
6539 VkBuffer buffer,
6540 VkMemoryRequirements* pMemoryRequirements) {
6541 deviceObject := GetDevice(device)
6542 bufferObject := GetBuffer(buffer)
6543 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006544}
6545
6546cmd VkResult vkBindBufferMemory(
6547 VkDevice device,
6548 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006549 VkDeviceMemory memory,
6550 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006551 deviceObject := GetDevice(device)
6552 bufferObject := GetBuffer(buffer)
6553 assert(bufferObject.device == device)
6554
6555 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006556 if bufferObject.memory != NULL_HANDLE {
6557 memoryObject := GetDeviceMemory(bufferObject.memory)
6558 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006559 }
6560
6561 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006562 if memory != NULL_HANDLE {
6563 memoryObject := GetDeviceMemory(memory)
6564 assert(memoryObject.device == device)
6565 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006566 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006567 bufferObject.memory = memory
6568 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006569
6570 return ?
6571}
6572
Jesse Hall606a54e2015-11-19 22:17:28 -08006573cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006574 VkDevice device,
6575 VkImage image,
6576 VkMemoryRequirements* pMemoryRequirements) {
6577 deviceObject := GetDevice(device)
6578 imageObject := GetImage(image)
6579 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006580}
6581
6582cmd VkResult vkBindImageMemory(
6583 VkDevice device,
6584 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006585 VkDeviceMemory memory,
6586 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006587 deviceObject := GetDevice(device)
6588 imageObject := GetImage(image)
6589 assert(imageObject.device == device)
6590
6591 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006592 if imageObject.memory != NULL_HANDLE {
6593 memoryObject := GetDeviceMemory(imageObject.memory)
6594 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006595 }
6596
6597 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006598 if memory != NULL_HANDLE {
6599 memoryObject := GetDeviceMemory(memory)
6600 assert(memoryObject.device == device)
6601 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006602 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006603 imageObject.memory = memory
6604 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006605
6606 return ?
6607}
6608
Jesse Hall606a54e2015-11-19 22:17:28 -08006609cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006610 VkDevice device,
6611 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006612 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006613 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
6614 deviceObject := GetDevice(device)
6615 imageObject := GetImage(image)
6616 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006617}
6618
Jesse Hall606a54e2015-11-19 22:17:28 -08006619cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006620 VkPhysicalDevice physicalDevice,
6621 VkFormat format,
6622 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08006623 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006624 VkImageUsageFlags usage,
6625 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006626 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006627 VkSparseImageFormatProperties* pProperties) {
6628 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006629}
6630
Jesse Halla6429252015-11-29 18:59:42 -08006631cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006632 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006633 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08006634 const VkBindSparseInfo* pBindInfo,
6635 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006636 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006637
6638 return ?
6639}
6640
6641
6642// Fence functions
6643
6644@threadSafety("system")
6645cmd VkResult vkCreateFence(
6646 VkDevice device,
6647 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006648 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006649 VkFence* pFence) {
6650 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
6651 deviceObject := GetDevice(device)
6652
6653 fence := ?
6654 pFence[0] = fence
6655 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08006656 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07006657
6658 return ?
6659}
6660
6661@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006662cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006663 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006664 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006665 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006666 deviceObject := GetDevice(device)
6667 fenceObject := GetFence(fence)
6668 assert(fenceObject.device == device)
6669
6670 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006671}
6672
6673@threadSafety("system")
6674cmd VkResult vkResetFences(
6675 VkDevice device,
6676 u32 fenceCount,
6677 const VkFence* pFences) {
6678 deviceObject := GetDevice(device)
6679
6680 fences := pFences[0:fenceCount]
6681 for i in (0 .. fenceCount) {
6682 fence := fences[i]
6683 fenceObject := GetFence(fence)
6684 assert(fenceObject.device == device)
6685 fenceObject.signaled = false
6686 }
6687
6688 return ?
6689}
6690
6691@threadSafety("system")
6692cmd VkResult vkGetFenceStatus(
6693 VkDevice device,
6694 VkFence fence) {
6695 deviceObject := GetDevice(device)
6696 fenceObject := GetFence(fence)
6697 assert(fenceObject.device == device)
6698
6699 return ?
6700}
6701
6702@threadSafety("system")
6703cmd VkResult vkWaitForFences(
6704 VkDevice device,
6705 u32 fenceCount,
6706 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006707 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006708 u64 timeout) { /// timeout in nanoseconds
6709 deviceObject := GetDevice(device)
6710
6711 fences := pFences[0:fenceCount]
6712 for i in (0 .. fenceCount) {
6713 fence := fences[i]
6714 fenceObject := GetFence(fence)
6715 assert(fenceObject.device == device)
6716 }
6717
6718 return ?
6719}
6720
6721
6722// Queue semaphore functions
6723
6724@threadSafety("system")
6725cmd VkResult vkCreateSemaphore(
6726 VkDevice device,
6727 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006728 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006729 VkSemaphore* pSemaphore) {
6730 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
6731 deviceObject := GetDevice(device)
6732
6733 semaphore := ?
6734 pSemaphore[0] = semaphore
6735 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
6736
6737 return ?
6738}
6739
6740@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006741cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006742 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006743 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006744 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006745 deviceObject := GetDevice(device)
6746 semaphoreObject := GetSemaphore(semaphore)
6747 assert(semaphoreObject.device == device)
6748
6749 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006750}
6751
Jesse Halld27f6aa2015-08-15 17:58:48 -07006752
6753// Event functions
6754
6755@threadSafety("system")
6756cmd VkResult vkCreateEvent(
6757 VkDevice device,
6758 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006759 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006760 VkEvent* pEvent) {
6761 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
6762 deviceObject := GetDevice(device)
6763
6764 event := ?
6765 pEvent[0] = event
6766 State.Events[event] = new!EventObject(device: device)
6767
6768 return ?
6769}
6770
6771@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006772cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006773 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006774 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006775 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006776 deviceObject := GetDevice(device)
6777 eventObject := GetEvent(event)
6778 assert(eventObject.device == device)
6779
6780 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006781}
6782
6783@threadSafety("system")
6784cmd VkResult vkGetEventStatus(
6785 VkDevice device,
6786 VkEvent event) {
6787 deviceObject := GetDevice(device)
6788 eventObject := GetEvent(event)
6789 assert(eventObject.device == device)
6790
6791 return ?
6792}
6793
6794@threadSafety("system")
6795cmd VkResult vkSetEvent(
6796 VkDevice device,
6797 VkEvent event) {
6798 deviceObject := GetDevice(device)
6799 eventObject := GetEvent(event)
6800 assert(eventObject.device == device)
6801
6802 return ?
6803}
6804
6805@threadSafety("system")
6806cmd VkResult vkResetEvent(
6807 VkDevice device,
6808 VkEvent event) {
6809 deviceObject := GetDevice(device)
6810 eventObject := GetEvent(event)
6811 assert(eventObject.device == device)
6812
6813 return ?
6814}
6815
6816
6817// Query functions
6818
6819@threadSafety("system")
6820cmd VkResult vkCreateQueryPool(
6821 VkDevice device,
6822 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006823 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006824 VkQueryPool* pQueryPool) {
6825 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
6826 deviceObject := GetDevice(device)
6827
6828 queryPool := ?
6829 pQueryPool[0] = queryPool
6830 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
6831
6832 return ?
6833}
6834
6835@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006836cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006837 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006838 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006839 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006840 deviceObject := GetDevice(device)
6841 queryPoolObject := GetQueryPool(queryPool)
6842 assert(queryPoolObject.device == device)
6843
6844 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006845}
6846
6847@threadSafety("system")
6848cmd VkResult vkGetQueryPoolResults(
6849 VkDevice device,
6850 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006851 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006852 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006853 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006854 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006855 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006856 VkQueryResultFlags flags) {
6857 deviceObject := GetDevice(device)
6858 queryPoolObject := GetQueryPool(queryPool)
6859 assert(queryPoolObject.device == device)
6860
Jesse Halld27f6aa2015-08-15 17:58:48 -07006861 data := pData[0:dataSize]
6862
6863 return ?
6864}
6865
6866// Buffer functions
6867
6868@threadSafety("system")
6869cmd VkResult vkCreateBuffer(
6870 VkDevice device,
6871 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006872 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006873 VkBuffer* pBuffer) {
6874 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
6875 deviceObject := GetDevice(device)
6876
6877 buffer := ?
6878 pBuffer[0] = buffer
6879 State.Buffers[buffer] = new!BufferObject(device: device)
6880
6881 return ?
6882}
6883
6884@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006885cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006886 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006887 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006888 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006889 deviceObject := GetDevice(device)
6890 bufferObject := GetBuffer(buffer)
6891 assert(bufferObject.device == device)
6892
Jesse Hall3fbc8562015-11-29 22:10:52 -08006893 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006894 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006895}
6896
6897
6898// Buffer view functions
6899
6900@threadSafety("system")
6901cmd VkResult vkCreateBufferView(
6902 VkDevice device,
6903 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006904 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006905 VkBufferView* pView) {
6906 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
6907 deviceObject := GetDevice(device)
6908
6909 bufferObject := GetBuffer(pCreateInfo.buffer)
6910 assert(bufferObject.device == device)
6911
6912 view := ?
6913 pView[0] = view
6914 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
6915
6916 return ?
6917}
6918
6919@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006920cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006921 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006922 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006923 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006924 deviceObject := GetDevice(device)
6925 bufferViewObject := GetBufferView(bufferView)
6926 assert(bufferViewObject.device == device)
6927
6928 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006929}
6930
6931
6932// Image functions
6933
6934@threadSafety("system")
6935cmd VkResult vkCreateImage(
6936 VkDevice device,
6937 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006938 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006939 VkImage* pImage) {
6940 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
6941 deviceObject := GetDevice(device)
6942
6943 image := ?
6944 pImage[0] = image
6945 State.Images[image] = new!ImageObject(device: device)
6946
6947 return ?
6948}
6949
6950@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006951cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006952 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006953 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006954 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006955 deviceObject := GetDevice(device)
6956 imageObject := GetImage(image)
6957 assert(imageObject.device == device)
6958
Jesse Hall3fbc8562015-11-29 22:10:52 -08006959 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006960 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006961}
6962
Jesse Hall606a54e2015-11-19 22:17:28 -08006963cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006964 VkDevice device,
6965 VkImage image,
6966 const VkImageSubresource* pSubresource,
6967 VkSubresourceLayout* pLayout) {
6968 deviceObject := GetDevice(device)
6969 imageObject := GetImage(image)
6970 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006971}
6972
6973
6974// Image view functions
6975
6976@threadSafety("system")
6977cmd VkResult vkCreateImageView(
6978 VkDevice device,
6979 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006980 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006981 VkImageView* pView) {
6982 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
6983 deviceObject := GetDevice(device)
6984
6985 imageObject := GetImage(pCreateInfo.image)
6986 assert(imageObject.device == device)
6987
6988 view := ?
6989 pView[0] = view
6990 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
6991
6992 return ?
6993}
6994
6995@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006996cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006997 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006998 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006999 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007000 deviceObject := GetDevice(device)
7001 imageViewObject := GetImageView(imageView)
7002 assert(imageViewObject.device == device)
7003
7004 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007005}
7006
7007
7008// Shader functions
7009
7010cmd VkResult vkCreateShaderModule(
7011 VkDevice device,
7012 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007013 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007014 VkShaderModule* pShaderModule) {
7015 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
7016 deviceObject := GetDevice(device)
7017
7018 shaderModule := ?
7019 pShaderModule[0] = shaderModule
7020 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
7021
7022 return ?
7023}
7024
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007025cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007026 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007027 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007028 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007029 deviceObject := GetDevice(device)
7030 shaderModuleObject := GetShaderModule(shaderModule)
7031 assert(shaderModuleObject.device == device)
7032
7033 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007034}
7035
Jesse Halld27f6aa2015-08-15 17:58:48 -07007036
7037// Pipeline functions
7038
7039cmd VkResult vkCreatePipelineCache(
7040 VkDevice device,
7041 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007042 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007043 VkPipelineCache* pPipelineCache) {
7044 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
7045 deviceObject := GetDevice(device)
7046
7047 pipelineCache := ?
7048 pPipelineCache[0] = pipelineCache
7049 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
7050
7051 return ?
7052}
7053
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007054cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007055 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007056 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007057 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007058 deviceObject := GetDevice(device)
7059 pipelineCacheObject := GetPipelineCache(pipelineCache)
7060 assert(pipelineCacheObject.device == device)
7061
7062 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007063}
7064
Jesse Halld27f6aa2015-08-15 17:58:48 -07007065cmd VkResult vkGetPipelineCacheData(
7066 VkDevice device,
7067 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08007068 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007069 void* pData) {
7070 deviceObject := GetDevice(device)
7071 pipelineCacheObject := GetPipelineCache(pipelineCache)
7072 assert(pipelineCacheObject.device == device)
7073
7074 return ?
7075}
7076
7077cmd VkResult vkMergePipelineCaches(
7078 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007079 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007080 u32 srcCacheCount,
7081 const VkPipelineCache* pSrcCaches) {
7082 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007083 dstCacheObject := GetPipelineCache(dstCache)
7084 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007085
7086 srcCaches := pSrcCaches[0:srcCacheCount]
7087 for i in (0 .. srcCacheCount) {
7088 srcCache := srcCaches[i]
7089 srcCacheObject := GetPipelineCache(srcCache)
7090 assert(srcCacheObject.device == device)
7091 }
7092
7093 return ?
7094}
7095
7096cmd VkResult vkCreateGraphicsPipelines(
7097 VkDevice device,
7098 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007099 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007100 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007101 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007102 VkPipeline* pPipelines) {
7103 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007104 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007105 pipelineCacheObject := GetPipelineCache(pipelineCache)
7106 assert(pipelineCacheObject.device == device)
7107 }
7108
Jesse Hall03b6fe12015-11-24 12:44:21 -08007109 createInfos := pCreateInfos[0:createInfoCount]
7110 pipelines := pPipelines[0:createInfoCount]
7111 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007112 pipeline := ?
7113 pipelines[i] = pipeline
7114 State.Pipelines[pipeline] = new!PipelineObject(device: device)
7115 }
7116
7117 return ?
7118}
7119
7120cmd VkResult vkCreateComputePipelines(
7121 VkDevice device,
7122 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007123 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007124 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007125 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007126 VkPipeline* pPipelines) {
7127 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007128 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007129 pipelineCacheObject := GetPipelineCache(pipelineCache)
7130 assert(pipelineCacheObject.device == device)
7131 }
7132
Jesse Hall03b6fe12015-11-24 12:44:21 -08007133 createInfos := pCreateInfos[0:createInfoCount]
7134 pipelines := pPipelines[0:createInfoCount]
7135 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007136 pipeline := ?
7137 pipelines[i] = pipeline
7138 State.Pipelines[pipeline] = new!PipelineObject(device: device)
7139 }
7140
7141 return ?
7142}
7143
7144@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007145cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007146 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007147 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007148 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007149 deviceObject := GetDevice(device)
7150 pipelineObjects := GetPipeline(pipeline)
7151 assert(pipelineObjects.device == device)
7152
7153 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007154}
7155
7156
7157// Pipeline layout functions
7158
7159@threadSafety("system")
7160cmd VkResult vkCreatePipelineLayout(
7161 VkDevice device,
7162 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007163 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007164 VkPipelineLayout* pPipelineLayout) {
7165 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
7166 deviceObject := GetDevice(device)
7167
7168 pipelineLayout := ?
7169 pPipelineLayout[0] = pipelineLayout
7170 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
7171
7172 return ?
7173}
7174
7175@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007176cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007177 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007178 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007179 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007180 deviceObject := GetDevice(device)
7181 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
7182 assert(pipelineLayoutObjects.device == device)
7183
7184 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007185}
7186
7187
7188// Sampler functions
7189
7190@threadSafety("system")
7191cmd VkResult vkCreateSampler(
7192 VkDevice device,
7193 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007194 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007195 VkSampler* pSampler) {
7196 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
7197 deviceObject := GetDevice(device)
7198
7199 sampler := ?
7200 pSampler[0] = sampler
7201 State.Samplers[sampler] = new!SamplerObject(device: device)
7202
7203 return ?
7204}
7205
7206@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007207cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007208 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007209 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007210 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007211 deviceObject := GetDevice(device)
7212 samplerObject := GetSampler(sampler)
7213 assert(samplerObject.device == device)
7214
7215 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007216}
7217
7218
7219// Descriptor set functions
7220
7221@threadSafety("system")
7222cmd VkResult vkCreateDescriptorSetLayout(
7223 VkDevice device,
7224 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007225 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007226 VkDescriptorSetLayout* pSetLayout) {
7227 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
7228 deviceObject := GetDevice(device)
7229
7230 setLayout := ?
7231 pSetLayout[0] = setLayout
7232 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
7233
7234 return ?
7235}
7236
7237@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007238cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007239 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007240 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007241 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007242 deviceObject := GetDevice(device)
7243 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
7244 assert(descriptorSetLayoutObject.device == device)
7245
7246 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007247}
7248
7249@threadSafety("system")
7250cmd VkResult vkCreateDescriptorPool(
7251 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007252 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007253 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007254 VkDescriptorPool* pDescriptorPool) {
7255 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
7256 deviceObject := GetDevice(device)
7257
7258 descriptorPool := ?
7259 pDescriptorPool[0] = descriptorPool
7260 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
7261
7262 return ?
7263}
7264
7265@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007266cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007267 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007268 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007269 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007270 deviceObject := GetDevice(device)
7271 descriptorPoolObject := GetDescriptorPool(descriptorPool)
7272 assert(descriptorPoolObject.device == device)
7273
7274 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007275}
7276
7277@threadSafety("app")
7278cmd VkResult vkResetDescriptorPool(
7279 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08007280 VkDescriptorPool descriptorPool,
7281 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007282 deviceObject := GetDevice(device)
7283 descriptorPoolObject := GetDescriptorPool(descriptorPool)
7284 assert(descriptorPoolObject.device == device)
7285
7286 return ?
7287}
7288
7289@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08007290cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007291 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007292 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007293 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007294 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007295 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08007296 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007297
Jesse Hall03b6fe12015-11-24 12:44:21 -08007298 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
7299 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007300 setLayout := setLayouts[i]
7301 setLayoutObject := GetDescriptorSetLayout(setLayout)
7302 assert(setLayoutObject.device == device)
7303 }
7304
Jesse Hall03b6fe12015-11-24 12:44:21 -08007305 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
7306 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007307 descriptorSet := ?
7308 descriptorSets[i] = descriptorSet
7309 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
7310 }
7311
7312 return ?
7313}
7314
Jesse Hallf09c6b12015-08-15 19:54:28 -07007315cmd VkResult vkFreeDescriptorSets(
7316 VkDevice device,
7317 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007318 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07007319 const VkDescriptorSet* pDescriptorSets) {
7320 deviceObject := GetDevice(device)
7321 descriptorPoolObject := GetDescriptorPool(descriptorPool)
7322
Jesse Hall03b6fe12015-11-24 12:44:21 -08007323 descriptorSets := pDescriptorSets[0:descriptorSetCount]
7324 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07007325 descriptorSet := descriptorSets[i]
7326 descriptorSetObject := GetDescriptorSet(descriptorSet)
7327 assert(descriptorSetObject.device == device)
7328 State.DescriptorSets[descriptorSet] = null
7329 }
7330
7331 return ?
7332}
7333
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007334cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007335 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08007336 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007337 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08007338 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007339 const VkCopyDescriptorSet* pDescriptorCopies) {
7340 deviceObject := GetDevice(device)
7341
Jesse Hallb00daad2015-11-29 19:46:20 -08007342 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
7343 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007344 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08007345 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007346 assert(descriptorWriteObject.device == device)
7347 }
7348
Jesse Hallb00daad2015-11-29 19:46:20 -08007349 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
7350 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007351 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08007352 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007353 assert(descriptorCopyObject.device == device)
7354 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07007355}
7356
7357
7358// Framebuffer functions
7359
7360@threadSafety("system")
7361cmd VkResult vkCreateFramebuffer(
7362 VkDevice device,
7363 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007364 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007365 VkFramebuffer* pFramebuffer) {
7366 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
7367 deviceObject := GetDevice(device)
7368
7369 framebuffer := ?
7370 pFramebuffer[0] = framebuffer
7371 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
7372
7373 return ?
7374}
7375
7376@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007377cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007378 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007379 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007380 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007381 deviceObject := GetDevice(device)
7382 framebufferObject := GetFramebuffer(framebuffer)
7383 assert(framebufferObject.device == device)
7384
7385 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007386}
7387
7388
7389// Renderpass functions
7390
7391@threadSafety("system")
7392cmd VkResult vkCreateRenderPass(
7393 VkDevice device,
7394 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007395 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007396 VkRenderPass* pRenderPass) {
7397 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
7398 deviceObject := GetDevice(device)
7399
7400 renderpass := ?
7401 pRenderPass[0] = renderpass
7402 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
7403
7404 return ?
7405}
7406
7407@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007408cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007409 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007410 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007411 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007412 deviceObject := GetDevice(device)
7413 renderPassObject := GetRenderPass(renderPass)
7414 assert(renderPassObject.device == device)
7415
7416 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007417}
7418
Jesse Hall606a54e2015-11-19 22:17:28 -08007419cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007420 VkDevice device,
7421 VkRenderPass renderPass,
7422 VkExtent2D* pGranularity) {
7423 deviceObject := GetDevice(device)
7424 renderPassObject := GetRenderPass(renderPass)
7425
7426 granularity := ?
7427 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07007428}
7429
7430// Command pool functions
7431
7432cmd VkResult vkCreateCommandPool(
7433 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007434 const VkCommandPoolCreateInfo* pCreateInfo,
7435 const VkAllocationCallbacks* pAllocator,
7436 VkCommandPool* pCommandPool) {
7437 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007438 deviceObject := GetDevice(device)
7439
Jesse Hall3fbc8562015-11-29 22:10:52 -08007440 commandPool := ?
7441 pCommandPool[0] = commandPool
7442 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007443
7444 return ?
7445}
7446
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007447cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007448 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007449 VkCommandPool commandPool,
7450 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007451 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007452 commandPoolObject := GetCommandPool(commandPool)
7453 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007454
Jesse Hall3fbc8562015-11-29 22:10:52 -08007455 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007456}
7457
7458cmd VkResult vkResetCommandPool(
7459 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007460 VkCommandPool commandPool,
7461 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007462 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007463 commandPoolObject := GetCommandPool(commandPool)
7464 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007465
7466 return ?
7467}
7468
7469// Command buffer functions
7470
Jesse Hall3fbc8562015-11-29 22:10:52 -08007471macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
7472 memoryObject := GetDeviceMemory(memory)
7473 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07007474
Jesse Hall3fbc8562015-11-29 22:10:52 -08007475 commandBufferObject := GetCommandBuffer(commandBuffer)
7476 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07007477}
7478
Jesse Hall3fbc8562015-11-29 22:10:52 -08007479macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
7480 memoryObject := GetDeviceMemory(memory)
7481 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007482
Jesse Hall3fbc8562015-11-29 22:10:52 -08007483 commandBufferObject := GetCommandBuffer(commandBuffer)
7484 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007485}
7486
7487@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08007488cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007489 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007490 const VkCommandBufferAllocateInfo* pAllocateInfo,
7491 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08007492 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007493
Jesse Hall3dd678a2016-01-08 21:52:01 -08007494 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08007495 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08007496 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007497 commandBuffer := ?
7498 commandBuffers[i] = commandBuffer
7499 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08007500 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07007501
7502 return ?
7503}
7504
7505@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08007506cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007507 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007508 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007509 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007510 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007511 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007512
Jesse Hall3fbc8562015-11-29 22:10:52 -08007513 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08007514 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007515 commandBufferObject := GetCommandBuffer(commandBuffers[i])
7516 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08007517 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08007518 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08007519 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07007520}
7521
7522@threadSafety("app")
7523cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007524 VkCommandBuffer commandBuffer,
7525 const VkCommandBufferBeginInfo* pBeginInfo) {
7526 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
7527 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007528
7529 // TODO: iterate over boundObjects and clear memory bindings
7530
7531 return ?
7532}
7533
7534@threadSafety("app")
7535cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007536 VkCommandBuffer commandBuffer) {
7537 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007538
7539 return ?
7540}
7541
7542@threadSafety("app")
7543cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007544 VkCommandBuffer commandBuffer,
7545 VkCommandBufferResetFlags flags) {
7546 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007547
7548 // TODO: iterate over boundObjects and clear memory bindings
7549
7550 return ?
7551}
7552
7553
7554// Command buffer building functions
7555
7556@threadSafety("app")
7557cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007558 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007559 VkPipelineBindPoint pipelineBindPoint,
7560 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007561 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007562 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007563 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007564
Jesse Halld8bade02015-11-24 10:24:18 -08007565 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007566 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
7567 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
7568 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08007569 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007570}
7571
7572@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007573cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007574 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007575 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007576 u32 viewportCount,
7577 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007578 commandBufferObject := GetCommandBuffer(commandBuffer)
7579 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007580}
7581
7582@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007583cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007584 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007585 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007586 u32 scissorCount,
7587 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007588 commandBufferObject := GetCommandBuffer(commandBuffer)
7589 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007590}
7591
7592@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007593cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007594 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007595 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007596 commandBufferObject := GetCommandBuffer(commandBuffer)
7597 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007598}
7599
7600@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007601cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007602 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08007603 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007604 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08007605 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007606 commandBufferObject := GetCommandBuffer(commandBuffer)
7607 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007608}
Jesse Halld27f6aa2015-08-15 17:58:48 -07007609
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007610@threadSafety("app")
7611cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007612 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007613 // TODO(jessehall): apic only supports 'const' on pointer types. Using
7614 // an annotation as a quick hack to pass this to the template without
7615 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08007616 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007617 commandBufferObject := GetCommandBuffer(commandBuffer)
7618 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007619}
7620
7621@threadSafety("app")
7622cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007623 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007624 f32 minDepthBounds,
7625 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007626 commandBufferObject := GetCommandBuffer(commandBuffer)
7627 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007628}
7629
7630@threadSafety("app")
7631cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007632 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007633 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08007634 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007635 commandBufferObject := GetCommandBuffer(commandBuffer)
7636 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007637}
7638
7639@threadSafety("app")
7640cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007641 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007642 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08007643 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007644 commandBufferObject := GetCommandBuffer(commandBuffer)
7645 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007646}
7647
7648@threadSafety("app")
7649cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007650 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007651 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08007652 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007653 commandBufferObject := GetCommandBuffer(commandBuffer)
7654 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007655}
7656
7657@threadSafety("app")
7658cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007659 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007660 VkPipelineBindPoint pipelineBindPoint,
7661 VkPipelineLayout layout,
7662 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007663 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007664 const VkDescriptorSet* pDescriptorSets,
7665 u32 dynamicOffsetCount,
7666 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007667 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007668
Jesse Hall03b6fe12015-11-24 12:44:21 -08007669 descriptorSets := pDescriptorSets[0:descriptorSetCount]
7670 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007671 descriptorSet := descriptorSets[i]
7672 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007673 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007674 }
7675
7676 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
7677 for i in (0 .. dynamicOffsetCount) {
7678 dynamicOffset := dynamicOffsets[i]
7679 }
7680
Jesse Halld8bade02015-11-24 10:24:18 -08007681 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007682 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
7683 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
7684 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08007685 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007686}
7687
7688@threadSafety("app")
7689cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007690 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007691 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007692 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007693 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007694 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007695 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007696 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007697
Jesse Hall3fbc8562015-11-29 22:10:52 -08007698 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007699
Jesse Hall3fbc8562015-11-29 22:10:52 -08007700 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007701}
7702
7703@threadSafety("app")
7704cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007705 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007706 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007707 u32 bindingCount,
7708 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007709 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007710 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007711
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007712 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007713 buffers := pBuffers[0:bindingCount]
7714 offsets := pOffsets[0:bindingCount]
7715 for i in (0 .. bindingCount) {
7716 buffer := buffers[i]
7717 offset := offsets[i]
7718 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007719 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007720
Jesse Hall3fbc8562015-11-29 22:10:52 -08007721 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007722 }
7723
Jesse Hall3fbc8562015-11-29 22:10:52 -08007724 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007725}
7726
7727@threadSafety("app")
7728cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007729 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007730 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007731 u32 instanceCount,
7732 u32 firstVertex,
7733 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007734 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007735
Jesse Hall3fbc8562015-11-29 22:10:52 -08007736 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007737}
7738
7739@threadSafety("app")
7740cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007741 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007742 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007743 u32 instanceCount,
7744 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007745 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007746 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007747 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007748
Jesse Hall3fbc8562015-11-29 22:10:52 -08007749 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007750}
7751
7752@threadSafety("app")
7753cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007754 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007755 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007756 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007757 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007758 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007759 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007760 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007761 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007762
Jesse Hall3fbc8562015-11-29 22:10:52 -08007763 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007764
Jesse Hall3fbc8562015-11-29 22:10:52 -08007765 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007766}
7767
7768@threadSafety("app")
7769cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007770 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007771 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007772 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007773 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007774 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007775 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007776 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007777 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007778
Jesse Hall3fbc8562015-11-29 22:10:52 -08007779 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007780
Jesse Hall3fbc8562015-11-29 22:10:52 -08007781 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007782}
7783
7784@threadSafety("app")
7785cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007786 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007787 u32 groupCountX,
7788 u32 groupCountY,
7789 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007790 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007791
Jesse Hall3fbc8562015-11-29 22:10:52 -08007792 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007793}
7794
7795@threadSafety("app")
7796cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007797 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007798 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007799 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007800 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007801 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007802 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007803
Jesse Hall3fbc8562015-11-29 22:10:52 -08007804 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007805
Jesse Hall3fbc8562015-11-29 22:10:52 -08007806 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007807}
7808
7809@threadSafety("app")
7810cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007811 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007812 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007813 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007814 u32 regionCount,
7815 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007816 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007817 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007818 dstBufferObject := GetBuffer(dstBuffer)
7819 assert(commandBufferObject.device == srcBufferObject.device)
7820 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007821
7822 regions := pRegions[0:regionCount]
7823 for i in (0 .. regionCount) {
7824 region := regions[i]
7825 }
7826
Jesse Hall3fbc8562015-11-29 22:10:52 -08007827 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
7828 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007829
Jesse Hall65ab5522015-11-30 00:07:16 -08007830 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007831}
7832
7833@threadSafety("app")
7834cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007835 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007836 VkImage srcImage,
7837 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007838 VkImage dstImage,
7839 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007840 u32 regionCount,
7841 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007842 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007843 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007844 dstImageObject := GetImage(dstImage)
7845 assert(commandBufferObject.device == srcImageObject.device)
7846 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007847
7848 regions := pRegions[0:regionCount]
7849 for i in (0 .. regionCount) {
7850 region := regions[i]
7851 }
7852
Jesse Hall3fbc8562015-11-29 22:10:52 -08007853 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
7854 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007855
Jesse Hall65ab5522015-11-30 00:07:16 -08007856 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007857}
7858
7859@threadSafety("app")
7860cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007861 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007862 VkImage srcImage,
7863 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007864 VkImage dstImage,
7865 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007866 u32 regionCount,
7867 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08007868 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007869 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007870 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007871 dstImageObject := GetImage(dstImage)
7872 assert(commandBufferObject.device == srcImageObject.device)
7873 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007874
7875 regions := pRegions[0:regionCount]
7876 for i in (0 .. regionCount) {
7877 region := regions[i]
7878 }
7879
Jesse Hall3fbc8562015-11-29 22:10:52 -08007880 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
7881 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007882
Jesse Hall3fbc8562015-11-29 22:10:52 -08007883 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007884}
7885
7886@threadSafety("app")
7887cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007888 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007889 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007890 VkImage dstImage,
7891 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007892 u32 regionCount,
7893 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007894 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007895 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007896 dstImageObject := GetImage(dstImage)
7897 assert(commandBufferObject.device == srcBufferObject.device)
7898 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007899
7900 regions := pRegions[0:regionCount]
7901 for i in (0 .. regionCount) {
7902 region := regions[i]
7903 }
7904
Jesse Hall3fbc8562015-11-29 22:10:52 -08007905 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
7906 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007907
Jesse Hall65ab5522015-11-30 00:07:16 -08007908 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007909}
7910
7911@threadSafety("app")
7912cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007913 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007914 VkImage srcImage,
7915 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007916 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007917 u32 regionCount,
7918 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007919 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007920 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007921 dstBufferObject := GetBuffer(dstBuffer)
7922 assert(commandBufferObject.device == srcImageObject.device)
7923 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007924
7925 regions := pRegions[0:regionCount]
7926 for i in (0 .. regionCount) {
7927 region := regions[i]
7928 }
7929
Jesse Hall3fbc8562015-11-29 22:10:52 -08007930 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
7931 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007932
Jesse Hall65ab5522015-11-30 00:07:16 -08007933 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007934}
7935
7936@threadSafety("app")
7937cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007938 VkCommandBuffer commandBuffer,
7939 VkBuffer dstBuffer,
7940 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007941 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07007942 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007943 commandBufferObject := GetCommandBuffer(commandBuffer)
7944 dstBufferObject := GetBuffer(dstBuffer)
7945 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007946
7947 data := pData[0:dataSize]
7948
Jesse Hall3fbc8562015-11-29 22:10:52 -08007949 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007950
Jesse Hall65ab5522015-11-30 00:07:16 -08007951 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007952}
7953
7954@threadSafety("app")
7955cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007956 VkCommandBuffer commandBuffer,
7957 VkBuffer dstBuffer,
7958 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08007959 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007960 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007961 commandBufferObject := GetCommandBuffer(commandBuffer)
7962 dstBufferObject := GetBuffer(dstBuffer)
7963 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007964
Jesse Hall65ab5522015-11-30 00:07:16 -08007965 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007966}
7967
7968@threadSafety("app")
7969cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007970 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007971 VkImage image,
7972 VkImageLayout imageLayout,
7973 const VkClearColorValue* pColor,
7974 u32 rangeCount,
7975 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007976 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007977 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007978 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007979
7980 ranges := pRanges[0:rangeCount]
7981 for i in (0 .. rangeCount) {
7982 range := ranges[i]
7983 }
7984
Jesse Hall3fbc8562015-11-29 22:10:52 -08007985 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007986
Jesse Hall3fbc8562015-11-29 22:10:52 -08007987 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007988}
7989
7990@threadSafety("app")
7991cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007992 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007993 VkImage image,
7994 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007995 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007996 u32 rangeCount,
7997 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007998 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007999 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008000 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008001
8002 ranges := pRanges[0:rangeCount]
8003 for i in (0 .. rangeCount) {
8004 range := ranges[i]
8005 }
8006
Jesse Hall3fbc8562015-11-29 22:10:52 -08008007 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008008
Jesse Hall3fbc8562015-11-29 22:10:52 -08008009 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008010}
8011
8012@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08008013cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008014 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08008015 u32 attachmentCount,
8016 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008017 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08008018 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008019 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008020
8021 rects := pRects[0:rectCount]
8022 for i in (0 .. rectCount) {
8023 rect := rects[i]
8024 }
8025
Jesse Hall3fbc8562015-11-29 22:10:52 -08008026 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008027}
8028
8029@threadSafety("app")
8030cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008031 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008032 VkImage srcImage,
8033 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008034 VkImage dstImage,
8035 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008036 u32 regionCount,
8037 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008038 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008039 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008040 dstImageObject := GetImage(dstImage)
8041 assert(commandBufferObject.device == srcImageObject.device)
8042 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008043
8044 regions := pRegions[0:regionCount]
8045 for i in (0 .. regionCount) {
8046 region := regions[i]
8047 }
8048
Jesse Hall3fbc8562015-11-29 22:10:52 -08008049 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
8050 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008051
Jesse Hall3fbc8562015-11-29 22:10:52 -08008052 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008053}
8054
8055@threadSafety("app")
8056cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008057 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008058 VkEvent event,
8059 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008060 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008061 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008062 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008063}
8064
8065@threadSafety("app")
8066cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008067 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008068 VkEvent event,
8069 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008070 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008071 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008072 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008073}
8074
8075@threadSafety("app")
8076cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008077 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008078 u32 eventCount,
8079 const VkEvent* pEvents,
8080 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008081 VkPipelineStageFlags dstStageMask,
8082 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008083 const VkMemoryBarrier* pMemoryBarriers,
8084 u32 bufferMemoryBarrierCount,
8085 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
8086 u32 imageMemoryBarrierCount,
8087 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008088 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008089
8090 events := pEvents[0:eventCount]
8091 for i in (0 .. eventCount) {
8092 event := events[i]
8093 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008094 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008095 }
8096
Jesse Hall3dd678a2016-01-08 21:52:01 -08008097 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08008098 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08008099 memoryBarrier := memoryBarriers[i]
8100 }
8101 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
8102 for i in (0 .. bufferMemoryBarrierCount) {
8103 bufferMemoryBarrier := bufferMemoryBarriers[i]
8104 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
8105 assert(bufferObject.device == commandBufferObject.device)
8106 }
8107 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
8108 for i in (0 .. imageMemoryBarrierCount) {
8109 imageMemoryBarrier := imageMemoryBarriers[i]
8110 imageObject := GetImage(imageMemoryBarrier.image)
8111 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008112 }
8113}
8114
8115@threadSafety("app")
8116cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008117 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008118 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008119 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08008120 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008121 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008122 const VkMemoryBarrier* pMemoryBarriers,
8123 u32 bufferMemoryBarrierCount,
8124 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
8125 u32 imageMemoryBarrierCount,
8126 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008127 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008128
Jesse Hall3dd678a2016-01-08 21:52:01 -08008129 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08008130 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08008131 memoryBarrier := memoryBarriers[i]
8132 }
8133 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
8134 for i in (0 .. bufferMemoryBarrierCount) {
8135 bufferMemoryBarrier := bufferMemoryBarriers[i]
8136 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
8137 assert(bufferObject.device == commandBufferObject.device)
8138 }
8139 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
8140 for i in (0 .. imageMemoryBarrierCount) {
8141 imageMemoryBarrier := imageMemoryBarriers[i]
8142 imageObject := GetImage(imageMemoryBarrier.image)
8143 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008144 }
8145}
8146
8147@threadSafety("app")
8148cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008149 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008150 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008151 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008152 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008153 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008154 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008155 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008156}
8157
8158@threadSafety("app")
8159cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008160 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008161 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008162 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008163 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008164 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008165 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008166}
8167
8168@threadSafety("app")
8169cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008170 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008171 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008172 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008173 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008174 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008175 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008176 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008177}
8178
8179@threadSafety("app")
8180cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008181 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08008182 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08008183 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008184 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008185 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08008186 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008187 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008188}
8189
8190@threadSafety("app")
8191cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008192 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008193 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008194 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008195 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008196 VkBuffer dstBuffer,
8197 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08008198 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008199 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008200 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008201 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008202 dstBufferObject := GetBuffer(dstBuffer)
8203 assert(commandBufferObject.device == queryPoolObject.device)
8204 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008205}
8206
8207cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008208 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008209 VkPipelineLayout layout,
8210 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008211 u32 offset,
8212 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08008213 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008214 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008215 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008216 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008217}
8218
8219@threadSafety("app")
8220cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008221 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008222 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08008223 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008224 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008225 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
8226 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008227 assert(commandBufferObject.device == renderPassObject.device)
8228 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008229
Jesse Hall3fbc8562015-11-29 22:10:52 -08008230 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008231}
8232
8233cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008234 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08008235 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008236 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008237}
8238
8239@threadSafety("app")
8240cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008241 VkCommandBuffer commandBuffer) {
8242 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008243
Jesse Hall3fbc8562015-11-29 22:10:52 -08008244 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008245}
8246
8247cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008248 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008249 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008250 const VkCommandBuffer* pCommandBuffers) {
8251 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008252
Jesse Hall3dd678a2016-01-08 21:52:01 -08008253 commandBuffers := pCommandBuffers[0:commandBufferCount]
8254 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008255 secondaryCommandBuffer := commandBuffers[i]
8256 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
8257 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008258 }
8259}
8260
Ian Elliott28bd2c32017-10-13 09:21:12 -06008261//@vulkan1_1 functions
Daniel Koch09f7bf92017-10-05 00:26:58 -04008262
Ian Elliott28bd2c32017-10-13 09:21:12 -06008263@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008264cmd VkResult vkEnumerateInstanceVersion(
8265 u32* pApiVersion) {
8266 return ?
8267}
8268
Ian Elliott28bd2c32017-10-13 09:21:12 -06008269@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008270cmd VkResult vkBindBufferMemory2(
8271 VkDevice device,
8272 u32 bindInfoCount,
8273 const VkBindBufferMemoryInfo* pBindInfos) {
8274 return ?
8275}
8276
Ian Elliott28bd2c32017-10-13 09:21:12 -06008277@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008278cmd VkResult vkBindImageMemory2(
8279 VkDevice device,
8280 u32 bindInfoCount,
8281 const VkBindImageMemoryInfo* pBindInfos) {
8282 return ?
8283}
8284
Ian Elliott28bd2c32017-10-13 09:21:12 -06008285@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008286cmd void vkGetDeviceGroupPeerMemoryFeatures(
8287 VkDevice device,
8288 u32 heapIndex,
8289 u32 localDeviceIndex,
8290 u32 remoteDeviceIndex,
8291 VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) {
8292}
8293
Ian Elliott28bd2c32017-10-13 09:21:12 -06008294@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008295cmd void vkCmdSetDeviceMask(
8296 VkCommandBuffer commandBuffer,
8297 u32 deviceMask) {
8298}
8299
Ian Elliott28bd2c32017-10-13 09:21:12 -06008300@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008301cmd void vkCmdDispatchBase(
8302 VkCommandBuffer commandBuffer,
8303 u32 baseGroupX,
8304 u32 baseGroupY,
8305 u32 baseGroupZ,
8306 u32 groupCountX,
8307 u32 groupCountY,
8308 u32 groupCountZ) {
8309}
8310
8311@threadSafety("system")
Ian Elliott28bd2c32017-10-13 09:21:12 -06008312@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008313cmd VkResult vkEnumeratePhysicalDeviceGroups(
8314 VkInstance instance,
8315 u32* pPhysicalDeviceGroupCount,
8316 VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) {
8317 instanceObject := GetInstance(instance)
8318
8319 physicalDeviceGroupCount := as!u32(?)
8320 pPhysicalDeviceGroupCount[0] = physicalDeviceGroupCount
8321 physicalDevices := pPhysicalDeviceGroupProperties[0:physicalDeviceGroupCount]
8322
8323 for i in (0 .. physicalDeviceGroupCount) {
8324 physicalDevice := ?
8325 physicalDevices[i] = physicalDevice
8326 if !(physicalDevice in State.PhysicalDevices) {
8327 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
8328 }
8329 }
8330
8331 return ?
8332}
8333
Ian Elliott28bd2c32017-10-13 09:21:12 -06008334@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008335cmd void vkGetImageMemoryRequirements2(
8336 VkDevice device,
8337 const VkImageMemoryRequirementsInfo2* pInfo,
8338 VkMemoryRequirements2* pMemoryRequirements) {
8339}
8340
Ian Elliott28bd2c32017-10-13 09:21:12 -06008341@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008342cmd void vkGetBufferMemoryRequirements2(
8343 VkDevice device,
8344 const VkBufferMemoryRequirementsInfo2* pInfo,
8345 VkMemoryRequirements2* pMemoryRequirements) {
8346}
8347
Ian Elliott28bd2c32017-10-13 09:21:12 -06008348@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008349cmd void vkGetImageSparseMemoryRequirements2(
8350 VkDevice device,
8351 const VkImageSparseMemoryRequirementsInfo2* pInfo,
8352 u32* pSparseMemoryRequirementCount,
8353 VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) {
8354}
8355
Ian Elliott28bd2c32017-10-13 09:21:12 -06008356@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008357cmd void vkGetPhysicalDeviceFeatures2(
8358 VkPhysicalDevice physicalDevice,
8359 VkPhysicalDeviceFeatures2* pFeatures) {
8360}
8361
Ian Elliott28bd2c32017-10-13 09:21:12 -06008362@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008363cmd void vkGetPhysicalDeviceProperties2(
8364 VkPhysicalDevice physicalDevice,
8365 VkPhysicalDeviceProperties2* pProperties) {
8366}
8367
Ian Elliott28bd2c32017-10-13 09:21:12 -06008368@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008369cmd void vkGetPhysicalDeviceFormatProperties2(
8370 VkPhysicalDevice physicalDevice,
8371 VkFormat format,
8372 VkFormatProperties2* pFormatProperties) {
8373}
8374
Ian Elliott28bd2c32017-10-13 09:21:12 -06008375@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008376cmd VkResult vkGetPhysicalDeviceImageFormatProperties2(
8377 VkPhysicalDevice physicalDevice,
8378 const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
8379 VkImageFormatProperties2* pImageFormatProperties) {
8380 return ?
8381}
8382
Ian Elliott28bd2c32017-10-13 09:21:12 -06008383@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008384cmd void vkGetPhysicalDeviceQueueFamilyProperties2(
8385 VkPhysicalDevice physicalDevice,
8386 u32* pQueueFamilyPropertyCount,
8387 VkQueueFamilyProperties2* pQueueFamilyProperties) {
8388}
8389
Ian Elliott28bd2c32017-10-13 09:21:12 -06008390@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008391cmd void vkGetPhysicalDeviceMemoryProperties2(
8392 VkPhysicalDevice physicalDevice,
8393 VkPhysicalDeviceMemoryProperties2* pMemoryProperties) {
8394}
8395
Ian Elliott28bd2c32017-10-13 09:21:12 -06008396@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008397cmd void vkGetPhysicalDeviceSparseImageFormatProperties2(
8398 VkPhysicalDevice physicalDevice,
8399 const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
8400 u32* pPropertyCount,
8401 VkSparseImageFormatProperties2* pProperties) {
8402}
8403
Ian Elliott28bd2c32017-10-13 09:21:12 -06008404@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008405cmd void vkTrimCommandPool(
8406 VkDevice device,
8407 VkCommandPool commandPool,
8408 VkCommandPoolTrimFlags flags) {
8409}
8410
8411
Ian Elliott28bd2c32017-10-13 09:21:12 -06008412@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008413cmd void vkGetDeviceQueue2(
8414 VkDevice device,
8415 const VkDeviceQueueInfo2* pQueueInfo,
8416 VkQueue* pQueue) {
8417 deviceObject := GetDevice(device)
8418
8419 queue := ?
8420 pQueue[0] = queue
8421
8422 if !(queue in State.Queues) {
8423 State.Queues[queue] = new!QueueObject(device: device)
8424 }
8425}
8426
Ian Elliott28bd2c32017-10-13 09:21:12 -06008427@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008428cmd VkResult vkCreateSamplerYcbcrConversion(
8429 VkDevice device,
8430 const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
8431 const VkAllocationCallbacks* pAllocator,
8432 VkSamplerYcbcrConversion* pYcbcrConversion) {
8433 return ?
8434}
8435
Ian Elliott28bd2c32017-10-13 09:21:12 -06008436@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008437cmd void vkDestroySamplerYcbcrConversion(
8438 VkDevice device,
8439 VkSamplerYcbcrConversion ycbcrConversion,
8440 const VkAllocationCallbacks* pAllocator) {
8441}
8442
Ian Elliott28bd2c32017-10-13 09:21:12 -06008443@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008444cmd VkResult vkCreateDescriptorUpdateTemplate(
8445 VkDevice device,
8446 const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
8447 const VkAllocationCallbacks* pAllocator,
8448 VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) {
8449 return ?
8450}
8451
Ian Elliott28bd2c32017-10-13 09:21:12 -06008452@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008453cmd void vkDestroyDescriptorUpdateTemplate(
8454 VkDevice device,
8455 VkDescriptorUpdateTemplate descriptorUpdateTemplate,
8456 const VkAllocationCallbacks* pAllocator) {
8457}
8458
Ian Elliott28bd2c32017-10-13 09:21:12 -06008459@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008460cmd void vkUpdateDescriptorSetWithTemplate(
8461 VkDevice device,
8462 VkDescriptorSet descriptorSet,
8463 VkDescriptorUpdateTemplate descriptorUpdateTemplate,
8464 const void* pData) {
8465}
8466
Ian Elliott28bd2c32017-10-13 09:21:12 -06008467@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008468cmd void vkGetPhysicalDeviceExternalBufferProperties(
8469 VkPhysicalDevice physicalDevice,
8470 const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
8471 VkExternalBufferProperties* pExternalBufferProperties) {
8472}
8473
Ian Elliott28bd2c32017-10-13 09:21:12 -06008474@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008475cmd void vkGetPhysicalDeviceExternalFenceProperties(
8476 VkPhysicalDevice physicalDevice,
8477 const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
8478 VkExternalFenceProperties* pExternalFenceProperties) {
8479}
8480
Ian Elliott28bd2c32017-10-13 09:21:12 -06008481@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008482cmd void vkGetPhysicalDeviceExternalSemaphoreProperties(
8483 VkPhysicalDevice physicalDevice,
8484 const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
8485 VkExternalSemaphoreProperties* pExternalSemaphoreProperties) {
8486}
8487
Ian Elliott28bd2c32017-10-13 09:21:12 -06008488@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008489cmd void vkGetDescriptorSetLayoutSupport(
8490 VkDevice device,
8491 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
8492 VkDescriptorSetLayoutSupport* pSupport) {
8493}
8494
8495
Jesse Hallad250842017-03-10 18:35:38 -08008496@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08008497cmd void vkDestroySurfaceKHR(
8498 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08008499 VkSurfaceKHR surface,
8500 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008501 instanceObject := GetInstance(instance)
8502 surfaceObject := GetSurface(surface)
8503 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08008504
Jesse Hall1356b0d2015-11-23 17:24:58 -08008505 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08008506}
8507
Jesse Hallad250842017-03-10 18:35:38 -08008508@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08008509cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008510 VkPhysicalDevice physicalDevice,
8511 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008512 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08008513 VkBool32* pSupported) {
8514 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08008515
8516 return ?
8517}
8518
Jesse Hallad250842017-03-10 18:35:38 -08008519@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08008520cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
8521 VkPhysicalDevice physicalDevice,
8522 VkSurfaceKHR surface,
8523 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
8524 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8525
8526 surfaceCapabilities := ?
8527 pSurfaceCapabilities[0] = surfaceCapabilities
8528
8529 return ?
8530}
8531
Jesse Hallad250842017-03-10 18:35:38 -08008532@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08008533cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
8534 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008535 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008536 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008537 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08008538 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08008539
8540 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08008541 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08008542 surfaceFormats := pSurfaceFormats[0:count]
8543
8544 for i in (0 .. count) {
8545 surfaceFormat := ?
8546 surfaceFormats[i] = surfaceFormat
8547 }
8548
8549 return ?
8550}
8551
Jesse Hallad250842017-03-10 18:35:38 -08008552@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08008553cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
8554 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008555 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008556 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008557 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08008558 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08008559
8560 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08008561 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08008562 presentModes := pPresentModes[0:count]
8563
8564 for i in (0 .. count) {
8565 presentMode := ?
8566 presentModes[i] = presentMode
8567 }
8568
8569 return ?
8570}
8571
Jesse Hallad250842017-03-10 18:35:38 -08008572@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008573cmd VkResult vkCreateSwapchainKHR(
8574 VkDevice device,
8575 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008576 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08008577 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008578 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08008579 deviceObject := GetDevice(device)
8580
8581 swapchain := ?
8582 pSwapchain[0] = swapchain
8583 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
8584
8585 return ?
8586}
8587
Jesse Hallad250842017-03-10 18:35:38 -08008588@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08008589cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08008590 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08008591 VkSwapchainKHR swapchain,
8592 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08008593 deviceObject := GetDevice(device)
8594 swapchainObject := GetSwapchain(swapchain)
8595 assert(swapchainObject.device == device)
8596
8597 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08008598}
8599
Jesse Hallad250842017-03-10 18:35:38 -08008600@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008601cmd VkResult vkGetSwapchainImagesKHR(
8602 VkDevice device,
8603 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008604 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08008605 VkImage* pSwapchainImages) {
8606 deviceObject := GetDevice(device)
8607
8608 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08008609 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08008610 swapchainImages := pSwapchainImages[0:count]
8611
8612 for i in (0 .. count) {
8613 swapchainImage := ?
8614 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08008615 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08008616 }
8617
8618 return ?
8619}
8620
Jesse Hallad250842017-03-10 18:35:38 -08008621@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008622cmd VkResult vkAcquireNextImageKHR(
8623 VkDevice device,
8624 VkSwapchainKHR swapchain,
8625 u64 timeout,
8626 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008627 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08008628 u32* pImageIndex) {
8629 deviceObject := GetDevice(device)
8630 swapchainObject := GetSwapchain(swapchain)
8631
8632 imageIndex := ?
8633 pImageIndex[0] = imageIndex
8634
8635 return ?
8636}
8637
Jesse Hallad250842017-03-10 18:35:38 -08008638@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008639cmd VkResult vkQueuePresentKHR(
8640 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08008641 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08008642 queueObject := GetQueue(queue)
8643
8644 presentInfo := ?
8645 pPresentInfo[0] = presentInfo
8646
8647 return ?
8648}
8649
Ian Elliott28bd2c32017-10-13 09:21:12 -06008650@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008651@extension("VK_KHR_swapchain") // 2
8652cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHR(
8653 VkDevice device,
8654 VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) {
8655 return ?
8656}
8657
Ian Elliott28bd2c32017-10-13 09:21:12 -06008658@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008659@extension("VK_KHR_swapchain") // 2
8660cmd VkResult vkGetDeviceGroupSurfacePresentModesKHR(
8661 VkDevice device,
8662 VkSurfaceKHR surface,
8663 VkDeviceGroupPresentModeFlagsKHR* pModes) {
8664 return ?
8665}
8666
Ian Elliott28bd2c32017-10-13 09:21:12 -06008667@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008668@extension("VK_KHR_swapchain") // 2
8669cmd VkResult vkGetPhysicalDevicePresentRectanglesKHR(
8670 VkPhysicalDevice physicalDevice,
8671 VkSurfaceKHR surface,
8672 u32* pRectCount,
8673 VkRect2D* pRects) {
8674 return ?
8675}
8676
Ian Elliott28bd2c32017-10-13 09:21:12 -06008677@vulkan1_1
Daniel Koch09f7bf92017-10-05 00:26:58 -04008678@extension("VK_KHR_swapchain") // 2
8679cmd VkResult vkAcquireNextImage2KHR(
8680 VkDevice device,
8681 const VkAcquireNextImageInfoKHR* pAcquireInfo,
8682 u32* pImageIndex) {
8683 return ?
8684}
8685
Jesse Hallad250842017-03-10 18:35:38 -08008686@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08008687cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
8688 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008689 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008690 VkDisplayPropertiesKHR* pProperties) {
8691 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8692 return ?
8693}
8694
Jesse Hallad250842017-03-10 18:35:38 -08008695@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008696cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
8697 VkPhysicalDevice physicalDevice,
8698 u32* pPropertyCount,
8699 VkDisplayPlanePropertiesKHR* pProperties) {
8700 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8701 return ?
8702}
8703
Jesse Hallad250842017-03-10 18:35:38 -08008704@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008705cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
8706 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008707 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08008708 u32* pDisplayCount,
8709 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08008710 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8711 return ?
8712}
8713
Jesse Hallad250842017-03-10 18:35:38 -08008714@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08008715cmd VkResult vkGetDisplayModePropertiesKHR(
8716 VkPhysicalDevice physicalDevice,
8717 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008718 u32* pPropertyCount,
8719 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008720 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8721 return ?
8722}
8723
Jesse Hallad250842017-03-10 18:35:38 -08008724@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08008725cmd VkResult vkCreateDisplayModeKHR(
8726 VkPhysicalDevice physicalDevice,
8727 VkDisplayKHR display,
8728 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008729 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008730 VkDisplayModeKHR* pMode) {
8731 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8732 return ?
8733}
8734
Jesse Hallad250842017-03-10 18:35:38 -08008735@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008736cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008737 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08008738 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008739 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08008740 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008741 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8742 return ?
8743}
8744
Jesse Hallad250842017-03-10 18:35:38 -08008745@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008746cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
8747 VkInstance instance,
8748 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008749 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08008750 VkSurfaceKHR* pSurface) {
8751 return ?
8752}
8753
Jesse Hallad250842017-03-10 18:35:38 -08008754@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08008755cmd VkResult vkCreateSharedSwapchainsKHR(
8756 VkDevice device,
8757 u32 swapchainCount,
8758 const VkSwapchainCreateInfoKHR* pCreateInfos,
8759 const VkAllocationCallbacks* pAllocator,
8760 VkSwapchainKHR* pSwapchains) {
8761 return ?
8762}
8763
Jesse Hallad250842017-03-10 18:35:38 -08008764@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08008765cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008766 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008767 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008768 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008769 VkSurfaceKHR* pSurface) {
8770 instanceObject := GetInstance(instance)
8771 return ?
8772}
8773
Jesse Hallad250842017-03-10 18:35:38 -08008774@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08008775cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
8776 VkPhysicalDevice physicalDevice,
8777 u32 queueFamilyIndex,
8778 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08008779 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08008780 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8781 return ?
8782}
8783
Jesse Hallad250842017-03-10 18:35:38 -08008784@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008785cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008786 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008787 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008788 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008789 VkSurfaceKHR* pSurface) {
8790 instanceObject := GetInstance(instance)
8791 return ?
8792}
8793
Jesse Hallad250842017-03-10 18:35:38 -08008794@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08008795cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
8796 VkPhysicalDevice physicalDevice,
8797 u32 queueFamilyIndex,
8798 platform.xcb_connection_t* connection,
8799 platform.xcb_visualid_t visual_id) {
8800 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8801 return ?
8802}
8803
Jesse Hallad250842017-03-10 18:35:38 -08008804@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08008805cmd VkResult vkCreateWaylandSurfaceKHR(
8806 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008807 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008808 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008809 VkSurfaceKHR* pSurface) {
8810 instanceObject := GetInstance(instance)
8811 return ?
8812}
8813
Jesse Hallad250842017-03-10 18:35:38 -08008814@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08008815cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
8816 VkPhysicalDevice physicalDevice,
8817 u32 queueFamilyIndex,
8818 platform.wl_display* display) {
8819 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8820 return ?
8821}
8822
Jesse Hallad250842017-03-10 18:35:38 -08008823@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08008824cmd VkResult vkCreateMirSurfaceKHR(
8825 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008826 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008827 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008828 VkSurfaceKHR* pSurface) {
8829 instanceObject := GetInstance(instance)
8830 return ?
8831}
8832
Jesse Hallad250842017-03-10 18:35:38 -08008833@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08008834cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
8835 VkPhysicalDevice physicalDevice,
8836 u32 queueFamilyIndex,
8837 platform.MirConnection* connection) {
8838 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8839 return ?
8840}
8841
Jesse Hallad250842017-03-10 18:35:38 -08008842@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08008843cmd VkResult vkCreateAndroidSurfaceKHR(
8844 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008845 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008846 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008847 VkSurfaceKHR* pSurface) {
8848 instanceObject := GetInstance(instance)
8849 return ?
8850}
8851
Jesse Hallad250842017-03-10 18:35:38 -08008852@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08008853cmd VkResult vkCreateWin32SurfaceKHR(
8854 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008855 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008856 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008857 VkSurfaceKHR* pSurface) {
8858 instanceObject := GetInstance(instance)
8859 return ?
8860}
8861
Jesse Hallad250842017-03-10 18:35:38 -08008862@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08008863cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
8864 VkPhysicalDevice physicalDevice,
8865 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08008866 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08008867 return ?
8868}
8869
Jesse Hallad250842017-03-10 18:35:38 -08008870@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08008871@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08008872cmd VkResult vkGetSwapchainGrallocUsageANDROID(
8873 VkDevice device,
8874 VkFormat format,
8875 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08008876 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08008877 return ?
8878}
8879
Jesse Hallad250842017-03-10 18:35:38 -08008880@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08008881@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13008882cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
8883 VkDevice device,
8884 VkFormat format,
8885 VkImageUsageFlags imageUsage,
8886 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08008887 u64* grallocConsumerUsage,
8888 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13008889 return ?
8890}
8891
Jesse Hallad250842017-03-10 18:35:38 -08008892@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08008893cmd VkResult vkAcquireImageANDROID(
8894 VkDevice device,
8895 VkImage image,
8896 int nativeFenceFd,
8897 VkSemaphore semaphore,
8898 VkFence fence) {
8899 return ?
8900}
8901
Jesse Hallad250842017-03-10 18:35:38 -08008902@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08008903cmd VkResult vkQueueSignalReleaseImageANDROID(
8904 VkQueue queue,
8905 u32 waitSemaphoreCount,
8906 const VkSemaphore* pWaitSemaphores,
8907 VkImage image,
8908 int* pNativeFenceFd) {
8909 return ?
8910}
8911
Jesse Hallad250842017-03-10 18:35:38 -08008912@extension("VK_EXT_debug_report") // 12
8913@external type void* PFN_vkDebugReportCallbackEXT
8914@extension("VK_EXT_debug_report") // 12
8915@pfn cmd VkBool32 vkDebugReportCallbackEXT(
8916 VkDebugReportFlagsEXT flags,
8917 VkDebugReportObjectTypeEXT objectType,
8918 u64 object,
8919 platform.size_t location,
8920 s32 messageCode,
8921 const char* pLayerPrefix,
8922 const char* pMessage,
8923 void* pUserData) {
8924 return ?
8925}
8926
8927@extension("VK_EXT_debug_report") // 12
8928cmd VkResult vkCreateDebugReportCallbackEXT(
8929 VkInstance instance,
8930 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
8931 const VkAllocationCallbacks* pAllocator,
8932 VkDebugReportCallbackEXT* pCallback) {
8933 return ?
8934}
8935
8936@extension("VK_EXT_debug_report") // 12
8937cmd void vkDestroyDebugReportCallbackEXT(
8938 VkInstance instance,
8939 VkDebugReportCallbackEXT callback,
8940 const VkAllocationCallbacks* pAllocator) {
8941}
8942
8943@extension("VK_EXT_debug_report") // 12
8944cmd void vkDebugReportMessageEXT(
8945 VkInstance instance,
8946 VkDebugReportFlagsEXT flags,
8947 VkDebugReportObjectTypeEXT objectType,
8948 u64 object,
8949 platform.size_t location,
8950 s32 messageCode,
8951 const char* pLayerPrefix,
8952 const char* pMessage) {
8953}
8954
8955@extension("VK_EXT_debug_marker") // 23
8956cmd VkResult vkDebugMarkerSetObjectTagEXT(
8957 VkDevice device,
Jesse Hall77726222017-09-19 14:49:27 -05008958 const VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008959 return ?
8960}
8961
8962@extension("VK_EXT_debug_marker") // 23
8963cmd VkResult vkDebugMarkerSetObjectNameEXT(
8964 VkDevice device,
Jesse Hall77726222017-09-19 14:49:27 -05008965 const VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008966 return ?
8967}
8968
8969@extension("VK_EXT_debug_marker") // 23
8970cmd void vkCmdDebugMarkerBeginEXT(
8971 VkCommandBuffer commandBuffer,
Jesse Hall77726222017-09-19 14:49:27 -05008972 const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008973}
8974
8975@extension("VK_EXT_debug_marker") // 23
8976cmd void vkCmdDebugMarkerEndEXT(
8977 VkCommandBuffer commandBuffer) {
8978}
8979
8980@extension("VK_EXT_debug_marker") // 23
8981cmd void vkCmdDebugMarkerInsertEXT(
8982 VkCommandBuffer commandBuffer,
Jesse Hall77726222017-09-19 14:49:27 -05008983 const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008984}
8985
8986@extension("VK_AMD_draw_indirect_count") // 34
8987cmd void vkCmdDrawIndirectCountAMD(
8988 VkCommandBuffer commandBuffer,
8989 VkBuffer buffer,
8990 VkDeviceSize offset,
8991 VkBuffer countBuffer,
8992 VkDeviceSize countBufferOffset,
8993 u32 maxDrawCount,
8994 u32 stride) {
8995}
8996
8997@extension("VK_AMD_draw_indirect_count") // 34
8998cmd void vkCmdDrawIndexedIndirectCountAMD(
8999 VkCommandBuffer commandBuffer,
9000 VkBuffer buffer,
9001 VkDeviceSize offset,
9002 VkBuffer countBuffer,
9003 VkDeviceSize countBufferOffset,
9004 u32 maxDrawCount,
9005 u32 stride) {
9006}
9007
9008@extension("VK_NV_external_memory_capabilities") // 56
9009cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
9010 VkPhysicalDevice physicalDevice,
9011 VkFormat format,
9012 VkImageType type,
9013 VkImageTiling tiling,
9014 VkImageUsageFlags usage,
9015 VkImageCreateFlags flags,
9016 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
9017 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
9018 return ?
9019}
9020
9021@extension("VK_NV_external_memory_win32") // 58
9022cmd VkResult vkGetMemoryWin32HandleNV(
9023 VkDevice device,
9024 VkDeviceMemory memory,
9025 VkExternalMemoryHandleTypeFlagsNV handleType,
9026 platform.HANDLE* pHandle) {
9027 return ?
9028}
9029
9030@extension("VK_KHR_get_physical_device_properties2") // 60
9031cmd void vkGetPhysicalDeviceFeatures2KHR(
9032 VkPhysicalDevice physicalDevice,
9033 VkPhysicalDeviceFeatures2KHR* pFeatures) {
9034}
9035
9036@extension("VK_KHR_get_physical_device_properties2") // 60
9037cmd void vkGetPhysicalDeviceProperties2KHR(
9038 VkPhysicalDevice physicalDevice,
9039 VkPhysicalDeviceProperties2KHR* pProperties) {
9040}
9041
9042@extension("VK_KHR_get_physical_device_properties2") // 60
9043cmd void vkGetPhysicalDeviceFormatProperties2KHR(
9044 VkPhysicalDevice physicalDevice,
9045 VkFormat format,
9046 VkFormatProperties2KHR* pFormatProperties) {
9047}
9048
9049@extension("VK_KHR_get_physical_device_properties2") // 60
9050cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
9051 VkPhysicalDevice physicalDevice,
9052 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
9053 VkImageFormatProperties2KHR* pImageFormatProperties) {
9054 return ?
9055}
9056
9057@extension("VK_KHR_get_physical_device_properties2") // 60
9058cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
9059 VkPhysicalDevice physicalDevice,
9060 u32* pQueueFamilyPropertyCount,
9061 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
9062}
9063
9064@extension("VK_KHR_get_physical_device_properties2") // 60
9065cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
9066 VkPhysicalDevice physicalDevice,
9067 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
9068}
9069
9070@extension("VK_KHR_get_physical_device_properties2") // 60
9071cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
9072 VkPhysicalDevice physicalDevice,
9073 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
9074 u32* pPropertyCount,
9075 VkSparseImageFormatProperties2KHR* pProperties) {
9076}
9077
Daniel Koch09f7bf92017-10-05 00:26:58 -04009078@extension("VK_KHR_device_group") // 61
9079cmd void vkGetDeviceGroupPeerMemoryFeaturesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009080 VkDevice device,
9081 u32 heapIndex,
9082 u32 localDeviceIndex,
9083 u32 remoteDeviceIndex,
Daniel Koch09f7bf92017-10-05 00:26:58 -04009084 VkPeerMemoryFeatureFlagsKHR* pPeerMemoryFeatures) {
Jesse Hallad250842017-03-10 18:35:38 -08009085}
9086
Daniel Koch09f7bf92017-10-05 00:26:58 -04009087@extension("VK_KHR_device_group") // 61
9088cmd void vkCmdSetDeviceMaskKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009089 VkCommandBuffer commandBuffer,
9090 u32 deviceMask) {
9091}
9092
Jesse Hallad250842017-03-10 18:35:38 -08009093
Daniel Koch09f7bf92017-10-05 00:26:58 -04009094@extension("VK_KHR_device_group") // 61
9095cmd void vkCmdDispatchBaseKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009096 VkCommandBuffer commandBuffer,
9097 u32 baseGroupX,
9098 u32 baseGroupY,
9099 u32 baseGroupZ,
9100 u32 groupCountX,
9101 u32 groupCountY,
9102 u32 groupCountZ) {
9103}
9104
Jesse Hallad250842017-03-10 18:35:38 -08009105@extension("VK_NN_vi_surface") // 63
9106cmd VkResult vkCreateViSurfaceNN(
9107 VkInstance instance,
9108 const VkViSurfaceCreateInfoNN* pCreateInfo,
9109 const VkAllocationCallbacks* pAllocator,
9110 VkSurfaceKHR* pSurface) {
9111 return ?
9112}
9113
9114@extension("VK_KHR_maintenance1") // 70
9115cmd void vkTrimCommandPoolKHR(
9116 VkDevice device,
9117 VkCommandPool commandPool,
9118 VkCommandPoolTrimFlagsKHR flags) {
9119}
9120
Daniel Koch09f7bf92017-10-05 00:26:58 -04009121@extension("VK_KHR_device_group_creation") // 71
9122@threadSafety("system")
9123cmd VkResult vkEnumeratePhysicalDeviceGroupsKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009124 VkInstance instance,
9125 u32* pPhysicalDeviceGroupCount,
Daniel Koch09f7bf92017-10-05 00:26:58 -04009126 VkPhysicalDeviceGroupPropertiesKHR* pPhysicalDeviceGroupProperties) {
9127 instanceObject := GetInstance(instance)
9128
9129 physicalDeviceGroupCount := as!u32(?)
9130 pPhysicalDeviceGroupCount[0] = physicalDeviceGroupCount
9131 physicalDevices := pPhysicalDeviceGroupProperties[0:physicalDeviceGroupCount]
9132
9133 for i in (0 .. physicalDeviceGroupCount) {
9134 physicalDevice := ?
9135 physicalDevices[i] = physicalDevice
9136 if !(physicalDevice in State.PhysicalDevices) {
9137 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
9138 }
9139 }
9140
Jesse Hallad250842017-03-10 18:35:38 -08009141 return ?
9142}
9143
Jesse Hall9492f992017-08-28 12:10:06 -07009144@extension("VK_KHR_external_memory_capabilities") // 72
9145cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009146 VkPhysicalDevice physicalDevice,
Jesse Hall9492f992017-08-28 12:10:06 -07009147 const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo,
9148 VkExternalBufferPropertiesKHR* pExternalBufferProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009149}
9150
Jesse Hall9492f992017-08-28 12:10:06 -07009151@extension("VK_KHR_external_memory_win32") // 74
9152cmd VkResult vkGetMemoryWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009153 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009154 const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009155 platform.HANDLE* pHandle) {
9156 return ?
9157}
9158
Jesse Hall9492f992017-08-28 12:10:06 -07009159@extension("VK_KHR_external_memory_win32") // 74
9160cmd VkResult vkGetMemoryWin32HandlePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009161 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009162 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08009163 platform.HANDLE handle,
Jesse Hall9492f992017-08-28 12:10:06 -07009164 VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009165 return ?
9166}
9167
Jesse Hall9492f992017-08-28 12:10:06 -07009168@extension("VK_KHR_external_memory_fd") // 75
9169cmd VkResult vkGetMemoryFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009170 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009171 const VkMemoryGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009172 s32* pFd) {
9173 return ?
9174}
9175
Jesse Hall9492f992017-08-28 12:10:06 -07009176@extension("VK_KHR_external_memory_fd") // 75
9177cmd VkResult vkGetMemoryFdPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009178 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009179 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08009180 s32 fd,
Jesse Hall9492f992017-08-28 12:10:06 -07009181 VkMemoryFdPropertiesKHR* pMemoryFdProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009182 return ?
9183}
9184
Jesse Hall9492f992017-08-28 12:10:06 -07009185@extension("VK_KHR_external_semaphore_capabilities") // 77
9186cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009187 VkPhysicalDevice physicalDevice,
Jesse Hall9492f992017-08-28 12:10:06 -07009188 const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
9189 VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009190}
9191
Jesse Hall9492f992017-08-28 12:10:06 -07009192@extension("VK_KHR_external_semaphore_win32") // 79
9193cmd VkResult vkImportSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009194 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009195 const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08009196 return ?
9197}
9198
Jesse Hall9492f992017-08-28 12:10:06 -07009199@extension("VK_KHR_external_semaphore_win32") // 79
9200cmd VkResult vkGetSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009201 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009202 const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009203 platform.HANDLE* pHandle) {
9204 return ?
9205}
9206
Jesse Hall9492f992017-08-28 12:10:06 -07009207@extension("VK_KHR_external_semaphore_fd") // 80
9208cmd VkResult vkImportSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009209 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009210 const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08009211 return ?
9212}
9213
Jesse Hall9492f992017-08-28 12:10:06 -07009214@extension("VK_KHR_external_semaphore_fd") // 80
9215cmd VkResult vkGetSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009216 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009217 const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009218 s32* pFd) {
9219 return ?
9220}
9221
9222@extension("VK_KHR_push_descriptor") // 81
9223cmd void vkCmdPushDescriptorSetKHR(
9224 VkCommandBuffer commandBuffer,
9225 VkPipelineBindPoint pipelineBindPoint,
9226 VkPipelineLayout layout,
9227 u32 set,
9228 u32 descriptorWriteCount,
9229 const VkWriteDescriptorSet* pDescriptorWrites) {
9230}
9231
9232@extension("VK_KHR_descriptor_update_template") // 86
9233cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
9234 VkDevice device,
9235 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
9236 const VkAllocationCallbacks* pAllocator,
9237 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
9238 return ?
9239}
9240
9241@extension("VK_KHR_descriptor_update_template") // 86
9242cmd void vkDestroyDescriptorUpdateTemplateKHR(
9243 VkDevice device,
9244 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
9245 const VkAllocationCallbacks* pAllocator) {
9246}
9247
9248@extension("VK_KHR_descriptor_update_template") // 86
9249cmd void vkUpdateDescriptorSetWithTemplateKHR(
9250 VkDevice device,
9251 VkDescriptorSet descriptorSet,
9252 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
9253 const void* pData) {
9254}
9255
9256@extension("VK_KHR_descriptor_update_template") // 86
9257cmd void vkCmdPushDescriptorSetWithTemplateKHR(
9258 VkCommandBuffer commandBuffer,
9259 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
9260 VkPipelineLayout layout,
9261 u32 set,
9262 const void* pData) {
9263}
9264
9265@extension("VK_NVX_device_generated_commands") // 87
9266cmd void vkCmdProcessCommandsNVX(
9267 VkCommandBuffer commandBuffer,
9268 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
9269}
9270
9271@extension("VK_NVX_device_generated_commands") // 87
9272cmd void vkCmdReserveSpaceForCommandsNVX(
9273 VkCommandBuffer commandBuffer,
9274 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
9275}
9276
9277@extension("VK_NVX_device_generated_commands") // 87
9278cmd VkResult vkCreateIndirectCommandsLayoutNVX(
9279 VkDevice device,
9280 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
9281 const VkAllocationCallbacks* pAllocator,
9282 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
9283 return ?
9284}
9285
9286@extension("VK_NVX_device_generated_commands") // 87
9287cmd void vkDestroyIndirectCommandsLayoutNVX(
9288 VkDevice device,
9289 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
9290 const VkAllocationCallbacks* pAllocator) {
9291}
9292
9293@extension("VK_NVX_device_generated_commands") // 87
9294cmd VkResult vkCreateObjectTableNVX(
9295 VkDevice device,
9296 const VkObjectTableCreateInfoNVX* pCreateInfo,
9297 const VkAllocationCallbacks* pAllocator,
9298 VkObjectTableNVX* pObjectTable) {
9299 return ?
9300}
9301
9302@extension("VK_NVX_device_generated_commands") // 87
9303cmd void vkDestroyObjectTableNVX(
9304 VkDevice device,
9305 VkObjectTableNVX objectTable,
9306 const VkAllocationCallbacks* pAllocator) {
9307}
9308
9309@extension("VK_NVX_device_generated_commands") // 87
9310cmd VkResult vkRegisterObjectsNVX(
9311 VkDevice device,
9312 VkObjectTableNVX objectTable,
9313 u32 objectCount,
9314 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
9315 const u32* pObjectIndices) {
9316 return ?
9317}
9318
9319@extension("VK_NVX_device_generated_commands") // 87
9320cmd VkResult vkUnregisterObjectsNVX(
9321 VkDevice device,
9322 VkObjectTableNVX objectTable,
9323 u32 objectCount,
9324 const VkObjectEntryTypeNVX* pObjectEntryTypes,
9325 const u32* pObjectIndices) {
9326 return ?
9327}
9328
9329@extension("VK_NVX_device_generated_commands") // 87
9330cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
9331 VkPhysicalDevice physicalDevice,
9332 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
9333 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
9334}
9335
9336@extension("VK_NV_clip_space_w_scaling") // 88
9337cmd void vkCmdSetViewportWScalingNV(
9338 VkCommandBuffer commandBuffer,
9339 u32 firstViewport,
9340 u32 viewportCount,
9341 const VkViewportWScalingNV* pViewportWScalings) {
9342}
9343
9344@extension("VK_EXT_direct_mode_display") // 89
9345cmd VkResult vkReleaseDisplayEXT(
9346 VkPhysicalDevice physicalDevice,
9347 VkDisplayKHR display) {
9348 return ?
9349}
9350
9351@extension("VK_EXT_acquire_xlib_display") // 90
9352cmd VkResult vkAcquireXlibDisplayEXT(
9353 VkPhysicalDevice physicalDevice,
9354 platform.Display* dpy,
9355 VkDisplayKHR display) {
9356 return ?
9357}
9358
9359@extension("VK_EXT_acquire_xlib_display") // 90
9360cmd VkResult vkGetRandROutputDisplayEXT(
9361 VkPhysicalDevice physicalDevice,
9362 platform.Display* dpy,
9363 platform.RROutput rrOutput,
9364 VkDisplayKHR* pDisplay) {
9365 return ?
9366}
9367
9368@extension("VK_EXT_display_surface_counter") // 91
9369cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
9370 VkPhysicalDevice physicalDevice,
9371 VkSurfaceKHR surface,
9372 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
9373 return ?
9374}
9375
9376@extension("VK_EXT_display_control") // 92
9377cmd VkResult vkDisplayPowerControlEXT(
9378 VkDevice device,
9379 VkDisplayKHR display,
9380 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
9381 return ?
9382}
9383
9384@extension("VK_EXT_display_control") // 92
9385cmd VkResult vkRegisterDeviceEventEXT(
9386 VkDevice device,
9387 const VkDeviceEventInfoEXT* pDeviceEventInfo,
9388 const VkAllocationCallbacks* pAllocator,
9389 VkFence* pFence) {
9390 return ?
9391}
9392
9393@extension("VK_EXT_display_control") // 92
9394cmd VkResult vkRegisterDisplayEventEXT(
9395 VkDevice device,
9396 VkDisplayKHR display,
9397 const VkDisplayEventInfoEXT* pDisplayEventInfo,
9398 const VkAllocationCallbacks* pAllocator,
9399 VkFence* pFence) {
9400 return ?
9401}
9402
9403@extension("VK_EXT_display_control") // 92
9404cmd VkResult vkGetSwapchainCounterEXT(
9405 VkDevice device,
9406 VkSwapchainKHR swapchain,
9407 VkSurfaceCounterFlagBitsEXT counter,
9408 u64* pCounterValue) {
9409 return ?
9410}
9411
9412@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009413cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08009414 VkDevice device,
9415 VkSwapchainKHR swapchain,
9416 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009417 deviceObject := GetDevice(device)
9418 swapchainObject := GetSwapchain(swapchain)
9419
9420 displayTimingProperties := ?
9421 pDisplayTimingProperties[0] = displayTimingProperties
9422
9423 return ?
9424}
9425
Jesse Hallad250842017-03-10 18:35:38 -08009426@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009427cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08009428 VkDevice device,
9429 VkSwapchainKHR swapchain,
9430 u32* pPresentationTimingCount,
9431 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009432 return ?
9433}
9434
Jesse Hallad250842017-03-10 18:35:38 -08009435@extension("VK_EXT_discard_rectangles") // 100
9436cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07009437 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08009438 u32 firstDiscardRectangle,
9439 u32 discardRectangleCount,
9440 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07009441}
9442
Jesse Hallad250842017-03-10 18:35:38 -08009443@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08009444cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08009445 VkDevice device,
9446 u32 swapchainCount,
9447 const VkSwapchainKHR* pSwapchains,
9448 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08009449}
9450
Jesse Hallad250842017-03-10 18:35:38 -08009451@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13009452cmd VkResult vkGetSwapchainStatusKHR(
9453 VkDevice device,
9454 VkSwapchainKHR swapchain) {
9455 return ?
9456}
9457
Jesse Hall9492f992017-08-28 12:10:06 -07009458@extension("VK_KHR_external_fence_capabilities") // 113
9459cmd void vkGetPhysicalDeviceExternalFencePropertiesKHR(
9460 VkPhysicalDevice physicalDevice,
9461 const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
9462 VkExternalFencePropertiesKHR* pExternalFenceProperties) {
9463}
9464
9465@extension("VK_KHR_external_fence_win32") // 115
9466cmd VkResult vkImportFenceWin32HandleKHR(
9467 VkDevice device,
9468 const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) {
9469 return ?
9470}
9471
9472@extension("VK_KHR_external_fence_win32") // 115
9473cmd VkResult vkGetFenceWin32HandleKHR(
9474 VkDevice device,
9475 const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
9476 platform.HANDLE* pHandle) {
9477 return ?
9478}
9479
9480@extension("VK_KHR_external_fence_fd") // 116
9481cmd VkResult vkImportFenceFdKHR(
9482 VkDevice device,
9483 const VkImportFenceFdInfoKHR* pImportFenceFdInfo) {
9484 return ?
9485}
9486
9487@extension("VK_KHR_external_fence_fd") // 116
9488cmd VkResult vkGetFenceFdKHR(
9489 VkDevice device,
9490 const VkFenceGetFdInfoKHR* pGetFdInfo,
9491 int* pFd) {
9492 return ?
9493}
9494
Jesse Hall05556b12017-05-18 17:40:25 -07009495@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13009496cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
9497 VkPhysicalDevice physicalDevice,
9498 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
9499 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
9500 return ?
9501}
9502
Jesse Hall05556b12017-05-18 17:40:25 -07009503@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13009504cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
9505 VkPhysicalDevice physicalDevice,
9506 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
9507 u32* pSurfaceFormatCount,
9508 VkSurfaceFormat2KHR* pSurfaceFormats) {
9509 return ?
9510}
9511
Jesse Hallad250842017-03-10 18:35:38 -08009512@extension("VK_MVK_ios_surface") // 123
9513cmd VkResult vkCreateIOSSurfaceMVK(
9514 VkInstance instance,
9515 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
9516 const VkAllocationCallbacks* pAllocator,
9517 VkSurfaceKHR* pSurface) {
9518 return ?
9519}
9520
9521@extension("VK_MVK_macos_surface") // 124
9522cmd VkResult vkCreateMacOSSurfaceMVK(
9523 VkInstance instance,
9524 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
9525 const VkAllocationCallbacks* pAllocator,
9526 VkSurfaceKHR* pSurface) {
9527 return ?
9528}
9529
Jesse Hall77726222017-09-19 14:49:27 -05009530@extension("VK_EXT_sample_locations") // 144
9531cmd void vkCmdSetSampleLocationsEXT(
9532 VkCommandBuffer commandBuffer,
9533 const VkSampleLocationsInfoEXT* pSampleLocationsInfo) {
9534}
9535
9536@extension("VK_EXT_sample_locations") // 144
9537cmd void vkGetPhysicalDeviceMultisamplePropertiesEXT(
9538 VkPhysicalDevice physicalDevice,
9539 VkSampleCountFlagBits samples,
9540 VkMultisamplePropertiesEXT* pMultisampleProperties) {
9541}
9542
Jesse Hall9492f992017-08-28 12:10:06 -07009543@extension("VK_KHR_get_memory_requirements2") // 147
9544cmd void vkGetImageMemoryRequirements2KHR(
9545 VkDevice device,
9546 const VkImageMemoryRequirementsInfo2KHR* pInfo,
9547 VkMemoryRequirements2KHR* pMemoryRequirements) {
9548}
9549
9550@extension("VK_KHR_get_memory_requirements2") // 147
9551cmd void vkGetBufferMemoryRequirements2KHR(
9552 VkDevice device,
9553 const VkBufferMemoryRequirementsInfo2KHR* pInfo,
9554 VkMemoryRequirements2KHR* pMemoryRequirements) {
9555}
9556
9557@extension("VK_KHR_get_memory_requirements2") // 147
9558cmd void vkGetImageSparseMemoryRequirements2KHR(
9559 VkDevice device,
9560 const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
9561 u32* pSparseMemoryRequirementCount,
9562 VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) {
9563}
9564
Jesse Hall076f95d2017-09-20 11:34:47 -07009565@extension("VK_KHR_sampler_ycbcr_conversion") // 157
9566cmd VkResult vkCreateSamplerYcbcrConversionKHR(
9567 VkDevice device,
9568 const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo,
9569 const VkAllocationCallbacks* pAllocator,
9570 VkSamplerYcbcrConversionKHR* pYcbcrConversion) {
9571 return ?
9572}
9573
9574@extension("VK_KHR_sampler_ycbcr_conversion") // 157
9575cmd void vkDestroySamplerYcbcrConversionKHR(
9576 VkDevice device,
9577 VkSamplerYcbcrConversionKHR ycbcrConversion,
9578 const VkAllocationCallbacks* pAllocator) {
9579}
9580
9581@extension("VK_KHR_bind_memory2") // 158
9582cmd VkResult vkBindBufferMemory2KHR(
9583 VkDevice device,
9584 u32 bindInfoCount,
9585 const VkBindBufferMemoryInfoKHR* pBindInfos) {
9586 return ?
9587}
9588
9589@extension("VK_KHR_bind_memory2") // 158
9590cmd VkResult vkBindImageMemory2KHR(
9591 VkDevice device,
9592 u32 bindInfoCount,
9593 const VkBindImageMemoryInfoKHR* pBindInfos) {
9594 return ?
9595}
9596
Jesse Hall77726222017-09-19 14:49:27 -05009597@extension("VK_EXT_validation_cache") // 161
9598cmd VkResult vkCreateValidationCacheEXT(
9599 VkDevice device,
9600 const VkValidationCacheCreateInfoEXT* pCreateInfo,
9601 const VkAllocationCallbacks* pAllocator,
9602 VkValidationCacheEXT* pValidationCache) {
9603 return ?
9604}
9605
9606@extension("VK_EXT_validation_cache") // 161
9607cmd void vkDestroyValidationCacheEXT(
9608 VkDevice device,
9609 VkValidationCacheEXT validationCache,
9610 const VkAllocationCallbacks* pAllocator) {
9611}
9612
9613@extension("VK_EXT_validation_cache") // 161
9614cmd VkResult vkMergeValidationCachesEXT(
9615 VkDevice device,
9616 VkValidationCacheEXT dstCache,
9617 u32 srcCacheCount,
9618 const VkValidationCacheEXT* pSrcCaches) {
9619 return ?
9620}
9621
9622@extension("VK_EXT_validation_cache") // 161
9623cmd VkResult vkGetValidationCacheDataEXT(
9624 VkDevice device,
9625 VkValidationCacheEXT validationCache,
9626 platform.size_t* pDataSize,
9627 void* pData) {
9628 return ?
9629}
9630
Daniel Koch09f7bf92017-10-05 00:26:58 -04009631@extension("VK_KHR_maintenance3") // 169
9632cmd void vkGetDescriptorSetLayoutSupportKHR(
9633 VkDevice device,
9634 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
9635 VkDescriptorSetLayoutSupportKHR* pSupport) {
9636}
9637
Jesse Halld27f6aa2015-08-15 17:58:48 -07009638////////////////
9639// Validation //
9640////////////////
9641
9642extern void validate(string layerName, bool condition, string message)
9643
9644
9645/////////////////////////////
9646// Internal State Tracking //
9647/////////////////////////////
9648
9649StateObject State
9650
9651@internal class StateObject {
9652 // Dispatchable objects.
9653 map!(VkInstance, ref!InstanceObject) Instances
9654 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
9655 map!(VkDevice, ref!DeviceObject) Devices
9656 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08009657 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07009658
9659 // Non-dispatchable objects.
9660 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
9661 map!(VkBuffer, ref!BufferObject) Buffers
9662 map!(VkBufferView, ref!BufferViewObject) BufferViews
9663 map!(VkImage, ref!ImageObject) Images
9664 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07009665 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07009666 map!(VkPipeline, ref!PipelineObject) Pipelines
9667 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
9668 map!(VkSampler, ref!SamplerObject) Samplers
9669 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
9670 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
9671 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07009672 map!(VkFence, ref!FenceObject) Fences
9673 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
9674 map!(VkEvent, ref!EventObject) Events
9675 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
9676 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
9677 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
9678 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08009679 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08009680 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08009681 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07009682}
9683
9684@internal class InstanceObject {
9685}
9686
9687@internal class PhysicalDeviceObject {
9688 VkInstance instance
9689}
9690
9691@internal class DeviceObject {
9692 VkPhysicalDevice physicalDevice
9693}
9694
9695@internal class QueueObject {
9696 VkDevice device
9697 VkQueueFlags flags
9698}
9699
Jesse Hall3fbc8562015-11-29 22:10:52 -08009700@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07009701 VkDevice device
9702 map!(u64, VkDeviceMemory) boundObjects
9703 VkQueueFlags queueFlags
9704}
9705
9706@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08009707 VkDevice device
9708 VkDeviceSize allocationSize
9709 map!(u64, VkDeviceSize) boundObjects
9710 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07009711}
9712
9713@internal class BufferObject {
9714 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08009715 VkDeviceMemory memory
9716 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07009717}
9718
9719@internal class BufferViewObject {
9720 VkDevice device
9721 VkBuffer buffer
9722}
9723
9724@internal class ImageObject {
9725 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08009726 VkDeviceMemory memory
9727 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07009728}
9729
9730@internal class ImageViewObject {
9731 VkDevice device
9732 VkImage image
9733}
9734
Jesse Halld27f6aa2015-08-15 17:58:48 -07009735@internal class ShaderObject {
9736 VkDevice device
9737}
9738
9739@internal class ShaderModuleObject {
9740 VkDevice device
9741}
9742
9743@internal class PipelineObject {
9744 VkDevice device
9745}
9746
9747@internal class PipelineLayoutObject {
9748 VkDevice device
9749}
9750
9751@internal class SamplerObject {
9752 VkDevice device
9753}
9754
9755@internal class DescriptorSetObject {
9756 VkDevice device
9757}
9758
9759@internal class DescriptorSetLayoutObject {
9760 VkDevice device
9761}
9762
9763@internal class DescriptorPoolObject {
9764 VkDevice device
9765}
9766
Jesse Halld27f6aa2015-08-15 17:58:48 -07009767@internal class FenceObject {
9768 VkDevice device
9769 bool signaled
9770}
9771
9772@internal class SemaphoreObject {
9773 VkDevice device
9774}
9775
9776@internal class EventObject {
9777 VkDevice device
9778}
9779
9780@internal class QueryPoolObject {
9781 VkDevice device
9782}
9783
9784@internal class FramebufferObject {
9785 VkDevice device
9786}
9787
9788@internal class RenderPassObject {
9789 VkDevice device
9790}
9791
9792@internal class PipelineCacheObject {
9793 VkDevice device
9794}
9795
Jesse Hall3fbc8562015-11-29 22:10:52 -08009796@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07009797 VkDevice device
9798}
9799
Jesse Hall1356b0d2015-11-23 17:24:58 -08009800@internal class SurfaceObject {
9801 VkInstance instance
9802}
9803
Michael Lentine88594d72015-11-12 12:49:45 -08009804@internal class SwapchainObject {
9805 VkDevice device
9806}
9807
Jesse Halld27f6aa2015-08-15 17:58:48 -07009808macro ref!InstanceObject GetInstance(VkInstance instance) {
9809 assert(instance in State.Instances)
9810 return State.Instances[instance]
9811}
9812
9813macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
9814 assert(physicalDevice in State.PhysicalDevices)
9815 return State.PhysicalDevices[physicalDevice]
9816}
9817
9818macro ref!DeviceObject GetDevice(VkDevice device) {
9819 assert(device in State.Devices)
9820 return State.Devices[device]
9821}
9822
9823macro ref!QueueObject GetQueue(VkQueue queue) {
9824 assert(queue in State.Queues)
9825 return State.Queues[queue]
9826}
9827
Jesse Hall3fbc8562015-11-29 22:10:52 -08009828macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
9829 assert(commandBuffer in State.CommandBuffers)
9830 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07009831}
9832
Jesse Hall3fbc8562015-11-29 22:10:52 -08009833macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
9834 assert(memory in State.DeviceMemories)
9835 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07009836}
9837
9838macro ref!BufferObject GetBuffer(VkBuffer buffer) {
9839 assert(buffer in State.Buffers)
9840 return State.Buffers[buffer]
9841}
9842
9843macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
9844 assert(bufferView in State.BufferViews)
9845 return State.BufferViews[bufferView]
9846}
9847
9848macro ref!ImageObject GetImage(VkImage image) {
9849 assert(image in State.Images)
9850 return State.Images[image]
9851}
9852
9853macro ref!ImageViewObject GetImageView(VkImageView imageView) {
9854 assert(imageView in State.ImageViews)
9855 return State.ImageViews[imageView]
9856}
9857
Jesse Halld27f6aa2015-08-15 17:58:48 -07009858macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
9859 assert(shaderModule in State.ShaderModules)
9860 return State.ShaderModules[shaderModule]
9861}
9862
9863macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
9864 assert(pipeline in State.Pipelines)
9865 return State.Pipelines[pipeline]
9866}
9867
9868macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
9869 assert(pipelineLayout in State.PipelineLayouts)
9870 return State.PipelineLayouts[pipelineLayout]
9871}
9872
9873macro ref!SamplerObject GetSampler(VkSampler sampler) {
9874 assert(sampler in State.Samplers)
9875 return State.Samplers[sampler]
9876}
9877
9878macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
9879 assert(descriptorSet in State.DescriptorSets)
9880 return State.DescriptorSets[descriptorSet]
9881}
9882
9883macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
9884 assert(descriptorSetLayout in State.DescriptorSetLayouts)
9885 return State.DescriptorSetLayouts[descriptorSetLayout]
9886}
9887
9888macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
9889 assert(descriptorPool in State.DescriptorPools)
9890 return State.DescriptorPools[descriptorPool]
9891}
9892
Jesse Halld27f6aa2015-08-15 17:58:48 -07009893macro ref!FenceObject GetFence(VkFence fence) {
9894 assert(fence in State.Fences)
9895 return State.Fences[fence]
9896}
9897
9898macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
9899 assert(semaphore in State.Semaphores)
9900 return State.Semaphores[semaphore]
9901}
9902
9903macro ref!EventObject GetEvent(VkEvent event) {
9904 assert(event in State.Events)
9905 return State.Events[event]
9906}
9907
9908macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
9909 assert(queryPool in State.QueryPools)
9910 return State.QueryPools[queryPool]
9911}
9912
9913macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
9914 assert(framebuffer in State.Framebuffers)
9915 return State.Framebuffers[framebuffer]
9916}
9917
9918macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
9919 assert(renderPass in State.RenderPasses)
9920 return State.RenderPasses[renderPass]
9921}
9922
9923macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
9924 assert(pipelineCache in State.PipelineCaches)
9925 return State.PipelineCaches[pipelineCache]
9926}
9927
Jesse Hall3fbc8562015-11-29 22:10:52 -08009928macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
9929 assert(commandPool in State.CommandPools)
9930 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07009931}
Michael Lentine88594d72015-11-12 12:49:45 -08009932
Jesse Hall1356b0d2015-11-23 17:24:58 -08009933macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
9934 assert(surface in State.Surfaces)
9935 return State.Surfaces[surface]
9936}
9937
Michael Lentine88594d72015-11-12 12:49:45 -08009938macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
9939 assert(swapchain in State.Swapchains)
9940 return State.Swapchains[swapchain]
9941}
Jesse Halld8bade02015-11-24 10:24:18 -08009942
9943macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
9944 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
9945}