blob: 3a2b1efb0b40645079987d69dc9638ec42e5e51a [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
30define VERSION_MINOR 0
Jesse Hall9947eab2017-08-28 12:10:06 -070031define VERSION_PATCH 54
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.
Jesse Hallad250842017-03-10 18:35:38 -080040define VK_MAX_DEVICE_GROUP_SIZE_KHX 32
Jesse Hall9947eab2017-08-28 12:10:06 -070041//@extension("VK_KHR_external_memory_capabilities")
42define VK_LUID_SIZE_KHR 8
43//@extension("VK_KHR_external_memory")
44define VK_QUEUE_FAMILY_EXTERNAL_KHR -2
Jesse Halld27f6aa2015-08-15 17:58:48 -070045
46// API keywords
47define VK_TRUE 1
48define VK_FALSE 0
Jesse Hall5ae3abb2015-10-08 14:00:22 -070049
50// API keyword, but needs special handling by some templates
51define NULL_HANDLE 0
Jesse Halld27f6aa2015-08-15 17:58:48 -070052
Jesse Halleb02c472017-02-24 15:13:45 -080053// 1
Jesse Hall33faaad2016-01-24 21:00:49 -080054@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080055@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080056
Jesse Halleb02c472017-02-24 15:13:45 -080057// 2
Jesse Hall26763382016-05-20 07:13:52 -070058@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080059@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080060
Jesse Halleb02c472017-02-24 15:13:45 -080061// 3
Jesse Hall543a7ff2016-01-08 16:38:30 -080062@extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080063@extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
Jesse Hall1356b0d2015-11-23 17:24:58 -080064
Jesse Halleb02c472017-02-24 15:13:45 -080065// 4
Jesse Hall543a7ff2016-01-08 16:38:30 -080066@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
Jesse Hall0e74f002015-11-30 11:37:59 -080067@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080068
Jesse Halleb02c472017-02-24 15:13:45 -080069// 5
Jesse Hall543a7ff2016-01-08 16:38:30 -080070@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080071@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080072
Jesse Halleb02c472017-02-24 15:13:45 -080073// 6
Jesse Hall543a7ff2016-01-08 16:38:30 -080074@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080075@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080076
Jesse Halleb02c472017-02-24 15:13:45 -080077// 7
Jesse Hallfdc8ab32017-03-10 21:01:57 -080078@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080079@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080080
Jesse Halleb02c472017-02-24 15:13:45 -080081// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080082@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080083@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080084
Jesse Halleb02c472017-02-24 15:13:45 -080085// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080086@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080087@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080088
Jesse Halleb02c472017-02-24 15:13:45 -080089// 10
Jesse Hall7ba0ac72017-07-07 17:13:23 -070090@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080091@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080092
Jesse Halleb02c472017-02-24 15:13:45 -080093// 11
Chris Forbes1d4e5542017-02-15 19:38:50 +130094@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7
Chia-I Wub262ddc2016-03-22 07:38:20 +080095@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer"
96
Jesse Halleb02c472017-02-24 15:13:45 -080097// 12
Jesse Hall7ba0ac72017-07-07 17:13:23 -070098@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 8
Jesse Hall715b86a2016-01-16 16:34:29 -080099@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
100
Jesse Halleb02c472017-02-24 15:13:45 -0800101// 13
Jesse Hall26763382016-05-20 07:13:52 -0700102@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
103@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
104
Jesse Halleb02c472017-02-24 15:13:45 -0800105// 15
Jesse Hall26763382016-05-20 07:13:52 -0700106@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
107@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
108
Jesse Halleb02c472017-02-24 15:13:45 -0800109// 16
Jesse Hall26763382016-05-20 07:13:52 -0700110@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
111@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
112
Jesse Halleb02c472017-02-24 15:13:45 -0800113// 19
Jesse Hall26763382016-05-20 07:13:52 -0700114@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
115@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
116
Jesse Halleb02c472017-02-24 15:13:45 -0800117// 21
Jesse Hall56d386a2016-07-26 15:20:40 -0700118@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
119@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
120
Jesse Halleb02c472017-02-24 15:13:45 -0800121// 22
Jesse Hall56d386a2016-07-26 15:20:40 -0700122@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
123@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
124
Jesse Halleb02c472017-02-24 15:13:45 -0800125// 23
Jesse Hall8f49fcb2017-03-06 16:02:58 -0800126@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
Jesse Hall26763382016-05-20 07:13:52 -0700127@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker"
128
Jesse Halleb02c472017-02-24 15:13:45 -0800129// 26
Jesse Hall56d386a2016-07-26 15:20:40 -0700130@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1
131@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
132
Jesse Halleb02c472017-02-24 15:13:45 -0800133// 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700134@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
135@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
136
Jesse Halleb02c472017-02-24 15:13:45 -0800137// 28
Chris Forbes289cb792016-12-30 15:03:55 +1300138@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
139@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
140
Jesse Halleb02c472017-02-24 15:13:45 -0800141// 34
142@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
143@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
144
145// 36
146@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
147@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
148
149// 37
150@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
151@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
152
153// 38
154@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
155@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
156
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700157// 42
158@extension("VK_AMD_texture_gather_bias_lod") define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
159@extension("VK_AMD_texture_gather_bias_lod") define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
160
Jesse Hallad250842017-03-10 18:35:38 -0800161// 54
162@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1
163@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview"
164
Jesse Halleb02c472017-02-24 15:13:45 -0800165// 56
Chris Forbes289cb792016-12-30 15:03:55 +1300166@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
167@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
168
Jesse Halleb02c472017-02-24 15:13:45 -0800169// 57
Chris Forbes289cb792016-12-30 15:03:55 +1300170@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
171@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
172
Jesse Halleb02c472017-02-24 15:13:45 -0800173// 58
Chris Forbes289cb792016-12-30 15:03:55 +1300174@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
175@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
176
Jesse Halleb02c472017-02-24 15:13:45 -0800177// 59
Chris Forbes289cb792016-12-30 15:03:55 +1300178@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
179@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
180
Jesse Hall889cd9a2017-02-25 22:12:23 -0800181// 60
182@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
183@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
184
Jesse Hallad250842017-03-10 18:35:38 -0800185// 61
186@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1
187@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group"
188
Jesse Halleb02c472017-02-24 15:13:45 -0800189// 62
Chris Forbes289cb792016-12-30 15:03:55 +1300190@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
191@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
192
Jesse Hall77ad05b2017-03-10 22:02:20 -0800193// 63
194@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1
195@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
196
197// 64
198@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
199@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
200
201// 65
202@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
203@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
204
205// 66
206@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
207@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
208
209// 70
210@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
211@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
212
Jesse Hallad250842017-03-10 18:35:38 -0800213// 71
214@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1
215@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation"
216
217// 72
Jesse Hall9947eab2017-08-28 12:10:06 -0700218@extension("VK_KHR_external_memory_capabilities") define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
219@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 -0800220
221// 73
Jesse Hall9947eab2017-08-28 12:10:06 -0700222@extension("VK_KHR_external_memory") define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
223@extension("VK_KHR_external_memory") define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
Jesse Hallad250842017-03-10 18:35:38 -0800224
225// 74
Jesse Hall9947eab2017-08-28 12:10:06 -0700226@extension("VK_KHR_external_memory_win32") define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
227@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 -0800228
229// 75
Jesse Hall9947eab2017-08-28 12:10:06 -0700230@extension("VK_KHR_external_memory_fd") define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
231@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 -0800232
233// 76
Jesse Hall9947eab2017-08-28 12:10:06 -0700234@extension("VK_KHR_win32_keyed_mutex") define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
235@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 -0800236
237// 77
Jesse Hall9947eab2017-08-28 12:10:06 -0700238@extension("VK_KHR_external_semaphore_capabilities") define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
239@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 -0800240
241// 78
Jesse Hall9947eab2017-08-28 12:10:06 -0700242@extension("VK_KHR_external_semaphore") define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
243@extension("VK_KHR_external_semaphore") define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore"
Jesse Hallad250842017-03-10 18:35:38 -0800244
245// 79
Jesse Hall9947eab2017-08-28 12:10:06 -0700246@extension("VK_KHR_external_semaphore_win32") define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
247@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 -0800248
249// 80
Jesse Hall9947eab2017-08-28 12:10:06 -0700250@extension("VK_KHR_external_semaphore_fd") define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
251@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 -0800252
253// 81
254@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1
255@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
256
Jesse Hall9947eab2017-08-28 12:10:06 -0700257// 84
258@extension("VK_KHR_16bit_storage") define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
259@extension("VK_KHR_16bit_storage") define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
260
Jesse Hall889cd9a2017-02-25 22:12:23 -0800261// 85
262@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700263@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800264
Jesse Hallad250842017-03-10 18:35:38 -0800265// 86
266@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
267@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
268
Jesse Halleb02c472017-02-24 15:13:45 -0800269// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300270@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
271@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
272
Jesse Hallad250842017-03-10 18:35:38 -0800273// 88
274@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
275@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
276
Jesse Hall77ad05b2017-03-10 22:02:20 -0800277// 89
278@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
279@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
280
281// 90
282@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
283@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
284
285// 91
286@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
287@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
288
289// 92
290@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
291@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
292
Jesse Hall889cd9a2017-02-25 22:12:23 -0800293// 93
294@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
Jesse Hallfdc8ab32017-03-10 21:01:57 -0800295@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800296
Jesse Hallad250842017-03-10 18:35:38 -0800297// 95
298@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
299@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
300
301// 96
302@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
303@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
304
305// 97
306@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
307@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
308
309// 98
310@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
311@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
312
313// 99
314@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
315@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
316
317// 100
318@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
319@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
320
Jesse Hall77ad05b2017-03-10 22:02:20 -0800321// 105
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700322@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 2
323@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
Jesse Hall77ad05b2017-03-10 22:02:20 -0800324
Jesse Hall889cd9a2017-02-25 22:12:23 -0800325// 106
326@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
327@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
328
329// 112
Chris Forbes1d5f68c2017-01-31 10:17:01 +1300330@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
331@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 +1300332
Jesse Hall9947eab2017-08-28 12:10:06 -0700333// 113
334@extension("VK_KHR_external_fence_capabilities") define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
335@extension("VK_KHR_external_fence_capabilities") define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities"
336
337// 114
338@extension("VK_KHR_external_fence") define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1
339@extension("VK_KHR_external_fence") define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence"
340
341// 115
342@extension("VK_KHR_external_fence_win32") define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
343@extension("VK_KHR_external_fence_win32") define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
344
345// 116
346@extension("VK_KHR_external_fence_fd") define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1
347@extension("VK_KHR_external_fence_fd") define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd"
348
Jesse Hall05556b12017-05-18 17:40:25 -0700349// 120
Chris Forbese2d3ee12017-03-16 16:10:15 +1300350@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
351@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
352
Jesse Hall9947eab2017-08-28 12:10:06 -0700353// 121
354@extension("VK_KHR_variable_pointers") define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
355@extension("VK_KHR_variable_pointers") define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
356
Jesse Hallad250842017-03-10 18:35:38 -0800357// 123
358@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
359@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
360
361// 124
362@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
363@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
364
Jesse Hall9947eab2017-08-28 12:10:06 -0700365// 128
366@extension("VK_KHR_dedicated_allocation") define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 1
367@extension("VK_KHR_dedicated_allocation") define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
368
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700369// 131
370@extension("VK_EXT_sampler_filter_minmax") define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
371@extension("VK_EXT_sampler_filter_minmax") define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
372
Jesse Hall9947eab2017-08-28 12:10:06 -0700373// 132
374@extension("VK_KHR_storage_buffer_storage_class") define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
375@extension("VK_KHR_storage_buffer_storage_class") define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
376
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700377// 133
378@extension("VK_AMD_gpu_shader_int16") define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
379@extension("VK_AMD_gpu_shader_int16") define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
380
Jesse Hall9947eab2017-08-28 12:10:06 -0700381// 147
382@extension("VK_KHR_get_memory_requirements2") define VK_KHR_GET_MEMORY_REQUIREMENTS2_SPEC_VERSION 1
383@extension("VK_KHR_get_memory_requirements2") define VK_KHR_GET_MEMORY_REQUIREMENTS2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
384
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700385// 149
386@extension("VK_EXT_blend_operation_advanced") define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
387@extension("VK_EXT_blend_operation_advanced") define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
388
389// 150
390@extension("VK_NV_fragment_coverage_to_color") define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
391@extension("VK_NV_fragment_coverage_to_color") define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
392
393// 153
394@extension("VK_NV_framebuffer_mixed_samples") define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
395@extension("VK_NV_framebuffer_mixed_samples") define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
396
397// 154
398@extension("VK_NV_fill_rectangle") define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
399@extension("VK_NV_fill_rectangle") define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
400
Jesse Halld27f6aa2015-08-15 17:58:48 -0700401/////////////
402// Types //
403/////////////
404
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700405type u32 VkBool32
406type u32 VkFlags
407type u64 VkDeviceSize
408type u32 VkSampleMask
409
Jesse Halld27f6aa2015-08-15 17:58:48 -0700410/// Dispatchable handle types.
411@dispatchHandle type u64 VkInstance
412@dispatchHandle type u64 VkPhysicalDevice
413@dispatchHandle type u64 VkDevice
414@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800415@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700416
417/// Non dispatchable handle types.
418@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800419@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700420@nonDispatchHandle type u64 VkBuffer
421@nonDispatchHandle type u64 VkBufferView
422@nonDispatchHandle type u64 VkImage
423@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700424@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700425@nonDispatchHandle type u64 VkPipeline
426@nonDispatchHandle type u64 VkPipelineLayout
427@nonDispatchHandle type u64 VkSampler
428@nonDispatchHandle type u64 VkDescriptorSet
429@nonDispatchHandle type u64 VkDescriptorSetLayout
430@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700431@nonDispatchHandle type u64 VkFence
432@nonDispatchHandle type u64 VkSemaphore
433@nonDispatchHandle type u64 VkEvent
434@nonDispatchHandle type u64 VkQueryPool
435@nonDispatchHandle type u64 VkFramebuffer
436@nonDispatchHandle type u64 VkRenderPass
437@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800438
Jesse Hallad250842017-03-10 18:35:38 -0800439// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800440@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800441
Jesse Hallad250842017-03-10 18:35:38 -0800442// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800443@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800444
Jesse Hallad250842017-03-10 18:35:38 -0800445// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800446@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
447@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700448
Jesse Hallad250842017-03-10 18:35:38 -0800449// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800450@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
451
Jesse Hallad250842017-03-10 18:35:38 -0800452// 86
453@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
454
455// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300456@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
457@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
458
Jesse Halld27f6aa2015-08-15 17:58:48 -0700459
460/////////////
461// Enums //
462/////////////
463
464enum VkImageLayout {
465 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
466 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
467 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
468 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
469 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
470 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 -0800471 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
472 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 -0700473 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800474
Jesse Hallad250842017-03-10 18:35:38 -0800475 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800476 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Chris Forbesaf3a1112017-01-31 15:37:03 +1300477
Jesse Hall05556b12017-05-18 17:40:25 -0700478 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbesaf3a1112017-01-31 15:37:03 +1300479 VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700480}
481
482enum VkAttachmentLoadOp {
483 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
484 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
485 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
486}
487
488enum VkAttachmentStoreOp {
489 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
490 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
491}
492
493enum VkImageType {
494 VK_IMAGE_TYPE_1D = 0x00000000,
495 VK_IMAGE_TYPE_2D = 0x00000001,
496 VK_IMAGE_TYPE_3D = 0x00000002,
497}
498
499enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800500 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
501 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700502}
503
504enum VkImageViewType {
505 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
506 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
507 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
508 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
509 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
510 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
511 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
512}
513
Jesse Hall3fbc8562015-11-29 22:10:52 -0800514enum VkCommandBufferLevel {
515 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
516 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700517}
518
Jesse Hall65ab5522015-11-30 00:07:16 -0800519enum VkComponentSwizzle {
520 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
521 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
522 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
523 VK_COMPONENT_SWIZZLE_R = 0x00000003,
524 VK_COMPONENT_SWIZZLE_G = 0x00000004,
525 VK_COMPONENT_SWIZZLE_B = 0x00000005,
526 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700527}
528
529enum VkDescriptorType {
530 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
531 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
532 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
533 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
534 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
535 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
536 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
537 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
538 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
539 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
540 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
541}
542
Jesse Halld27f6aa2015-08-15 17:58:48 -0700543enum VkQueryType {
544 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
545 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800546 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700547}
548
Jesse Halld27f6aa2015-08-15 17:58:48 -0700549enum VkBorderColor {
550 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
551 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
552 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
553 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
554 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
555 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
556}
557
558enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800559 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
560 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700561}
562
563enum VkPrimitiveTopology {
564 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
565 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
566 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
567 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
568 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
569 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800570 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
571 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
572 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
573 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800574 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700575}
576
577enum VkSharingMode {
578 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
579 VK_SHARING_MODE_CONCURRENT = 0x00000001,
580}
581
582enum VkIndexType {
583 VK_INDEX_TYPE_UINT16 = 0x00000000,
584 VK_INDEX_TYPE_UINT32 = 0x00000001,
585}
586
Jesse Hall23ff73f2015-11-29 14:36:39 -0800587enum VkFilter {
588 VK_FILTER_NEAREST = 0x00000000,
589 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700590
Jesse Hallad250842017-03-10 18:35:38 -0800591 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700592 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700593}
594
Jesse Hall23ff73f2015-11-29 14:36:39 -0800595enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800596 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
597 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700598}
599
Jesse Hall23ff73f2015-11-29 14:36:39 -0800600enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800601 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
602 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
603 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
604 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
605 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700606}
607
608enum VkCompareOp {
609 VK_COMPARE_OP_NEVER = 0x00000000,
610 VK_COMPARE_OP_LESS = 0x00000001,
611 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800612 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700613 VK_COMPARE_OP_GREATER = 0x00000004,
614 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800615 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700616 VK_COMPARE_OP_ALWAYS = 0x00000007,
617}
618
Jesse Hall65ab5522015-11-30 00:07:16 -0800619enum VkPolygonMode {
620 VK_POLYGON_MODE_FILL = 0x00000000,
621 VK_POLYGON_MODE_LINE = 0x00000001,
622 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700623
624 //@extension("VK_NV_fill_rectangle") // 154
625 VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700626}
627
628enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800629 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
630 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700631}
632
Jesse Hall65ab5522015-11-30 00:07:16 -0800633enum VkBlendFactor {
634 VK_BLEND_FACTOR_ZERO = 0x00000000,
635 VK_BLEND_FACTOR_ONE = 0x00000001,
636 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
637 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
638 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
639 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
640 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
641 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
642 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
643 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
644 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
645 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
646 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
647 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
648 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
649 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
650 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
651 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
652 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700653}
654
655enum VkBlendOp {
656 VK_BLEND_OP_ADD = 0x00000000,
657 VK_BLEND_OP_SUBTRACT = 0x00000001,
658 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
659 VK_BLEND_OP_MIN = 0x00000003,
660 VK_BLEND_OP_MAX = 0x00000004,
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700661
662 //@extension("VK_EXT_blend_operation_advanced") // 149
663 VK_BLEND_OP_ZERO_EXT = 1000148000,
664 VK_BLEND_OP_SRC_EXT = 1000148001,
665 VK_BLEND_OP_DST_EXT = 1000148002,
666 VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
667 VK_BLEND_OP_DST_OVER_EXT = 1000148004,
668 VK_BLEND_OP_SRC_IN_EXT = 1000148005,
669 VK_BLEND_OP_DST_IN_EXT = 1000148006,
670 VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
671 VK_BLEND_OP_DST_OUT_EXT = 1000148008,
672 VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
673 VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
674 VK_BLEND_OP_XOR_EXT = 1000148011,
675 VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
676 VK_BLEND_OP_SCREEN_EXT = 1000148013,
677 VK_BLEND_OP_OVERLAY_EXT = 1000148014,
678 VK_BLEND_OP_DARKEN_EXT = 1000148015,
679 VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
680 VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
681 VK_BLEND_OP_COLORBURN_EXT = 1000148018,
682 VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
683 VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
684 VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
685 VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
686 VK_BLEND_OP_INVERT_EXT = 1000148023,
687 VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
688 VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
689 VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
690 VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
691 VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
692 VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
693 VK_BLEND_OP_HARDMIX_EXT = 1000148030,
694 VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
695 VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
696 VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
697 VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
698 VK_BLEND_OP_PLUS_EXT = 1000148035,
699 VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
700 VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
701 VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
702 VK_BLEND_OP_MINUS_EXT = 1000148039,
703 VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
704 VK_BLEND_OP_CONTRAST_EXT = 1000148041,
705 VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
706 VK_BLEND_OP_RED_EXT = 1000148043,
707 VK_BLEND_OP_GREEN_EXT = 1000148044,
708 VK_BLEND_OP_BLUE_EXT = 1000148045,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700709}
710
711enum VkStencilOp {
712 VK_STENCIL_OP_KEEP = 0x00000000,
713 VK_STENCIL_OP_ZERO = 0x00000001,
714 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800715 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
716 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700717 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800718 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
719 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700720}
721
722enum VkLogicOp {
723 VK_LOGIC_OP_CLEAR = 0x00000000,
724 VK_LOGIC_OP_AND = 0x00000001,
725 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
726 VK_LOGIC_OP_COPY = 0x00000003,
727 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800728 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700729 VK_LOGIC_OP_XOR = 0x00000006,
730 VK_LOGIC_OP_OR = 0x00000007,
731 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800732 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700733 VK_LOGIC_OP_INVERT = 0x0000000a,
734 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
735 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
736 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
737 VK_LOGIC_OP_NAND = 0x0000000e,
738 VK_LOGIC_OP_SET = 0x0000000f,
739}
740
Jesse Hall3fbc8562015-11-29 22:10:52 -0800741enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800742 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800743 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
744 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
745 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
746 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800747}
748
Jesse Hall3fbc8562015-11-29 22:10:52 -0800749enum VkInternalAllocationType {
750 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700751}
752
753enum VkPhysicalDeviceType {
754 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
755 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
756 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
757 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
758 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
759}
760
Jesse Hall65ab5522015-11-30 00:07:16 -0800761enum VkVertexInputRate {
762 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
763 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700764}
765
766/// Vulkan format definitions
767enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800768 VK_FORMAT_UNDEFINED = 0,
769 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
770 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
771 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
772 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
773 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
774 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
775 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
776 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
777 VK_FORMAT_R8_UNORM = 9,
778 VK_FORMAT_R8_SNORM = 10,
779 VK_FORMAT_R8_USCALED = 11,
780 VK_FORMAT_R8_SSCALED = 12,
781 VK_FORMAT_R8_UINT = 13,
782 VK_FORMAT_R8_SINT = 14,
783 VK_FORMAT_R8_SRGB = 15,
784 VK_FORMAT_R8G8_UNORM = 16,
785 VK_FORMAT_R8G8_SNORM = 17,
786 VK_FORMAT_R8G8_USCALED = 18,
787 VK_FORMAT_R8G8_SSCALED = 19,
788 VK_FORMAT_R8G8_UINT = 20,
789 VK_FORMAT_R8G8_SINT = 21,
790 VK_FORMAT_R8G8_SRGB = 22,
791 VK_FORMAT_R8G8B8_UNORM = 23,
792 VK_FORMAT_R8G8B8_SNORM = 24,
793 VK_FORMAT_R8G8B8_USCALED = 25,
794 VK_FORMAT_R8G8B8_SSCALED = 26,
795 VK_FORMAT_R8G8B8_UINT = 27,
796 VK_FORMAT_R8G8B8_SINT = 28,
797 VK_FORMAT_R8G8B8_SRGB = 29,
798 VK_FORMAT_B8G8R8_UNORM = 30,
799 VK_FORMAT_B8G8R8_SNORM = 31,
800 VK_FORMAT_B8G8R8_USCALED = 32,
801 VK_FORMAT_B8G8R8_SSCALED = 33,
802 VK_FORMAT_B8G8R8_UINT = 34,
803 VK_FORMAT_B8G8R8_SINT = 35,
804 VK_FORMAT_B8G8R8_SRGB = 36,
805 VK_FORMAT_R8G8B8A8_UNORM = 37,
806 VK_FORMAT_R8G8B8A8_SNORM = 38,
807 VK_FORMAT_R8G8B8A8_USCALED = 39,
808 VK_FORMAT_R8G8B8A8_SSCALED = 40,
809 VK_FORMAT_R8G8B8A8_UINT = 41,
810 VK_FORMAT_R8G8B8A8_SINT = 42,
811 VK_FORMAT_R8G8B8A8_SRGB = 43,
812 VK_FORMAT_B8G8R8A8_UNORM = 44,
813 VK_FORMAT_B8G8R8A8_SNORM = 45,
814 VK_FORMAT_B8G8R8A8_USCALED = 46,
815 VK_FORMAT_B8G8R8A8_SSCALED = 47,
816 VK_FORMAT_B8G8R8A8_UINT = 48,
817 VK_FORMAT_B8G8R8A8_SINT = 49,
818 VK_FORMAT_B8G8R8A8_SRGB = 50,
819 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
820 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
821 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
822 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
823 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
824 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
825 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
826 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
827 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
828 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
829 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
830 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
831 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
832 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
833 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
834 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
835 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
836 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
837 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
838 VK_FORMAT_R16_UNORM = 70,
839 VK_FORMAT_R16_SNORM = 71,
840 VK_FORMAT_R16_USCALED = 72,
841 VK_FORMAT_R16_SSCALED = 73,
842 VK_FORMAT_R16_UINT = 74,
843 VK_FORMAT_R16_SINT = 75,
844 VK_FORMAT_R16_SFLOAT = 76,
845 VK_FORMAT_R16G16_UNORM = 77,
846 VK_FORMAT_R16G16_SNORM = 78,
847 VK_FORMAT_R16G16_USCALED = 79,
848 VK_FORMAT_R16G16_SSCALED = 80,
849 VK_FORMAT_R16G16_UINT = 81,
850 VK_FORMAT_R16G16_SINT = 82,
851 VK_FORMAT_R16G16_SFLOAT = 83,
852 VK_FORMAT_R16G16B16_UNORM = 84,
853 VK_FORMAT_R16G16B16_SNORM = 85,
854 VK_FORMAT_R16G16B16_USCALED = 86,
855 VK_FORMAT_R16G16B16_SSCALED = 87,
856 VK_FORMAT_R16G16B16_UINT = 88,
857 VK_FORMAT_R16G16B16_SINT = 89,
858 VK_FORMAT_R16G16B16_SFLOAT = 90,
859 VK_FORMAT_R16G16B16A16_UNORM = 91,
860 VK_FORMAT_R16G16B16A16_SNORM = 92,
861 VK_FORMAT_R16G16B16A16_USCALED = 93,
862 VK_FORMAT_R16G16B16A16_SSCALED = 94,
863 VK_FORMAT_R16G16B16A16_UINT = 95,
864 VK_FORMAT_R16G16B16A16_SINT = 96,
865 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
866 VK_FORMAT_R32_UINT = 98,
867 VK_FORMAT_R32_SINT = 99,
868 VK_FORMAT_R32_SFLOAT = 100,
869 VK_FORMAT_R32G32_UINT = 101,
870 VK_FORMAT_R32G32_SINT = 102,
871 VK_FORMAT_R32G32_SFLOAT = 103,
872 VK_FORMAT_R32G32B32_UINT = 104,
873 VK_FORMAT_R32G32B32_SINT = 105,
874 VK_FORMAT_R32G32B32_SFLOAT = 106,
875 VK_FORMAT_R32G32B32A32_UINT = 107,
876 VK_FORMAT_R32G32B32A32_SINT = 108,
877 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
878 VK_FORMAT_R64_UINT = 110,
879 VK_FORMAT_R64_SINT = 111,
880 VK_FORMAT_R64_SFLOAT = 112,
881 VK_FORMAT_R64G64_UINT = 113,
882 VK_FORMAT_R64G64_SINT = 114,
883 VK_FORMAT_R64G64_SFLOAT = 115,
884 VK_FORMAT_R64G64B64_UINT = 116,
885 VK_FORMAT_R64G64B64_SINT = 117,
886 VK_FORMAT_R64G64B64_SFLOAT = 118,
887 VK_FORMAT_R64G64B64A64_UINT = 119,
888 VK_FORMAT_R64G64B64A64_SINT = 120,
889 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
890 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
891 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
892 VK_FORMAT_D16_UNORM = 124,
893 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
894 VK_FORMAT_D32_SFLOAT = 126,
895 VK_FORMAT_S8_UINT = 127,
896 VK_FORMAT_D16_UNORM_S8_UINT = 128,
897 VK_FORMAT_D24_UNORM_S8_UINT = 129,
898 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
899 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
900 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
901 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
902 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
903 VK_FORMAT_BC2_UNORM_BLOCK = 135,
904 VK_FORMAT_BC2_SRGB_BLOCK = 136,
905 VK_FORMAT_BC3_UNORM_BLOCK = 137,
906 VK_FORMAT_BC3_SRGB_BLOCK = 138,
907 VK_FORMAT_BC4_UNORM_BLOCK = 139,
908 VK_FORMAT_BC4_SNORM_BLOCK = 140,
909 VK_FORMAT_BC5_UNORM_BLOCK = 141,
910 VK_FORMAT_BC5_SNORM_BLOCK = 142,
911 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
912 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
913 VK_FORMAT_BC7_UNORM_BLOCK = 145,
914 VK_FORMAT_BC7_SRGB_BLOCK = 146,
915 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
916 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
917 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
918 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
919 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
920 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
921 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
922 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
923 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
924 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
925 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
926 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
927 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
928 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
929 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
930 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
931 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
932 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
933 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
934 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
935 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
936 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
937 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
938 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
939 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
940 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
941 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
942 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
943 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
944 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
945 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
946 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
947 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
948 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
949 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
950 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
951 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
952 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Chris Forbes289cb792016-12-30 15:03:55 +1300953
Jesse Hallad250842017-03-10 18:35:38 -0800954 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -0800955 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
956 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
957 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
958 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
959 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
960 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
961 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
962 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700963}
964
Jesse Halld27f6aa2015-08-15 17:58:48 -0700965/// Structure type enumerant
966enum VkStructureType {
967 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -0800968 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
969 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
970 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
971 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800972 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -0800973 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
974 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
975 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
976 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700977 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -0800978 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
979 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
980 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
981 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
982 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
983 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800984 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
985 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
986 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
987 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
988 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
989 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
990 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
991 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
992 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
993 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
994 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
995 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
996 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
997 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
998 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
999 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
1000 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001001 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001002 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
1003 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
1004 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
1005 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
1006 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001007 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -08001008 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
1009 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
1010 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
1011 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
1012 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
1013 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
1014 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
1015 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001016
Jesse Hallad250842017-03-10 18:35:38 -08001017 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001018 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
1019 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001020
Jesse Hallad250842017-03-10 18:35:38 -08001021 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -08001022 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
1023 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001024
Jesse Hallad250842017-03-10 18:35:38 -08001025 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001026 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001027
Jesse Hallad250842017-03-10 18:35:38 -08001028 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001029 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
1030
Jesse Hallad250842017-03-10 18:35:38 -08001031 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001032 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
1033
Jesse Hallad250842017-03-10 18:35:38 -08001034 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001035 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
1036
Jesse Hallad250842017-03-10 18:35:38 -08001037 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001038 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
1039
Jesse Hallad250842017-03-10 18:35:38 -08001040 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001041 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
1042
Jesse Hallad250842017-03-10 18:35:38 -08001043 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001044 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -08001045
Jesse Hallad250842017-03-10 18:35:38 -08001046 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08001047 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
Chris Forbes8e4438b2016-12-07 16:26:49 +13001048 VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001,
Chris Forbes1d4e5542017-02-15 19:38:50 +13001049 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002,
Chia-I Wub262ddc2016-03-22 07:38:20 +08001050
Jesse Hallad250842017-03-10 18:35:38 -08001051 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -07001052 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
1053
Jesse Hallad250842017-03-10 18:35:38 -08001054 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001055 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
1056
Jesse Hallad250842017-03-10 18:35:38 -08001057 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07001058 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -07001059 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -07001060 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall56d386a2016-07-26 15:20:40 -07001061
Jesse Hallad250842017-03-10 18:35:38 -08001062 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07001063 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall56d386a2016-07-26 15:20:40 -07001064 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall56d386a2016-07-26 15:20:40 -07001065 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Chris Forbes289cb792016-12-30 15:03:55 +13001066
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001067 //@extension("VK_AMD_texture_gather_bias_lod") // 42
1068 VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
1069
Jesse Hallad250842017-03-10 18:35:38 -08001070 //@extension("VK_KHX_multiview") // 54
1071 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
1072 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
1073 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
1074
1075 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08001076 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
1077 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
Chris Forbes289cb792016-12-30 15:03:55 +13001078
Jesse Hallad250842017-03-10 18:35:38 -08001079 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08001080 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
1081 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
Chris Forbes289cb792016-12-30 15:03:55 +13001082
Jesse Hallad250842017-03-10 18:35:38 -08001083 //@extension("VK_NV_win32_keyed_mutex") // 59
Chris Forbes289cb792016-12-30 15:03:55 +13001084 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
1085
Jesse Hallad250842017-03-10 18:35:38 -08001086 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall889cd9a2017-02-25 22:12:23 -08001087 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
1088 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
1089 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
1090 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
1091 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
1092 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
1093 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
1094 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
Chris Forbes1194ede2016-12-30 16:29:25 +13001095 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
1096
Jesse Hallad250842017-03-10 18:35:38 -08001097 //@extension("VK_KHX_device_group") // 61
1098 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
1099 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
1100 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
1101 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
1102 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
1103 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
1104 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
1105 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
1106 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
1107 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
1108 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
1109 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
1110 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
1111
1112 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08001113 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
Chris Forbes289cb792016-12-30 15:03:55 +13001114
Jesse Hallad250842017-03-10 18:35:38 -08001115 //@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001116 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
1117
Jesse Hallad250842017-03-10 18:35:38 -08001118 //@extension("VK_KHX_device_group_creation") // 71
1119 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
1120 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
1121
Jesse Hall9947eab2017-08-28 12:10:06 -07001122 //@extension("VK_KHR_external_memory_capabilities") // 72
1123 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000,
1124 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001,
1125 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002,
1126 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003,
1127 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004,
Jesse Hallad250842017-03-10 18:35:38 -08001128
Jesse Hall9947eab2017-08-28 12:10:06 -07001129 //@extension("VK_KHR_external_memory") // 73
1130 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000,
1131 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001,
1132 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002,
Jesse Hallad250842017-03-10 18:35:38 -08001133
Jesse Hall9947eab2017-08-28 12:10:06 -07001134 //@extension("VK_KHR_external_memory_win32") // 74
1135 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
1136 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
1137 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
Jesse Hallad250842017-03-10 18:35:38 -08001138
Jesse Hall9947eab2017-08-28 12:10:06 -07001139 //@extension("VK_KHR_external_memory_fd") // 75
1140 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
1141 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
Jesse Hallad250842017-03-10 18:35:38 -08001142
Jesse Hall9947eab2017-08-28 12:10:06 -07001143 //@extension("VK_KHR_win32_keyed_mutex") // 76
1144 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
Jesse Hallad250842017-03-10 18:35:38 -08001145
Jesse Hall9947eab2017-08-28 12:10:06 -07001146 //@extension("VK_KHR_external_semaphore_capabilities") // 77
1147 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000,
1148 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001,
Jesse Hallad250842017-03-10 18:35:38 -08001149
Jesse Hall9947eab2017-08-28 12:10:06 -07001150 //@extension("VK_KHR_external_semaphore") // 78
1151 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000,
Jesse Hallad250842017-03-10 18:35:38 -08001152
Jesse Hall9947eab2017-08-28 12:10:06 -07001153 //@extension("VK_KHR_external_semaphore_win32") // 79
1154 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
1155 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
1156 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
Jesse Hallad250842017-03-10 18:35:38 -08001157
Jesse Hall9947eab2017-08-28 12:10:06 -07001158 //@extension("VK_KHR_external_semaphore_fd") // 80
1159 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
1160 VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
Jesse Hallad250842017-03-10 18:35:38 -08001161
1162 //@extension("VK_KHR_push_descriptor") // 81
1163 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1164
Jesse Hall9947eab2017-08-28 12:10:06 -07001165 //@extension("VK_KHR_16bit_storage") // 84
1166 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000,
1167
Jesse Hallad250842017-03-10 18:35:38 -08001168 //@extension("VK_KHR_incremental_present") // 85
Jesse Hall889cd9a2017-02-25 22:12:23 -08001169 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
Chris Forbes289cb792016-12-30 15:03:55 +13001170
Jesse Hallad250842017-03-10 18:35:38 -08001171 //@extension("VK_KHR_descriptor_update_template") // 86
1172 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1173
1174 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001175 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1176 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1177 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1178 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1179 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1180 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001181
Jesse Hallad250842017-03-10 18:35:38 -08001182 //@extension("VK_NV_clip_space_w_scaling") // 88
1183 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1184
1185 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08001186 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1187
Jesse Hallad250842017-03-10 18:35:38 -08001188 //@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001189 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1190 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1191 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1192 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Hallad250842017-03-10 18:35:38 -08001193
1194 //@extension("VK_GOOGLE_display_timing") // 93
1195 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1196
1197 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1198 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1199
1200 //@extension("VK_NV_viewport_swizzle") // 99
1201 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1202
1203 //@extension("VK_EXT_discard_rectangles") // 100
1204 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1205 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1206
Jesse Hallfdc8ab32017-03-10 21:01:57 -08001207 //@extension("VK_EXT_hdr_metadata") // 106
1208 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1209
Jesse Hall05556b12017-05-18 17:40:25 -07001210 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13001211 VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
1212
Jesse Hall9947eab2017-08-28 12:10:06 -07001213 //@extension("VK_KHR_external_fence_capabilities") // 113
1214 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000,
1215 VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001,
1216
1217 //@extension("VK_KHR_external_fence") // 114
1218 VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = 1000113000,
1219
1220 //@extension("VK_KHR_external_fence_win32") // 115
1221 VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
1222 VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
1223 VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
1224
1225 //@extension("VK_KHR_external_fence_fd") // 117
1226 VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
1227 VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
1228
Jesse Hall05556b12017-05-18 17:40:25 -07001229 //@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13001230 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
1231 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
1232 VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
1233
Jesse Hall9947eab2017-08-28 12:10:06 -07001234 //@extension("VK_KHR_variable_pointers") // 121
1235 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = 1000120000,
1236
Jesse Hallad250842017-03-10 18:35:38 -08001237 //@extension("VK_MVK_ios_surface") // 123
1238 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1239
1240 //@extension("VK_MVK_macos_surface") // 124
1241 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001242
Jesse Hall9947eab2017-08-28 12:10:06 -07001243 //@extension("VK_KHR_dedicated_allocation") // 128
1244 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000,
1245 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001,
1246
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001247 //@extension("VK_EXT_sampler_filter_minmax") // 131
1248 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
1249 VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
1250
Jesse Hall9947eab2017-08-28 12:10:06 -07001251 //@extension("VK_KHR_get_memory_requirements2") // 147
1252 VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000,
1253 VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001,
1254 VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002,
1255 VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = 1000146003,
1256 VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004,
1257
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001258 //@extension("VK_EXT_blend_operation_advanced") // 149
1259 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
1260 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
1261 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
1262
1263 //@extension("VK_NV_fragment_coverage_to_color") // 150
1264 VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
1265
1266 //@structure("VK_NV_framebuffer_mixed_samples") // 153
1267 VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001268}
1269
Jesse Hall65ab5522015-11-30 00:07:16 -08001270enum VkSubpassContents {
1271 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1272 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001273}
1274
Jesse Hall543a7ff2016-01-08 16:38:30 -08001275enum VkPipelineCacheHeaderVersion {
1276 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1277}
1278
Jesse Hallbd888842015-11-30 21:44:14 -08001279@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001280/// Error and return codes
1281enum VkResult {
1282 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001283 VK_SUCCESS = 0,
1284 VK_NOT_READY = 1,
1285 VK_TIMEOUT = 2,
1286 VK_EVENT_SET = 3,
1287 VK_EVENT_RESET = 4,
1288 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001289
Jesse Hallad250842017-03-10 18:35:38 -08001290 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001291 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001292
Jesse Halld27f6aa2015-08-15 17:58:48 -07001293 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001294 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1295 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1296 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1297 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1298 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1299 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1300 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1301 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1302 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1303 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1304 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001305 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001306
Jesse Hallad250842017-03-10 18:35:38 -08001307 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001308 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001309 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001310
Jesse Hallad250842017-03-10 18:35:38 -08001311 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001312 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001313
Jesse Hallad250842017-03-10 18:35:38 -08001314 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001315 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001316
Jesse Hallad250842017-03-10 18:35:38 -08001317 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001318 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001319
Jesse Hallad250842017-03-10 18:35:38 -08001320 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001321 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001322
Jesse Hallad250842017-03-10 18:35:38 -08001323 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001324 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001325
Jesse Hall9947eab2017-08-28 12:10:06 -07001326 //@extension("VK_KHR_external_memory") // 73
1327 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001328}
1329
1330enum VkDynamicState {
1331 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1332 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1333 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1334 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1335 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1336 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1337 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1338 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1339 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001340
1341 //@extension("VK_NV_clip_space_w_scaling") // 88
1342 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1343
1344 //@extension("VK_EXT_discard_rectangles") // 100
1345 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001346}
1347
Jesse Hall05556b12017-05-18 17:40:25 -07001348enum VkObjectType {
1349 VK_OBJECT_TYPE_UNKNOWN = 0,
1350 VK_OBJECT_TYPE_INSTANCE = 1,
1351 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
1352 VK_OBJECT_TYPE_DEVICE = 3,
1353 VK_OBJECT_TYPE_QUEUE = 4,
1354 VK_OBJECT_TYPE_SEMAPHORE = 5,
1355 VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
1356 VK_OBJECT_TYPE_FENCE = 7,
1357 VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
1358 VK_OBJECT_TYPE_BUFFER = 9,
1359 VK_OBJECT_TYPE_IMAGE = 10,
1360 VK_OBJECT_TYPE_EVENT = 11,
1361 VK_OBJECT_TYPE_QUERY_POOL = 12,
1362 VK_OBJECT_TYPE_BUFFER_VIEW = 13,
1363 VK_OBJECT_TYPE_IMAGE_VIEW = 14,
1364 VK_OBJECT_TYPE_SHADER_MODULE = 15,
1365 VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
1366 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
1367 VK_OBJECT_TYPE_RENDER_PASS = 18,
1368 VK_OBJECT_TYPE_PIPELINE = 19,
1369 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
1370 VK_OBJECT_TYPE_SAMPLER = 21,
1371 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
1372 VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
1373 VK_OBJECT_TYPE_FRAMEBUFFER = 24,
1374 VK_OBJECT_TYPE_COMMAND_POOL = 25,
1375
1376 //@extension("VK_KHR_surface") // 1
1377 VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
1378
1379 //@extension("VK_KHR_swapchain") // 2
1380 VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
1381
1382 //@extension("VK_KHR_display") // 3
1383 VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000,
1384 VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001,
1385
1386 //@extension("VK_KHR_debug_report") // 12
1387 VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000,
1388
1389 //@extension("VK_KHR_descriptor_update_template") // 86
1390 VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
1391
1392 //@extension("VK_NVX_device_generated_commands") // 87
1393 VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000,
1394 VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001,
1395}
1396
Jesse Hallad250842017-03-10 18:35:38 -08001397@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001398enum VkPresentModeKHR {
1399 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1400 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1401 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001402 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001403
Jesse Hall05556b12017-05-18 17:40:25 -07001404 //@extension("VK_KHR_shared_presentable_image") // 112
Jesse Hall77ad05b2017-03-10 22:02:20 -08001405 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1406 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001407}
1408
Jesse Hallad250842017-03-10 18:35:38 -08001409@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001410enum VkColorSpaceKHR {
1411 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001412
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001413 //@extension("VK_EXT_swapchain_colorspace") // 105
1414 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
1415 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
1416 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
1417 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
1418 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
1419 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
1420 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
1421 VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
1422 VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
1423 VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001424 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1425 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001426 VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
Courtney Goeltzenleuchteredc88e72017-07-09 12:50:57 -06001427 VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
Michael Lentine88594d72015-11-12 12:49:45 -08001428}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001429
Jesse Hallad250842017-03-10 18:35:38 -08001430@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001431enum VkDebugReportObjectTypeEXT {
1432 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1433 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1434 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1435 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1436 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1437 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1438 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1439 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1440 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1441 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1442 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1443 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1444 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1445 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1446 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1447 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1448 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1449 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1450 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1451 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1452 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1453 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1454 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1455 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1456 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1457 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1458 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1459 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001460 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001461 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1462 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1463 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1464 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001465
1466 //extension("VK_KHR_descriptor_update_template") // 86
1467 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001468}
1469
Jesse Hallad250842017-03-10 18:35:38 -08001470@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001471enum VkRasterizationOrderAMD {
1472 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1473 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1474}
1475
Jesse Hallad250842017-03-10 18:35:38 -08001476@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001477enum VkValidationCheckEXT {
1478 VK_VALIDATION_CHECK_ALL_EXT = 0,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001479 VK_VALIDATION_CHECK_SHADERS_EXT = 1,
Chris Forbes289cb792016-12-30 15:03:55 +13001480}
1481
Jesse Hallad250842017-03-10 18:35:38 -08001482@extension("VK_KHR_descriptor_update_template") // 86
1483enum VkDescriptorUpdateTemplateTypeKHR {
1484 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1485 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1486}
1487
1488@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001489enum VkIndirectCommandsTokenTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001490 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0,
1491 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1,
1492 VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2,
1493 VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3,
1494 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4,
1495 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5,
1496 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6,
1497 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001498}
1499
Jesse Hallad250842017-03-10 18:35:38 -08001500@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001501enum VkObjectEntryTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001502 VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0,
1503 VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1,
1504 VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2,
1505 VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3,
1506 VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001507}
Jesse Hall715b86a2016-01-16 16:34:29 -08001508
Jesse Hallad250842017-03-10 18:35:38 -08001509@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001510enum VkDisplayPowerStateEXT {
1511 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1512 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1513 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1514}
1515
Jesse Hallad250842017-03-10 18:35:38 -08001516@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001517enum VkDeviceEventTypeEXT {
1518 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1519}
1520
Jesse Hallad250842017-03-10 18:35:38 -08001521@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001522enum VkDisplayEventTypeEXT {
1523 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1524}
1525
Jesse Hallad250842017-03-10 18:35:38 -08001526@extension("VK_NV_viewport_swizzle") // 99
1527enum VkViewportCoordinateSwizzleNV {
1528 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1529 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1530 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1531 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1532 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1533 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1534 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1535 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1536}
1537
1538@extension("VK_EXT_discard_rectangles") // 100
1539enum VkDiscardRectangleModeEXT {
1540 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1541 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1542}
1543
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001544@extension("VK_EXT_sampler_filter_minmax") // 131
1545enum VkSamplerReductionModeEXT {
1546 VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
1547 VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
1548 VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
1549}
1550
1551@extension("VK_EXT_blend_operation_advanced") // 149
1552enum VkBlendOverlapEXT {
1553 VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
1554 VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
1555 VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
1556}
1557
1558@extension("VK_NV_framebuffer_mixed_samples") // 153
1559enum VkCoverageModulationModeNV {
1560 VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
1561 VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
1562 VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
1563 VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
1564}
1565
Jesse Halld27f6aa2015-08-15 17:58:48 -07001566/////////////////
1567// Bitfields //
1568/////////////////
1569
Jesse Halld27f6aa2015-08-15 17:58:48 -07001570/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001571type VkFlags VkQueueFlags
1572bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001573 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1574 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001575 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001576 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001577}
1578
1579/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001580type VkFlags VkMemoryPropertyFlags
1581bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001582 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1583 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1584 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1585 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1586 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001587}
1588
1589/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001590type VkFlags VkMemoryHeapFlags
1591bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001592 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001593
1594 //@extension("VK_KHX_device_group_creation") // 71
1595 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001596}
1597
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001598/// Access flags
1599type VkFlags VkAccessFlags
1600bitfield VkAccessFlagBits {
1601 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1602 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1603 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1604 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1605 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1606 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1607 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1608 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1609 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1610 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1611 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1612 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1613 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1614 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1615 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1616 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1617 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001618
Jesse Hallad250842017-03-10 18:35:38 -08001619 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001620 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001621 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001622
1623 //@extension("VK_EXT_blend_operation_advanced") // 149
1624 VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001625}
1626
1627/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001628type VkFlags VkBufferUsageFlags
1629bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001630 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1631 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001632 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1633 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1634 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1635 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1636 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1637 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1638 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1639}
1640
1641/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001642type VkFlags VkBufferCreateFlags
1643bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001644 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001645 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1646 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1647}
1648
1649/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001650type VkFlags VkShaderStageFlags
1651bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001652 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001653 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1654 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001655 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1656 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1657 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001658 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001659
1660 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1661}
1662
Jesse Hallfbf97b02015-11-20 14:17:03 -08001663/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001664type VkFlags VkDescriptorPoolCreateFlags
1665bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001666 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1667}
1668
1669/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001670type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001671//bitfield VkDescriptorPoolResetFlagBits {
1672//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001673
Jesse Halld27f6aa2015-08-15 17:58:48 -07001674/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001675type VkFlags VkImageUsageFlags
1676bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001677 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1678 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001679 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1680 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1681 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001682 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001683 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1684 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1685}
1686
1687/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001688type VkFlags VkImageCreateFlags
1689bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001690 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001691 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1692 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 -07001693 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1694 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 -08001695
Jesse Hallad250842017-03-10 18:35:38 -08001696 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001697 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001698
1699 //@extension("VK_KHX_device_group") // 61
1700 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001701}
1702
Jesse Hallb00daad2015-11-29 19:46:20 -08001703/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001704type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001705//bitfield VkImageViewCreateFlagBits {
1706//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001707
1708/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001709type VkFlags VkPipelineCreateFlags
1710bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001711 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1712 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1713 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001714
1715 //@extension("VK_KHX_device_group") // 61
1716 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1717 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001718}
1719
Jesse Hall65ab5522015-11-30 00:07:16 -08001720/// Color component flags
1721type VkFlags VkColorComponentFlags
1722bitfield VkColorComponentFlagBits {
1723 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1724 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1725 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1726 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001727}
1728
1729/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001730type VkFlags VkFenceCreateFlags
1731bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001732 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1733}
1734
1735/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001736type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001737//bitfield VkSemaphoreCreateFlagBits {
1738//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001739
1740/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001741type VkFlags VkFormatFeatureFlags
1742bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001743 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1744 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1745 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1746 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1747 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1748 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1749 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1750 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1751 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1752 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001753 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1754 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 -08001755 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001756
Jesse Hallad250842017-03-10 18:35:38 -08001757 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001758 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001759
Jesse Hallad250842017-03-10 18:35:38 -08001760 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001761 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1762 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001763
1764 //@extension("VK_EXT_sampler_filter_minmax") // 131
1765 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001766}
1767
1768/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001769type VkFlags VkQueryControlFlags
1770bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001771 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001772}
1773
1774/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001775type VkFlags VkQueryResultFlags
1776bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001777 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1778 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1779 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1780 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1781}
1782
1783/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001784type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001785//bitfield VkShaderModuleCreateFlagBits {
1786//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001787
Jesse Halld27f6aa2015-08-15 17:58:48 -07001788/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001789type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001790//bitfield VkEventCreateFlagBits {
1791//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001792
Jesse Halla15a4bf2015-11-19 22:48:02 -08001793/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001794type VkFlags VkCommandBufferUsageFlags
1795bitfield VkCommandBufferUsageFlagBits {
1796 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1797 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1798 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001799}
1800
1801/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001802type VkFlags VkQueryPipelineStatisticFlags
1803bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001804 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1805 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1806 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1807 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1808 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1809 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1810 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1811 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1812 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1813 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1814 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001815}
1816
1817/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001818type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001819//bitfield VkMemoryMapFlagBits {
1820//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001821
1822/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001823type VkFlags VkImageAspectFlags
1824bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001825 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1826 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1827 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1828 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1829}
1830
1831/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001832type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001833bitfield VkSparseMemoryBindFlagBits {
1834 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1835}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001836
1837/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001838type VkFlags VkSparseImageFormatFlags
1839bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001840 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1841 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.
1842 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001843}
1844
1845/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001846type VkFlags VkPipelineStageFlags
1847bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001848 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1849 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1850 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1851 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001852 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1853 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001854 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1855 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1856 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1857 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1858 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1859 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1860 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001861 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1862 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001863
Jesse Hall543a7ff2016-01-08 16:38:30 -08001864 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1865 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001866
Jesse Hallad250842017-03-10 18:35:38 -08001867 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001868 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001869}
1870
1871/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001872type VkFlags VkAttachmentDescriptionFlags
1873bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001874 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 -07001875}
1876
1877/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001878type VkFlags VkSubpassDescriptionFlags
1879bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001880 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1881 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1882 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001883}
1884
1885/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001886type VkFlags VkCommandPoolCreateFlags
1887bitfield VkCommandPoolCreateFlagBits {
1888 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1889 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001890}
1891
1892/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001893type VkFlags VkCommandPoolResetFlags
1894bitfield VkCommandPoolResetFlagBits {
1895 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001896}
1897
Jesse Hall3fbc8562015-11-29 22:10:52 -08001898type VkFlags VkCommandBufferResetFlags
1899bitfield VkCommandBufferResetFlagBits {
1900 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001901}
1902
Jesse Halld8bade02015-11-24 10:24:18 -08001903type VkFlags VkSampleCountFlags
1904bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001905 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1906 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1907 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1908 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1909 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1910 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1911 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1912}
1913
Jesse Halld8bade02015-11-24 10:24:18 -08001914type VkFlags VkStencilFaceFlags
1915bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001916 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1917 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001918 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001919}
1920
Jesse Halla6429252015-11-29 18:59:42 -08001921/// Instance creation flags
1922type VkFlags VkInstanceCreateFlags
1923//bitfield VkInstanceCreateFlagBits {
1924//}
1925
1926/// Device creation flags
1927type VkFlags VkDeviceCreateFlags
1928//bitfield VkDeviceCreateFlagBits {
1929//}
1930
1931/// Device queue creation flags
1932type VkFlags VkDeviceQueueCreateFlags
1933//bitfield VkDeviceQueueCreateFlagBits {
1934//}
1935
1936/// Query pool creation flags
1937type VkFlags VkQueryPoolCreateFlags
1938//bitfield VkQueryPoolCreateFlagBits {
1939//}
1940
1941/// Buffer view creation flags
1942type VkFlags VkBufferViewCreateFlags
1943//bitfield VkBufferViewCreateFlagBits {
1944//}
1945
1946/// Pipeline cache creation flags
1947type VkFlags VkPipelineCacheCreateFlags
1948//bitfield VkPipelineCacheCreateFlagBits {
1949//}
1950
1951/// Pipeline shader stage creation flags
1952type VkFlags VkPipelineShaderStageCreateFlags
1953//bitfield VkPipelineShaderStageCreateFlagBits {
1954//}
1955
1956/// Descriptor set layout creation flags
1957type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001958bitfield VkDescriptorSetLayoutCreateFlagBits {
1959 //@extension("VK_KHR_push_descriptor") // 81
1960 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1961}
Jesse Halla6429252015-11-29 18:59:42 -08001962
1963/// Pipeline vertex input state creation flags
1964type VkFlags VkPipelineVertexInputStateCreateFlags
1965//bitfield VkPipelineVertexInputStateCreateFlagBits {
1966//}
1967
1968/// Pipeline input assembly state creation flags
1969type VkFlags VkPipelineInputAssemblyStateCreateFlags
1970//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1971//}
1972
1973/// Tessellation state creation flags
1974type VkFlags VkPipelineTessellationStateCreateFlags
1975//bitfield VkPipelineTessellationStateCreateFlagBits {
1976//}
1977
1978/// Viewport state creation flags
1979type VkFlags VkPipelineViewportStateCreateFlags
1980//bitfield VkPipelineViewportStateCreateFlagBits {
1981//}
1982
Jesse Hall3fbc8562015-11-29 22:10:52 -08001983/// Rasterization state creation flags
1984type VkFlags VkPipelineRasterizationStateCreateFlags
1985//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001986//}
1987
1988/// Multisample state creation flags
1989type VkFlags VkPipelineMultisampleStateCreateFlags
1990//bitfield VkPipelineMultisampleStateCreateFlagBits {
1991//}
1992
1993/// Color blend state creation flags
1994type VkFlags VkPipelineColorBlendStateCreateFlags
1995//bitfield VkPipelineColorBlendStateCreateFlagBits {
1996//}
1997
1998/// Depth/stencil state creation flags
1999type VkFlags VkPipelineDepthStencilStateCreateFlags
2000//bitfield VkPipelineDepthStencilStateCreateFlagBits {
2001//}
2002
2003/// Dynamic state creation flags
2004type VkFlags VkPipelineDynamicStateCreateFlags
2005//bitfield VkPipelineDynamicStateCreateFlagBits {
2006//}
2007
2008/// Pipeline layout creation flags
2009type VkFlags VkPipelineLayoutCreateFlags
2010//bitfield VkPipelineLayoutCreateFlagBits {
2011//}
2012
2013/// Sampler creation flags
2014type VkFlags VkSamplerCreateFlags
2015//bitfield VkSamplerCreateFlagBits {
2016//}
2017
2018/// Render pass creation flags
2019type VkFlags VkRenderPassCreateFlags
2020//bitfield VkRenderPassCreateFlagBits {
2021//}
2022
2023/// Framebuffer creation flags
2024type VkFlags VkFramebufferCreateFlags
2025//bitfield VkFramebufferCreateFlagBits {
2026//}
2027
Jesse Halldc6d36c2015-11-29 19:12:15 -08002028/// Dependency flags
2029type VkFlags VkDependencyFlags
2030bitfield VkDependencyFlagBits {
2031 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002032
2033 //@extension("VK_KHX_multiview") // 54
2034 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
2035
2036 //@extension("VK_KHX_device_group") // 61
2037 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08002038}
2039
Jesse Hallc7467b72015-11-29 21:05:26 -08002040/// Cull mode flags
2041type VkFlags VkCullModeFlags
2042bitfield VkCullModeFlagBits {
2043 VK_CULL_MODE_NONE = 0x00000000,
2044 VK_CULL_MODE_FRONT_BIT = 0x00000001,
2045 VK_CULL_MODE_BACK_BIT = 0x00000002,
2046 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
2047}
2048
Jesse Hallad250842017-03-10 18:35:38 -08002049@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002050type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002051@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002052bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002053 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002054 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
2055 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
2056 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
2057 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
2058 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
2059 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
2060 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
2061 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08002062}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002063
Jesse Hallad250842017-03-10 18:35:38 -08002064@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002065type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002066@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002067bitfield VkCompositeAlphaFlagBitsKHR {
2068 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2069 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
2070 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
2071 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
2072}
2073
Jesse Hallad250842017-03-10 18:35:38 -08002074@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002075type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002076@extension("VK_KHR_swapchain") // 2
2077bitfield VkSwapchainCreateFlagBitsKHR {
2078 //@extension("VK_KHX_device_group") // 61
2079 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
2080}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002081
Jesse Hallad250842017-03-10 18:35:38 -08002082@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002083type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002084@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002085bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002086 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2087 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
2088 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
2089 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08002090}
2091
Jesse Hallad250842017-03-10 18:35:38 -08002092@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002093type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002094//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002095//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
2096//}
2097
Jesse Hallad250842017-03-10 18:35:38 -08002098@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002099type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002100//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002101//bitfield VkDisplayModeCreateFlagBitsKHR {
2102//}
2103
Jesse Hallad250842017-03-10 18:35:38 -08002104@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002105type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002106//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002107//bitfield VkXlibSurfaceCreateFlagBitsKHR {
2108//}
2109
Jesse Hallad250842017-03-10 18:35:38 -08002110@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002111type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002112//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002113//bitfield VkXcbSurfaceCreateFlagBitsKHR {
2114//}
2115
Jesse Hallad250842017-03-10 18:35:38 -08002116@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002117type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002118//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002119//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
2120//}
2121
Jesse Hallad250842017-03-10 18:35:38 -08002122@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002123type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002124//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002125//bitfield VkMirSurfaceCreateFlagBitsKHR {
2126//}
2127
Jesse Hallad250842017-03-10 18:35:38 -08002128@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002129type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002130//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002131//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
2132//}
2133
Jesse Hallad250842017-03-10 18:35:38 -08002134@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002135type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002136//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002137//bitfield VkWin32SurfaceCreateFlagBitsKHR {
2138//}
2139
Jesse Hallad250842017-03-10 18:35:38 -08002140@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002141type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08002142@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002143bitfield VkSwapchainImageUsageFlagBitsANDROID {
2144 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
2145}
2146
Jesse Hallad250842017-03-10 18:35:38 -08002147@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002148type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002149@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002150bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08002151 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
2152 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
2153 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08002154 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
2155 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
2156}
2157
Jesse Hallad250842017-03-10 18:35:38 -08002158@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002159type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002160@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002161bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002162 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
2163 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
2164 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
2165 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002166}
2167
Jesse Hallad250842017-03-10 18:35:38 -08002168@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002169type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002170@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002171bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002172 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
2173 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
2174 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13002175}
2176
Jesse Hallad250842017-03-10 18:35:38 -08002177@extension("VK_KHX_device_group") // 61
2178type VkFlags VkPeerMemoryFeatureFlagsKHX
2179@extension("VK_KHX_device_group") // 61
2180bitfield VkPeerMemoryFeatureFlagBitsKHX {
2181 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
2182 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
2183 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
2184 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
2185}
2186
2187@extension("VK_KHX_device_group") // 61
2188type VkFlags VkMemoryAllocateFlagsKHX
2189@extension("VK_KHX_device_group") // 61
2190bitfield VkMemoryAllocateFlagBitsKHX {
2191 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
2192}
2193
2194@extension("VK_KHX_device_group") // 61
2195type VkFlags VkDeviceGroupPresentModeFlagsKHX
2196@extension("VK_KHX_device_group") // 61
2197bitfield VkDeviceGroupPresentModeFlagBitsKHX {
2198 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
2199 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
2200 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
2201 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
2202}
2203
2204@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002205type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08002206//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002207//bitfield VkViSurfaceCreateFlagBitsNN {
2208//}
2209
Jesse Hallad250842017-03-10 18:35:38 -08002210@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002211type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002212//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002213//bitfield VkCommandPoolTrimFlagBitsKHR {
2214//}
2215
Jesse Hall9947eab2017-08-28 12:10:06 -07002216@extension("VK_KHR_external_memory_capabilities") // 72
2217type VkFlags VkExternalMemoryHandleTypeFlagsKHR
2218@extension("VK_KHR_external_memory_capabilities") // 72
2219bitfield VkExternalMemoryHandleTypeFlagBitsKHR {
2220 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2221 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2222 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2223 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = 0x00000008,
2224 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010,
2225 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020,
2226 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040,
Jesse Hallad250842017-03-10 18:35:38 -08002227}
2228
Jesse Hall9947eab2017-08-28 12:10:06 -07002229@extension("VK_KHR_external_memory_capabilities") // 72
2230type VkFlags VkExternalMemoryFeatureFlagsKHR
2231@extension("VK_KHR_external_memory_capabilities") // 72
2232bitfield VkExternalMemoryFeatureFlagBitsKHR {
2233 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = 0x00000001,
2234 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = 0x00000002,
2235 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08002236}
2237
Jesse Hall9947eab2017-08-28 12:10:06 -07002238@extension("VK_KHR_external_semaphore_capabilities") // 77
2239type VkFlags VkExternalSemaphoreHandleTypeFlagsKHR
2240@extension("VK_KHR_external_semaphore_capabilities") // 77
2241bitfield VkExternalSemaphoreHandleTypeFlagBitsKHR {
2242 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001
2243 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002
2244 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004
2245 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = 0x00000008
2246 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHR = 0x00000010
Jesse Hallad250842017-03-10 18:35:38 -08002247}
2248
Jesse Hall9947eab2017-08-28 12:10:06 -07002249@extension("VK_KHR_external_semaphore_capabilities") // 77
2250type VkFlags VkExternalSemaphoreFeatureFlagsKHR
2251@extension("VK_KHR_external_semaphore_capabilities") // 77
2252bitfield VkExternalSemaphoreFeatureFlagBitsKHR {
2253 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2254 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2255}
2256
2257@extension("VK_KHR_external_semaphore") // 78
2258type VkFlags VkSemaphoreImportFlagsKHR
2259@extension("VK_KHR_external_semaphore") // 78
2260bitfield VkSemaphoreImportFlagBitsKHR {
2261 VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002262}
2263
2264@extension("VK_KHR_descriptor_update_template") // 86
2265type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2266//@extension("VK_KHR_descriptor_update_template") // 86
2267//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2268//}
2269
2270@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002271type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002272@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002273bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002274 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2275 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2276 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2277 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002278}
2279
Jesse Hallad250842017-03-10 18:35:38 -08002280@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002281type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002282@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002283bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002284 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2285 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002286}
2287
Jesse Hallad250842017-03-10 18:35:38 -08002288@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002289type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002290@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002291bitfield VkSurfaceCounterFlagBitsEXT {
2292 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2293}
2294
Jesse Hallad250842017-03-10 18:35:38 -08002295@extension("VK_NV_viewport_swizzle") // 99
2296type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2297//@extension("VK_NV_viewport_swizzle") // 99
2298//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2299//}
2300
2301@extension("VK_EXT_discard_rectangles") // 100
2302type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2303//@extension("VK_EXT_discard_rectangles") // 100
2304//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2305//}
2306
Jesse Hall9947eab2017-08-28 12:10:06 -07002307@extension("VK_KHR_external_fence_capabilities") // 113
2308type VkFlags VkExternalFenceHandleTypeFlagsKHR
2309@extension("VK_KHR_external_fence_capabilities") // 113
2310bitfield VkExternalFenceHandleTypeFlagBitsKHR {
2311 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2312 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2313 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2314 VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000008,
2315}
2316
2317@extension("VK_KHR_external_fence_capabilities") // 113
2318type VkFlags VkExternalFenceFeatureFlagsKHR
2319@extension("VK_KHR_external_fence_capabilities") // 113
2320bitfield VkExternalFenceFeatureFlagBitsKHR {
2321 VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2322 VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2323}
2324
2325@extension("VK_KHR_external_fence") // 114
2326type VkFlags VkFenceImportFlagsKHR
2327@extension("VK_KHR_external_fence") // 114
2328bitfield VkFenceImportFlagBitsKHR {
2329 VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
2330}
2331
Jesse Hallad250842017-03-10 18:35:38 -08002332@extension("VK_MVK_ios_surface") // 123
2333type VkFlags VkIOSSurfaceCreateFlagsMVK
2334//@extension("VK_MVK_ios_surface") // 123
2335//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2336//}
2337
2338@extension("VK_MVK_macos_surface") // 124
2339type VkFlags VkMacOSSurfaceCreateFlagsMVK
2340//@extension("VK_MVK_macos_surface") // 124
2341//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2342//}
2343
Jesse Hall7ba0ac72017-07-07 17:13:23 -07002344@extension("VK_NV_fragment_coverage_to_color") // 150
2345type VkFlags VkPipelineCoverageToColorStateCreateFlagsNV
2346@extension("VK_NV_fragment_coverage_to_color") // 150
2347//bitfield VkPipelineCoverageToColorStateCreateFlagBitsNV {
2348//}
2349
2350@extension("VK_NV_framebuffer_mixed_samples") // 153
2351type VkFlags VkPipelineCoverageModulationStateCreateFlagsNV
2352@extension("VK_NV_framebuffer_mixed_samples") // 153
2353//bitfield VkPipelineCoverageModulationStateCreateFlagBitsNV {
2354//}
2355
Jesse Halld27f6aa2015-08-15 17:58:48 -07002356//////////////////
2357// Structures //
2358//////////////////
2359
2360class VkOffset2D {
2361 s32 x
2362 s32 y
2363}
2364
2365class VkOffset3D {
2366 s32 x
2367 s32 y
2368 s32 z
2369}
2370
2371class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002372 u32 width
2373 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002374}
2375
2376class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002377 u32 width
2378 u32 height
2379 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002380}
2381
2382class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002383 f32 x
2384 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002385 f32 width
2386 f32 height
2387 f32 minDepth
2388 f32 maxDepth
2389}
2390
2391class VkRect2D {
2392 VkOffset2D offset
2393 VkExtent2D extent
2394}
2395
Jesse Halla15a4bf2015-11-19 22:48:02 -08002396class VkClearRect {
2397 VkRect2D rect
2398 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002399 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002400}
2401
Jesse Hall65ab5522015-11-30 00:07:16 -08002402class VkComponentMapping {
2403 VkComponentSwizzle r
2404 VkComponentSwizzle g
2405 VkComponentSwizzle b
2406 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002407}
2408
2409class VkPhysicalDeviceProperties {
2410 u32 apiVersion
2411 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002412 u32 vendorID
2413 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002414 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002415 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2416 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002417 VkPhysicalDeviceLimits limits
2418 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002419}
2420
2421class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002422 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002423 u32 specVersion /// version of the extension specification implemented
2424}
2425
2426class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002427 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002428 u32 specVersion /// version of the layer specification implemented
2429 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002430 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002431}
2432
Jesse Halla366a512015-11-19 22:30:07 -08002433class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002434 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2435 const void* pNext /// Next structure in chain
2436 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002437 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002438 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002439 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002440 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002441 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002442 const VkSemaphore* pSignalSemaphores
2443}
2444
Jesse Halld27f6aa2015-08-15 17:58:48 -07002445class VkApplicationInfo {
2446 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2447 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002448 const char* pApplicationName
2449 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002450 const char* pEngineName
2451 u32 engineVersion
2452 u32 apiVersion
2453}
2454
Jesse Hall3fbc8562015-11-29 22:10:52 -08002455class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002456 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002457 PFN_vkAllocationFunction pfnAllocation
2458 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002459 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002460 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002461 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002462}
2463
2464class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002465 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2466 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002467 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002468 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002469 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002470 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002471}
2472
2473class VkDeviceCreateInfo {
2474 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2475 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002476 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002477 u32 queueCreateInfoCount
2478 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002479 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002480 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002481 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002482 const char* const* ppEnabledExtensionNames
2483 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002484}
2485
2486class VkInstanceCreateInfo {
2487 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2488 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002489 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002490 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002491 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002492 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002493 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002494 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2495}
2496
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002497class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002498 VkQueueFlags queueFlags /// Queue flags
2499 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002500 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002501 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002502}
2503
2504class VkPhysicalDeviceMemoryProperties {
2505 u32 memoryTypeCount
2506 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2507 u32 memoryHeapCount
2508 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2509}
2510
Jesse Hall3fbc8562015-11-29 22:10:52 -08002511class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002512 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002513 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002514 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002515 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2516}
2517
2518class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002519 VkDeviceSize size /// Specified in bytes
2520 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002521 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2522}
2523
2524class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002525 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002526 VkExtent3D imageGranularity
2527 VkSparseImageFormatFlags flags
2528}
2529
2530class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002531 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002532 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002533 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2534 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2535 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002536}
2537
2538class VkMemoryType {
2539 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2540 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2541}
2542
2543class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002544 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002545 VkMemoryHeapFlags flags /// Flags for the heap
2546}
2547
2548class VkMappedMemoryRange {
2549 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2550 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002551 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002552 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2553 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002554}
2555
2556class VkFormatProperties {
2557 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2558 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002559 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002560}
2561
2562class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002563 VkExtent3D maxExtent /// max image dimensions for this resource type
2564 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002565 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002566 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2567 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2568}
2569
Jesse Halla15a4bf2015-11-19 22:48:02 -08002570class VkDescriptorImageInfo {
2571 VkSampler sampler
2572 VkImageView imageView
2573 VkImageLayout imageLayout
2574}
2575
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002576class VkDescriptorBufferInfo {
2577 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2578 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2579 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002580}
2581
Jesse Halld27f6aa2015-08-15 17:58:48 -07002582class VkWriteDescriptorSet {
2583 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2584 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002585 VkDescriptorSet dstSet /// Destination descriptor set
2586 u32 dstBinding /// Binding within the destination descriptor set to write
2587 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002588 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002589 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 -08002590 const VkDescriptorImageInfo* pImageInfo
2591 const VkDescriptorBufferInfo* pBufferInfo
2592 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002593}
2594
2595class VkCopyDescriptorSet {
2596 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2597 const void* pNext /// Pointer to next structure
2598 VkDescriptorSet srcSet /// Source descriptor set
2599 u32 srcBinding /// Binding within the source descriptor set to copy from
2600 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002601 VkDescriptorSet dstSet /// Destination descriptor set
2602 u32 dstBinding /// Binding within the destination descriptor set to copy to
2603 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002604 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002605}
2606
2607class VkBufferCreateInfo {
2608 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2609 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002610 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002611 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002612 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002613 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002614 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002615 const u32* pQueueFamilyIndices
2616}
2617
2618class VkBufferViewCreateInfo {
2619 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2620 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002621 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002622 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002623 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002624 VkDeviceSize offset /// Specified in bytes
2625 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002626}
2627
2628class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002629 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002630 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002631 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002632}
2633
2634class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002635 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002636 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002637 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002638 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002639 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002640}
2641
2642class VkMemoryBarrier {
2643 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2644 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002645 VkAccessFlags srcAccessMask
2646 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002647}
2648
2649class VkBufferMemoryBarrier {
2650 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2651 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002652 VkAccessFlags srcAccessMask
2653 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002654 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002655 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002656 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002657 VkDeviceSize offset /// Offset within the buffer to sync
2658 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002659}
2660
2661class VkImageMemoryBarrier {
2662 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2663 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002664 VkAccessFlags srcAccessMask
2665 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002666 VkImageLayout oldLayout /// Current layout of the image
2667 VkImageLayout newLayout /// New layout to transition the image to
2668 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002669 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002670 VkImage image /// Image to sync
2671 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2672}
2673
2674class VkImageCreateInfo {
2675 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2676 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002677 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002678 VkImageType imageType
2679 VkFormat format
2680 VkExtent3D extent
2681 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002682 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002683 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002684 VkImageTiling tiling
2685 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002686 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002687 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002688 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002689 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002690}
2691
2692class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002693 VkDeviceSize offset /// Specified in bytes
2694 VkDeviceSize size /// Specified in bytes
2695 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002696 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002697 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002698}
2699
2700class VkImageViewCreateInfo {
2701 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2702 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002703 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002704 VkImage image
2705 VkImageViewType viewType
2706 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002707 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002708 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002709}
2710
2711class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002712 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002713 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002714 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002715}
2716
Jesse Halla6429252015-11-29 18:59:42 -08002717class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002718 VkDeviceSize resourceOffset /// Specified in bytes
2719 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002720 VkDeviceMemory memory
2721 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002722 VkSparseMemoryBindFlags flags
2723}
2724
Jesse Halla6429252015-11-29 18:59:42 -08002725class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002726 VkImageSubresource subresource
2727 VkOffset3D offset
2728 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002729 VkDeviceMemory memory
2730 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002731 VkSparseMemoryBindFlags flags
2732}
2733
Jesse Halla6429252015-11-29 18:59:42 -08002734class VkSparseBufferMemoryBindInfo {
2735 VkBuffer buffer
2736 u32 bindCount
2737 const VkSparseMemoryBind* pBinds
2738}
2739
2740class VkSparseImageOpaqueMemoryBindInfo {
2741 VkImage image
2742 u32 bindCount
2743 const VkSparseMemoryBind* pBinds
2744}
2745
2746class VkSparseImageMemoryBindInfo {
2747 VkImage image
2748 u32 bindCount
2749 const VkSparseMemoryBind* pBinds
2750}
2751
2752class VkBindSparseInfo {
2753 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2754 const void* pNext
2755 u32 waitSemaphoreCount
2756 const VkSemaphore* pWaitSemaphores
2757 u32 numBufferBinds
2758 const VkSparseBufferMemoryBindInfo* pBufferBinds
2759 u32 numImageOpaqueBinds
2760 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2761 u32 numImageBinds
2762 const VkSparseImageMemoryBindInfo* pImageBinds
2763 u32 signalSemaphoreCount
2764 const VkSemaphore* pSignalSemaphores
2765}
2766
Jesse Hall65ab5522015-11-30 00:07:16 -08002767class VkImageSubresourceLayers {
2768 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002769 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002770 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002771 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002772}
2773
Jesse Halld27f6aa2015-08-15 17:58:48 -07002774class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002775 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002776 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002777 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002778 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002779 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2780}
2781
2782class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002783 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002784 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002785 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002786 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002787}
2788
2789class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002790 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002791 u32 bufferRowLength /// Specified in texels
2792 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002793 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002794 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2795 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2796}
2797
2798class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002799 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002800 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002801 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002802 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002803 VkExtent3D extent
2804}
2805
2806class VkShaderModuleCreateInfo {
2807 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2808 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002809 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002810 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002811 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002812}
2813
Jesse Halld27f6aa2015-08-15 17:58:48 -07002814class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002815 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002816 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002817 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002818 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2819 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2820}
2821
2822class VkDescriptorSetLayoutCreateInfo {
2823 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2824 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002825 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002826 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002827 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002828}
2829
Jesse Hall65ab5522015-11-30 00:07:16 -08002830class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002831 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002832 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002833}
2834
2835class VkDescriptorPoolCreateInfo {
2836 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2837 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002838 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002839 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002840 u32 poolSizeCount
2841 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002842}
2843
Jesse Hall3fbc8562015-11-29 22:10:52 -08002844class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002845 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002846 const void* pNext /// Pointer to next structure
2847 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002848 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002849 const VkDescriptorSetLayout* pSetLayouts
2850}
2851
Jesse Halld27f6aa2015-08-15 17:58:48 -07002852class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002853 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002854 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002855 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002856}
2857
2858class VkSpecializationInfo {
2859 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002860 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002861 platform.size_t dataSize /// Size in bytes of pData
2862 const void* pData /// Pointer to SpecConstant data
2863}
2864
2865class VkPipelineShaderStageCreateInfo {
2866 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2867 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002868 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002869 VkShaderStageFlagBits stage
2870 VkShaderModule module
2871 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002872 const VkSpecializationInfo* pSpecializationInfo
2873}
2874
2875class VkComputePipelineCreateInfo {
2876 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2877 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002878 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002879 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002880 VkPipelineLayout layout /// Interface layout of the pipeline
2881 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
2882 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
2883}
2884
2885class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002886 u32 binding /// Vertex buffer binding id
2887 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002888 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002889}
2890
2891class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002892 u32 location /// location of the shader vertex attrib
2893 u32 binding /// Vertex buffer binding id
2894 VkFormat format /// format of source data
2895 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002896}
2897
2898class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002899 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2900 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002901 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002902 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002903 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002904 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002905 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2906}
2907
2908class VkPipelineInputAssemblyStateCreateInfo {
2909 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2910 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002911 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002912 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002913 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002914}
2915
2916class VkPipelineTessellationStateCreateInfo {
2917 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2918 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002919 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002920 u32 patchControlPoints
2921}
2922
2923class VkPipelineViewportStateCreateInfo {
2924 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2925 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002926 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002927 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002928 const VkViewport* pViewports
2929 u32 scissorCount
2930 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002931}
2932
Jesse Hall3fbc8562015-11-29 22:10:52 -08002933class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002934 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002935 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002936 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002937 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002938 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002939 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002940 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002941 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002942 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002943 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002944 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002945 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002946 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002947}
2948
2949class VkPipelineMultisampleStateCreateInfo {
2950 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2951 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002952 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002953 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002954 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002955 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002956 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002957 VkBool32 alphaToCoverageEnable
2958 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002959}
2960
2961class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002962 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002963 VkBlendFactor srcColorBlendFactor
2964 VkBlendFactor dstColorBlendFactor
2965 VkBlendOp colorBlendOp
2966 VkBlendFactor srcAlphaBlendFactor
2967 VkBlendFactor dstAlphaBlendFactor
2968 VkBlendOp alphaBlendOp
2969 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002970}
2971
2972class VkPipelineColorBlendStateCreateInfo {
2973 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2974 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002975 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002976 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002977 VkLogicOp logicOp
2978 u32 attachmentCount /// # of pAttachments
2979 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002980 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002981}
2982
2983class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002984 VkStencilOp failOp
2985 VkStencilOp passOp
2986 VkStencilOp depthFailOp
2987 VkCompareOp compareOp
2988 u32 compareMask
2989 u32 writeMask
2990 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002991}
2992
2993class VkPipelineDepthStencilStateCreateInfo {
2994 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2995 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002996 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002997 VkBool32 depthTestEnable
2998 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002999 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003000 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
3001 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003002 VkStencilOpState front
3003 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003004 f32 minDepthBounds
3005 f32 maxDepthBounds
3006}
3007
3008class VkPipelineDynamicStateCreateInfo {
3009 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
3010 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003011 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003012 u32 dynamicStateCount
3013 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003014}
3015
3016class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08003017 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
3018 const void* pNext /// Pointer to next structure
3019 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003020 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08003021 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07003022 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
3023 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
3024 const VkPipelineTessellationStateCreateInfo* pTessellationState
3025 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08003026 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07003027 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
3028 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
3029 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003030 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08003031 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003032 VkRenderPass renderPass
3033 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08003034 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
3035 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 -07003036}
3037
3038class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08003039 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
3040 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003041 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08003042 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
3043 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07003044}
3045
3046class VkPushConstantRange {
3047 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08003048 u32 offset /// Start of the range, in bytes
3049 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003050}
3051
3052class VkPipelineLayoutCreateInfo {
3053 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
3054 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003055 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08003056 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003057 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
3058 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
3059 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
3060}
3061
3062class VkSamplerCreateInfo {
3063 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
3064 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003065 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08003066 VkFilter magFilter /// Filter mode for magnification
3067 VkFilter minFilter /// Filter mode for minifiation
3068 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
3069 VkSamplerAddressMode addressModeU
3070 VkSamplerAddressMode addressModeV
3071 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07003072 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003073 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003074 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003075 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003076 VkCompareOp compareOp
3077 f32 minLod
3078 f32 maxLod
3079 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003080 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003081}
3082
Jesse Hall3fbc8562015-11-29 22:10:52 -08003083class VkCommandPoolCreateInfo {
3084 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003085 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003086 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08003087 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07003088}
3089
Jesse Hall3fbc8562015-11-29 22:10:52 -08003090class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003091 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003092 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003093 VkCommandPool commandPool
3094 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08003095 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003096}
3097
Jesse Hall3dd678a2016-01-08 21:52:01 -08003098class VkCommandBufferInheritanceInfo {
3099 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003100 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07003101 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003102 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003103 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003104 VkBool32 occlusionQueryEnable
3105 VkQueryControlFlags queryFlags
3106 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003107}
3108
Jesse Hall3dd678a2016-01-08 21:52:01 -08003109class VkCommandBufferBeginInfo {
3110 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
3111 const void* pNext /// Pointer to next structure
3112 VkCommandBufferUsageFlags flags /// Command buffer usage flags
3113 const VkCommandBufferInheritanceInfo* pInheritanceInfo
3114}
3115
Jesse Halld27f6aa2015-08-15 17:58:48 -07003116class VkRenderPassBeginInfo {
3117 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
3118 const void* pNext /// Pointer to next structure
3119 VkRenderPass renderPass
3120 VkFramebuffer framebuffer
3121 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003122 u32 clearValueCount
3123 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07003124}
3125
3126@union
3127/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
3128class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003129 f32[4] float32
3130 s32[4] int32
3131 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07003132}
3133
3134class VkClearDepthStencilValue {
3135 f32 depth
3136 u32 stencil
3137}
3138
3139@union
3140/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
3141class VkClearValue {
3142 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003143 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07003144}
3145
Jesse Hallae38f732015-11-19 21:32:50 -08003146class VkClearAttachment {
3147 VkImageAspectFlags aspectMask
3148 u32 colorAttachment
3149 VkClearValue clearValue
3150}
3151
Jesse Halld27f6aa2015-08-15 17:58:48 -07003152class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08003153 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003154 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08003155 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07003156 VkAttachmentLoadOp loadOp /// Load op for color or depth data
3157 VkAttachmentStoreOp storeOp /// Store op for color or depth data
3158 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
3159 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
3160 VkImageLayout initialLayout
3161 VkImageLayout finalLayout
3162}
3163
3164class VkAttachmentReference {
3165 u32 attachment
3166 VkImageLayout layout
3167}
3168
3169class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003170 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08003171 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08003172 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003173 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08003174 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003175 const VkAttachmentReference* pColorAttachments
3176 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08003177 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08003178 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08003179 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003180}
3181
3182class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003183 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08003184 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003185 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08003186 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003187 VkAccessFlags srcAccessMask
3188 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08003189 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003190}
3191
3192class VkRenderPassCreateInfo {
3193 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
3194 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003195 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003196 u32 attachmentCount
3197 const VkAttachmentDescription* pAttachments
3198 u32 subpassCount
3199 const VkSubpassDescription* pSubpasses
3200 u32 dependencyCount
3201 const VkSubpassDependency* pDependencies
3202}
3203
3204class VkEventCreateInfo {
3205 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
3206 const void* pNext /// Pointer to next structure
3207 VkEventCreateFlags flags /// Event creation flags
3208}
3209
3210class VkFenceCreateInfo {
3211 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
3212 const void* pNext /// Pointer to next structure
3213 VkFenceCreateFlags flags /// Fence creation flags
3214}
3215
3216class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003217 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
3218 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
3219 VkBool32 imageCubeArray /// image views which are arrays of cube maps
3220 VkBool32 independentBlend /// blending operations are controlled per-attachment
3221 VkBool32 geometryShader /// geometry stage
3222 VkBool32 tessellationShader /// tessellation control and evaluation stage
3223 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08003224 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003225 VkBool32 logicOp /// logic operations
3226 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08003227 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08003228 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003229 VkBool32 depthBiasClamp /// depth bias clamping
3230 VkBool32 fillModeNonSolid /// point and wireframe fill modes
3231 VkBool32 depthBounds /// depth bounds test
3232 VkBool32 wideLines /// lines with width greater than 1
3233 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08003234 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
3235 VkBool32 multiViewport
3236 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003237 VkBool32 textureCompressionETC2 /// ETC texture compression formats
3238 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
3239 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08003240 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003241 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08003242 VkBool32 vertexPipelineStoresAndAtomics
3243 VkBool32 fragmentStoresAndAtomics
3244 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003245 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
3246 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
3247 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08003248 VkBool32 shaderStorageImageReadWithoutFormat
3249 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003250 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
3251 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
3252 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
3253 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
3254 VkBool32 shaderClipDistance /// clip distance in shaders
3255 VkBool32 shaderCullDistance /// cull distance in shaders
3256 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
3257 VkBool32 shaderInt64 /// 64-bit integers in shaders
3258 VkBool32 shaderInt16 /// 16-bit integers in shaders
3259 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08003260 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003261 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
3262 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
3263 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
3264 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
3265 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
3266 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
3267 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
3268 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
3269 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08003270 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003271 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003272}
3273
3274class VkPhysicalDeviceLimits {
3275 /// resource maximum sizes
3276 u32 maxImageDimension1D /// max 1D image dimension
3277 u32 maxImageDimension2D /// max 2D image dimension
3278 u32 maxImageDimension3D /// max 3D image dimension
3279 u32 maxImageDimensionCube /// max cubemap image dimension
3280 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08003281 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08003282 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
3283 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003284 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
3285 /// memory limits
3286 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003287 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003288 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3289 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003290 /// descriptor set limits
3291 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003292 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3293 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3294 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3295 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3296 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003297 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003298 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003299 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3300 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003301 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003302 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003303 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003304 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3305 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003306 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003307 /// vertex stage limits
3308 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003309 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003310 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3311 u32 maxVertexInputBindingStride /// max vertex input binding stride
3312 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3313 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003314 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003315 u32 maxTessellationPatchSize /// max patch size (vertices)
3316 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3317 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3318 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3319 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3320 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3321 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003322 /// geometry stage limits
3323 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3324 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3325 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3326 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3327 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3328 /// fragment stage limits
3329 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003330 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003331 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003332 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3333 /// compute stage limits
3334 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3335 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3336 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3337 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3338
3339 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3340 u32 subTexelPrecisionBits /// num bits of subtexel precision
3341 u32 mipmapPrecisionBits /// num bits of mipmap precision
3342
3343 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003344 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003345
3346 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3347 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3348
3349 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003350 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3351 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3352 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3353
Jesse Halldc6d36c2015-11-29 19:12:15 -08003354 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3355 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3356 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3357 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003358
Jesse Hallfbf97b02015-11-20 14:17:03 -08003359 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003360 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003361 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003362 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3363 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3364 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3365 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3366
3367 u32 maxFramebufferWidth /// max width for a framebuffer
3368 u32 maxFramebufferHeight /// max height for a framebuffer
3369 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003370 VkSampleCountFlags framebufferColorSampleCounts
3371 VkSampleCountFlags framebufferDepthSampleCounts
3372 VkSampleCountFlags framebufferStencilSampleCounts
3373 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003374 u32 maxColorAttachments /// max num of framebuffer color attachments
3375
Jesse Hall091ed9e2015-11-30 00:55:29 -08003376 VkSampleCountFlags sampledImageColorSampleCounts
3377 VkSampleCountFlags sampledImageIntegerSampleCounts
3378 VkSampleCountFlags sampledImageDepthSampleCounts
3379 VkSampleCountFlags sampledImageStencilSampleCounts
3380 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003381 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003382 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003383
Jesse Halla9bb62b2015-11-21 19:31:56 -08003384 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003385
3386 u32 maxClipDistances /// max number of clip distances
3387 u32 maxCullDistances /// max number of cull distances
3388 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3389
Jesse Hallfbf97b02015-11-20 14:17:03 -08003390 u32 discreteQueuePriorities
3391
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003392 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3393 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003394 f32 pointSizeGranularity /// granularity of supported point sizes
3395 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003396 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003397 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003398
Jesse Hall65ab5522015-11-30 00:07:16 -08003399 VkDeviceSize optimalBufferCopyOffsetAlignment
3400 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003401 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003402}
3403
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003404class VkPhysicalDeviceSparseProperties {
3405 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 -08003406 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 -07003407 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3408 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 -07003409 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
3410}
3411
Jesse Halld27f6aa2015-08-15 17:58:48 -07003412class VkSemaphoreCreateInfo {
3413 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3414 const void* pNext /// Pointer to next structure
3415 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3416}
3417
3418class VkQueryPoolCreateInfo {
3419 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3420 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003421 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003422 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003423 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003424 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3425}
3426
3427class VkFramebufferCreateInfo {
3428 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3429 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003430 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003431 VkRenderPass renderPass
3432 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003433 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003434 u32 width
3435 u32 height
3436 u32 layers
3437}
3438
Jesse Hall3fbc8562015-11-29 22:10:52 -08003439class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003440 u32 vertexCount
3441 u32 instanceCount
3442 u32 firstVertex
3443 u32 firstInstance
3444}
3445
Jesse Hall3fbc8562015-11-29 22:10:52 -08003446class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003447 u32 indexCount
3448 u32 instanceCount
3449 u32 firstIndex
3450 s32 vertexOffset
3451 u32 firstInstance
3452}
3453
Jesse Hall3fbc8562015-11-29 22:10:52 -08003454class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003455 u32 x
3456 u32 y
3457 u32 z
3458}
3459
Jesse Hallad250842017-03-10 18:35:38 -08003460@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003461class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003462 u32 minImageCount
3463 u32 maxImageCount
3464 VkExtent2D currentExtent
3465 VkExtent2D minImageExtent
3466 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003467 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003468 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003469 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003470 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003471 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003472}
3473
Jesse Hallad250842017-03-10 18:35:38 -08003474@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003475class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003476 VkFormat format
3477 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003478}
3479
Jesse Hallad250842017-03-10 18:35:38 -08003480@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003481class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003482 VkStructureType sType
3483 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003484 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003485 VkSurfaceKHR surface
3486 u32 minImageCount
3487 VkFormat imageFormat
3488 VkColorSpaceKHR imageColorSpace
3489 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003490 u32 imageArrayLayers
3491 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003492 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003493 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003494 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003495 VkSurfaceTransformFlagBitsKHR preTransform
3496 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003497 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003498 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003499 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003500}
3501
Jesse Hallad250842017-03-10 18:35:38 -08003502@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003503class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003504 VkStructureType sType
3505 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003506 u32 waitSemaphoreCount
3507 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003508 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003509 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003510 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003511 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003512}
3513
Jesse Hallad250842017-03-10 18:35:38 -08003514@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003515class VkDisplayPropertiesKHR {
3516 VkDisplayKHR display
3517 const char* displayName
3518 VkExtent2D physicalDimensions
3519 VkExtent2D physicalResolution
3520 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003521 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003522 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003523}
3524
Jesse Hallad250842017-03-10 18:35:38 -08003525@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003526class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003527 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003528 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003529}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003530
Jesse Hallad250842017-03-10 18:35:38 -08003531@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003532class VkDisplayModePropertiesKHR {
3533 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003534 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003535}
3536
Jesse Hallad250842017-03-10 18:35:38 -08003537@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003538class VkDisplayModeCreateInfoKHR {
3539 VkStructureType sType
3540 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003541 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003542 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003543}
3544
Jesse Hallad250842017-03-10 18:35:38 -08003545@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003546class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003547 VkDisplayKHR currentDisplay
3548 u32 currentStackIndex
3549}
3550
Jesse Hallad250842017-03-10 18:35:38 -08003551@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003552class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003553 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3554 VkOffset2D minSrcPosition
3555 VkOffset2D maxSrcPosition
3556 VkExtent2D minSrcExtent
3557 VkExtent2D maxSrcExtent
3558 VkOffset2D minDstPosition
3559 VkOffset2D maxDstPosition
3560 VkExtent2D minDstExtent
3561 VkExtent2D maxDstExtent
3562}
3563
Jesse Hallad250842017-03-10 18:35:38 -08003564@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003565class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003566 VkStructureType sType
3567 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003568 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003569 VkDisplayModeKHR displayMode
3570 u32 planeIndex
3571 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003572 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003573 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003574 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3575 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003576}
3577
Jesse Hallad250842017-03-10 18:35:38 -08003578@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003579class VkDisplayPresentInfoKHR {
3580 VkStructureType sType
3581 const void* pNext
3582 VkRect2D srcRect
3583 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003584 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003585}
3586
Jesse Hallad250842017-03-10 18:35:38 -08003587@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003588class VkXlibSurfaceCreateInfoKHR {
3589 VkStructureType sType
3590 const void* pNext
3591 VkXlibSurfaceCreateFlagsKHR flags
3592 platform.Display* dpy
3593 platform.Window window
3594}
3595
Jesse Hallad250842017-03-10 18:35:38 -08003596@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003597class VkXcbSurfaceCreateInfoKHR {
3598 VkStructureType sType
3599 const void* pNext
3600 VkXcbSurfaceCreateFlagsKHR flags
3601 platform.xcb_connection_t* connection
3602 platform.xcb_window_t window
3603}
3604
Jesse Hallad250842017-03-10 18:35:38 -08003605@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003606class VkWaylandSurfaceCreateInfoKHR {
3607 VkStructureType sType
3608 const void* pNext
3609 VkWaylandSurfaceCreateFlagsKHR flags
3610 platform.wl_display* display
3611 platform.wl_surface* surface
3612}
3613
Jesse Hallad250842017-03-10 18:35:38 -08003614@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003615class VkMirSurfaceCreateInfoKHR {
3616 VkStructureType sType
3617 const void* pNext
3618 VkMirSurfaceCreateFlagsKHR flags
3619 platform.MirConnection* connection
3620 platform.MirSurface* mirSurface
3621}
3622
Jesse Hallad250842017-03-10 18:35:38 -08003623@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003624class VkAndroidSurfaceCreateInfoKHR {
3625 VkStructureType sType
3626 const void* pNext
3627 VkAndroidSurfaceCreateFlagsKHR flags
3628 platform.ANativeWindow* window
3629}
3630
Jesse Hallad250842017-03-10 18:35:38 -08003631@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003632class VkWin32SurfaceCreateInfoKHR {
3633 VkStructureType sType
3634 const void* pNext
3635 VkWin32SurfaceCreateFlagsKHR flags
3636 platform.HINSTANCE hinstance
3637 platform.HWND hwnd
3638}
3639
Jesse Hallad250842017-03-10 18:35:38 -08003640@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003641@internal class Gralloc1Usage {
3642 u64 consumer
3643 u64 producer
3644}
3645
Jesse Hallad250842017-03-10 18:35:38 -08003646@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003647class VkNativeBufferANDROID {
3648 VkStructureType sType
3649 const void* pNext
3650 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003651 s32 stride
3652 s32 format
3653 s32 usage
3654 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003655}
3656
Jesse Hallad250842017-03-10 18:35:38 -08003657@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003658class VkSwapchainImageCreateInfoANDROID {
3659 VkStructureType sType
3660 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003661 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003662}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003663
Jesse Hallad250842017-03-10 18:35:38 -08003664@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003665class VkPhysicalDevicePresentationPropertiesANDROID {
3666 VkStructureType sType
3667 void* pNext
3668 VkBool32 sharedImage
3669}
3670
Jesse Hallad250842017-03-10 18:35:38 -08003671@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003672class VkDebugReportCallbackCreateInfoEXT {
3673 VkStructureType sType
3674 const void* pNext
3675 VkDebugReportFlagsEXT flags
3676 PFN_vkDebugReportCallbackEXT pfnCallback
3677 void* pUserData
3678}
3679
Jesse Hallad250842017-03-10 18:35:38 -08003680@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003681class VkPipelineRasterizationStateRasterizationOrderAMD {
3682 VkStructureType sType
3683 const void* pNext
3684 VkRasterizationOrderAMD rasterizationOrder
3685}
3686
Jesse Hallad250842017-03-10 18:35:38 -08003687@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003688class VkDebugMarkerObjectNameInfoEXT {
3689 VkStructureType sType
3690 const void* pNext
3691 VkDebugReportObjectTypeEXT objectType
3692 u64 object
3693 const char* pObjectName
3694}
3695
Jesse Hallad250842017-03-10 18:35:38 -08003696@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003697class VkDebugMarkerObjectTagInfoEXT {
3698 VkStructureType sType
3699 const void* pNext
3700 VkDebugReportObjectTypeEXT objectType
3701 u64 object
3702 u64 tagName
3703 platform.size_t tagSize
3704 const void* pTag
3705}
3706
Jesse Hallad250842017-03-10 18:35:38 -08003707@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003708class VkDebugMarkerMarkerInfoEXT {
3709 VkStructureType sType
3710 const void* pNext
3711 const char* pMarkerName
3712 f32[4] color
3713}
3714
Jesse Hallad250842017-03-10 18:35:38 -08003715@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003716class VkDedicatedAllocationImageCreateInfoNV {
3717 VkStructureType sType
3718 const void* pNext
3719 VkBool32 dedicatedAllocation
3720}
3721
Jesse Hallad250842017-03-10 18:35:38 -08003722@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003723class VkDedicatedAllocationBufferCreateInfoNV {
3724 VkStructureType sType
3725 const void* pNext
3726 VkBool32 dedicatedAllocation
3727}
3728
Jesse Hallad250842017-03-10 18:35:38 -08003729@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003730class VkDedicatedAllocationMemoryAllocateInfoNV {
3731 VkStructureType sType
3732 const void* pNext
3733 VkImage image
3734 VkBuffer buffer
3735}
3736
Jesse Hall7ba0ac72017-07-07 17:13:23 -07003737@extension("VK_AMD_texture_gather_bias_lod") // 42
3738class VkTextureLODGatherFormatPropertiesAMD {
3739 VkStructureType sType
3740 void* pNext
3741 VkBool32 supportsTextureGatherLODBiasAMD
3742}
3743
Jesse Hallad250842017-03-10 18:35:38 -08003744@extension("VK_KHX_multiview") // 54
3745class VkRenderPassMultiviewCreateInfoKHX {
3746 VkStructureType sType
3747 const void* pNext
3748 u32 subpassCount
3749 const u32* pViewMasks
3750 u32 dependencyCount
3751 const s32* pViewOffsets
3752 u32 correlationMaskCount
3753 const u32* pCorrelationMasks
3754}
3755
3756@extension("VK_KHX_multiview") // 54
3757class VkPhysicalDeviceMultiviewFeaturesKHX {
3758 VkStructureType sType
3759 void* pNext
3760 VkBool32 multiview
3761 VkBool32 multiviewGeometryShader
3762 VkBool32 multiviewTessellationShader
3763}
3764
3765@extension("VK_KHX_multiview") // 54
3766class VkPhysicalDeviceMultiviewPropertiesKHX {
3767 VkStructureType sType
3768 void* pNext
3769 u32 maxMultiviewViewCount
3770 u32 maxMultiviewInstanceIndex
3771}
3772
3773@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003774class VkExternalImageFormatPropertiesNV {
3775 VkImageFormatProperties imageFormatProperties
3776 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3777 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3778 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3779}
3780
Jesse Hallad250842017-03-10 18:35:38 -08003781@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003782class VkExternalMemoryImageCreateInfoNV {
3783 VkStructureType sType
3784 const void* pNext
3785 VkExternalMemoryHandleTypeFlagsNV handleTypes
3786}
3787
Jesse Hallad250842017-03-10 18:35:38 -08003788@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003789class VkExportMemoryAllocateInfoNV {
3790 VkStructureType sType
3791 const void* pNext
3792 VkExternalMemoryHandleTypeFlagsNV handleTypes
3793}
3794
Jesse Hallad250842017-03-10 18:35:38 -08003795@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003796class VkImportMemoryWin32HandleInfoNV {
3797 VkStructureType sType
3798 const void* pNext
3799 VkExternalMemoryHandleTypeFlagsNV handleType
3800 platform.HANDLE handle
3801}
3802
Jesse Hallad250842017-03-10 18:35:38 -08003803@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003804class VkExportMemoryWin32HandleInfoNV {
3805 VkStructureType sType
3806 const void* pNext
3807 const platform.SECURITY_ATTRIBUTES* pAttributes
3808 platform.DWORD dwAccess
3809}
3810
Jesse Hallad250842017-03-10 18:35:38 -08003811@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003812class VkWin32KeyedMutexAcquireReleaseInfoNV {
3813 VkStructureType sType
3814 const void* pNext
3815 u32 acquireCount
3816 const VkDeviceMemory* pAcquireSyncs
3817 const u64* pAcquireKeys
3818 const u32* pAcquireTimeoutMilliseconds
3819 u32 releaseCount
3820 const VkDeviceMemory* pReleaseSyncs
3821 const u64* pReleaseKeys
3822}
3823
Jesse Hallad250842017-03-10 18:35:38 -08003824@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003825class VkPhysicalDeviceFeatures2KHR {
3826 VkStructureType sType
3827 void* pNext
3828 VkPhysicalDeviceFeatures features
3829}
3830
Jesse Hallad250842017-03-10 18:35:38 -08003831@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003832class VkPhysicalDeviceProperties2KHR {
3833 VkStructureType sType
3834 void* pNext
3835 VkPhysicalDeviceProperties properties
3836}
3837
Jesse Hallad250842017-03-10 18:35:38 -08003838@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003839class VkFormatProperties2KHR {
3840 VkStructureType sType
3841 void* pNext
3842 VkFormatProperties formatProperties
3843}
3844
Jesse Hallad250842017-03-10 18:35:38 -08003845@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003846class VkImageFormatProperties2KHR {
3847 VkStructureType sType
3848 void* pNext
3849 VkImageFormatProperties imageFormatProperties
3850}
3851
Jesse Hallad250842017-03-10 18:35:38 -08003852@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003853class VkPhysicalDeviceImageFormatInfo2KHR {
3854 VkStructureType sType
3855 const void* pNext
3856 VkFormat format
3857 VkImageType type
3858 VkImageTiling tiling
3859 VkImageUsageFlags usage
3860 VkImageCreateFlags flags
3861}
3862
Jesse Hallad250842017-03-10 18:35:38 -08003863@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003864class VkQueueFamilyProperties2KHR {
3865 VkStructureType sType
3866 void* pNext
3867 VkQueueFamilyProperties queueFamilyProperties
3868}
3869
Jesse Hallad250842017-03-10 18:35:38 -08003870@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003871class VkPhysicalDeviceMemoryProperties2KHR {
3872 VkStructureType sType
3873 void* pNext
3874 VkPhysicalDeviceMemoryProperties memoryProperties
3875}
3876
Jesse Hallad250842017-03-10 18:35:38 -08003877@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003878class VkSparseImageFormatProperties2KHR {
3879 VkStructureType sType
3880 void* pNext
3881 VkSparseImageFormatProperties properties
3882}
3883
Jesse Hallad250842017-03-10 18:35:38 -08003884@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003885class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3886 VkStructureType sType
3887 const void* pNext
3888 VkFormat format
3889 VkImageType type
3890 VkSampleCountFlagBits samples
3891 VkImageUsageFlags usage
3892 VkImageTiling tiling
3893}
3894
Jesse Hallad250842017-03-10 18:35:38 -08003895@extension("VK_KHX_device_group") // 61
3896class VkMemoryAllocateFlagsInfoKHX {
3897 VkStructureType sType
3898 const void* pNext
3899 VkMemoryAllocateFlagsKHX flags
3900 u32 deviceMask
3901}
3902
3903@extension("VK_KHX_device_group") // 61
3904class VkBindBufferMemoryInfoKHX {
3905 VkStructureType sType
3906 const void* pNext
3907 VkBuffer buffer
3908 VkDeviceMemory memory
3909 VkDeviceSize memoryOffset
3910 u32 deviceIndexCount
3911 const u32* pDeviceIndices
3912}
3913
3914@extension("VK_KHX_device_group") // 61
3915class VkBindImageMemoryInfoKHX {
3916 VkStructureType sType
3917 const void* pNext
3918 VkImage image
3919 VkDeviceMemory memory
3920 VkDeviceSize memoryOffset
3921 u32 deviceIndexCount
3922 const u32* pDeviceIndices
3923 u32 SFRRectCount
3924 const VkRect2D* pSFRRects
3925}
3926
3927@extension("VK_KHX_device_group") // 61
3928class VkDeviceGroupRenderPassBeginInfoKHX {
3929 VkStructureType sType
3930 const void* pNext
3931 u32 deviceMask
3932 u32 deviceRenderAreaCount
3933 const VkRect2D* pDeviceRenderAreas
3934}
3935
3936@extension("VK_KHX_device_group") // 61
3937class VkDeviceGroupCommandBufferBeginInfoKHX {
3938 VkStructureType sType
3939 const void* pNext
3940 u32 deviceMask
3941}
3942
3943@extension("VK_KHX_device_group") // 61
3944class VkDeviceGroupSubmitInfoKHX {
3945 VkStructureType sType
3946 const void* pNext
3947 u32 waitSemaphoreCount
3948 const u32* pWaitSemaphoreDeviceIndices
3949 u32 commandBufferCount
3950 const u32* pCommandBufferDeviceMasks
3951 u32 signalSemaphoreCount
3952 const u32* pSignalSemaphoreDeviceIndices
3953}
3954
3955@extension("VK_KHX_device_group") // 61
3956class VkDeviceGroupBindSparseInfoKHX {
3957 VkStructureType sType
3958 const void* pNext
3959 u32 resourceDeviceIndex
3960 u32 memoryDeviceIndex
3961}
3962
3963@extension("VK_KHX_device_group") // 61
3964class VkDeviceGroupPresentCapabilitiesKHX {
3965 VkStructureType sType
3966 const void* pNext
3967 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3968 VkDeviceGroupPresentModeFlagsKHX modes
3969}
3970
3971@extension("VK_KHX_device_group") // 61
3972class VkImageSwapchainCreateInfoKHX {
3973 VkStructureType sType
3974 const void* pNext
3975 VkSwapchainKHR swapchain
3976}
3977
3978@extension("VK_KHX_device_group") // 61
3979class VkBindImageMemorySwapchainInfoKHX {
3980 VkStructureType sType
3981 const void* pNext
3982 VkSwapchainKHR swapchain
3983 u32 imageIndex
3984}
3985
3986@extension("VK_KHX_device_group") // 61
3987class VkAcquireNextImageInfoKHX {
3988 VkStructureType sType
3989 const void* pNext
3990 VkSwapchainKHR swapchain
3991 u64 timeout
3992 VkSemaphore semaphore
3993 VkFence fence
3994 u32 deviceMask
3995}
3996
3997@extension("VK_KHX_device_group") // 61
3998class VkDeviceGroupPresentInfoKHX {
3999 VkStructureType sType
4000 const void* pNext
4001 u32 swapchainCount
4002 const u32* pDeviceMasks
4003 VkDeviceGroupPresentModeFlagBitsKHX mode
4004}
4005
4006@extension("VK_KHX_device_group") // 61
4007class VkDeviceGroupSwapchainCreateInfoKHX {
4008 VkStructureType sType
4009 const void* pNext
4010 VkDeviceGroupPresentModeFlagsKHX modes
4011}
4012
4013@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13004014class VkValidationFlagsEXT {
4015 VkStructureType sType
4016 const void* pNext
4017 u32 disabledValidationCheckCount
4018 VkValidationCheckEXT* pDisabledValidationChecks
4019}
4020
Jesse Hallad250842017-03-10 18:35:38 -08004021@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08004022class VkViSurfaceCreateInfoNN {
4023 VkStructureType sType
4024 const void* pNext
4025 VkViSurfaceCreateFlagsNN flags
4026 void* window
4027}
4028
Jesse Hallad250842017-03-10 18:35:38 -08004029@extension("VK_KHX_device_group_creation") // 71
4030class VkPhysicalDeviceGroupPropertiesKHX {
4031 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07004032 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004033 u32 physicalDeviceCount
4034 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
4035 VkBool32 subsetAllocation
4036}
4037
4038@extension("VK_KHX_device_group_creation") // 71
4039class VkDeviceGroupDeviceCreateInfoKHX {
4040 VkStructureType sType
4041 const void* pNext
4042 u32 physicalDeviceCount
4043 const VkPhysicalDevice* pPhysicalDevices
4044}
4045
Jesse Hall9947eab2017-08-28 12:10:06 -07004046@extension("VK_KHR_external_memory_capabilities") // 72
4047class VkExternalMemoryPropertiesKHR {
4048 VkExternalMemoryFeatureFlagsKHR externalMemoryFeatures
4049 VkExternalMemoryHandleTypeFlagsKHR exportFromImportedHandleTypes
4050 VkExternalMemoryHandleTypeFlagsKHR compatibleHandleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004051}
4052
Jesse Hall9947eab2017-08-28 12:10:06 -07004053@extension("VK_KHR_external_memory_capabilities") // 72
4054class VkPhysicalDeviceExternalImageFormatInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004055 VkStructureType sType
4056 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004057 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004058}
4059
Jesse Hall9947eab2017-08-28 12:10:06 -07004060@extension("VK_KHR_external_memory_capabilities") // 72
4061class VkExternalImageFormatPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004062 VkStructureType sType
4063 void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004064 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08004065}
4066
Jesse Hall9947eab2017-08-28 12:10:06 -07004067@extension("VK_KHR_external_memory_capabilities") // 72
4068class VkPhysicalDeviceExternalBufferInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004069 VkStructureType sType
4070 const void* pNext
4071 VkBufferCreateFlags flags
4072 VkBufferUsageFlags usage
Jesse Hall9947eab2017-08-28 12:10:06 -07004073 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004074}
4075
Jesse Hall9947eab2017-08-28 12:10:06 -07004076@extension("VK_KHR_external_memory_capabilities") // 72
4077class VkExternalBufferPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004078 VkStructureType sType
4079 void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004080 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08004081}
4082
Jesse Hall9947eab2017-08-28 12:10:06 -07004083@extension("VK_KHR_external_memory_capabilities") // 72
4084class VkPhysicalDeviceIDPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004085 VkStructureType sType
4086 void* pNext
4087 u8[VK_UUID_SIZE] deviceUUID
4088 u8[VK_UUID_SIZE] driverUUID
Jesse Hall9947eab2017-08-28 12:10:06 -07004089 u8[VK_LUID_SIZE_KHR] deviceLUID
4090 u32 deviceNodeMask
Jesse Hallad250842017-03-10 18:35:38 -08004091 VkBool32 deviceLUIDValid
4092}
4093
Jesse Hall9947eab2017-08-28 12:10:06 -07004094@extension("VK_KHR_external_memory") // 73
4095class VkExternalMemoryImageCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004096 VkStructureType sType
4097 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004098 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004099}
4100
Jesse Hall9947eab2017-08-28 12:10:06 -07004101@extension("VK_KHR_external_memory") // 73
4102class VkExternalMemoryBufferCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004103 VkStructureType sType
4104 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004105 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004106}
4107
Jesse Hall9947eab2017-08-28 12:10:06 -07004108@extension("VK_KHR_external_memory") // 73
4109class VkExportMemoryAllocateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004110 VkStructureType sType
4111 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004112 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004113}
4114
Jesse Hall9947eab2017-08-28 12:10:06 -07004115@extension("VK_KHR_external_memory_win32") // 74
4116class VkImportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004117 VkStructureType sType
4118 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004119 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004120 platform.HANDLE handle
Jesse Hall9947eab2017-08-28 12:10:06 -07004121 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08004122}
4123
Jesse Hall9947eab2017-08-28 12:10:06 -07004124@extension("VK_KHR_external_memory_win32") // 74
4125class VkExportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004126 VkStructureType sType
4127 const void* pNext
4128 const platform.SECURITY_ATTRIBUTES* pAttributes
4129 platform.DWORD dwAccess
4130 platform.LPCWSTR name
4131}
4132
Jesse Hall9947eab2017-08-28 12:10:06 -07004133@extension("VK_KHR_external_memory_win32") // 74
4134class VkMemoryWin32HandlePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004135 VkStructureType sType
4136 void* pNext
4137 u32 memoryTypeBits
4138}
4139
Jesse Hall9947eab2017-08-28 12:10:06 -07004140@extension("VK_KHR_external_memory_win32") // 74
4141class VkMemoryGetWin32HandleInfoKHR {
4142 VkStructureType sType
4143 void* pNext
4144 VkDeviceMemory memory
4145 VkExternalMemoryHandleTypeFlagBitsKHR handleType
4146}
4147
4148@extension("VK_KHR_external_memory_fd") // 75
4149class VkImportMemoryFdInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004150 VkStructureType sType
4151 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004152 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004153 int fd
4154}
4155
Jesse Hall9947eab2017-08-28 12:10:06 -07004156@extension("VK_KHR_external_memory_fd") // 75
4157class VkMemoryFdPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004158 VkStructureType sType
4159 void* pNext
4160 u32 memoryTypeBits
4161}
4162
Jesse Hall9947eab2017-08-28 12:10:06 -07004163@extension("VK_KHR_external_memory_fd") // 75
4164class VkMemoryGetFdInfoKHR {
4165 VkStructureType sType
4166 void* pNext
4167 VkDeviceMemory memory
4168 VkExternalMemoryHandleTypeFlagBitsKHR handleType
4169}
4170
4171@extension("VK_KHR_win32_keyed_mutex") // 76
4172class VkWin32KeyedMutexAcquireReleaseInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004173 VkStructureType sType
4174 const void* pNext
4175 u32 acquireCount
4176 const VkDeviceMemory* pAcquireSyncs
4177 const u64* pAcquireKeys
4178 const u32* pAcquireTimeouts
4179 u32 releaseCount
4180 const VkDeviceMemory* pReleaseSyncs
4181 const u64* pReleaseKeys
4182}
4183
Jesse Hall9947eab2017-08-28 12:10:06 -07004184@extension("VK_KHR_external_semaphore_capabilities") // 77
4185class VkPhysicalDeviceExternalSemaphoreInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004186 VkStructureType sType
4187 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004188 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004189}
4190
Jesse Hall9947eab2017-08-28 12:10:06 -07004191@extension("VK_KHR_external_semaphore_capabilities") // 77
4192class VkExternalSemaphorePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004193 VkStructureType sType
4194 void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004195 VkExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes
4196 VkExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes
4197 VkExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures
Jesse Hallad250842017-03-10 18:35:38 -08004198}
4199
Jesse Hall9947eab2017-08-28 12:10:06 -07004200@extension("VK_KHR_external_semaphore") // 78
4201class VkExportSemaphoreCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004202 VkStructureType sType
4203 const void* pNext
Jesse Hall9947eab2017-08-28 12:10:06 -07004204 VkExternalSemaphoreHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004205}
4206
Jesse Hall9947eab2017-08-28 12:10:06 -07004207@extension("VK_KHR_external_semaphore_win32") // 79
4208class VkImportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004209 VkStructureType sType
4210 const void* pNext
4211 VkSemaphore semaphore
Jesse Hall9947eab2017-08-28 12:10:06 -07004212 VkSemaphoreImportFlagsKHR flags
4213 VkExternalSemaphoreHandleTypeFlagsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004214 platform.HANDLE handle
Jesse Hall9947eab2017-08-28 12:10:06 -07004215 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08004216}
4217
Jesse Hall9947eab2017-08-28 12:10:06 -07004218@extension("VK_KHR_external_semaphore_win32") // 79
4219class VkExportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004220 VkStructureType sType
4221 const void* pNext
4222 const platform.SECURITY_ATTRIBUTES* pAttributes
4223 platform.DWORD dwAccess
4224 platform.LPCWSTR name
4225}
4226
Jesse Hall9947eab2017-08-28 12:10:06 -07004227@extension("VK_KHR_external_semaphore_win32") // 79
4228class VkD3D12FenceSubmitInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004229 VkStructureType sType
4230 const void* pNext
4231 u32 waitSemaphoreValuesCount
4232 const u64* pWaitSemaphoreValues
4233 u32 signalSemaphoreValuesCount
4234 const u64* pSignalSemaphoreValues
4235}
4236
Jesse Hall9947eab2017-08-28 12:10:06 -07004237@extension("VK_KHR_external_semaphore_win32") // 79
4238class VkSemaphoreGetWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004239 VkStructureType sType
4240 const void* pNext
4241 VkSemaphore semaphore
Jesse Hall9947eab2017-08-28 12:10:06 -07004242 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
4243}
4244
4245@extension("VK_KHR_external_semaphore_fd") // 80
4246class VkImportSemaphoreFdInfoKHR {
4247 VkStructureType sType
4248 const void* pNext
4249 VkSemaphore semaphore
4250 VkSemaphoreImportFlagsKHR flags
4251 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004252 s32 fd
4253}
4254
Jesse Hall9947eab2017-08-28 12:10:06 -07004255@extension("VK_KHR_external_semaphore_fd") // 80
4256class VkSemaphoreGetFdInfoKHR {
4257 VkStructureType sType
4258 const void* pNext
4259 VkSemaphore semaphore
4260 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
4261}
4262
Jesse Hallad250842017-03-10 18:35:38 -08004263@extension("VK_KHR_push_descriptor") // 81
4264class VkPhysicalDevicePushDescriptorPropertiesKHR {
4265 VkStructureType sType
4266 void* pNext
4267 u32 maxPushDescriptors
4268}
4269
Jesse Hall9947eab2017-08-28 12:10:06 -07004270@extension("VK_KHR_16bit_storage") // 84
4271class VkPhysicalDevice16BitStorageFeaturesKHR {
4272 VkStructureType sType
4273 void* pNext
4274 VkBool32 storageBuffer16BitAccess
4275 VkBool32 uniformAndStorageBuffer16BitAccess
4276 VkBool32 storagePushConstant16
4277 VkBool32 storageInputOutput16
4278}
4279
Jesse Hallad250842017-03-10 18:35:38 -08004280@extension("VK_KHR_incremental_present") // 85
4281class VkRectLayerKHR {
4282 VkOffset2D offset
4283 VkExtent2D extent
4284 u32 layer
4285}
4286
4287@extension("VK_KHR_incremental_present") // 85
4288class VkPresentRegionKHR {
4289 u32 rectangleCount
4290 const VkRectLayerKHR* pRectangles
4291}
4292
4293@extension("VK_KHR_incremental_present") // 85
4294class VkPresentRegionsKHR {
4295 VkStructureType sType
4296 const void* pNext
4297 u32 swapchainCount
4298 const VkPresentRegionKHR* pRegions
4299}
4300
4301@extension("VK_KHR_descriptor_update_template") // 86
4302class VkDescriptorUpdateTemplateEntryKHR {
4303 u32 dstBinding
4304 u32 dstArrayElement
4305 u32 descriptorCount
4306 VkDescriptorType descriptorType
4307 platform.size_t offset
4308 platform.size_t stride
4309}
4310
4311@extension("VK_KHR_descriptor_update_template") // 86
4312class VkDescriptorUpdateTemplateCreateInfoKHR {
4313 VkStructureType sType
4314 void* pNext
4315 VkDescriptorUpdateTemplateCreateFlagsKHR flags
4316 u32 descriptorUpdateEntryCount
4317 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
4318 VkDescriptorUpdateTemplateTypeKHR templateType
4319 VkDescriptorSetLayout descriptorSetLayout
4320 VkPipelineBindPoint pipelineBindPoint
4321 VkPipelineLayout pipelineLayout
4322 u32 set
4323}
4324
4325@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004326class VkDeviceGeneratedCommandsFeaturesNVX {
4327 VkStructureType sType
4328 const void* pNext
4329 VkBool32 computeBindingPointSupport
4330}
4331
Jesse Hallad250842017-03-10 18:35:38 -08004332@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004333class VkDeviceGeneratedCommandsLimitsNVX {
4334 VkStructureType sType
4335 const void* pNext
4336 u32 maxIndirectCommandsLayoutTokenCount
4337 u32 maxObjectEntryCounts
4338 u32 minSequenceCountBufferOffsetAlignment
4339 u32 minSequenceIndexBufferOffsetAlignment
4340 u32 minCommandsTokenBufferOffsetAlignment
4341}
4342
Jesse Hallad250842017-03-10 18:35:38 -08004343@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004344class VkIndirectCommandsTokenNVX {
4345 VkIndirectCommandsTokenTypeNVX tokenType
4346 VkBuffer buffer
4347 VkDeviceSize offset
4348}
4349
Jesse Hallad250842017-03-10 18:35:38 -08004350@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004351class VkIndirectCommandsLayoutTokenNVX {
4352 VkIndirectCommandsTokenTypeNVX tokenType
4353 u32 bindingUnit
4354 u32 dynamicCount
4355 u32 divisor
4356}
4357
Jesse Hallad250842017-03-10 18:35:38 -08004358@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004359class VkIndirectCommandsLayoutCreateInfoNVX {
4360 VkStructureType sType
4361 const void* pNext
4362 VkPipelineBindPoint pipelineBindPoint
4363 VkIndirectCommandsLayoutUsageFlagsNVX flags
4364 u32 tokenCount
4365 const VkIndirectCommandsLayoutTokenNVX* pTokens
4366}
4367
Jesse Hallad250842017-03-10 18:35:38 -08004368@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004369class VkCmdProcessCommandsInfoNVX {
4370 VkStructureType sType
4371 const void* pNext
4372 VkObjectTableNVX objectTable
4373 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4374 u32 indirectCommandsTokenCount
4375 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4376 u32 maxSequencesCount
4377 VkCommandBuffer targetCommandBuffer
4378 VkBuffer sequencesCountBuffer
4379 VkDeviceSize sequencesCountOffset
4380 VkBuffer sequencesIndexBuffer
4381 VkDeviceSize sequencesIndexOffset
4382}
4383
Jesse Hallad250842017-03-10 18:35:38 -08004384@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004385class VkCmdReserveSpaceForCommandsInfoNVX {
4386 VkStructureType sType
4387 const void* pNext
4388 VkObjectTableNVX objectTable
4389 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4390 u32 maxSequencesCount
4391}
4392
Jesse Hallad250842017-03-10 18:35:38 -08004393@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004394class VkObjectTableCreateInfoNVX {
4395 VkStructureType sType
4396 const void* pNext
4397 u32 objectCount
4398 const VkObjectEntryTypeNVX* pObjectEntryTypes
4399 const u32* pObjectEntryCounts
4400 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4401 u32 maxUniformBuffersPerDescriptor
4402 u32 maxStorageBuffersPerDescriptor
4403 u32 maxStorageImagesPerDescriptor
4404 u32 maxSampledImagesPerDescriptor
4405 u32 maxPipelineLayouts
4406}
4407
Jesse Hallad250842017-03-10 18:35:38 -08004408@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004409class VkObjectTableEntryNVX {
4410 VkObjectEntryTypeNVX type
4411 VkObjectEntryUsageFlagsNVX flags
4412}
4413
Jesse Hallad250842017-03-10 18:35:38 -08004414@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004415class VkObjectTablePipelineEntryNVX {
4416 VkObjectEntryTypeNVX type
4417 VkObjectEntryUsageFlagsNVX flags
4418 VkPipeline pipeline
4419}
4420
Jesse Hallad250842017-03-10 18:35:38 -08004421@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004422class VkObjectTableDescriptorSetEntryNVX {
4423 VkObjectEntryTypeNVX type
4424 VkObjectEntryUsageFlagsNVX flags
4425 VkPipelineLayout pipelineLayout
4426 VkDescriptorSet descriptorSet
4427}
4428
Jesse Hallad250842017-03-10 18:35:38 -08004429@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004430class VkObjectTableVertexBufferEntryNVX {
4431 VkObjectEntryTypeNVX type
4432 VkObjectEntryUsageFlagsNVX flags
4433 VkBuffer buffer
4434}
4435
Jesse Hallad250842017-03-10 18:35:38 -08004436@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004437class VkObjectTableIndexBufferEntryNVX {
4438 VkObjectEntryTypeNVX type
4439 VkObjectEntryUsageFlagsNVX flags
4440 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004441 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004442}
4443
Jesse Hallad250842017-03-10 18:35:38 -08004444@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004445class VkObjectTablePushConstantEntryNVX {
4446 VkObjectEntryTypeNVX type
4447 VkObjectEntryUsageFlagsNVX flags
4448 VkPipelineLayout pipelineLayout
4449 VkShaderStageFlags stageFlags
4450}
4451
Jesse Hallad250842017-03-10 18:35:38 -08004452@extension("VK_NV_clip_space_w_scaling") // 88
4453class VkViewportWScalingNV {
4454 f32 xcoeff
4455 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004456}
4457
Jesse Hallad250842017-03-10 18:35:38 -08004458@extension("VK_NV_clip_space_w_scaling") // 88
4459class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004460 VkStructureType sType
4461 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004462 VkBool32 viewportWScalingEnable
4463 u32 viewportCount
4464 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004465}
4466
Jesse Hallad250842017-03-10 18:35:38 -08004467@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004468class VkSurfaceCapabilities2EXT {
4469 VkStructureType sType
4470 void* pNext
4471 u32 minImageCount
4472 u32 maxImageCount
4473 VkExtent2D currentExtent
4474 VkExtent2D minImageExtent
4475 VkExtent2D maxImageExtent
4476 u32 maxImageArrayLayers
4477 VkSurfaceTransformFlagsKHR supportedTransforms
4478 VkSurfaceTransformFlagBitsKHR currentTransform
4479 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4480 VkImageUsageFlags supportedUsageFlags
4481 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4482}
4483
Jesse Hallad250842017-03-10 18:35:38 -08004484@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004485class VkDisplayPowerInfoEXT {
4486 VkStructureType sType
4487 const void* pNext
4488 VkDisplayPowerStateEXT powerState
4489}
4490
Jesse Hallad250842017-03-10 18:35:38 -08004491@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004492class VkDeviceEventInfoEXT {
4493 VkStructureType sType
4494 const void* pNext
4495 VkDeviceEventTypeEXT deviceEvent
4496}
4497
Jesse Hallad250842017-03-10 18:35:38 -08004498@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004499class VkDisplayEventInfoEXT {
4500 VkStructureType sType
4501 const void* pNext
4502 VkDisplayEventTypeEXT displayEvent
4503}
4504
Jesse Hallad250842017-03-10 18:35:38 -08004505@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004506class VkSwapchainCounterCreateInfoEXT {
4507 VkStructureType sType
4508 const void* pNext
4509 VkSurfaceCounterFlagsEXT surfaceCounters
4510}
4511
Jesse Hallad250842017-03-10 18:35:38 -08004512@extension("VK_GOOGLE_display_timing") // 93
4513class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004514 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08004515}
4516
4517@extension("VK_GOOGLE_display_timing") // 93
4518class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004519 u32 presentID
4520 u64 desiredPresentTime
4521 u64 actualPresentTime
4522 u64 earliestPresentTime
4523 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08004524}
4525
4526@extension("VK_GOOGLE_display_timing") // 93
4527class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004528 u32 presentID
4529 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08004530}
4531
4532@extension("VK_GOOGLE_display_timing") // 93
4533class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004534 VkStructureType sType
4535 const void* pNext
4536 u32 swapchainCount
4537 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08004538}
4539
4540@extension("VK_NVX_multiview_per_view_attributes") // 98
4541class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4542 VkStructureType sType
4543 void* pNext
4544 VkBool32 perViewPositionAllComponents
4545}
4546
4547@extension("VK_NV_viewport_swizzle") // 99
4548class VkViewportSwizzleNV {
4549 VkViewportCoordinateSwizzleNV x
4550 VkViewportCoordinateSwizzleNV y
4551 VkViewportCoordinateSwizzleNV z
4552 VkViewportCoordinateSwizzleNV w
4553}
4554
4555@extension("VK_NV_viewport_swizzle") // 99
4556class VkPipelineViewportSwizzleStateCreateInfoNV {
4557 VkStructureType sType
4558 const void* pNext
4559 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4560 u32 viewportCount
4561 const VkViewportSwizzleNV* pViewportSwizzles
4562}
4563
4564@extension("VK_EXT_discard_rectangles") // 100
4565class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4566 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07004567 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004568 u32 maxDiscardRectangles
4569}
4570
4571@extension("VK_EXT_discard_rectangles") // 100
4572class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004573 VkStructureType sType
4574 const void* pNext
4575 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4576 VkDiscardRectangleModeEXT discardRectangleMode
4577 u32 discardRectangleCount
4578 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08004579}
4580
4581@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004582class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004583 f32 x
4584 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004585}
4586
Jesse Hallad250842017-03-10 18:35:38 -08004587@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004588class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004589 VkStructureType sType
4590 const void* pNext
4591 VkXYColorEXT displayPrimaryRed
4592 VkXYColorEXT displayPrimaryGreen
4593 VkXYColorEXT displayPrimaryBlue
4594 VkXYColorEXT whitePoint
4595 f32 maxLuminance
4596 f32 minLuminance
4597 f32 maxContentLightLevel
4598 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004599}
4600
Jesse Hall05556b12017-05-18 17:40:25 -07004601@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13004602class VkSharedPresentSurfaceCapabilitiesKHR {
4603 VkStructureType sType
4604 const void* pNext
4605 VkImageUsageFlags sharedPresentSupportedUsageFlags
4606}
4607
Jesse Hall9947eab2017-08-28 12:10:06 -07004608@extension("VK_KHR_external_fence_capabilities") // 113
4609class VkPhysicalDeviceExternalFenceInfoKHR {
4610 VkStructureType sType
4611 const void* pNext
4612 VkExternalFenceHandleTypeFlagBitsKHR handleType
4613}
4614
4615@extension("VK_KHR_external_fence_capabilities") // 113
4616class VkExternalFencePropertiesKHR {
4617 VkStructureType sType
4618 void* pNext
4619 VkExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes
4620 VkExternalFenceHandleTypeFlagsKHR compatibleHandleTypes
4621 VkExternalFenceFeatureFlagsKHR externalFenceFeatures
4622}
4623
4624@extension("VK_KHR_external_fence") // 114
4625class VkExportFenceCreateInfoKHR {
4626 VkStructureType sType
4627 const void* pNext
4628 VkExternalFenceHandleTypeFlagsKHR handleTypes
4629}
4630
4631@extension("VK_KHR_external_fence_win32") // 115
4632class VkImportFenceWin32HandleInfoKHR {
4633 VkStructureType sType
4634 const void* pNext
4635 VkFence fence
4636 VkFenceImportFlagsKHR flags
4637 VkExternalFenceHandleTypeFlagBitsKHR handleType
4638 platform.HANDLE handle
4639 platform.LPCWSTR name
4640}
4641
4642@extension("VK_KHR_external_fence_win32") // 115
4643class VkExportFenceWin32HandleInfoKHR {
4644 VkStructureType sType
4645 const void* pNext
4646 const platform.SECURITY_ATTRIBUTES* pAttributes
4647 platform.DWORD dwAccess
4648 platform.LPCWSTR name
4649}
4650
4651@extension("VK_KHR_external_fence_win32") // 115
4652class VkFenceGetWin32HandleInfoKHR {
4653 VkStructureType sType
4654 const void* pNext
4655 VkFence fence
4656 VkExternalFenceHandleTypeFlagBitsKHR handleType
4657}
4658
4659@extension("VK_KHR_external_fence_fd") // 116
4660class VkImportFenceFdInfoKHR {
4661 VkStructureType sType
4662 const void* pNext
4663 VkFence fence
4664 VkFenceImportFlagsKHR flags
4665 VkExternalFenceHandleTypeFlagBitsKHR handleType
4666 int fd
4667}
4668
4669@extension("VK_KHR_external_fence_fd") // 116
4670class VkFenceGetFdInfoKHR {
4671 VkStructureType sType
4672 const void* pNext
4673 VkFence fence
4674 VkExternalFenceHandleTypeFlagBitsKHR handleType
4675}
4676
Jesse Hall05556b12017-05-18 17:40:25 -07004677@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004678class VkPhysicalDeviceSurfaceInfo2KHR {
4679 VkStructureType sType
4680 const void* pNext
4681 VkSurfaceKHR surface
4682}
4683
Jesse Hall05556b12017-05-18 17:40:25 -07004684@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004685class VkSurfaceCapabilities2KHR {
4686 VkStructureType sType
4687 void* pNext
4688 VkSurfaceCapabilitiesKHR surfaceCapabilities
4689}
4690
Jesse Hall05556b12017-05-18 17:40:25 -07004691@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004692class VkSurfaceFormat2KHR {
4693 VkStructureType sType
4694 void* pNext
4695 VkSurfaceFormatKHR surfaceFormat
4696}
4697
Jesse Hall9947eab2017-08-28 12:10:06 -07004698@extension("VK_KHR_variable_pointers") // 121
4699class VkPhysicalDeviceVariablePointerFeaturesKHR {
4700 VkStructureType sType
4701 void* pNext
4702 VkBool32 variablePointersStorageBuffer
4703 VkBool32 variablePointers
4704}
4705
Jesse Hallad250842017-03-10 18:35:38 -08004706@extension("VK_MVK_ios_surface") // 123
4707class VkIOSSurfaceCreateInfoMVK {
4708 VkStructureType sType
4709 const void* pNext
4710 VkIOSSurfaceCreateFlagsMVK flags
4711 const void* pView
4712}
4713
4714@extension("VK_MVK_macos_surface") // 124
4715class VkMacOSSurfaceCreateInfoMVK {
4716 VkStructureType sType
4717 const void* pNext
4718 VkMacOSSurfaceCreateFlagsMVK flags
4719 const void* pView
4720}
4721
Jesse Hall9947eab2017-08-28 12:10:06 -07004722@extension("VK_KHR_dedicated_allocation") // 128
4723class VkMemoryDedicatedRequirementsKHR {
4724 VkStructureType sType
4725 void* pNext
4726 VkBool32 prefersDedicatedAllocation
4727 VkBool32 requiresDedicatedAllocation
4728}
4729
4730@extension("VK_KHR_dedicated_allocation") // 128
4731class VkMemoryDedicatedAllocateInfoKHR {
4732 VkStructureType sType
4733 const void* pNext
4734 VkImage image
4735 VkBuffer buffer
4736}
4737
Jesse Hall7ba0ac72017-07-07 17:13:23 -07004738@extension("VK_EXT_sampler_filter_minmax") // 131
4739class VkSamplerReductionModeCreateInfoEXT {
4740 VkStructureType sType
4741 const void* pNext
4742 VkSamplerReductionModeEXT reductionMode
4743}
4744
4745@extension("VK_EXT_sampler_filter_minmax") // 131
4746class VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
4747 VkStructureType sType
4748 void* pNext
4749 VkBool32 filterMinmaxSingleComponentFormats
4750 VkBool32 filterMinmaxImageComponentMapping
4751}
4752
Jesse Hall9947eab2017-08-28 12:10:06 -07004753@extension("VK_KHR_get_memory_requirements2") // 147
4754class VkBufferMemoryRequirementsInfo2KHR {
4755 VkStructureType sType
4756 const void* pNext
4757 VkBuffer buffer
4758}
4759
4760@extension("VK_KHR_get_memory_requirements2") // 147
4761class VkImageMemoryRequirementsInfo2KHR {
4762 VkStructureType sType
4763 const void* pNext
4764 VkImage image
4765}
4766
4767@extension("VK_KHR_get_memory_requirements2") // 147
4768class VkImageSparseMemoryRequirementsInfo2KHR {
4769 VkStructureType sType
4770 const void* pNext
4771 VkImage image
4772}
4773
4774@extension("VK_KHR_get_memory_requirements2") // 147
4775class VkMemoryRequirements2KHR {
4776 VkStructureType sType
4777 void* pNext
4778 VkMemoryRequirements memoryRequirements
4779}
4780
4781@extension("VK_KHR_get_memory_requirements2") // 147
4782class VkSparseImageMemoryRequirements2KHR {
4783 VkStructureType sType
4784 void* pNext
4785 VkSparseImageMemoryRequirements memoryRequirements
4786}
4787
Jesse Hall7ba0ac72017-07-07 17:13:23 -07004788@extension("VK_EXT_blend_operation_advanced") // 149
4789class VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
4790 VkStructureType sType
4791 void* pNext
4792 VkBool32 advancedBlendCoherentOperations
4793}
4794
4795@extension("VK_EXT_blend_operation_advanced") // 149
4796class VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT {
4797 VkStructureType sType
4798 void* pNext
4799 u32 advancedBlendMaxColorAttachments
4800 VkBool32 advancedBlendIndependentBlend
4801 VkBool32 advancedBlendNonPremultipliedSrcColor
4802 VkBool32 advancedBlendNonPremultipliedDstColor
4803 VkBool32 advancedBlendCorrelatedOverlap
4804 VkBool32 advancedBlendAllOperations
4805}
4806
4807@extension("VK_EXT_blend_operation_advanced") // 149
4808class VkPipelineColorBlendAdvancedStateCreateInfoEXT {
4809 VkStructureType sType
4810 const void* pNext
4811 VkBool32 srcPremultiplied
4812 VkBool32 dstPremultiplied
4813 VkBlendOverlapEXT blendOverlap
4814}
4815
4816@extension("VK_NV_fragment_coverage_to_color") // 150
4817class VkPipelineCoverageToColorStateCreateInfoNV {
4818 VkStructureType sType
4819 const void* pNext
4820 VkPipelineCoverageToColorStateCreateFlagsNV flags
4821 VkBool32 coverageToColorEnable
4822 u32 coverageToColorLocation
4823}
4824
4825@extension("VK_NV_framebuffer_mixed_samples") // 153
4826class VkPipelineCoverageModulationStateCreateInfoNV {
4827 VkStructureType sType
4828 const void* pNext
4829 VkPipelineCoverageModulationStateCreateFlagsNV flags
4830 VkCoverageModulationModeNV coverageModulationMode
4831 VkBool32 coverageModulationTableEnable
4832 u32 coverageModulationTableCount
4833 const f32* pCoverageModulationTable
4834}
4835
Jesse Halld27f6aa2015-08-15 17:58:48 -07004836////////////////
4837// Commands //
4838////////////////
4839
4840// Function pointers. TODO: add support for function pointers.
4841
4842@external type void* PFN_vkVoidFunction
4843@pfn cmd void vkVoidFunction() {
4844}
4845
Jesse Hall3fbc8562015-11-29 22:10:52 -08004846@external type void* PFN_vkAllocationFunction
4847@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004848 void* pUserData,
4849 platform.size_t size,
4850 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004851 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004852 return ?
4853}
4854
Jesse Hall3fbc8562015-11-29 22:10:52 -08004855@external type void* PFN_vkReallocationFunction
4856@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004857 void* pUserData,
4858 void* pOriginal,
4859 platform.size_t size,
4860 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004861 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004862 return ?
4863}
4864
4865@external type void* PFN_vkFreeFunction
4866@pfn cmd void vkFreeFunction(
4867 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004868 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004869}
4870
Jesse Hall3fbc8562015-11-29 22:10:52 -08004871@external type void* PFN_vkInternalAllocationNotification
4872@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004873 void* pUserData,
4874 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004875 VkInternalAllocationType allocationType,
4876 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004877}
4878
4879@external type void* PFN_vkInternalFreeNotification
4880@pfn cmd void vkInternalFreeNotification(
4881 void* pUserData,
4882 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004883 VkInternalAllocationType allocationType,
4884 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004885}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004886
4887// Global functions
4888
4889@threadSafety("system")
4890cmd VkResult vkCreateInstance(
4891 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004892 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004893 VkInstance* pInstance) {
4894 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4895
4896 instance := ?
4897 pInstance[0] = instance
4898 State.Instances[instance] = new!InstanceObject()
4899
Jesse Hall3dd678a2016-01-08 21:52:01 -08004900 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4901 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004902
4903 return ?
4904}
4905
4906@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004907cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004908 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004909 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004910 instanceObject := GetInstance(instance)
4911
4912 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004913}
4914
4915@threadSafety("system")
4916cmd VkResult vkEnumeratePhysicalDevices(
4917 VkInstance instance,
4918 u32* pPhysicalDeviceCount,
4919 VkPhysicalDevice* pPhysicalDevices) {
4920 instanceObject := GetInstance(instance)
4921
4922 physicalDeviceCount := as!u32(?)
4923 pPhysicalDeviceCount[0] = physicalDeviceCount
4924 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4925
4926 for i in (0 .. physicalDeviceCount) {
4927 physicalDevice := ?
4928 physicalDevices[i] = physicalDevice
4929 if !(physicalDevice in State.PhysicalDevices) {
4930 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4931 }
4932 }
4933
4934 return ?
4935}
4936
4937cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4938 VkDevice device,
4939 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004940 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004941 device := GetDevice(device)
4942 }
4943
4944 return ?
4945}
4946
4947cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4948 VkInstance instance,
4949 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004950 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004951 instanceObject := GetInstance(instance)
4952 }
4953
4954 return ?
4955}
4956
Jesse Hall606a54e2015-11-19 22:17:28 -08004957cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004958 VkPhysicalDevice physicalDevice,
4959 VkPhysicalDeviceProperties* pProperties) {
4960 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4961
4962 properties := ?
4963 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004964}
4965
Jesse Hall606a54e2015-11-19 22:17:28 -08004966cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004967 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004968 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004969 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004970 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004971 // TODO: Figure out how to express fetch-count-or-properties
4972 // This version fails 'apic validate' with 'fence not allowed in
4973 // *semantic.Branch'. Other attempts have failed with the same or other
4974 // errors.
4975 // if pQueueFamilyProperties != null {
4976 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4977 // for i in (0 .. pCount[0]) {
4978 // queueProperties := as!VkQueueFamilyProperties(?)
4979 // queuesProperties[i] = queueProperties
4980 // }
4981 // } else {
4982 // count := ?
4983 // pCount[0] = count
4984 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004985}
4986
Jesse Hall606a54e2015-11-19 22:17:28 -08004987cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004988 VkPhysicalDevice physicalDevice,
4989 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4990 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4991
4992 memoryProperties := ?
4993 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004994}
4995
Jesse Hall606a54e2015-11-19 22:17:28 -08004996cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004997 VkPhysicalDevice physicalDevice,
4998 VkPhysicalDeviceFeatures* pFeatures) {
4999 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5000
5001 features := ?
5002 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07005003}
5004
Jesse Hall606a54e2015-11-19 22:17:28 -08005005cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005006 VkPhysicalDevice physicalDevice,
5007 VkFormat format,
5008 VkFormatProperties* pFormatProperties) {
5009 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5010
5011 formatProperties := ?
5012 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07005013}
5014
Jesse Halla9e57032015-11-30 01:03:10 -08005015cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005016 VkPhysicalDevice physicalDevice,
5017 VkFormat format,
5018 VkImageType type,
5019 VkImageTiling tiling,
5020 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005021 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005022 VkImageFormatProperties* pImageFormatProperties) {
5023 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5024
5025 imageFormatProperties := ?
5026 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08005027
5028 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07005029}
5030
Jesse Halld27f6aa2015-08-15 17:58:48 -07005031
5032// Device functions
5033
5034@threadSafety("system")
5035cmd VkResult vkCreateDevice(
5036 VkPhysicalDevice physicalDevice,
5037 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005038 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005039 VkDevice* pDevice) {
5040 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
5041 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5042
5043 device := ?
5044 pDevice[0] = device
5045 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
5046
5047 return ?
5048}
5049
5050@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005051cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08005052 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005053 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005054 deviceObject := GetDevice(device)
5055
5056 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005057}
5058
5059
5060// Extension discovery functions
5061
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005062cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08005063 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005064 VkLayerProperties* pProperties) {
5065 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005066 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005067
5068 properties := pProperties[0:count]
5069 for i in (0 .. count) {
5070 property := ?
5071 properties[i] = property
5072 }
5073
5074 return ?
5075}
5076
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005077cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005078 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005079 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005080 VkExtensionProperties* pProperties) {
5081 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005082 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005083
5084 properties := pProperties[0:count]
5085 for i in (0 .. count) {
5086 property := ?
5087 properties[i] = property
5088 }
5089
5090 return ?
5091}
5092
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005093cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005094 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005095 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005096 VkLayerProperties* pProperties) {
5097 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5098 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005099 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005100
5101 properties := pProperties[0:count]
5102 for i in (0 .. count) {
5103 property := ?
5104 properties[i] = property
5105 }
5106
5107 return ?
5108}
5109
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005110cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005111 VkPhysicalDevice physicalDevice,
5112 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005113 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005114 VkExtensionProperties* pProperties) {
5115 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5116
5117 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005118 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005119
5120 properties := pProperties[0:count]
5121 for i in (0 .. count) {
5122 property := ?
5123 properties[i] = property
5124 }
5125
5126 return ?
5127}
5128
5129
5130// Queue functions
5131
5132@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08005133cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005134 VkDevice device,
5135 u32 queueFamilyIndex,
5136 u32 queueIndex,
5137 VkQueue* pQueue) {
5138 deviceObject := GetDevice(device)
5139
5140 queue := ?
5141 pQueue[0] = queue
5142
5143 if !(queue in State.Queues) {
5144 State.Queues[queue] = new!QueueObject(device: device)
5145 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005146}
5147
5148@threadSafety("app")
5149cmd VkResult vkQueueSubmit(
5150 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08005151 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08005152 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005153 VkFence fence) {
5154 queueObject := GetQueue(queue)
5155
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005156 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005157 fenceObject := GetFence(fence)
5158 assert(fenceObject.device == queueObject.device)
5159 }
5160
Jesse Hall3fbc8562015-11-29 22:10:52 -08005161 // commandBuffers := pcommandBuffers[0:commandBufferCount]
5162 // for i in (0 .. commandBufferCount) {
5163 // commandBuffer := commandBuffers[i]
5164 // commandBufferObject := GetCommandBuffer(commandBuffer)
5165 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08005166 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08005167 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
5168 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08005169 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005170
5171 return ?
5172}
5173
5174@threadSafety("system")
5175cmd VkResult vkQueueWaitIdle(
5176 VkQueue queue) {
5177 queueObject := GetQueue(queue)
5178
5179 return ?
5180}
5181
5182@threadSafety("system")
5183cmd VkResult vkDeviceWaitIdle(
5184 VkDevice device) {
5185 deviceObject := GetDevice(device)
5186
5187 return ?
5188}
5189
5190
5191// Memory functions
5192
5193@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005194cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005195 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005196 const VkMemoryAllocateInfo* pAllocateInfo,
5197 const VkAllocationCallbacks* pAllocator,
5198 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005199 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005200 deviceObject := GetDevice(device)
5201
Jesse Hall3fbc8562015-11-29 22:10:52 -08005202 memory := ?
5203 pMemory[0] = memory
5204 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005205 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005206 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005207
5208 return ?
5209}
5210
5211@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005212cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005213 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005214 VkDeviceMemory memory,
5215 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005216 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005217 memoryObject := GetDeviceMemory(memory)
5218 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005219
5220 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005221 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005222 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005223 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
5224 "vkFreeMemory: commandBuffers still bound")
5225 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005226}
5227
5228@threadSafety("app")
5229cmd VkResult vkMapMemory(
5230 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005231 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005232 VkDeviceSize offset,
5233 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005234 VkMemoryMapFlags flags,
5235 void** ppData) {
5236 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005237 memoryObject := GetDeviceMemory(memory)
5238 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005239
5240 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08005241 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005242
5243 return ?
5244}
5245
5246@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005247cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005248 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005249 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005250 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005251 memoryObject := GetDeviceMemory(memory)
5252 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005253}
5254
5255cmd VkResult vkFlushMappedMemoryRanges(
5256 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005257 u32 memoryRangeCount
5258 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005259 deviceObject := GetDevice(device)
5260
Jesse Hall3fbc8562015-11-29 22:10:52 -08005261 memoryRanges := pMemoryRanges[0:memoryRangeCount]
5262 for i in (0 .. memoryRangeCount) {
5263 memoryRange := memoryRanges[i]
5264 memoryObject := GetDeviceMemory(memoryRange.memory)
5265 assert(memoryObject.device == device)
5266 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005267 }
5268
5269 return ?
5270}
5271
5272cmd VkResult vkInvalidateMappedMemoryRanges(
5273 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005274 u32 memoryRangeCount,
5275 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005276 deviceObject := GetDevice(device)
5277
Jesse Hall3fbc8562015-11-29 22:10:52 -08005278 memoryRanges := pMemoryRanges[0:memoryRangeCount]
5279 for i in (0 .. memoryRangeCount) {
5280 memoryRange := memoryRanges[i]
5281 memoryObject := GetDeviceMemory(memoryRange.memory)
5282 assert(memoryObject.device == device)
5283 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005284 }
5285
5286 return ?
5287}
5288
5289
5290// Memory management API functions
5291
Jesse Hall606a54e2015-11-19 22:17:28 -08005292cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005293 VkDevice device,
5294 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005295 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005296 deviceObject := GetDevice(device)
5297
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005298 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005299 memoryObject := GetDeviceMemory(memory)
5300 assert(memoryObject.device == device)
5301 }
5302
5303 committedMemoryInBytes := ?
5304 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07005305}
5306
Jesse Hall606a54e2015-11-19 22:17:28 -08005307cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005308 VkDevice device,
5309 VkBuffer buffer,
5310 VkMemoryRequirements* pMemoryRequirements) {
5311 deviceObject := GetDevice(device)
5312 bufferObject := GetBuffer(buffer)
5313 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005314}
5315
5316cmd VkResult vkBindBufferMemory(
5317 VkDevice device,
5318 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005319 VkDeviceMemory memory,
5320 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005321 deviceObject := GetDevice(device)
5322 bufferObject := GetBuffer(buffer)
5323 assert(bufferObject.device == device)
5324
5325 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005326 if bufferObject.memory != NULL_HANDLE {
5327 memoryObject := GetDeviceMemory(bufferObject.memory)
5328 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005329 }
5330
5331 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005332 if memory != NULL_HANDLE {
5333 memoryObject := GetDeviceMemory(memory)
5334 assert(memoryObject.device == device)
5335 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005336 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005337 bufferObject.memory = memory
5338 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005339
5340 return ?
5341}
5342
Jesse Hall606a54e2015-11-19 22:17:28 -08005343cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005344 VkDevice device,
5345 VkImage image,
5346 VkMemoryRequirements* pMemoryRequirements) {
5347 deviceObject := GetDevice(device)
5348 imageObject := GetImage(image)
5349 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005350}
5351
5352cmd VkResult vkBindImageMemory(
5353 VkDevice device,
5354 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005355 VkDeviceMemory memory,
5356 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005357 deviceObject := GetDevice(device)
5358 imageObject := GetImage(image)
5359 assert(imageObject.device == device)
5360
5361 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005362 if imageObject.memory != NULL_HANDLE {
5363 memoryObject := GetDeviceMemory(imageObject.memory)
5364 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005365 }
5366
5367 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005368 if memory != NULL_HANDLE {
5369 memoryObject := GetDeviceMemory(memory)
5370 assert(memoryObject.device == device)
5371 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005372 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005373 imageObject.memory = memory
5374 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005375
5376 return ?
5377}
5378
Jesse Hall606a54e2015-11-19 22:17:28 -08005379cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005380 VkDevice device,
5381 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005382 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005383 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
5384 deviceObject := GetDevice(device)
5385 imageObject := GetImage(image)
5386 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005387}
5388
Jesse Hall606a54e2015-11-19 22:17:28 -08005389cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005390 VkPhysicalDevice physicalDevice,
5391 VkFormat format,
5392 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08005393 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005394 VkImageUsageFlags usage,
5395 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005396 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005397 VkSparseImageFormatProperties* pProperties) {
5398 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005399}
5400
Jesse Halla6429252015-11-29 18:59:42 -08005401cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005402 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005403 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08005404 const VkBindSparseInfo* pBindInfo,
5405 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005406 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005407
5408 return ?
5409}
5410
5411
5412// Fence functions
5413
5414@threadSafety("system")
5415cmd VkResult vkCreateFence(
5416 VkDevice device,
5417 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005418 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005419 VkFence* pFence) {
5420 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
5421 deviceObject := GetDevice(device)
5422
5423 fence := ?
5424 pFence[0] = fence
5425 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08005426 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07005427
5428 return ?
5429}
5430
5431@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005432cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005433 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005434 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005435 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005436 deviceObject := GetDevice(device)
5437 fenceObject := GetFence(fence)
5438 assert(fenceObject.device == device)
5439
5440 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005441}
5442
5443@threadSafety("system")
5444cmd VkResult vkResetFences(
5445 VkDevice device,
5446 u32 fenceCount,
5447 const VkFence* pFences) {
5448 deviceObject := GetDevice(device)
5449
5450 fences := pFences[0:fenceCount]
5451 for i in (0 .. fenceCount) {
5452 fence := fences[i]
5453 fenceObject := GetFence(fence)
5454 assert(fenceObject.device == device)
5455 fenceObject.signaled = false
5456 }
5457
5458 return ?
5459}
5460
5461@threadSafety("system")
5462cmd VkResult vkGetFenceStatus(
5463 VkDevice device,
5464 VkFence fence) {
5465 deviceObject := GetDevice(device)
5466 fenceObject := GetFence(fence)
5467 assert(fenceObject.device == device)
5468
5469 return ?
5470}
5471
5472@threadSafety("system")
5473cmd VkResult vkWaitForFences(
5474 VkDevice device,
5475 u32 fenceCount,
5476 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005477 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005478 u64 timeout) { /// timeout in nanoseconds
5479 deviceObject := GetDevice(device)
5480
5481 fences := pFences[0:fenceCount]
5482 for i in (0 .. fenceCount) {
5483 fence := fences[i]
5484 fenceObject := GetFence(fence)
5485 assert(fenceObject.device == device)
5486 }
5487
5488 return ?
5489}
5490
5491
5492// Queue semaphore functions
5493
5494@threadSafety("system")
5495cmd VkResult vkCreateSemaphore(
5496 VkDevice device,
5497 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005498 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005499 VkSemaphore* pSemaphore) {
5500 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
5501 deviceObject := GetDevice(device)
5502
5503 semaphore := ?
5504 pSemaphore[0] = semaphore
5505 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
5506
5507 return ?
5508}
5509
5510@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005511cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005512 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005513 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005514 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005515 deviceObject := GetDevice(device)
5516 semaphoreObject := GetSemaphore(semaphore)
5517 assert(semaphoreObject.device == device)
5518
5519 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005520}
5521
Jesse Halld27f6aa2015-08-15 17:58:48 -07005522
5523// Event functions
5524
5525@threadSafety("system")
5526cmd VkResult vkCreateEvent(
5527 VkDevice device,
5528 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005529 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005530 VkEvent* pEvent) {
5531 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
5532 deviceObject := GetDevice(device)
5533
5534 event := ?
5535 pEvent[0] = event
5536 State.Events[event] = new!EventObject(device: device)
5537
5538 return ?
5539}
5540
5541@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005542cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005543 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005544 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005545 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005546 deviceObject := GetDevice(device)
5547 eventObject := GetEvent(event)
5548 assert(eventObject.device == device)
5549
5550 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005551}
5552
5553@threadSafety("system")
5554cmd VkResult vkGetEventStatus(
5555 VkDevice device,
5556 VkEvent event) {
5557 deviceObject := GetDevice(device)
5558 eventObject := GetEvent(event)
5559 assert(eventObject.device == device)
5560
5561 return ?
5562}
5563
5564@threadSafety("system")
5565cmd VkResult vkSetEvent(
5566 VkDevice device,
5567 VkEvent event) {
5568 deviceObject := GetDevice(device)
5569 eventObject := GetEvent(event)
5570 assert(eventObject.device == device)
5571
5572 return ?
5573}
5574
5575@threadSafety("system")
5576cmd VkResult vkResetEvent(
5577 VkDevice device,
5578 VkEvent event) {
5579 deviceObject := GetDevice(device)
5580 eventObject := GetEvent(event)
5581 assert(eventObject.device == device)
5582
5583 return ?
5584}
5585
5586
5587// Query functions
5588
5589@threadSafety("system")
5590cmd VkResult vkCreateQueryPool(
5591 VkDevice device,
5592 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005593 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005594 VkQueryPool* pQueryPool) {
5595 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5596 deviceObject := GetDevice(device)
5597
5598 queryPool := ?
5599 pQueryPool[0] = queryPool
5600 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5601
5602 return ?
5603}
5604
5605@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005606cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005607 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005608 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005609 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005610 deviceObject := GetDevice(device)
5611 queryPoolObject := GetQueryPool(queryPool)
5612 assert(queryPoolObject.device == device)
5613
5614 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005615}
5616
5617@threadSafety("system")
5618cmd VkResult vkGetQueryPoolResults(
5619 VkDevice device,
5620 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005621 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005622 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005623 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005624 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005625 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005626 VkQueryResultFlags flags) {
5627 deviceObject := GetDevice(device)
5628 queryPoolObject := GetQueryPool(queryPool)
5629 assert(queryPoolObject.device == device)
5630
Jesse Halld27f6aa2015-08-15 17:58:48 -07005631 data := pData[0:dataSize]
5632
5633 return ?
5634}
5635
5636// Buffer functions
5637
5638@threadSafety("system")
5639cmd VkResult vkCreateBuffer(
5640 VkDevice device,
5641 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005642 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005643 VkBuffer* pBuffer) {
5644 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5645 deviceObject := GetDevice(device)
5646
5647 buffer := ?
5648 pBuffer[0] = buffer
5649 State.Buffers[buffer] = new!BufferObject(device: device)
5650
5651 return ?
5652}
5653
5654@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005655cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005656 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005657 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005658 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005659 deviceObject := GetDevice(device)
5660 bufferObject := GetBuffer(buffer)
5661 assert(bufferObject.device == device)
5662
Jesse Hall3fbc8562015-11-29 22:10:52 -08005663 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005664 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005665}
5666
5667
5668// Buffer view functions
5669
5670@threadSafety("system")
5671cmd VkResult vkCreateBufferView(
5672 VkDevice device,
5673 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005674 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005675 VkBufferView* pView) {
5676 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5677 deviceObject := GetDevice(device)
5678
5679 bufferObject := GetBuffer(pCreateInfo.buffer)
5680 assert(bufferObject.device == device)
5681
5682 view := ?
5683 pView[0] = view
5684 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5685
5686 return ?
5687}
5688
5689@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005690cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005691 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005692 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005693 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005694 deviceObject := GetDevice(device)
5695 bufferViewObject := GetBufferView(bufferView)
5696 assert(bufferViewObject.device == device)
5697
5698 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005699}
5700
5701
5702// Image functions
5703
5704@threadSafety("system")
5705cmd VkResult vkCreateImage(
5706 VkDevice device,
5707 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005708 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005709 VkImage* pImage) {
5710 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5711 deviceObject := GetDevice(device)
5712
5713 image := ?
5714 pImage[0] = image
5715 State.Images[image] = new!ImageObject(device: device)
5716
5717 return ?
5718}
5719
5720@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005721cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005722 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005723 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005724 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005725 deviceObject := GetDevice(device)
5726 imageObject := GetImage(image)
5727 assert(imageObject.device == device)
5728
Jesse Hall3fbc8562015-11-29 22:10:52 -08005729 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005730 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005731}
5732
Jesse Hall606a54e2015-11-19 22:17:28 -08005733cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005734 VkDevice device,
5735 VkImage image,
5736 const VkImageSubresource* pSubresource,
5737 VkSubresourceLayout* pLayout) {
5738 deviceObject := GetDevice(device)
5739 imageObject := GetImage(image)
5740 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005741}
5742
5743
5744// Image view functions
5745
5746@threadSafety("system")
5747cmd VkResult vkCreateImageView(
5748 VkDevice device,
5749 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005750 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005751 VkImageView* pView) {
5752 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5753 deviceObject := GetDevice(device)
5754
5755 imageObject := GetImage(pCreateInfo.image)
5756 assert(imageObject.device == device)
5757
5758 view := ?
5759 pView[0] = view
5760 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5761
5762 return ?
5763}
5764
5765@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005766cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005767 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005768 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005769 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005770 deviceObject := GetDevice(device)
5771 imageViewObject := GetImageView(imageView)
5772 assert(imageViewObject.device == device)
5773
5774 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005775}
5776
5777
5778// Shader functions
5779
5780cmd VkResult vkCreateShaderModule(
5781 VkDevice device,
5782 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005783 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005784 VkShaderModule* pShaderModule) {
5785 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5786 deviceObject := GetDevice(device)
5787
5788 shaderModule := ?
5789 pShaderModule[0] = shaderModule
5790 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5791
5792 return ?
5793}
5794
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005795cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005796 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005797 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005798 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005799 deviceObject := GetDevice(device)
5800 shaderModuleObject := GetShaderModule(shaderModule)
5801 assert(shaderModuleObject.device == device)
5802
5803 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005804}
5805
Jesse Halld27f6aa2015-08-15 17:58:48 -07005806
5807// Pipeline functions
5808
5809cmd VkResult vkCreatePipelineCache(
5810 VkDevice device,
5811 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005812 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005813 VkPipelineCache* pPipelineCache) {
5814 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5815 deviceObject := GetDevice(device)
5816
5817 pipelineCache := ?
5818 pPipelineCache[0] = pipelineCache
5819 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5820
5821 return ?
5822}
5823
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005824cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005825 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005826 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005827 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005828 deviceObject := GetDevice(device)
5829 pipelineCacheObject := GetPipelineCache(pipelineCache)
5830 assert(pipelineCacheObject.device == device)
5831
5832 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005833}
5834
Jesse Halld27f6aa2015-08-15 17:58:48 -07005835cmd VkResult vkGetPipelineCacheData(
5836 VkDevice device,
5837 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005838 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005839 void* pData) {
5840 deviceObject := GetDevice(device)
5841 pipelineCacheObject := GetPipelineCache(pipelineCache)
5842 assert(pipelineCacheObject.device == device)
5843
5844 return ?
5845}
5846
5847cmd VkResult vkMergePipelineCaches(
5848 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005849 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005850 u32 srcCacheCount,
5851 const VkPipelineCache* pSrcCaches) {
5852 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005853 dstCacheObject := GetPipelineCache(dstCache)
5854 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005855
5856 srcCaches := pSrcCaches[0:srcCacheCount]
5857 for i in (0 .. srcCacheCount) {
5858 srcCache := srcCaches[i]
5859 srcCacheObject := GetPipelineCache(srcCache)
5860 assert(srcCacheObject.device == device)
5861 }
5862
5863 return ?
5864}
5865
5866cmd VkResult vkCreateGraphicsPipelines(
5867 VkDevice device,
5868 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005869 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005870 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005871 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005872 VkPipeline* pPipelines) {
5873 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005874 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005875 pipelineCacheObject := GetPipelineCache(pipelineCache)
5876 assert(pipelineCacheObject.device == device)
5877 }
5878
Jesse Hall03b6fe12015-11-24 12:44:21 -08005879 createInfos := pCreateInfos[0:createInfoCount]
5880 pipelines := pPipelines[0:createInfoCount]
5881 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005882 pipeline := ?
5883 pipelines[i] = pipeline
5884 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5885 }
5886
5887 return ?
5888}
5889
5890cmd VkResult vkCreateComputePipelines(
5891 VkDevice device,
5892 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005893 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005894 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005895 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005896 VkPipeline* pPipelines) {
5897 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005898 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005899 pipelineCacheObject := GetPipelineCache(pipelineCache)
5900 assert(pipelineCacheObject.device == device)
5901 }
5902
Jesse Hall03b6fe12015-11-24 12:44:21 -08005903 createInfos := pCreateInfos[0:createInfoCount]
5904 pipelines := pPipelines[0:createInfoCount]
5905 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005906 pipeline := ?
5907 pipelines[i] = pipeline
5908 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5909 }
5910
5911 return ?
5912}
5913
5914@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005915cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005916 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005917 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005918 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005919 deviceObject := GetDevice(device)
5920 pipelineObjects := GetPipeline(pipeline)
5921 assert(pipelineObjects.device == device)
5922
5923 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005924}
5925
5926
5927// Pipeline layout functions
5928
5929@threadSafety("system")
5930cmd VkResult vkCreatePipelineLayout(
5931 VkDevice device,
5932 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005933 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005934 VkPipelineLayout* pPipelineLayout) {
5935 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5936 deviceObject := GetDevice(device)
5937
5938 pipelineLayout := ?
5939 pPipelineLayout[0] = pipelineLayout
5940 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5941
5942 return ?
5943}
5944
5945@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005946cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005947 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005948 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005949 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005950 deviceObject := GetDevice(device)
5951 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5952 assert(pipelineLayoutObjects.device == device)
5953
5954 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005955}
5956
5957
5958// Sampler functions
5959
5960@threadSafety("system")
5961cmd VkResult vkCreateSampler(
5962 VkDevice device,
5963 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005964 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005965 VkSampler* pSampler) {
5966 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5967 deviceObject := GetDevice(device)
5968
5969 sampler := ?
5970 pSampler[0] = sampler
5971 State.Samplers[sampler] = new!SamplerObject(device: device)
5972
5973 return ?
5974}
5975
5976@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005977cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005978 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005979 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005980 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005981 deviceObject := GetDevice(device)
5982 samplerObject := GetSampler(sampler)
5983 assert(samplerObject.device == device)
5984
5985 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005986}
5987
5988
5989// Descriptor set functions
5990
5991@threadSafety("system")
5992cmd VkResult vkCreateDescriptorSetLayout(
5993 VkDevice device,
5994 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005995 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005996 VkDescriptorSetLayout* pSetLayout) {
5997 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5998 deviceObject := GetDevice(device)
5999
6000 setLayout := ?
6001 pSetLayout[0] = setLayout
6002 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
6003
6004 return ?
6005}
6006
6007@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006008cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006009 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006010 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006011 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006012 deviceObject := GetDevice(device)
6013 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
6014 assert(descriptorSetLayoutObject.device == device)
6015
6016 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006017}
6018
6019@threadSafety("system")
6020cmd VkResult vkCreateDescriptorPool(
6021 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006022 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006023 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006024 VkDescriptorPool* pDescriptorPool) {
6025 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
6026 deviceObject := GetDevice(device)
6027
6028 descriptorPool := ?
6029 pDescriptorPool[0] = descriptorPool
6030 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
6031
6032 return ?
6033}
6034
6035@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006036cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006037 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006038 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006039 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006040 deviceObject := GetDevice(device)
6041 descriptorPoolObject := GetDescriptorPool(descriptorPool)
6042 assert(descriptorPoolObject.device == device)
6043
6044 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045}
6046
6047@threadSafety("app")
6048cmd VkResult vkResetDescriptorPool(
6049 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08006050 VkDescriptorPool descriptorPool,
6051 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006052 deviceObject := GetDevice(device)
6053 descriptorPoolObject := GetDescriptorPool(descriptorPool)
6054 assert(descriptorPoolObject.device == device)
6055
6056 return ?
6057}
6058
6059@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006060cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006061 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006062 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006063 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006064 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006065 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08006066 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006067
Jesse Hall03b6fe12015-11-24 12:44:21 -08006068 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
6069 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006070 setLayout := setLayouts[i]
6071 setLayoutObject := GetDescriptorSetLayout(setLayout)
6072 assert(setLayoutObject.device == device)
6073 }
6074
Jesse Hall03b6fe12015-11-24 12:44:21 -08006075 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
6076 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006077 descriptorSet := ?
6078 descriptorSets[i] = descriptorSet
6079 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
6080 }
6081
6082 return ?
6083}
6084
Jesse Hallf09c6b12015-08-15 19:54:28 -07006085cmd VkResult vkFreeDescriptorSets(
6086 VkDevice device,
6087 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006088 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07006089 const VkDescriptorSet* pDescriptorSets) {
6090 deviceObject := GetDevice(device)
6091 descriptorPoolObject := GetDescriptorPool(descriptorPool)
6092
Jesse Hall03b6fe12015-11-24 12:44:21 -08006093 descriptorSets := pDescriptorSets[0:descriptorSetCount]
6094 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07006095 descriptorSet := descriptorSets[i]
6096 descriptorSetObject := GetDescriptorSet(descriptorSet)
6097 assert(descriptorSetObject.device == device)
6098 State.DescriptorSets[descriptorSet] = null
6099 }
6100
6101 return ?
6102}
6103
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006104cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006105 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08006106 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006107 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08006108 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006109 const VkCopyDescriptorSet* pDescriptorCopies) {
6110 deviceObject := GetDevice(device)
6111
Jesse Hallb00daad2015-11-29 19:46:20 -08006112 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
6113 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006114 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006115 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006116 assert(descriptorWriteObject.device == device)
6117 }
6118
Jesse Hallb00daad2015-11-29 19:46:20 -08006119 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
6120 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006121 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006122 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006123 assert(descriptorCopyObject.device == device)
6124 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006125}
6126
6127
6128// Framebuffer functions
6129
6130@threadSafety("system")
6131cmd VkResult vkCreateFramebuffer(
6132 VkDevice device,
6133 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006134 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006135 VkFramebuffer* pFramebuffer) {
6136 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
6137 deviceObject := GetDevice(device)
6138
6139 framebuffer := ?
6140 pFramebuffer[0] = framebuffer
6141 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
6142
6143 return ?
6144}
6145
6146@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006147cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006148 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006149 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006150 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006151 deviceObject := GetDevice(device)
6152 framebufferObject := GetFramebuffer(framebuffer)
6153 assert(framebufferObject.device == device)
6154
6155 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006156}
6157
6158
6159// Renderpass functions
6160
6161@threadSafety("system")
6162cmd VkResult vkCreateRenderPass(
6163 VkDevice device,
6164 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006165 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006166 VkRenderPass* pRenderPass) {
6167 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
6168 deviceObject := GetDevice(device)
6169
6170 renderpass := ?
6171 pRenderPass[0] = renderpass
6172 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
6173
6174 return ?
6175}
6176
6177@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006178cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006179 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006180 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006181 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006182 deviceObject := GetDevice(device)
6183 renderPassObject := GetRenderPass(renderPass)
6184 assert(renderPassObject.device == device)
6185
6186 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006187}
6188
Jesse Hall606a54e2015-11-19 22:17:28 -08006189cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006190 VkDevice device,
6191 VkRenderPass renderPass,
6192 VkExtent2D* pGranularity) {
6193 deviceObject := GetDevice(device)
6194 renderPassObject := GetRenderPass(renderPass)
6195
6196 granularity := ?
6197 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07006198}
6199
6200// Command pool functions
6201
6202cmd VkResult vkCreateCommandPool(
6203 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006204 const VkCommandPoolCreateInfo* pCreateInfo,
6205 const VkAllocationCallbacks* pAllocator,
6206 VkCommandPool* pCommandPool) {
6207 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006208 deviceObject := GetDevice(device)
6209
Jesse Hall3fbc8562015-11-29 22:10:52 -08006210 commandPool := ?
6211 pCommandPool[0] = commandPool
6212 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006213
6214 return ?
6215}
6216
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006217cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006218 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006219 VkCommandPool commandPool,
6220 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006221 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006222 commandPoolObject := GetCommandPool(commandPool)
6223 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006224
Jesse Hall3fbc8562015-11-29 22:10:52 -08006225 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006226}
6227
6228cmd VkResult vkResetCommandPool(
6229 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006230 VkCommandPool commandPool,
6231 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006232 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006233 commandPoolObject := GetCommandPool(commandPool)
6234 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006235
6236 return ?
6237}
6238
6239// Command buffer functions
6240
Jesse Hall3fbc8562015-11-29 22:10:52 -08006241macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
6242 memoryObject := GetDeviceMemory(memory)
6243 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07006244
Jesse Hall3fbc8562015-11-29 22:10:52 -08006245 commandBufferObject := GetCommandBuffer(commandBuffer)
6246 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07006247}
6248
Jesse Hall3fbc8562015-11-29 22:10:52 -08006249macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
6250 memoryObject := GetDeviceMemory(memory)
6251 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006252
Jesse Hall3fbc8562015-11-29 22:10:52 -08006253 commandBufferObject := GetCommandBuffer(commandBuffer)
6254 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006255}
6256
6257@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006258cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006259 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006260 const VkCommandBufferAllocateInfo* pAllocateInfo,
6261 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006262 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006263
Jesse Hall3dd678a2016-01-08 21:52:01 -08006264 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08006265 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08006266 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006267 commandBuffer := ?
6268 commandBuffers[i] = commandBuffer
6269 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08006270 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006271
6272 return ?
6273}
6274
6275@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08006276cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006277 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006278 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006279 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006280 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006281 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006282
Jesse Hall3fbc8562015-11-29 22:10:52 -08006283 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08006284 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006285 commandBufferObject := GetCommandBuffer(commandBuffers[i])
6286 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08006287 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08006288 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08006289 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006290}
6291
6292@threadSafety("app")
6293cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006294 VkCommandBuffer commandBuffer,
6295 const VkCommandBufferBeginInfo* pBeginInfo) {
6296 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
6297 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006298
6299 // TODO: iterate over boundObjects and clear memory bindings
6300
6301 return ?
6302}
6303
6304@threadSafety("app")
6305cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006306 VkCommandBuffer commandBuffer) {
6307 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006308
6309 return ?
6310}
6311
6312@threadSafety("app")
6313cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006314 VkCommandBuffer commandBuffer,
6315 VkCommandBufferResetFlags flags) {
6316 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006317
6318 // TODO: iterate over boundObjects and clear memory bindings
6319
6320 return ?
6321}
6322
6323
6324// Command buffer building functions
6325
6326@threadSafety("app")
6327cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006328 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006329 VkPipelineBindPoint pipelineBindPoint,
6330 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006331 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006332 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006333 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006334
Jesse Halld8bade02015-11-24 10:24:18 -08006335 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006336 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
6337 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
6338 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006339 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006340}
6341
6342@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006343cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006344 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006345 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006346 u32 viewportCount,
6347 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006348 commandBufferObject := GetCommandBuffer(commandBuffer)
6349 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006350}
6351
6352@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006353cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006354 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006355 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006356 u32 scissorCount,
6357 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006358 commandBufferObject := GetCommandBuffer(commandBuffer)
6359 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006360}
6361
6362@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006363cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006364 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006365 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006366 commandBufferObject := GetCommandBuffer(commandBuffer)
6367 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006368}
6369
6370@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006371cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006372 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006373 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006374 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006375 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006376 commandBufferObject := GetCommandBuffer(commandBuffer)
6377 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006378}
Jesse Halld27f6aa2015-08-15 17:58:48 -07006379
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006380@threadSafety("app")
6381cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006382 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006383 // TODO(jessehall): apic only supports 'const' on pointer types. Using
6384 // an annotation as a quick hack to pass this to the template without
6385 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08006386 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006387 commandBufferObject := GetCommandBuffer(commandBuffer)
6388 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006389}
6390
6391@threadSafety("app")
6392cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006393 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006394 f32 minDepthBounds,
6395 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006396 commandBufferObject := GetCommandBuffer(commandBuffer)
6397 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006398}
6399
6400@threadSafety("app")
6401cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006402 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006403 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08006404 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006405 commandBufferObject := GetCommandBuffer(commandBuffer)
6406 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006407}
6408
6409@threadSafety("app")
6410cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006411 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006412 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08006413 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006414 commandBufferObject := GetCommandBuffer(commandBuffer)
6415 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006416}
6417
6418@threadSafety("app")
6419cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006420 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006421 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08006422 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006423 commandBufferObject := GetCommandBuffer(commandBuffer)
6424 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006425}
6426
6427@threadSafety("app")
6428cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006429 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006430 VkPipelineBindPoint pipelineBindPoint,
6431 VkPipelineLayout layout,
6432 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006433 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006434 const VkDescriptorSet* pDescriptorSets,
6435 u32 dynamicOffsetCount,
6436 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006437 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006438
Jesse Hall03b6fe12015-11-24 12:44:21 -08006439 descriptorSets := pDescriptorSets[0:descriptorSetCount]
6440 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006441 descriptorSet := descriptorSets[i]
6442 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006443 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006444 }
6445
6446 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
6447 for i in (0 .. dynamicOffsetCount) {
6448 dynamicOffset := dynamicOffsets[i]
6449 }
6450
Jesse Halld8bade02015-11-24 10:24:18 -08006451 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006452 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
6453 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
6454 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006455 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006456}
6457
6458@threadSafety("app")
6459cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006460 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006461 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006462 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006463 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006464 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006465 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006466 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006467
Jesse Hall3fbc8562015-11-29 22:10:52 -08006468 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006469
Jesse Hall3fbc8562015-11-29 22:10:52 -08006470 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006471}
6472
6473@threadSafety("app")
6474cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006475 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006476 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006477 u32 bindingCount,
6478 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006479 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006480 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006481
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006482 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07006483 buffers := pBuffers[0:bindingCount]
6484 offsets := pOffsets[0:bindingCount]
6485 for i in (0 .. bindingCount) {
6486 buffer := buffers[i]
6487 offset := offsets[i]
6488 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006489 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006490
Jesse Hall3fbc8562015-11-29 22:10:52 -08006491 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006492 }
6493
Jesse Hall3fbc8562015-11-29 22:10:52 -08006494 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006495}
6496
6497@threadSafety("app")
6498cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006499 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006500 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006501 u32 instanceCount,
6502 u32 firstVertex,
6503 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006504 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006505
Jesse Hall3fbc8562015-11-29 22:10:52 -08006506 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006507}
6508
6509@threadSafety("app")
6510cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006511 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006512 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006513 u32 instanceCount,
6514 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006515 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006516 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006517 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006518
Jesse Hall3fbc8562015-11-29 22:10:52 -08006519 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006520}
6521
6522@threadSafety("app")
6523cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006524 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006525 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006526 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006527 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006528 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006529 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006530 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006531 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006532
Jesse Hall3fbc8562015-11-29 22:10:52 -08006533 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006534
Jesse Hall3fbc8562015-11-29 22:10:52 -08006535 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006536}
6537
6538@threadSafety("app")
6539cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006540 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006541 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006542 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006543 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006544 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006545 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006546 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006547 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006548
Jesse Hall3fbc8562015-11-29 22:10:52 -08006549 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006550
Jesse Hall3fbc8562015-11-29 22:10:52 -08006551 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006552}
6553
6554@threadSafety("app")
6555cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006556 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08006557 u32 groupCountX,
6558 u32 groupCountY,
6559 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006560 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006561
Jesse Hall3fbc8562015-11-29 22:10:52 -08006562 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006563}
6564
6565@threadSafety("app")
6566cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006567 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006568 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006569 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006570 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006571 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006572 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006573
Jesse Hall3fbc8562015-11-29 22:10:52 -08006574 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006575
Jesse Hall3fbc8562015-11-29 22:10:52 -08006576 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006577}
6578
6579@threadSafety("app")
6580cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006581 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006582 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006583 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006584 u32 regionCount,
6585 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006586 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006587 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006588 dstBufferObject := GetBuffer(dstBuffer)
6589 assert(commandBufferObject.device == srcBufferObject.device)
6590 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006591
6592 regions := pRegions[0:regionCount]
6593 for i in (0 .. regionCount) {
6594 region := regions[i]
6595 }
6596
Jesse Hall3fbc8562015-11-29 22:10:52 -08006597 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6598 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006599
Jesse Hall65ab5522015-11-30 00:07:16 -08006600 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006601}
6602
6603@threadSafety("app")
6604cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006605 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006606 VkImage srcImage,
6607 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006608 VkImage dstImage,
6609 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006610 u32 regionCount,
6611 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006612 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006613 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006614 dstImageObject := GetImage(dstImage)
6615 assert(commandBufferObject.device == srcImageObject.device)
6616 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006617
6618 regions := pRegions[0:regionCount]
6619 for i in (0 .. regionCount) {
6620 region := regions[i]
6621 }
6622
Jesse Hall3fbc8562015-11-29 22:10:52 -08006623 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6624 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006625
Jesse Hall65ab5522015-11-30 00:07:16 -08006626 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006627}
6628
6629@threadSafety("app")
6630cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006631 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006632 VkImage srcImage,
6633 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006634 VkImage dstImage,
6635 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006636 u32 regionCount,
6637 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006638 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006639 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006640 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006641 dstImageObject := GetImage(dstImage)
6642 assert(commandBufferObject.device == srcImageObject.device)
6643 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006644
6645 regions := pRegions[0:regionCount]
6646 for i in (0 .. regionCount) {
6647 region := regions[i]
6648 }
6649
Jesse Hall3fbc8562015-11-29 22:10:52 -08006650 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6651 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006652
Jesse Hall3fbc8562015-11-29 22:10:52 -08006653 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006654}
6655
6656@threadSafety("app")
6657cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006658 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006659 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006660 VkImage dstImage,
6661 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006662 u32 regionCount,
6663 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006664 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006665 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006666 dstImageObject := GetImage(dstImage)
6667 assert(commandBufferObject.device == srcBufferObject.device)
6668 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006669
6670 regions := pRegions[0:regionCount]
6671 for i in (0 .. regionCount) {
6672 region := regions[i]
6673 }
6674
Jesse Hall3fbc8562015-11-29 22:10:52 -08006675 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6676 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006677
Jesse Hall65ab5522015-11-30 00:07:16 -08006678 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006679}
6680
6681@threadSafety("app")
6682cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006683 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006684 VkImage srcImage,
6685 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006686 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006687 u32 regionCount,
6688 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006689 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006690 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006691 dstBufferObject := GetBuffer(dstBuffer)
6692 assert(commandBufferObject.device == srcImageObject.device)
6693 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006694
6695 regions := pRegions[0:regionCount]
6696 for i in (0 .. regionCount) {
6697 region := regions[i]
6698 }
6699
Jesse Hall3fbc8562015-11-29 22:10:52 -08006700 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6701 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006702
Jesse Hall65ab5522015-11-30 00:07:16 -08006703 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006704}
6705
6706@threadSafety("app")
6707cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006708 VkCommandBuffer commandBuffer,
6709 VkBuffer dstBuffer,
6710 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006711 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006712 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006713 commandBufferObject := GetCommandBuffer(commandBuffer)
6714 dstBufferObject := GetBuffer(dstBuffer)
6715 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006716
6717 data := pData[0:dataSize]
6718
Jesse Hall3fbc8562015-11-29 22:10:52 -08006719 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006720
Jesse Hall65ab5522015-11-30 00:07:16 -08006721 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006722}
6723
6724@threadSafety("app")
6725cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006726 VkCommandBuffer commandBuffer,
6727 VkBuffer dstBuffer,
6728 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006729 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006730 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006731 commandBufferObject := GetCommandBuffer(commandBuffer)
6732 dstBufferObject := GetBuffer(dstBuffer)
6733 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006734
Jesse Hall65ab5522015-11-30 00:07:16 -08006735 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006736}
6737
6738@threadSafety("app")
6739cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006740 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006741 VkImage image,
6742 VkImageLayout imageLayout,
6743 const VkClearColorValue* pColor,
6744 u32 rangeCount,
6745 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006746 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006747 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006748 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006749
6750 ranges := pRanges[0:rangeCount]
6751 for i in (0 .. rangeCount) {
6752 range := ranges[i]
6753 }
6754
Jesse Hall3fbc8562015-11-29 22:10:52 -08006755 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006756
Jesse Hall3fbc8562015-11-29 22:10:52 -08006757 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006758}
6759
6760@threadSafety("app")
6761cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006762 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006763 VkImage image,
6764 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006765 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006766 u32 rangeCount,
6767 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006768 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006769 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006770 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006771
6772 ranges := pRanges[0:rangeCount]
6773 for i in (0 .. rangeCount) {
6774 range := ranges[i]
6775 }
6776
Jesse Hall3fbc8562015-11-29 22:10:52 -08006777 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006778
Jesse Hall3fbc8562015-11-29 22:10:52 -08006779 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006780}
6781
6782@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006783cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006784 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006785 u32 attachmentCount,
6786 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006787 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006788 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006789 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006790
6791 rects := pRects[0:rectCount]
6792 for i in (0 .. rectCount) {
6793 rect := rects[i]
6794 }
6795
Jesse Hall3fbc8562015-11-29 22:10:52 -08006796 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006797}
6798
6799@threadSafety("app")
6800cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006801 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006802 VkImage srcImage,
6803 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006804 VkImage dstImage,
6805 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006806 u32 regionCount,
6807 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006808 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006809 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006810 dstImageObject := GetImage(dstImage)
6811 assert(commandBufferObject.device == srcImageObject.device)
6812 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006813
6814 regions := pRegions[0:regionCount]
6815 for i in (0 .. regionCount) {
6816 region := regions[i]
6817 }
6818
Jesse Hall3fbc8562015-11-29 22:10:52 -08006819 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6820 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006821
Jesse Hall3fbc8562015-11-29 22:10:52 -08006822 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006823}
6824
6825@threadSafety("app")
6826cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006827 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006828 VkEvent event,
6829 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006830 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006831 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006832 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006833}
6834
6835@threadSafety("app")
6836cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006837 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006838 VkEvent event,
6839 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006840 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006841 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006842 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006843}
6844
6845@threadSafety("app")
6846cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006847 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006848 u32 eventCount,
6849 const VkEvent* pEvents,
6850 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006851 VkPipelineStageFlags dstStageMask,
6852 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006853 const VkMemoryBarrier* pMemoryBarriers,
6854 u32 bufferMemoryBarrierCount,
6855 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6856 u32 imageMemoryBarrierCount,
6857 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006858 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006859
6860 events := pEvents[0:eventCount]
6861 for i in (0 .. eventCount) {
6862 event := events[i]
6863 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006864 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006865 }
6866
Jesse Hall3dd678a2016-01-08 21:52:01 -08006867 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006868 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006869 memoryBarrier := memoryBarriers[i]
6870 }
6871 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6872 for i in (0 .. bufferMemoryBarrierCount) {
6873 bufferMemoryBarrier := bufferMemoryBarriers[i]
6874 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6875 assert(bufferObject.device == commandBufferObject.device)
6876 }
6877 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6878 for i in (0 .. imageMemoryBarrierCount) {
6879 imageMemoryBarrier := imageMemoryBarriers[i]
6880 imageObject := GetImage(imageMemoryBarrier.image)
6881 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006882 }
6883}
6884
6885@threadSafety("app")
6886cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006887 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006888 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006889 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006890 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006891 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006892 const VkMemoryBarrier* pMemoryBarriers,
6893 u32 bufferMemoryBarrierCount,
6894 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6895 u32 imageMemoryBarrierCount,
6896 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006897 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006898
Jesse Hall3dd678a2016-01-08 21:52:01 -08006899 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006900 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006901 memoryBarrier := memoryBarriers[i]
6902 }
6903 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6904 for i in (0 .. bufferMemoryBarrierCount) {
6905 bufferMemoryBarrier := bufferMemoryBarriers[i]
6906 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6907 assert(bufferObject.device == commandBufferObject.device)
6908 }
6909 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6910 for i in (0 .. imageMemoryBarrierCount) {
6911 imageMemoryBarrier := imageMemoryBarriers[i]
6912 imageObject := GetImage(imageMemoryBarrier.image)
6913 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006914 }
6915}
6916
6917@threadSafety("app")
6918cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006919 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006920 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006921 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006922 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006923 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006924 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006925 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006926}
6927
6928@threadSafety("app")
6929cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006930 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006931 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006932 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006933 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006934 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006935 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006936}
6937
6938@threadSafety("app")
6939cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006940 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006941 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006942 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006943 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006944 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006945 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006946 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006947}
6948
6949@threadSafety("app")
6950cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006951 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006952 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006953 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006954 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006955 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006956 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006957 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006958}
6959
6960@threadSafety("app")
6961cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006962 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006963 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006964 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006965 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006966 VkBuffer dstBuffer,
6967 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006968 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006969 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006970 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006971 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006972 dstBufferObject := GetBuffer(dstBuffer)
6973 assert(commandBufferObject.device == queryPoolObject.device)
6974 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006975}
6976
6977cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006978 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006979 VkPipelineLayout layout,
6980 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006981 u32 offset,
6982 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006983 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006984 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006985 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006986 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006987}
6988
6989@threadSafety("app")
6990cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006991 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006992 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006993 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006994 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006995 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6996 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006997 assert(commandBufferObject.device == renderPassObject.device)
6998 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006999
Jesse Hall3fbc8562015-11-29 22:10:52 -08007000 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007001}
7002
7003cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007004 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08007005 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007006 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007007}
7008
7009@threadSafety("app")
7010cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007011 VkCommandBuffer commandBuffer) {
7012 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007013
Jesse Hall3fbc8562015-11-29 22:10:52 -08007014 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007015}
7016
7017cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007018 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08007019 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007020 const VkCommandBuffer* pCommandBuffers) {
7021 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007022
Jesse Hall3dd678a2016-01-08 21:52:01 -08007023 commandBuffers := pCommandBuffers[0:commandBufferCount]
7024 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007025 secondaryCommandBuffer := commandBuffers[i]
7026 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
7027 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007028 }
7029}
7030
Jesse Hallad250842017-03-10 18:35:38 -08007031@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08007032cmd void vkDestroySurfaceKHR(
7033 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08007034 VkSurfaceKHR surface,
7035 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007036 instanceObject := GetInstance(instance)
7037 surfaceObject := GetSurface(surface)
7038 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08007039
Jesse Hall1356b0d2015-11-23 17:24:58 -08007040 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08007041}
7042
Jesse Hallad250842017-03-10 18:35:38 -08007043@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08007044cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007045 VkPhysicalDevice physicalDevice,
7046 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007047 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08007048 VkBool32* pSupported) {
7049 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08007050
7051 return ?
7052}
7053
Jesse Hallad250842017-03-10 18:35:38 -08007054@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08007055cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
7056 VkPhysicalDevice physicalDevice,
7057 VkSurfaceKHR surface,
7058 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
7059 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7060
7061 surfaceCapabilities := ?
7062 pSurfaceCapabilities[0] = surfaceCapabilities
7063
7064 return ?
7065}
7066
Jesse Hallad250842017-03-10 18:35:38 -08007067@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08007068cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
7069 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007070 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007071 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007072 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08007073 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08007074
7075 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08007076 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08007077 surfaceFormats := pSurfaceFormats[0:count]
7078
7079 for i in (0 .. count) {
7080 surfaceFormat := ?
7081 surfaceFormats[i] = surfaceFormat
7082 }
7083
7084 return ?
7085}
7086
Jesse Hallad250842017-03-10 18:35:38 -08007087@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08007088cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
7089 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007090 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007091 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007092 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08007093 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08007094
7095 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08007096 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08007097 presentModes := pPresentModes[0:count]
7098
7099 for i in (0 .. count) {
7100 presentMode := ?
7101 presentModes[i] = presentMode
7102 }
7103
7104 return ?
7105}
7106
Jesse Hallad250842017-03-10 18:35:38 -08007107@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007108cmd VkResult vkCreateSwapchainKHR(
7109 VkDevice device,
7110 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007111 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08007112 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007113 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08007114 deviceObject := GetDevice(device)
7115
7116 swapchain := ?
7117 pSwapchain[0] = swapchain
7118 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
7119
7120 return ?
7121}
7122
Jesse Hallad250842017-03-10 18:35:38 -08007123@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08007124cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08007125 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08007126 VkSwapchainKHR swapchain,
7127 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08007128 deviceObject := GetDevice(device)
7129 swapchainObject := GetSwapchain(swapchain)
7130 assert(swapchainObject.device == device)
7131
7132 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08007133}
7134
Jesse Hallad250842017-03-10 18:35:38 -08007135@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007136cmd VkResult vkGetSwapchainImagesKHR(
7137 VkDevice device,
7138 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007139 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08007140 VkImage* pSwapchainImages) {
7141 deviceObject := GetDevice(device)
7142
7143 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08007144 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08007145 swapchainImages := pSwapchainImages[0:count]
7146
7147 for i in (0 .. count) {
7148 swapchainImage := ?
7149 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08007150 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08007151 }
7152
7153 return ?
7154}
7155
Jesse Hallad250842017-03-10 18:35:38 -08007156@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007157cmd VkResult vkAcquireNextImageKHR(
7158 VkDevice device,
7159 VkSwapchainKHR swapchain,
7160 u64 timeout,
7161 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007162 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08007163 u32* pImageIndex) {
7164 deviceObject := GetDevice(device)
7165 swapchainObject := GetSwapchain(swapchain)
7166
7167 imageIndex := ?
7168 pImageIndex[0] = imageIndex
7169
7170 return ?
7171}
7172
Jesse Hallad250842017-03-10 18:35:38 -08007173@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007174cmd VkResult vkQueuePresentKHR(
7175 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08007176 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08007177 queueObject := GetQueue(queue)
7178
7179 presentInfo := ?
7180 pPresentInfo[0] = presentInfo
7181
7182 return ?
7183}
7184
Jesse Hallad250842017-03-10 18:35:38 -08007185@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08007186cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
7187 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007188 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007189 VkDisplayPropertiesKHR* pProperties) {
7190 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7191 return ?
7192}
7193
Jesse Hallad250842017-03-10 18:35:38 -08007194@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007195cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
7196 VkPhysicalDevice physicalDevice,
7197 u32* pPropertyCount,
7198 VkDisplayPlanePropertiesKHR* pProperties) {
7199 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7200 return ?
7201}
7202
Jesse Hallad250842017-03-10 18:35:38 -08007203@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007204cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
7205 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08007206 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08007207 u32* pDisplayCount,
7208 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08007209 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7210 return ?
7211}
7212
Jesse Hallad250842017-03-10 18:35:38 -08007213@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08007214cmd VkResult vkGetDisplayModePropertiesKHR(
7215 VkPhysicalDevice physicalDevice,
7216 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007217 u32* pPropertyCount,
7218 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007219 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7220 return ?
7221}
7222
Jesse Hallad250842017-03-10 18:35:38 -08007223@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08007224cmd VkResult vkCreateDisplayModeKHR(
7225 VkPhysicalDevice physicalDevice,
7226 VkDisplayKHR display,
7227 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007228 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007229 VkDisplayModeKHR* pMode) {
7230 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7231 return ?
7232}
7233
Jesse Hallad250842017-03-10 18:35:38 -08007234@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007235cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007236 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08007237 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007238 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08007239 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007240 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7241 return ?
7242}
7243
Jesse Hallad250842017-03-10 18:35:38 -08007244@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007245cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
7246 VkInstance instance,
7247 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007248 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08007249 VkSurfaceKHR* pSurface) {
7250 return ?
7251}
7252
Jesse Hallad250842017-03-10 18:35:38 -08007253@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08007254cmd VkResult vkCreateSharedSwapchainsKHR(
7255 VkDevice device,
7256 u32 swapchainCount,
7257 const VkSwapchainCreateInfoKHR* pCreateInfos,
7258 const VkAllocationCallbacks* pAllocator,
7259 VkSwapchainKHR* pSwapchains) {
7260 return ?
7261}
7262
Jesse Hallad250842017-03-10 18:35:38 -08007263@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08007264cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007265 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007266 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007267 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007268 VkSurfaceKHR* pSurface) {
7269 instanceObject := GetInstance(instance)
7270 return ?
7271}
7272
Jesse Hallad250842017-03-10 18:35:38 -08007273@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08007274cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
7275 VkPhysicalDevice physicalDevice,
7276 u32 queueFamilyIndex,
7277 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08007278 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08007279 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7280 return ?
7281}
7282
Jesse Hallad250842017-03-10 18:35:38 -08007283@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007284cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007285 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007286 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007287 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007288 VkSurfaceKHR* pSurface) {
7289 instanceObject := GetInstance(instance)
7290 return ?
7291}
7292
Jesse Hallad250842017-03-10 18:35:38 -08007293@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08007294cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
7295 VkPhysicalDevice physicalDevice,
7296 u32 queueFamilyIndex,
7297 platform.xcb_connection_t* connection,
7298 platform.xcb_visualid_t visual_id) {
7299 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7300 return ?
7301}
7302
Jesse Hallad250842017-03-10 18:35:38 -08007303@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08007304cmd VkResult vkCreateWaylandSurfaceKHR(
7305 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007306 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007307 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007308 VkSurfaceKHR* pSurface) {
7309 instanceObject := GetInstance(instance)
7310 return ?
7311}
7312
Jesse Hallad250842017-03-10 18:35:38 -08007313@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08007314cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
7315 VkPhysicalDevice physicalDevice,
7316 u32 queueFamilyIndex,
7317 platform.wl_display* display) {
7318 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7319 return ?
7320}
7321
Jesse Hallad250842017-03-10 18:35:38 -08007322@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08007323cmd VkResult vkCreateMirSurfaceKHR(
7324 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007325 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007326 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007327 VkSurfaceKHR* pSurface) {
7328 instanceObject := GetInstance(instance)
7329 return ?
7330}
7331
Jesse Hallad250842017-03-10 18:35:38 -08007332@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08007333cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
7334 VkPhysicalDevice physicalDevice,
7335 u32 queueFamilyIndex,
7336 platform.MirConnection* connection) {
7337 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7338 return ?
7339}
7340
Jesse Hallad250842017-03-10 18:35:38 -08007341@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08007342cmd VkResult vkCreateAndroidSurfaceKHR(
7343 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007344 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007345 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007346 VkSurfaceKHR* pSurface) {
7347 instanceObject := GetInstance(instance)
7348 return ?
7349}
7350
Jesse Hallad250842017-03-10 18:35:38 -08007351@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08007352cmd VkResult vkCreateWin32SurfaceKHR(
7353 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007354 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007355 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007356 VkSurfaceKHR* pSurface) {
7357 instanceObject := GetInstance(instance)
7358 return ?
7359}
7360
Jesse Hallad250842017-03-10 18:35:38 -08007361@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08007362cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
7363 VkPhysicalDevice physicalDevice,
7364 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08007365 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08007366 return ?
7367}
7368
Jesse Hallad250842017-03-10 18:35:38 -08007369@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08007370@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08007371cmd VkResult vkGetSwapchainGrallocUsageANDROID(
7372 VkDevice device,
7373 VkFormat format,
7374 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08007375 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08007376 return ?
7377}
7378
Jesse Hallad250842017-03-10 18:35:38 -08007379@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08007380@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13007381cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
7382 VkDevice device,
7383 VkFormat format,
7384 VkImageUsageFlags imageUsage,
7385 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08007386 u64* grallocConsumerUsage,
7387 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13007388 return ?
7389}
7390
Jesse Hallad250842017-03-10 18:35:38 -08007391@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08007392cmd VkResult vkAcquireImageANDROID(
7393 VkDevice device,
7394 VkImage image,
7395 int nativeFenceFd,
7396 VkSemaphore semaphore,
7397 VkFence fence) {
7398 return ?
7399}
7400
Jesse Hallad250842017-03-10 18:35:38 -08007401@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08007402cmd VkResult vkQueueSignalReleaseImageANDROID(
7403 VkQueue queue,
7404 u32 waitSemaphoreCount,
7405 const VkSemaphore* pWaitSemaphores,
7406 VkImage image,
7407 int* pNativeFenceFd) {
7408 return ?
7409}
7410
Jesse Hallad250842017-03-10 18:35:38 -08007411@extension("VK_EXT_debug_report") // 12
7412@external type void* PFN_vkDebugReportCallbackEXT
7413@extension("VK_EXT_debug_report") // 12
7414@pfn cmd VkBool32 vkDebugReportCallbackEXT(
7415 VkDebugReportFlagsEXT flags,
7416 VkDebugReportObjectTypeEXT objectType,
7417 u64 object,
7418 platform.size_t location,
7419 s32 messageCode,
7420 const char* pLayerPrefix,
7421 const char* pMessage,
7422 void* pUserData) {
7423 return ?
7424}
7425
7426@extension("VK_EXT_debug_report") // 12
7427cmd VkResult vkCreateDebugReportCallbackEXT(
7428 VkInstance instance,
7429 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
7430 const VkAllocationCallbacks* pAllocator,
7431 VkDebugReportCallbackEXT* pCallback) {
7432 return ?
7433}
7434
7435@extension("VK_EXT_debug_report") // 12
7436cmd void vkDestroyDebugReportCallbackEXT(
7437 VkInstance instance,
7438 VkDebugReportCallbackEXT callback,
7439 const VkAllocationCallbacks* pAllocator) {
7440}
7441
7442@extension("VK_EXT_debug_report") // 12
7443cmd void vkDebugReportMessageEXT(
7444 VkInstance instance,
7445 VkDebugReportFlagsEXT flags,
7446 VkDebugReportObjectTypeEXT objectType,
7447 u64 object,
7448 platform.size_t location,
7449 s32 messageCode,
7450 const char* pLayerPrefix,
7451 const char* pMessage) {
7452}
7453
7454@extension("VK_EXT_debug_marker") // 23
7455cmd VkResult vkDebugMarkerSetObjectTagEXT(
7456 VkDevice device,
7457 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
7458 return ?
7459}
7460
7461@extension("VK_EXT_debug_marker") // 23
7462cmd VkResult vkDebugMarkerSetObjectNameEXT(
7463 VkDevice device,
7464 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
7465 return ?
7466}
7467
7468@extension("VK_EXT_debug_marker") // 23
7469cmd void vkCmdDebugMarkerBeginEXT(
7470 VkCommandBuffer commandBuffer,
7471 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
7472}
7473
7474@extension("VK_EXT_debug_marker") // 23
7475cmd void vkCmdDebugMarkerEndEXT(
7476 VkCommandBuffer commandBuffer) {
7477}
7478
7479@extension("VK_EXT_debug_marker") // 23
7480cmd void vkCmdDebugMarkerInsertEXT(
7481 VkCommandBuffer commandBuffer,
7482 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
7483}
7484
7485@extension("VK_AMD_draw_indirect_count") // 34
7486cmd void vkCmdDrawIndirectCountAMD(
7487 VkCommandBuffer commandBuffer,
7488 VkBuffer buffer,
7489 VkDeviceSize offset,
7490 VkBuffer countBuffer,
7491 VkDeviceSize countBufferOffset,
7492 u32 maxDrawCount,
7493 u32 stride) {
7494}
7495
7496@extension("VK_AMD_draw_indirect_count") // 34
7497cmd void vkCmdDrawIndexedIndirectCountAMD(
7498 VkCommandBuffer commandBuffer,
7499 VkBuffer buffer,
7500 VkDeviceSize offset,
7501 VkBuffer countBuffer,
7502 VkDeviceSize countBufferOffset,
7503 u32 maxDrawCount,
7504 u32 stride) {
7505}
7506
7507@extension("VK_NV_external_memory_capabilities") // 56
7508cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
7509 VkPhysicalDevice physicalDevice,
7510 VkFormat format,
7511 VkImageType type,
7512 VkImageTiling tiling,
7513 VkImageUsageFlags usage,
7514 VkImageCreateFlags flags,
7515 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
7516 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
7517 return ?
7518}
7519
7520@extension("VK_NV_external_memory_win32") // 58
7521cmd VkResult vkGetMemoryWin32HandleNV(
7522 VkDevice device,
7523 VkDeviceMemory memory,
7524 VkExternalMemoryHandleTypeFlagsNV handleType,
7525 platform.HANDLE* pHandle) {
7526 return ?
7527}
7528
7529@extension("VK_KHR_get_physical_device_properties2") // 60
7530cmd void vkGetPhysicalDeviceFeatures2KHR(
7531 VkPhysicalDevice physicalDevice,
7532 VkPhysicalDeviceFeatures2KHR* pFeatures) {
7533}
7534
7535@extension("VK_KHR_get_physical_device_properties2") // 60
7536cmd void vkGetPhysicalDeviceProperties2KHR(
7537 VkPhysicalDevice physicalDevice,
7538 VkPhysicalDeviceProperties2KHR* pProperties) {
7539}
7540
7541@extension("VK_KHR_get_physical_device_properties2") // 60
7542cmd void vkGetPhysicalDeviceFormatProperties2KHR(
7543 VkPhysicalDevice physicalDevice,
7544 VkFormat format,
7545 VkFormatProperties2KHR* pFormatProperties) {
7546}
7547
7548@extension("VK_KHR_get_physical_device_properties2") // 60
7549cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
7550 VkPhysicalDevice physicalDevice,
7551 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
7552 VkImageFormatProperties2KHR* pImageFormatProperties) {
7553 return ?
7554}
7555
7556@extension("VK_KHR_get_physical_device_properties2") // 60
7557cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
7558 VkPhysicalDevice physicalDevice,
7559 u32* pQueueFamilyPropertyCount,
7560 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
7561}
7562
7563@extension("VK_KHR_get_physical_device_properties2") // 60
7564cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
7565 VkPhysicalDevice physicalDevice,
7566 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
7567}
7568
7569@extension("VK_KHR_get_physical_device_properties2") // 60
7570cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
7571 VkPhysicalDevice physicalDevice,
7572 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7573 u32* pPropertyCount,
7574 VkSparseImageFormatProperties2KHR* pProperties) {
7575}
7576
7577@extension("VK_KHX_device_group") // 61
7578cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7579 VkDevice device,
7580 u32 heapIndex,
7581 u32 localDeviceIndex,
7582 u32 remoteDeviceIndex,
7583 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7584}
7585
7586@extension("VK_KHX_device_group") // 61
7587cmd VkResult vkBindBufferMemory2KHX(
7588 VkDevice device,
7589 u32 bindInfoCount,
7590 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7591 return ?
7592}
7593
7594@extension("VK_KHX_device_group") // 61
7595cmd VkResult vkBindImageMemory2KHX(
7596 VkDevice device,
7597 u32 bindInfoCount,
7598 const VkBindImageMemoryInfoKHX* pBindInfos) {
7599 return ?
7600}
7601
7602@extension("VK_KHX_device_group") // 61
7603cmd void vkCmdSetDeviceMaskKHX(
7604 VkCommandBuffer commandBuffer,
7605 u32 deviceMask) {
7606}
7607
7608@extension("VK_KHX_device_group") // 61
7609cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7610 VkDevice device,
7611 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7612 return ?
7613}
7614
7615@extension("VK_KHX_device_group") // 61
7616cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7617 VkDevice device,
7618 VkSurfaceKHR surface,
7619 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7620 return ?
7621}
7622
7623@extension("VK_KHX_device_group") // 61
7624cmd VkResult vkAcquireNextImage2KHX(
7625 VkDevice device,
7626 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7627 u32* pImageIndex) {
7628 return ?
7629}
7630
7631@extension("VK_KHX_device_group") // 61
7632cmd void vkCmdDispatchBaseKHX(
7633 VkCommandBuffer commandBuffer,
7634 u32 baseGroupX,
7635 u32 baseGroupY,
7636 u32 baseGroupZ,
7637 u32 groupCountX,
7638 u32 groupCountY,
7639 u32 groupCountZ) {
7640}
7641
7642@extension("VK_KHX_device_group") // 61
7643cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7644 VkPhysicalDevice physicalDevice,
7645 VkSurfaceKHR surface,
7646 u32* pRectCount,
7647 VkRect2D* pRects) {
7648 return ?
7649}
7650
7651@extension("VK_NN_vi_surface") // 63
7652cmd VkResult vkCreateViSurfaceNN(
7653 VkInstance instance,
7654 const VkViSurfaceCreateInfoNN* pCreateInfo,
7655 const VkAllocationCallbacks* pAllocator,
7656 VkSurfaceKHR* pSurface) {
7657 return ?
7658}
7659
7660@extension("VK_KHR_maintenance1") // 70
7661cmd void vkTrimCommandPoolKHR(
7662 VkDevice device,
7663 VkCommandPool commandPool,
7664 VkCommandPoolTrimFlagsKHR flags) {
7665}
7666
7667@extension("VK_KHX_device_group_creation") // 71
7668cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7669 VkInstance instance,
7670 u32* pPhysicalDeviceGroupCount,
7671 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7672 return ?
7673}
7674
Jesse Hall9947eab2017-08-28 12:10:06 -07007675@extension("VK_KHR_external_memory_capabilities") // 72
7676cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007677 VkPhysicalDevice physicalDevice,
Jesse Hall9947eab2017-08-28 12:10:06 -07007678 const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo,
7679 VkExternalBufferPropertiesKHR* pExternalBufferProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007680}
7681
Jesse Hall9947eab2017-08-28 12:10:06 -07007682@extension("VK_KHR_external_memory_win32") // 74
7683cmd VkResult vkGetMemoryWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007684 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007685 const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007686 platform.HANDLE* pHandle) {
7687 return ?
7688}
7689
Jesse Hall9947eab2017-08-28 12:10:06 -07007690@extension("VK_KHR_external_memory_win32") // 74
7691cmd VkResult vkGetMemoryWin32HandlePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007692 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007693 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08007694 platform.HANDLE handle,
Jesse Hall9947eab2017-08-28 12:10:06 -07007695 VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007696 return ?
7697}
7698
Jesse Hall9947eab2017-08-28 12:10:06 -07007699@extension("VK_KHR_external_memory_fd") // 75
7700cmd VkResult vkGetMemoryFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007701 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007702 const VkMemoryGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007703 s32* pFd) {
7704 return ?
7705}
7706
Jesse Hall9947eab2017-08-28 12:10:06 -07007707@extension("VK_KHR_external_memory_fd") // 75
7708cmd VkResult vkGetMemoryFdPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007709 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007710 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08007711 s32 fd,
Jesse Hall9947eab2017-08-28 12:10:06 -07007712 VkMemoryFdPropertiesKHR* pMemoryFdProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007713 return ?
7714}
7715
Jesse Hall9947eab2017-08-28 12:10:06 -07007716@extension("VK_KHR_external_semaphore_capabilities") // 77
7717cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007718 VkPhysicalDevice physicalDevice,
Jesse Hall9947eab2017-08-28 12:10:06 -07007719 const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
7720 VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007721}
7722
Jesse Hall9947eab2017-08-28 12:10:06 -07007723@extension("VK_KHR_external_semaphore_win32") // 79
7724cmd VkResult vkImportSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007725 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007726 const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08007727 return ?
7728}
7729
Jesse Hall9947eab2017-08-28 12:10:06 -07007730@extension("VK_KHR_external_semaphore_win32") // 79
7731cmd VkResult vkGetSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007732 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007733 const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007734 platform.HANDLE* pHandle) {
7735 return ?
7736}
7737
Jesse Hall9947eab2017-08-28 12:10:06 -07007738@extension("VK_KHR_external_semaphore_fd") // 80
7739cmd VkResult vkImportSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007740 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007741 const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08007742 return ?
7743}
7744
Jesse Hall9947eab2017-08-28 12:10:06 -07007745@extension("VK_KHR_external_semaphore_fd") // 80
7746cmd VkResult vkGetSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007747 VkDevice device,
Jesse Hall9947eab2017-08-28 12:10:06 -07007748 const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007749 s32* pFd) {
7750 return ?
7751}
7752
7753@extension("VK_KHR_push_descriptor") // 81
7754cmd void vkCmdPushDescriptorSetKHR(
7755 VkCommandBuffer commandBuffer,
7756 VkPipelineBindPoint pipelineBindPoint,
7757 VkPipelineLayout layout,
7758 u32 set,
7759 u32 descriptorWriteCount,
7760 const VkWriteDescriptorSet* pDescriptorWrites) {
7761}
7762
7763@extension("VK_KHR_descriptor_update_template") // 86
7764cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7765 VkDevice device,
7766 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7767 const VkAllocationCallbacks* pAllocator,
7768 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7769 return ?
7770}
7771
7772@extension("VK_KHR_descriptor_update_template") // 86
7773cmd void vkDestroyDescriptorUpdateTemplateKHR(
7774 VkDevice device,
7775 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7776 const VkAllocationCallbacks* pAllocator) {
7777}
7778
7779@extension("VK_KHR_descriptor_update_template") // 86
7780cmd void vkUpdateDescriptorSetWithTemplateKHR(
7781 VkDevice device,
7782 VkDescriptorSet descriptorSet,
7783 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7784 const void* pData) {
7785}
7786
7787@extension("VK_KHR_descriptor_update_template") // 86
7788cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7789 VkCommandBuffer commandBuffer,
7790 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7791 VkPipelineLayout layout,
7792 u32 set,
7793 const void* pData) {
7794}
7795
7796@extension("VK_NVX_device_generated_commands") // 87
7797cmd void vkCmdProcessCommandsNVX(
7798 VkCommandBuffer commandBuffer,
7799 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7800}
7801
7802@extension("VK_NVX_device_generated_commands") // 87
7803cmd void vkCmdReserveSpaceForCommandsNVX(
7804 VkCommandBuffer commandBuffer,
7805 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7806}
7807
7808@extension("VK_NVX_device_generated_commands") // 87
7809cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7810 VkDevice device,
7811 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7812 const VkAllocationCallbacks* pAllocator,
7813 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7814 return ?
7815}
7816
7817@extension("VK_NVX_device_generated_commands") // 87
7818cmd void vkDestroyIndirectCommandsLayoutNVX(
7819 VkDevice device,
7820 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7821 const VkAllocationCallbacks* pAllocator) {
7822}
7823
7824@extension("VK_NVX_device_generated_commands") // 87
7825cmd VkResult vkCreateObjectTableNVX(
7826 VkDevice device,
7827 const VkObjectTableCreateInfoNVX* pCreateInfo,
7828 const VkAllocationCallbacks* pAllocator,
7829 VkObjectTableNVX* pObjectTable) {
7830 return ?
7831}
7832
7833@extension("VK_NVX_device_generated_commands") // 87
7834cmd void vkDestroyObjectTableNVX(
7835 VkDevice device,
7836 VkObjectTableNVX objectTable,
7837 const VkAllocationCallbacks* pAllocator) {
7838}
7839
7840@extension("VK_NVX_device_generated_commands") // 87
7841cmd VkResult vkRegisterObjectsNVX(
7842 VkDevice device,
7843 VkObjectTableNVX objectTable,
7844 u32 objectCount,
7845 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7846 const u32* pObjectIndices) {
7847 return ?
7848}
7849
7850@extension("VK_NVX_device_generated_commands") // 87
7851cmd VkResult vkUnregisterObjectsNVX(
7852 VkDevice device,
7853 VkObjectTableNVX objectTable,
7854 u32 objectCount,
7855 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7856 const u32* pObjectIndices) {
7857 return ?
7858}
7859
7860@extension("VK_NVX_device_generated_commands") // 87
7861cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7862 VkPhysicalDevice physicalDevice,
7863 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7864 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7865}
7866
7867@extension("VK_NV_clip_space_w_scaling") // 88
7868cmd void vkCmdSetViewportWScalingNV(
7869 VkCommandBuffer commandBuffer,
7870 u32 firstViewport,
7871 u32 viewportCount,
7872 const VkViewportWScalingNV* pViewportWScalings) {
7873}
7874
7875@extension("VK_EXT_direct_mode_display") // 89
7876cmd VkResult vkReleaseDisplayEXT(
7877 VkPhysicalDevice physicalDevice,
7878 VkDisplayKHR display) {
7879 return ?
7880}
7881
7882@extension("VK_EXT_acquire_xlib_display") // 90
7883cmd VkResult vkAcquireXlibDisplayEXT(
7884 VkPhysicalDevice physicalDevice,
7885 platform.Display* dpy,
7886 VkDisplayKHR display) {
7887 return ?
7888}
7889
7890@extension("VK_EXT_acquire_xlib_display") // 90
7891cmd VkResult vkGetRandROutputDisplayEXT(
7892 VkPhysicalDevice physicalDevice,
7893 platform.Display* dpy,
7894 platform.RROutput rrOutput,
7895 VkDisplayKHR* pDisplay) {
7896 return ?
7897}
7898
7899@extension("VK_EXT_display_surface_counter") // 91
7900cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7901 VkPhysicalDevice physicalDevice,
7902 VkSurfaceKHR surface,
7903 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7904 return ?
7905}
7906
7907@extension("VK_EXT_display_control") // 92
7908cmd VkResult vkDisplayPowerControlEXT(
7909 VkDevice device,
7910 VkDisplayKHR display,
7911 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7912 return ?
7913}
7914
7915@extension("VK_EXT_display_control") // 92
7916cmd VkResult vkRegisterDeviceEventEXT(
7917 VkDevice device,
7918 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7919 const VkAllocationCallbacks* pAllocator,
7920 VkFence* pFence) {
7921 return ?
7922}
7923
7924@extension("VK_EXT_display_control") // 92
7925cmd VkResult vkRegisterDisplayEventEXT(
7926 VkDevice device,
7927 VkDisplayKHR display,
7928 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7929 const VkAllocationCallbacks* pAllocator,
7930 VkFence* pFence) {
7931 return ?
7932}
7933
7934@extension("VK_EXT_display_control") // 92
7935cmd VkResult vkGetSwapchainCounterEXT(
7936 VkDevice device,
7937 VkSwapchainKHR swapchain,
7938 VkSurfaceCounterFlagBitsEXT counter,
7939 u64* pCounterValue) {
7940 return ?
7941}
7942
7943@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007944cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007945 VkDevice device,
7946 VkSwapchainKHR swapchain,
7947 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007948 deviceObject := GetDevice(device)
7949 swapchainObject := GetSwapchain(swapchain)
7950
7951 displayTimingProperties := ?
7952 pDisplayTimingProperties[0] = displayTimingProperties
7953
7954 return ?
7955}
7956
Jesse Hallad250842017-03-10 18:35:38 -08007957@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007958cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007959 VkDevice device,
7960 VkSwapchainKHR swapchain,
7961 u32* pPresentationTimingCount,
7962 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007963 return ?
7964}
7965
Jesse Hallad250842017-03-10 18:35:38 -08007966@extension("VK_EXT_discard_rectangles") // 100
7967cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007968 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007969 u32 firstDiscardRectangle,
7970 u32 discardRectangleCount,
7971 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007972}
7973
Jesse Hallad250842017-03-10 18:35:38 -08007974@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007975cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007976 VkDevice device,
7977 u32 swapchainCount,
7978 const VkSwapchainKHR* pSwapchains,
7979 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08007980}
7981
Jesse Hallad250842017-03-10 18:35:38 -08007982@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007983cmd VkResult vkGetSwapchainStatusKHR(
7984 VkDevice device,
7985 VkSwapchainKHR swapchain) {
7986 return ?
7987}
7988
Jesse Hall9947eab2017-08-28 12:10:06 -07007989@extension("VK_KHR_external_fence_capabilities") // 113
7990cmd void vkGetPhysicalDeviceExternalFencePropertiesKHR(
7991 VkPhysicalDevice physicalDevice,
7992 const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
7993 VkExternalFencePropertiesKHR* pExternalFenceProperties) {
7994}
7995
7996@extension("VK_KHR_external_fence_win32") // 115
7997cmd VkResult vkImportFenceWin32HandleKHR(
7998 VkDevice device,
7999 const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) {
8000 return ?
8001}
8002
8003@extension("VK_KHR_external_fence_win32") // 115
8004cmd VkResult vkGetFenceWin32HandleKHR(
8005 VkDevice device,
8006 const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
8007 platform.HANDLE* pHandle) {
8008 return ?
8009}
8010
8011@extension("VK_KHR_external_fence_fd") // 116
8012cmd VkResult vkImportFenceFdKHR(
8013 VkDevice device,
8014 const VkImportFenceFdInfoKHR* pImportFenceFdInfo) {
8015 return ?
8016}
8017
8018@extension("VK_KHR_external_fence_fd") // 116
8019cmd VkResult vkGetFenceFdKHR(
8020 VkDevice device,
8021 const VkFenceGetFdInfoKHR* pGetFdInfo,
8022 int* pFd) {
8023 return ?
8024}
8025
Jesse Hall05556b12017-05-18 17:40:25 -07008026@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13008027cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
8028 VkPhysicalDevice physicalDevice,
8029 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
8030 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
8031 return ?
8032}
8033
Jesse Hall05556b12017-05-18 17:40:25 -07008034@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13008035cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
8036 VkPhysicalDevice physicalDevice,
8037 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
8038 u32* pSurfaceFormatCount,
8039 VkSurfaceFormat2KHR* pSurfaceFormats) {
8040 return ?
8041}
8042
Jesse Hallad250842017-03-10 18:35:38 -08008043@extension("VK_MVK_ios_surface") // 123
8044cmd VkResult vkCreateIOSSurfaceMVK(
8045 VkInstance instance,
8046 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
8047 const VkAllocationCallbacks* pAllocator,
8048 VkSurfaceKHR* pSurface) {
8049 return ?
8050}
8051
8052@extension("VK_MVK_macos_surface") // 124
8053cmd VkResult vkCreateMacOSSurfaceMVK(
8054 VkInstance instance,
8055 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
8056 const VkAllocationCallbacks* pAllocator,
8057 VkSurfaceKHR* pSurface) {
8058 return ?
8059}
8060
Jesse Hall9947eab2017-08-28 12:10:06 -07008061@extension("VK_KHR_get_memory_requirements2") // 147
8062cmd void vkGetImageMemoryRequirements2KHR(
8063 VkDevice device,
8064 const VkImageMemoryRequirementsInfo2KHR* pInfo,
8065 VkMemoryRequirements2KHR* pMemoryRequirements) {
8066}
8067
8068@extension("VK_KHR_get_memory_requirements2") // 147
8069cmd void vkGetBufferMemoryRequirements2KHR(
8070 VkDevice device,
8071 const VkBufferMemoryRequirementsInfo2KHR* pInfo,
8072 VkMemoryRequirements2KHR* pMemoryRequirements) {
8073}
8074
8075@extension("VK_KHR_get_memory_requirements2") // 147
8076cmd void vkGetImageSparseMemoryRequirements2KHR(
8077 VkDevice device,
8078 const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
8079 u32* pSparseMemoryRequirementCount,
8080 VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) {
8081}
8082
Jesse Halld27f6aa2015-08-15 17:58:48 -07008083////////////////
8084// Validation //
8085////////////////
8086
8087extern void validate(string layerName, bool condition, string message)
8088
8089
8090/////////////////////////////
8091// Internal State Tracking //
8092/////////////////////////////
8093
8094StateObject State
8095
8096@internal class StateObject {
8097 // Dispatchable objects.
8098 map!(VkInstance, ref!InstanceObject) Instances
8099 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
8100 map!(VkDevice, ref!DeviceObject) Devices
8101 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08008102 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07008103
8104 // Non-dispatchable objects.
8105 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
8106 map!(VkBuffer, ref!BufferObject) Buffers
8107 map!(VkBufferView, ref!BufferViewObject) BufferViews
8108 map!(VkImage, ref!ImageObject) Images
8109 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07008110 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07008111 map!(VkPipeline, ref!PipelineObject) Pipelines
8112 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
8113 map!(VkSampler, ref!SamplerObject) Samplers
8114 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
8115 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
8116 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07008117 map!(VkFence, ref!FenceObject) Fences
8118 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
8119 map!(VkEvent, ref!EventObject) Events
8120 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
8121 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
8122 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
8123 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08008124 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08008125 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08008126 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07008127}
8128
8129@internal class InstanceObject {
8130}
8131
8132@internal class PhysicalDeviceObject {
8133 VkInstance instance
8134}
8135
8136@internal class DeviceObject {
8137 VkPhysicalDevice physicalDevice
8138}
8139
8140@internal class QueueObject {
8141 VkDevice device
8142 VkQueueFlags flags
8143}
8144
Jesse Hall3fbc8562015-11-29 22:10:52 -08008145@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07008146 VkDevice device
8147 map!(u64, VkDeviceMemory) boundObjects
8148 VkQueueFlags queueFlags
8149}
8150
8151@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008152 VkDevice device
8153 VkDeviceSize allocationSize
8154 map!(u64, VkDeviceSize) boundObjects
8155 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07008156}
8157
8158@internal class BufferObject {
8159 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08008160 VkDeviceMemory memory
8161 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07008162}
8163
8164@internal class BufferViewObject {
8165 VkDevice device
8166 VkBuffer buffer
8167}
8168
8169@internal class ImageObject {
8170 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08008171 VkDeviceMemory memory
8172 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07008173}
8174
8175@internal class ImageViewObject {
8176 VkDevice device
8177 VkImage image
8178}
8179
Jesse Halld27f6aa2015-08-15 17:58:48 -07008180@internal class ShaderObject {
8181 VkDevice device
8182}
8183
8184@internal class ShaderModuleObject {
8185 VkDevice device
8186}
8187
8188@internal class PipelineObject {
8189 VkDevice device
8190}
8191
8192@internal class PipelineLayoutObject {
8193 VkDevice device
8194}
8195
8196@internal class SamplerObject {
8197 VkDevice device
8198}
8199
8200@internal class DescriptorSetObject {
8201 VkDevice device
8202}
8203
8204@internal class DescriptorSetLayoutObject {
8205 VkDevice device
8206}
8207
8208@internal class DescriptorPoolObject {
8209 VkDevice device
8210}
8211
Jesse Halld27f6aa2015-08-15 17:58:48 -07008212@internal class FenceObject {
8213 VkDevice device
8214 bool signaled
8215}
8216
8217@internal class SemaphoreObject {
8218 VkDevice device
8219}
8220
8221@internal class EventObject {
8222 VkDevice device
8223}
8224
8225@internal class QueryPoolObject {
8226 VkDevice device
8227}
8228
8229@internal class FramebufferObject {
8230 VkDevice device
8231}
8232
8233@internal class RenderPassObject {
8234 VkDevice device
8235}
8236
8237@internal class PipelineCacheObject {
8238 VkDevice device
8239}
8240
Jesse Hall3fbc8562015-11-29 22:10:52 -08008241@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07008242 VkDevice device
8243}
8244
Jesse Hall1356b0d2015-11-23 17:24:58 -08008245@internal class SurfaceObject {
8246 VkInstance instance
8247}
8248
Michael Lentine88594d72015-11-12 12:49:45 -08008249@internal class SwapchainObject {
8250 VkDevice device
8251}
8252
Jesse Halld27f6aa2015-08-15 17:58:48 -07008253macro ref!InstanceObject GetInstance(VkInstance instance) {
8254 assert(instance in State.Instances)
8255 return State.Instances[instance]
8256}
8257
8258macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
8259 assert(physicalDevice in State.PhysicalDevices)
8260 return State.PhysicalDevices[physicalDevice]
8261}
8262
8263macro ref!DeviceObject GetDevice(VkDevice device) {
8264 assert(device in State.Devices)
8265 return State.Devices[device]
8266}
8267
8268macro ref!QueueObject GetQueue(VkQueue queue) {
8269 assert(queue in State.Queues)
8270 return State.Queues[queue]
8271}
8272
Jesse Hall3fbc8562015-11-29 22:10:52 -08008273macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
8274 assert(commandBuffer in State.CommandBuffers)
8275 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07008276}
8277
Jesse Hall3fbc8562015-11-29 22:10:52 -08008278macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
8279 assert(memory in State.DeviceMemories)
8280 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07008281}
8282
8283macro ref!BufferObject GetBuffer(VkBuffer buffer) {
8284 assert(buffer in State.Buffers)
8285 return State.Buffers[buffer]
8286}
8287
8288macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
8289 assert(bufferView in State.BufferViews)
8290 return State.BufferViews[bufferView]
8291}
8292
8293macro ref!ImageObject GetImage(VkImage image) {
8294 assert(image in State.Images)
8295 return State.Images[image]
8296}
8297
8298macro ref!ImageViewObject GetImageView(VkImageView imageView) {
8299 assert(imageView in State.ImageViews)
8300 return State.ImageViews[imageView]
8301}
8302
Jesse Halld27f6aa2015-08-15 17:58:48 -07008303macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
8304 assert(shaderModule in State.ShaderModules)
8305 return State.ShaderModules[shaderModule]
8306}
8307
8308macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
8309 assert(pipeline in State.Pipelines)
8310 return State.Pipelines[pipeline]
8311}
8312
8313macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
8314 assert(pipelineLayout in State.PipelineLayouts)
8315 return State.PipelineLayouts[pipelineLayout]
8316}
8317
8318macro ref!SamplerObject GetSampler(VkSampler sampler) {
8319 assert(sampler in State.Samplers)
8320 return State.Samplers[sampler]
8321}
8322
8323macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
8324 assert(descriptorSet in State.DescriptorSets)
8325 return State.DescriptorSets[descriptorSet]
8326}
8327
8328macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
8329 assert(descriptorSetLayout in State.DescriptorSetLayouts)
8330 return State.DescriptorSetLayouts[descriptorSetLayout]
8331}
8332
8333macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
8334 assert(descriptorPool in State.DescriptorPools)
8335 return State.DescriptorPools[descriptorPool]
8336}
8337
Jesse Halld27f6aa2015-08-15 17:58:48 -07008338macro ref!FenceObject GetFence(VkFence fence) {
8339 assert(fence in State.Fences)
8340 return State.Fences[fence]
8341}
8342
8343macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
8344 assert(semaphore in State.Semaphores)
8345 return State.Semaphores[semaphore]
8346}
8347
8348macro ref!EventObject GetEvent(VkEvent event) {
8349 assert(event in State.Events)
8350 return State.Events[event]
8351}
8352
8353macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
8354 assert(queryPool in State.QueryPools)
8355 return State.QueryPools[queryPool]
8356}
8357
8358macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
8359 assert(framebuffer in State.Framebuffers)
8360 return State.Framebuffers[framebuffer]
8361}
8362
8363macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
8364 assert(renderPass in State.RenderPasses)
8365 return State.RenderPasses[renderPass]
8366}
8367
8368macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
8369 assert(pipelineCache in State.PipelineCaches)
8370 return State.PipelineCaches[pipelineCache]
8371}
8372
Jesse Hall3fbc8562015-11-29 22:10:52 -08008373macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
8374 assert(commandPool in State.CommandPools)
8375 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07008376}
Michael Lentine88594d72015-11-12 12:49:45 -08008377
Jesse Hall1356b0d2015-11-23 17:24:58 -08008378macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
8379 assert(surface in State.Surfaces)
8380 return State.Surfaces[surface]
8381}
8382
Michael Lentine88594d72015-11-12 12:49:45 -08008383macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
8384 assert(swapchain in State.Swapchains)
8385 return State.Swapchains[swapchain]
8386}
Jesse Halld8bade02015-11-24 10:24:18 -08008387
8388macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
8389 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
8390}