blob: cae1992501c13bd2e277d4fc686873ecf246c637 [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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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 Hall9492f992017-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,
Michael Lentine88594d72015-11-12 12:49:45 -08001427}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001428
Jesse Hallad250842017-03-10 18:35:38 -08001429@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001430enum VkDebugReportObjectTypeEXT {
1431 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1432 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1433 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1434 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1435 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1436 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1437 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1438 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1439 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1440 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1441 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1442 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1443 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1444 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1445 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1446 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1447 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1448 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1449 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1450 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1451 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1452 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1453 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1454 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1455 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1456 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1457 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1458 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001459 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001460 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1461 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1462 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1463 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001464
1465 //extension("VK_KHR_descriptor_update_template") // 86
1466 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001467}
1468
Jesse Hallad250842017-03-10 18:35:38 -08001469@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001470enum VkRasterizationOrderAMD {
1471 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1472 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1473}
1474
Jesse Hallad250842017-03-10 18:35:38 -08001475@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001476enum VkValidationCheckEXT {
1477 VK_VALIDATION_CHECK_ALL_EXT = 0,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001478 VK_VALIDATION_CHECK_SHADERS_EXT = 1,
Chris Forbes289cb792016-12-30 15:03:55 +13001479}
1480
Jesse Hallad250842017-03-10 18:35:38 -08001481@extension("VK_KHR_descriptor_update_template") // 86
1482enum VkDescriptorUpdateTemplateTypeKHR {
1483 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1484 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1485}
1486
1487@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001488enum VkIndirectCommandsTokenTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001489 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0,
1490 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1,
1491 VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2,
1492 VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3,
1493 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4,
1494 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5,
1495 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6,
1496 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001497}
1498
Jesse Hallad250842017-03-10 18:35:38 -08001499@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001500enum VkObjectEntryTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001501 VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0,
1502 VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1,
1503 VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2,
1504 VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3,
1505 VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001506}
Jesse Hall715b86a2016-01-16 16:34:29 -08001507
Jesse Hallad250842017-03-10 18:35:38 -08001508@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001509enum VkDisplayPowerStateEXT {
1510 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1511 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1512 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1513}
1514
Jesse Hallad250842017-03-10 18:35:38 -08001515@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001516enum VkDeviceEventTypeEXT {
1517 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1518}
1519
Jesse Hallad250842017-03-10 18:35:38 -08001520@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001521enum VkDisplayEventTypeEXT {
1522 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1523}
1524
Jesse Hallad250842017-03-10 18:35:38 -08001525@extension("VK_NV_viewport_swizzle") // 99
1526enum VkViewportCoordinateSwizzleNV {
1527 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1528 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1529 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1530 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1531 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1532 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1533 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1534 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1535}
1536
1537@extension("VK_EXT_discard_rectangles") // 100
1538enum VkDiscardRectangleModeEXT {
1539 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1540 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1541}
1542
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001543@extension("VK_EXT_sampler_filter_minmax") // 131
1544enum VkSamplerReductionModeEXT {
1545 VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
1546 VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
1547 VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
1548}
1549
1550@extension("VK_EXT_blend_operation_advanced") // 149
1551enum VkBlendOverlapEXT {
1552 VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
1553 VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
1554 VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
1555}
1556
1557@extension("VK_NV_framebuffer_mixed_samples") // 153
1558enum VkCoverageModulationModeNV {
1559 VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
1560 VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
1561 VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
1562 VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
1563}
1564
Jesse Halld27f6aa2015-08-15 17:58:48 -07001565/////////////////
1566// Bitfields //
1567/////////////////
1568
Jesse Halld27f6aa2015-08-15 17:58:48 -07001569/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001570type VkFlags VkQueueFlags
1571bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001572 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1573 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001574 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001575 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001576}
1577
1578/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001579type VkFlags VkMemoryPropertyFlags
1580bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001581 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1582 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1583 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1584 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1585 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001586}
1587
1588/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001589type VkFlags VkMemoryHeapFlags
1590bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001591 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001592
1593 //@extension("VK_KHX_device_group_creation") // 71
1594 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001595}
1596
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001597/// Access flags
1598type VkFlags VkAccessFlags
1599bitfield VkAccessFlagBits {
1600 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1601 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1602 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1603 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1604 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1605 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1606 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1607 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1608 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1609 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1610 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1611 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1612 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1613 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1614 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1615 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1616 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001617
Jesse Hallad250842017-03-10 18:35:38 -08001618 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001619 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001620 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001621
1622 //@extension("VK_EXT_blend_operation_advanced") // 149
1623 VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001624}
1625
1626/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001627type VkFlags VkBufferUsageFlags
1628bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001629 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1630 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001631 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1632 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1633 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1634 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1635 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1636 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1637 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1638}
1639
1640/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001641type VkFlags VkBufferCreateFlags
1642bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001643 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001644 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1645 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1646}
1647
1648/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001649type VkFlags VkShaderStageFlags
1650bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001651 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001652 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1653 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001654 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1655 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1656 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001657 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001658
1659 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1660}
1661
Jesse Hallfbf97b02015-11-20 14:17:03 -08001662/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001663type VkFlags VkDescriptorPoolCreateFlags
1664bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001665 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1666}
1667
1668/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001669type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001670//bitfield VkDescriptorPoolResetFlagBits {
1671//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001672
Jesse Halld27f6aa2015-08-15 17:58:48 -07001673/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001674type VkFlags VkImageUsageFlags
1675bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001676 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1677 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001678 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1679 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1680 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001681 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001682 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1683 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1684}
1685
1686/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001687type VkFlags VkImageCreateFlags
1688bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001689 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001690 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1691 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 -07001692 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1693 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 -08001694
Jesse Hallad250842017-03-10 18:35:38 -08001695 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001696 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001697
1698 //@extension("VK_KHX_device_group") // 61
1699 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001700}
1701
Jesse Hallb00daad2015-11-29 19:46:20 -08001702/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001703type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001704//bitfield VkImageViewCreateFlagBits {
1705//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001706
1707/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001708type VkFlags VkPipelineCreateFlags
1709bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001710 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1711 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1712 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001713
1714 //@extension("VK_KHX_device_group") // 61
1715 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1716 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001717}
1718
Jesse Hall65ab5522015-11-30 00:07:16 -08001719/// Color component flags
1720type VkFlags VkColorComponentFlags
1721bitfield VkColorComponentFlagBits {
1722 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1723 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1724 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1725 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001726}
1727
1728/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001729type VkFlags VkFenceCreateFlags
1730bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001731 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1732}
1733
1734/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001735type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001736//bitfield VkSemaphoreCreateFlagBits {
1737//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001738
1739/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001740type VkFlags VkFormatFeatureFlags
1741bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001742 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1743 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1744 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1745 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1746 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1747 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1748 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1749 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1750 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1751 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001752 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1753 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 -08001754 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001755
Jesse Hallad250842017-03-10 18:35:38 -08001756 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001757 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001758
Jesse Hallad250842017-03-10 18:35:38 -08001759 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001760 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1761 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001762
1763 //@extension("VK_EXT_sampler_filter_minmax") // 131
1764 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001765}
1766
1767/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001768type VkFlags VkQueryControlFlags
1769bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001770 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001771}
1772
1773/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001774type VkFlags VkQueryResultFlags
1775bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001776 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1777 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1778 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1779 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1780}
1781
1782/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001783type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001784//bitfield VkShaderModuleCreateFlagBits {
1785//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001786
Jesse Halld27f6aa2015-08-15 17:58:48 -07001787/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001788type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001789//bitfield VkEventCreateFlagBits {
1790//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001791
Jesse Halla15a4bf2015-11-19 22:48:02 -08001792/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001793type VkFlags VkCommandBufferUsageFlags
1794bitfield VkCommandBufferUsageFlagBits {
1795 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1796 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1797 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001798}
1799
1800/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001801type VkFlags VkQueryPipelineStatisticFlags
1802bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001803 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1804 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1805 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1806 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1807 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1808 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1809 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1810 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1811 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1812 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1813 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001814}
1815
1816/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001817type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001818//bitfield VkMemoryMapFlagBits {
1819//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001820
1821/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001822type VkFlags VkImageAspectFlags
1823bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001824 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1825 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1826 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1827 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1828}
1829
1830/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001831type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001832bitfield VkSparseMemoryBindFlagBits {
1833 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1834}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001835
1836/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001837type VkFlags VkSparseImageFormatFlags
1838bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001839 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1840 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.
1841 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001842}
1843
1844/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001845type VkFlags VkPipelineStageFlags
1846bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001847 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1848 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1849 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1850 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001851 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1852 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001853 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1854 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1855 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1856 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1857 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1858 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1859 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001860 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1861 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001862
Jesse Hall543a7ff2016-01-08 16:38:30 -08001863 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1864 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001865
Jesse Hallad250842017-03-10 18:35:38 -08001866 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001867 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001868}
1869
1870/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001871type VkFlags VkAttachmentDescriptionFlags
1872bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001873 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 -07001874}
1875
1876/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001877type VkFlags VkSubpassDescriptionFlags
1878bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001879 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1880 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1881 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001882}
1883
1884/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001885type VkFlags VkCommandPoolCreateFlags
1886bitfield VkCommandPoolCreateFlagBits {
1887 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1888 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001889}
1890
1891/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001892type VkFlags VkCommandPoolResetFlags
1893bitfield VkCommandPoolResetFlagBits {
1894 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001895}
1896
Jesse Hall3fbc8562015-11-29 22:10:52 -08001897type VkFlags VkCommandBufferResetFlags
1898bitfield VkCommandBufferResetFlagBits {
1899 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001900}
1901
Jesse Halld8bade02015-11-24 10:24:18 -08001902type VkFlags VkSampleCountFlags
1903bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001904 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1905 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1906 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1907 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1908 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1909 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1910 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1911}
1912
Jesse Halld8bade02015-11-24 10:24:18 -08001913type VkFlags VkStencilFaceFlags
1914bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001915 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1916 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001917 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001918}
1919
Jesse Halla6429252015-11-29 18:59:42 -08001920/// Instance creation flags
1921type VkFlags VkInstanceCreateFlags
1922//bitfield VkInstanceCreateFlagBits {
1923//}
1924
1925/// Device creation flags
1926type VkFlags VkDeviceCreateFlags
1927//bitfield VkDeviceCreateFlagBits {
1928//}
1929
1930/// Device queue creation flags
1931type VkFlags VkDeviceQueueCreateFlags
1932//bitfield VkDeviceQueueCreateFlagBits {
1933//}
1934
1935/// Query pool creation flags
1936type VkFlags VkQueryPoolCreateFlags
1937//bitfield VkQueryPoolCreateFlagBits {
1938//}
1939
1940/// Buffer view creation flags
1941type VkFlags VkBufferViewCreateFlags
1942//bitfield VkBufferViewCreateFlagBits {
1943//}
1944
1945/// Pipeline cache creation flags
1946type VkFlags VkPipelineCacheCreateFlags
1947//bitfield VkPipelineCacheCreateFlagBits {
1948//}
1949
1950/// Pipeline shader stage creation flags
1951type VkFlags VkPipelineShaderStageCreateFlags
1952//bitfield VkPipelineShaderStageCreateFlagBits {
1953//}
1954
1955/// Descriptor set layout creation flags
1956type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001957bitfield VkDescriptorSetLayoutCreateFlagBits {
1958 //@extension("VK_KHR_push_descriptor") // 81
1959 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1960}
Jesse Halla6429252015-11-29 18:59:42 -08001961
1962/// Pipeline vertex input state creation flags
1963type VkFlags VkPipelineVertexInputStateCreateFlags
1964//bitfield VkPipelineVertexInputStateCreateFlagBits {
1965//}
1966
1967/// Pipeline input assembly state creation flags
1968type VkFlags VkPipelineInputAssemblyStateCreateFlags
1969//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1970//}
1971
1972/// Tessellation state creation flags
1973type VkFlags VkPipelineTessellationStateCreateFlags
1974//bitfield VkPipelineTessellationStateCreateFlagBits {
1975//}
1976
1977/// Viewport state creation flags
1978type VkFlags VkPipelineViewportStateCreateFlags
1979//bitfield VkPipelineViewportStateCreateFlagBits {
1980//}
1981
Jesse Hall3fbc8562015-11-29 22:10:52 -08001982/// Rasterization state creation flags
1983type VkFlags VkPipelineRasterizationStateCreateFlags
1984//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001985//}
1986
1987/// Multisample state creation flags
1988type VkFlags VkPipelineMultisampleStateCreateFlags
1989//bitfield VkPipelineMultisampleStateCreateFlagBits {
1990//}
1991
1992/// Color blend state creation flags
1993type VkFlags VkPipelineColorBlendStateCreateFlags
1994//bitfield VkPipelineColorBlendStateCreateFlagBits {
1995//}
1996
1997/// Depth/stencil state creation flags
1998type VkFlags VkPipelineDepthStencilStateCreateFlags
1999//bitfield VkPipelineDepthStencilStateCreateFlagBits {
2000//}
2001
2002/// Dynamic state creation flags
2003type VkFlags VkPipelineDynamicStateCreateFlags
2004//bitfield VkPipelineDynamicStateCreateFlagBits {
2005//}
2006
2007/// Pipeline layout creation flags
2008type VkFlags VkPipelineLayoutCreateFlags
2009//bitfield VkPipelineLayoutCreateFlagBits {
2010//}
2011
2012/// Sampler creation flags
2013type VkFlags VkSamplerCreateFlags
2014//bitfield VkSamplerCreateFlagBits {
2015//}
2016
2017/// Render pass creation flags
2018type VkFlags VkRenderPassCreateFlags
2019//bitfield VkRenderPassCreateFlagBits {
2020//}
2021
2022/// Framebuffer creation flags
2023type VkFlags VkFramebufferCreateFlags
2024//bitfield VkFramebufferCreateFlagBits {
2025//}
2026
Jesse Halldc6d36c2015-11-29 19:12:15 -08002027/// Dependency flags
2028type VkFlags VkDependencyFlags
2029bitfield VkDependencyFlagBits {
2030 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002031
2032 //@extension("VK_KHX_multiview") // 54
2033 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
2034
2035 //@extension("VK_KHX_device_group") // 61
2036 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08002037}
2038
Jesse Hallc7467b72015-11-29 21:05:26 -08002039/// Cull mode flags
2040type VkFlags VkCullModeFlags
2041bitfield VkCullModeFlagBits {
2042 VK_CULL_MODE_NONE = 0x00000000,
2043 VK_CULL_MODE_FRONT_BIT = 0x00000001,
2044 VK_CULL_MODE_BACK_BIT = 0x00000002,
2045 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
2046}
2047
Jesse Hallad250842017-03-10 18:35:38 -08002048@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002049type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002050@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002051bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002052 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002053 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
2054 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
2055 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
2056 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
2057 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
2058 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
2059 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
2060 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08002061}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002062
Jesse Hallad250842017-03-10 18:35:38 -08002063@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002064type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002065@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002066bitfield VkCompositeAlphaFlagBitsKHR {
2067 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2068 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
2069 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
2070 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
2071}
2072
Jesse Hallad250842017-03-10 18:35:38 -08002073@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002074type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002075@extension("VK_KHR_swapchain") // 2
2076bitfield VkSwapchainCreateFlagBitsKHR {
2077 //@extension("VK_KHX_device_group") // 61
2078 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
2079}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002080
Jesse Hallad250842017-03-10 18:35:38 -08002081@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002082type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002083@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002084bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002085 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2086 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
2087 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
2088 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08002089}
2090
Jesse Hallad250842017-03-10 18:35:38 -08002091@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002092type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002093//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002094//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
2095//}
2096
Jesse Hallad250842017-03-10 18:35:38 -08002097@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002098type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002099//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002100//bitfield VkDisplayModeCreateFlagBitsKHR {
2101//}
2102
Jesse Hallad250842017-03-10 18:35:38 -08002103@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002104type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002105//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002106//bitfield VkXlibSurfaceCreateFlagBitsKHR {
2107//}
2108
Jesse Hallad250842017-03-10 18:35:38 -08002109@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002110type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002111//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002112//bitfield VkXcbSurfaceCreateFlagBitsKHR {
2113//}
2114
Jesse Hallad250842017-03-10 18:35:38 -08002115@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002116type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002117//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002118//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
2119//}
2120
Jesse Hallad250842017-03-10 18:35:38 -08002121@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002122type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002123//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002124//bitfield VkMirSurfaceCreateFlagBitsKHR {
2125//}
2126
Jesse Hallad250842017-03-10 18:35:38 -08002127@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002128type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002129//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002130//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
2131//}
2132
Jesse Hallad250842017-03-10 18:35:38 -08002133@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002134type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002135//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002136//bitfield VkWin32SurfaceCreateFlagBitsKHR {
2137//}
2138
Jesse Hallad250842017-03-10 18:35:38 -08002139@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002140type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08002141@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002142bitfield VkSwapchainImageUsageFlagBitsANDROID {
2143 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
2144}
2145
Jesse Hallad250842017-03-10 18:35:38 -08002146@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002147type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002148@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002149bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08002150 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
2151 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
2152 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08002153 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
2154 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
2155}
2156
Jesse Hallad250842017-03-10 18:35:38 -08002157@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002158type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002159@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002160bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002161 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
2162 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
2163 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
2164 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002165}
2166
Jesse Hallad250842017-03-10 18:35:38 -08002167@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002168type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002169@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002170bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002171 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
2172 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
2173 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13002174}
2175
Jesse Hallad250842017-03-10 18:35:38 -08002176@extension("VK_KHX_device_group") // 61
2177type VkFlags VkPeerMemoryFeatureFlagsKHX
2178@extension("VK_KHX_device_group") // 61
2179bitfield VkPeerMemoryFeatureFlagBitsKHX {
2180 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
2181 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
2182 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
2183 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
2184}
2185
2186@extension("VK_KHX_device_group") // 61
2187type VkFlags VkMemoryAllocateFlagsKHX
2188@extension("VK_KHX_device_group") // 61
2189bitfield VkMemoryAllocateFlagBitsKHX {
2190 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
2191}
2192
2193@extension("VK_KHX_device_group") // 61
2194type VkFlags VkDeviceGroupPresentModeFlagsKHX
2195@extension("VK_KHX_device_group") // 61
2196bitfield VkDeviceGroupPresentModeFlagBitsKHX {
2197 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
2198 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
2199 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
2200 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
2201}
2202
2203@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002204type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08002205//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002206//bitfield VkViSurfaceCreateFlagBitsNN {
2207//}
2208
Jesse Hallad250842017-03-10 18:35:38 -08002209@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002210type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002211//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002212//bitfield VkCommandPoolTrimFlagBitsKHR {
2213//}
2214
Jesse Hall9492f992017-08-28 12:10:06 -07002215@extension("VK_KHR_external_memory_capabilities") // 72
2216type VkFlags VkExternalMemoryHandleTypeFlagsKHR
2217@extension("VK_KHR_external_memory_capabilities") // 72
2218bitfield VkExternalMemoryHandleTypeFlagBitsKHR {
2219 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2220 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2221 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2222 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = 0x00000008,
2223 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010,
2224 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020,
2225 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040,
Jesse Hallad250842017-03-10 18:35:38 -08002226}
2227
Jesse Hall9492f992017-08-28 12:10:06 -07002228@extension("VK_KHR_external_memory_capabilities") // 72
2229type VkFlags VkExternalMemoryFeatureFlagsKHR
2230@extension("VK_KHR_external_memory_capabilities") // 72
2231bitfield VkExternalMemoryFeatureFlagBitsKHR {
2232 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = 0x00000001,
2233 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = 0x00000002,
2234 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08002235}
2236
Jesse Hall9492f992017-08-28 12:10:06 -07002237@extension("VK_KHR_external_semaphore_capabilities") // 77
2238type VkFlags VkExternalSemaphoreHandleTypeFlagsKHR
2239@extension("VK_KHR_external_semaphore_capabilities") // 77
2240bitfield VkExternalSemaphoreHandleTypeFlagBitsKHR {
2241 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001
2242 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002
2243 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004
2244 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = 0x00000008
2245 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHR = 0x00000010
Jesse Hallad250842017-03-10 18:35:38 -08002246}
2247
Jesse Hall9492f992017-08-28 12:10:06 -07002248@extension("VK_KHR_external_semaphore_capabilities") // 77
2249type VkFlags VkExternalSemaphoreFeatureFlagsKHR
2250@extension("VK_KHR_external_semaphore_capabilities") // 77
2251bitfield VkExternalSemaphoreFeatureFlagBitsKHR {
2252 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2253 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2254}
2255
2256@extension("VK_KHR_external_semaphore") // 78
2257type VkFlags VkSemaphoreImportFlagsKHR
2258@extension("VK_KHR_external_semaphore") // 78
2259bitfield VkSemaphoreImportFlagBitsKHR {
2260 VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002261}
2262
2263@extension("VK_KHR_descriptor_update_template") // 86
2264type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2265//@extension("VK_KHR_descriptor_update_template") // 86
2266//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2267//}
2268
2269@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002270type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002271@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002272bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002273 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2274 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2275 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2276 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002277}
2278
Jesse Hallad250842017-03-10 18:35:38 -08002279@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002280type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002281@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002282bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002283 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2284 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002285}
2286
Jesse Hallad250842017-03-10 18:35:38 -08002287@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002288type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002289@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002290bitfield VkSurfaceCounterFlagBitsEXT {
2291 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2292}
2293
Jesse Hallad250842017-03-10 18:35:38 -08002294@extension("VK_NV_viewport_swizzle") // 99
2295type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2296//@extension("VK_NV_viewport_swizzle") // 99
2297//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2298//}
2299
2300@extension("VK_EXT_discard_rectangles") // 100
2301type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2302//@extension("VK_EXT_discard_rectangles") // 100
2303//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2304//}
2305
Jesse Hall9492f992017-08-28 12:10:06 -07002306@extension("VK_KHR_external_fence_capabilities") // 113
2307type VkFlags VkExternalFenceHandleTypeFlagsKHR
2308@extension("VK_KHR_external_fence_capabilities") // 113
2309bitfield VkExternalFenceHandleTypeFlagBitsKHR {
2310 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2311 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2312 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2313 VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000008,
2314}
2315
2316@extension("VK_KHR_external_fence_capabilities") // 113
2317type VkFlags VkExternalFenceFeatureFlagsKHR
2318@extension("VK_KHR_external_fence_capabilities") // 113
2319bitfield VkExternalFenceFeatureFlagBitsKHR {
2320 VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2321 VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2322}
2323
2324@extension("VK_KHR_external_fence") // 114
2325type VkFlags VkFenceImportFlagsKHR
2326@extension("VK_KHR_external_fence") // 114
2327bitfield VkFenceImportFlagBitsKHR {
2328 VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
2329}
2330
Jesse Hallad250842017-03-10 18:35:38 -08002331@extension("VK_MVK_ios_surface") // 123
2332type VkFlags VkIOSSurfaceCreateFlagsMVK
2333//@extension("VK_MVK_ios_surface") // 123
2334//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2335//}
2336
2337@extension("VK_MVK_macos_surface") // 124
2338type VkFlags VkMacOSSurfaceCreateFlagsMVK
2339//@extension("VK_MVK_macos_surface") // 124
2340//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2341//}
2342
Jesse Hall7ba0ac72017-07-07 17:13:23 -07002343@extension("VK_NV_fragment_coverage_to_color") // 150
2344type VkFlags VkPipelineCoverageToColorStateCreateFlagsNV
2345@extension("VK_NV_fragment_coverage_to_color") // 150
2346//bitfield VkPipelineCoverageToColorStateCreateFlagBitsNV {
2347//}
2348
2349@extension("VK_NV_framebuffer_mixed_samples") // 153
2350type VkFlags VkPipelineCoverageModulationStateCreateFlagsNV
2351@extension("VK_NV_framebuffer_mixed_samples") // 153
2352//bitfield VkPipelineCoverageModulationStateCreateFlagBitsNV {
2353//}
2354
Jesse Halld27f6aa2015-08-15 17:58:48 -07002355//////////////////
2356// Structures //
2357//////////////////
2358
2359class VkOffset2D {
2360 s32 x
2361 s32 y
2362}
2363
2364class VkOffset3D {
2365 s32 x
2366 s32 y
2367 s32 z
2368}
2369
2370class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002371 u32 width
2372 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002373}
2374
2375class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002376 u32 width
2377 u32 height
2378 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002379}
2380
2381class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002382 f32 x
2383 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002384 f32 width
2385 f32 height
2386 f32 minDepth
2387 f32 maxDepth
2388}
2389
2390class VkRect2D {
2391 VkOffset2D offset
2392 VkExtent2D extent
2393}
2394
Jesse Halla15a4bf2015-11-19 22:48:02 -08002395class VkClearRect {
2396 VkRect2D rect
2397 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002398 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002399}
2400
Jesse Hall65ab5522015-11-30 00:07:16 -08002401class VkComponentMapping {
2402 VkComponentSwizzle r
2403 VkComponentSwizzle g
2404 VkComponentSwizzle b
2405 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002406}
2407
2408class VkPhysicalDeviceProperties {
2409 u32 apiVersion
2410 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002411 u32 vendorID
2412 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002413 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002414 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2415 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002416 VkPhysicalDeviceLimits limits
2417 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002418}
2419
2420class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002421 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002422 u32 specVersion /// version of the extension specification implemented
2423}
2424
2425class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002426 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002427 u32 specVersion /// version of the layer specification implemented
2428 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002429 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002430}
2431
Jesse Halla366a512015-11-19 22:30:07 -08002432class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002433 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2434 const void* pNext /// Next structure in chain
2435 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002436 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002437 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002438 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002439 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002440 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002441 const VkSemaphore* pSignalSemaphores
2442}
2443
Jesse Halld27f6aa2015-08-15 17:58:48 -07002444class VkApplicationInfo {
2445 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2446 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002447 const char* pApplicationName
2448 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002449 const char* pEngineName
2450 u32 engineVersion
2451 u32 apiVersion
2452}
2453
Jesse Hall3fbc8562015-11-29 22:10:52 -08002454class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002455 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002456 PFN_vkAllocationFunction pfnAllocation
2457 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002458 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002459 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002460 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002461}
2462
2463class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002464 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2465 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002466 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002467 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002468 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002469 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002470}
2471
2472class VkDeviceCreateInfo {
2473 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2474 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002475 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002476 u32 queueCreateInfoCount
2477 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002478 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002479 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002480 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002481 const char* const* ppEnabledExtensionNames
2482 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002483}
2484
2485class VkInstanceCreateInfo {
2486 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2487 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002488 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002489 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002490 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002491 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002492 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002493 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2494}
2495
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002496class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002497 VkQueueFlags queueFlags /// Queue flags
2498 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002499 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002500 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002501}
2502
2503class VkPhysicalDeviceMemoryProperties {
2504 u32 memoryTypeCount
2505 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2506 u32 memoryHeapCount
2507 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2508}
2509
Jesse Hall3fbc8562015-11-29 22:10:52 -08002510class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002511 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002512 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002513 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002514 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2515}
2516
2517class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002518 VkDeviceSize size /// Specified in bytes
2519 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002520 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2521}
2522
2523class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002524 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002525 VkExtent3D imageGranularity
2526 VkSparseImageFormatFlags flags
2527}
2528
2529class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002530 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002531 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002532 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2533 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2534 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002535}
2536
2537class VkMemoryType {
2538 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2539 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2540}
2541
2542class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002543 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002544 VkMemoryHeapFlags flags /// Flags for the heap
2545}
2546
2547class VkMappedMemoryRange {
2548 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2549 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002550 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002551 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2552 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002553}
2554
2555class VkFormatProperties {
2556 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2557 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002558 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002559}
2560
2561class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002562 VkExtent3D maxExtent /// max image dimensions for this resource type
2563 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002564 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002565 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2566 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2567}
2568
Jesse Halla15a4bf2015-11-19 22:48:02 -08002569class VkDescriptorImageInfo {
2570 VkSampler sampler
2571 VkImageView imageView
2572 VkImageLayout imageLayout
2573}
2574
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002575class VkDescriptorBufferInfo {
2576 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2577 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2578 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002579}
2580
Jesse Halld27f6aa2015-08-15 17:58:48 -07002581class VkWriteDescriptorSet {
2582 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2583 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002584 VkDescriptorSet dstSet /// Destination descriptor set
2585 u32 dstBinding /// Binding within the destination descriptor set to write
2586 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002587 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002588 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 -08002589 const VkDescriptorImageInfo* pImageInfo
2590 const VkDescriptorBufferInfo* pBufferInfo
2591 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002592}
2593
2594class VkCopyDescriptorSet {
2595 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2596 const void* pNext /// Pointer to next structure
2597 VkDescriptorSet srcSet /// Source descriptor set
2598 u32 srcBinding /// Binding within the source descriptor set to copy from
2599 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002600 VkDescriptorSet dstSet /// Destination descriptor set
2601 u32 dstBinding /// Binding within the destination descriptor set to copy to
2602 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002603 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002604}
2605
2606class VkBufferCreateInfo {
2607 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2608 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002609 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002610 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002611 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002612 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002613 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002614 const u32* pQueueFamilyIndices
2615}
2616
2617class VkBufferViewCreateInfo {
2618 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2619 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002620 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002621 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002622 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002623 VkDeviceSize offset /// Specified in bytes
2624 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002625}
2626
2627class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002628 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002629 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002630 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002631}
2632
2633class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002634 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002635 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002636 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002637 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002638 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002639}
2640
2641class VkMemoryBarrier {
2642 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2643 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002644 VkAccessFlags srcAccessMask
2645 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002646}
2647
2648class VkBufferMemoryBarrier {
2649 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2650 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002651 VkAccessFlags srcAccessMask
2652 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002653 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002654 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002655 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002656 VkDeviceSize offset /// Offset within the buffer to sync
2657 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002658}
2659
2660class VkImageMemoryBarrier {
2661 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2662 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002663 VkAccessFlags srcAccessMask
2664 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002665 VkImageLayout oldLayout /// Current layout of the image
2666 VkImageLayout newLayout /// New layout to transition the image to
2667 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002668 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002669 VkImage image /// Image to sync
2670 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2671}
2672
2673class VkImageCreateInfo {
2674 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2675 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002676 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002677 VkImageType imageType
2678 VkFormat format
2679 VkExtent3D extent
2680 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002681 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002682 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002683 VkImageTiling tiling
2684 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002685 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002686 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002687 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002688 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002689}
2690
2691class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002692 VkDeviceSize offset /// Specified in bytes
2693 VkDeviceSize size /// Specified in bytes
2694 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002695 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002696 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002697}
2698
2699class VkImageViewCreateInfo {
2700 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2701 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002702 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002703 VkImage image
2704 VkImageViewType viewType
2705 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002706 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002707 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002708}
2709
2710class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002711 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002712 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002713 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002714}
2715
Jesse Halla6429252015-11-29 18:59:42 -08002716class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002717 VkDeviceSize resourceOffset /// Specified in bytes
2718 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002719 VkDeviceMemory memory
2720 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002721 VkSparseMemoryBindFlags flags
2722}
2723
Jesse Halla6429252015-11-29 18:59:42 -08002724class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002725 VkImageSubresource subresource
2726 VkOffset3D offset
2727 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002728 VkDeviceMemory memory
2729 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002730 VkSparseMemoryBindFlags flags
2731}
2732
Jesse Halla6429252015-11-29 18:59:42 -08002733class VkSparseBufferMemoryBindInfo {
2734 VkBuffer buffer
2735 u32 bindCount
2736 const VkSparseMemoryBind* pBinds
2737}
2738
2739class VkSparseImageOpaqueMemoryBindInfo {
2740 VkImage image
2741 u32 bindCount
2742 const VkSparseMemoryBind* pBinds
2743}
2744
2745class VkSparseImageMemoryBindInfo {
2746 VkImage image
2747 u32 bindCount
2748 const VkSparseMemoryBind* pBinds
2749}
2750
2751class VkBindSparseInfo {
2752 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2753 const void* pNext
2754 u32 waitSemaphoreCount
2755 const VkSemaphore* pWaitSemaphores
2756 u32 numBufferBinds
2757 const VkSparseBufferMemoryBindInfo* pBufferBinds
2758 u32 numImageOpaqueBinds
2759 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2760 u32 numImageBinds
2761 const VkSparseImageMemoryBindInfo* pImageBinds
2762 u32 signalSemaphoreCount
2763 const VkSemaphore* pSignalSemaphores
2764}
2765
Jesse Hall65ab5522015-11-30 00:07:16 -08002766class VkImageSubresourceLayers {
2767 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002768 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002769 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002770 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002771}
2772
Jesse Halld27f6aa2015-08-15 17:58:48 -07002773class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002774 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002775 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002776 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002777 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002778 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2779}
2780
2781class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002782 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002783 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002784 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002785 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002786}
2787
2788class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002789 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002790 u32 bufferRowLength /// Specified in texels
2791 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002792 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002793 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2794 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2795}
2796
2797class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002798 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002799 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002800 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002801 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002802 VkExtent3D extent
2803}
2804
2805class VkShaderModuleCreateInfo {
2806 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2807 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002808 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002809 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002810 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002811}
2812
Jesse Halld27f6aa2015-08-15 17:58:48 -07002813class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002814 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002815 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002816 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002817 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2818 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2819}
2820
2821class VkDescriptorSetLayoutCreateInfo {
2822 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2823 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002824 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002825 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002826 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002827}
2828
Jesse Hall65ab5522015-11-30 00:07:16 -08002829class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002830 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002831 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002832}
2833
2834class VkDescriptorPoolCreateInfo {
2835 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2836 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002837 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002838 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002839 u32 poolSizeCount
2840 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002841}
2842
Jesse Hall3fbc8562015-11-29 22:10:52 -08002843class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002844 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002845 const void* pNext /// Pointer to next structure
2846 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002847 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002848 const VkDescriptorSetLayout* pSetLayouts
2849}
2850
Jesse Halld27f6aa2015-08-15 17:58:48 -07002851class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002852 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002853 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002854 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002855}
2856
2857class VkSpecializationInfo {
2858 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002859 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002860 platform.size_t dataSize /// Size in bytes of pData
2861 const void* pData /// Pointer to SpecConstant data
2862}
2863
2864class VkPipelineShaderStageCreateInfo {
2865 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2866 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002867 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002868 VkShaderStageFlagBits stage
2869 VkShaderModule module
2870 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002871 const VkSpecializationInfo* pSpecializationInfo
2872}
2873
2874class VkComputePipelineCreateInfo {
2875 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2876 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002877 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002878 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002879 VkPipelineLayout layout /// Interface layout of the pipeline
2880 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
2881 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
2882}
2883
2884class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002885 u32 binding /// Vertex buffer binding id
2886 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002887 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002888}
2889
2890class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002891 u32 location /// location of the shader vertex attrib
2892 u32 binding /// Vertex buffer binding id
2893 VkFormat format /// format of source data
2894 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002895}
2896
2897class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002898 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2899 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002900 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002901 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002902 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002903 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002904 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2905}
2906
2907class VkPipelineInputAssemblyStateCreateInfo {
2908 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2909 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002910 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002911 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002912 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002913}
2914
2915class VkPipelineTessellationStateCreateInfo {
2916 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2917 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002918 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002919 u32 patchControlPoints
2920}
2921
2922class VkPipelineViewportStateCreateInfo {
2923 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2924 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002925 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002926 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002927 const VkViewport* pViewports
2928 u32 scissorCount
2929 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002930}
2931
Jesse Hall3fbc8562015-11-29 22:10:52 -08002932class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002933 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002934 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002935 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002936 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002937 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002938 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002939 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002940 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002941 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002942 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002943 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002944 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002945 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002946}
2947
2948class VkPipelineMultisampleStateCreateInfo {
2949 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2950 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002951 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002952 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002953 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002954 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002955 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002956 VkBool32 alphaToCoverageEnable
2957 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002958}
2959
2960class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002961 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002962 VkBlendFactor srcColorBlendFactor
2963 VkBlendFactor dstColorBlendFactor
2964 VkBlendOp colorBlendOp
2965 VkBlendFactor srcAlphaBlendFactor
2966 VkBlendFactor dstAlphaBlendFactor
2967 VkBlendOp alphaBlendOp
2968 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002969}
2970
2971class VkPipelineColorBlendStateCreateInfo {
2972 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2973 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002974 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002975 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002976 VkLogicOp logicOp
2977 u32 attachmentCount /// # of pAttachments
2978 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002979 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002980}
2981
2982class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002983 VkStencilOp failOp
2984 VkStencilOp passOp
2985 VkStencilOp depthFailOp
2986 VkCompareOp compareOp
2987 u32 compareMask
2988 u32 writeMask
2989 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002990}
2991
2992class VkPipelineDepthStencilStateCreateInfo {
2993 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2994 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002995 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002996 VkBool32 depthTestEnable
2997 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002998 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002999 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
3000 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003001 VkStencilOpState front
3002 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003003 f32 minDepthBounds
3004 f32 maxDepthBounds
3005}
3006
3007class VkPipelineDynamicStateCreateInfo {
3008 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
3009 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003010 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003011 u32 dynamicStateCount
3012 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003013}
3014
3015class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08003016 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
3017 const void* pNext /// Pointer to next structure
3018 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003019 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08003020 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07003021 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
3022 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
3023 const VkPipelineTessellationStateCreateInfo* pTessellationState
3024 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08003025 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07003026 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
3027 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
3028 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003029 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08003030 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003031 VkRenderPass renderPass
3032 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08003033 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
3034 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 -07003035}
3036
3037class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08003038 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
3039 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003040 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08003041 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
3042 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07003043}
3044
3045class VkPushConstantRange {
3046 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08003047 u32 offset /// Start of the range, in bytes
3048 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003049}
3050
3051class VkPipelineLayoutCreateInfo {
3052 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
3053 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003054 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08003055 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003056 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
3057 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
3058 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
3059}
3060
3061class VkSamplerCreateInfo {
3062 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
3063 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003064 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08003065 VkFilter magFilter /// Filter mode for magnification
3066 VkFilter minFilter /// Filter mode for minifiation
3067 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
3068 VkSamplerAddressMode addressModeU
3069 VkSamplerAddressMode addressModeV
3070 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07003071 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003072 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003073 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003074 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003075 VkCompareOp compareOp
3076 f32 minLod
3077 f32 maxLod
3078 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003079 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003080}
3081
Jesse Hall3fbc8562015-11-29 22:10:52 -08003082class VkCommandPoolCreateInfo {
3083 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003084 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003085 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08003086 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07003087}
3088
Jesse Hall3fbc8562015-11-29 22:10:52 -08003089class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003090 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003091 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003092 VkCommandPool commandPool
3093 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08003094 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003095}
3096
Jesse Hall3dd678a2016-01-08 21:52:01 -08003097class VkCommandBufferInheritanceInfo {
3098 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003099 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07003100 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003101 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003102 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003103 VkBool32 occlusionQueryEnable
3104 VkQueryControlFlags queryFlags
3105 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003106}
3107
Jesse Hall3dd678a2016-01-08 21:52:01 -08003108class VkCommandBufferBeginInfo {
3109 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
3110 const void* pNext /// Pointer to next structure
3111 VkCommandBufferUsageFlags flags /// Command buffer usage flags
3112 const VkCommandBufferInheritanceInfo* pInheritanceInfo
3113}
3114
Jesse Halld27f6aa2015-08-15 17:58:48 -07003115class VkRenderPassBeginInfo {
3116 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
3117 const void* pNext /// Pointer to next structure
3118 VkRenderPass renderPass
3119 VkFramebuffer framebuffer
3120 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003121 u32 clearValueCount
3122 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07003123}
3124
3125@union
3126/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
3127class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003128 f32[4] float32
3129 s32[4] int32
3130 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07003131}
3132
3133class VkClearDepthStencilValue {
3134 f32 depth
3135 u32 stencil
3136}
3137
3138@union
3139/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
3140class VkClearValue {
3141 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003142 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07003143}
3144
Jesse Hallae38f732015-11-19 21:32:50 -08003145class VkClearAttachment {
3146 VkImageAspectFlags aspectMask
3147 u32 colorAttachment
3148 VkClearValue clearValue
3149}
3150
Jesse Halld27f6aa2015-08-15 17:58:48 -07003151class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08003152 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003153 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08003154 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07003155 VkAttachmentLoadOp loadOp /// Load op for color or depth data
3156 VkAttachmentStoreOp storeOp /// Store op for color or depth data
3157 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
3158 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
3159 VkImageLayout initialLayout
3160 VkImageLayout finalLayout
3161}
3162
3163class VkAttachmentReference {
3164 u32 attachment
3165 VkImageLayout layout
3166}
3167
3168class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003169 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08003170 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08003171 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003172 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08003173 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003174 const VkAttachmentReference* pColorAttachments
3175 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08003176 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08003177 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08003178 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003179}
3180
3181class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003182 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08003183 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003184 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08003185 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003186 VkAccessFlags srcAccessMask
3187 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08003188 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003189}
3190
3191class VkRenderPassCreateInfo {
3192 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
3193 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003194 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003195 u32 attachmentCount
3196 const VkAttachmentDescription* pAttachments
3197 u32 subpassCount
3198 const VkSubpassDescription* pSubpasses
3199 u32 dependencyCount
3200 const VkSubpassDependency* pDependencies
3201}
3202
3203class VkEventCreateInfo {
3204 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
3205 const void* pNext /// Pointer to next structure
3206 VkEventCreateFlags flags /// Event creation flags
3207}
3208
3209class VkFenceCreateInfo {
3210 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
3211 const void* pNext /// Pointer to next structure
3212 VkFenceCreateFlags flags /// Fence creation flags
3213}
3214
3215class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003216 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
3217 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
3218 VkBool32 imageCubeArray /// image views which are arrays of cube maps
3219 VkBool32 independentBlend /// blending operations are controlled per-attachment
3220 VkBool32 geometryShader /// geometry stage
3221 VkBool32 tessellationShader /// tessellation control and evaluation stage
3222 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08003223 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003224 VkBool32 logicOp /// logic operations
3225 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08003226 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08003227 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003228 VkBool32 depthBiasClamp /// depth bias clamping
3229 VkBool32 fillModeNonSolid /// point and wireframe fill modes
3230 VkBool32 depthBounds /// depth bounds test
3231 VkBool32 wideLines /// lines with width greater than 1
3232 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08003233 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
3234 VkBool32 multiViewport
3235 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003236 VkBool32 textureCompressionETC2 /// ETC texture compression formats
3237 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
3238 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08003239 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003240 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08003241 VkBool32 vertexPipelineStoresAndAtomics
3242 VkBool32 fragmentStoresAndAtomics
3243 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003244 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
3245 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
3246 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08003247 VkBool32 shaderStorageImageReadWithoutFormat
3248 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003249 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
3250 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
3251 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
3252 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
3253 VkBool32 shaderClipDistance /// clip distance in shaders
3254 VkBool32 shaderCullDistance /// cull distance in shaders
3255 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
3256 VkBool32 shaderInt64 /// 64-bit integers in shaders
3257 VkBool32 shaderInt16 /// 16-bit integers in shaders
3258 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08003259 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003260 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
3261 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
3262 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
3263 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
3264 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
3265 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
3266 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
3267 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
3268 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08003269 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003270 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003271}
3272
3273class VkPhysicalDeviceLimits {
3274 /// resource maximum sizes
3275 u32 maxImageDimension1D /// max 1D image dimension
3276 u32 maxImageDimension2D /// max 2D image dimension
3277 u32 maxImageDimension3D /// max 3D image dimension
3278 u32 maxImageDimensionCube /// max cubemap image dimension
3279 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08003280 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08003281 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
3282 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003283 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
3284 /// memory limits
3285 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003286 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003287 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3288 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003289 /// descriptor set limits
3290 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003291 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3292 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3293 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3294 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3295 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003296 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003297 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003298 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3299 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003300 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003301 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003302 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003303 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3304 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003305 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003306 /// vertex stage limits
3307 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003308 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003309 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3310 u32 maxVertexInputBindingStride /// max vertex input binding stride
3311 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3312 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003313 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003314 u32 maxTessellationPatchSize /// max patch size (vertices)
3315 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3316 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3317 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3318 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3319 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3320 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003321 /// geometry stage limits
3322 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3323 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3324 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3325 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3326 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3327 /// fragment stage limits
3328 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003329 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003330 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003331 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3332 /// compute stage limits
3333 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3334 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3335 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3336 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3337
3338 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3339 u32 subTexelPrecisionBits /// num bits of subtexel precision
3340 u32 mipmapPrecisionBits /// num bits of mipmap precision
3341
3342 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003343 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003344
3345 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3346 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3347
3348 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003349 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3350 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3351 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3352
Jesse Halldc6d36c2015-11-29 19:12:15 -08003353 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3354 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3355 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3356 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003357
Jesse Hallfbf97b02015-11-20 14:17:03 -08003358 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003359 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003360 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003361 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3362 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3363 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3364 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3365
3366 u32 maxFramebufferWidth /// max width for a framebuffer
3367 u32 maxFramebufferHeight /// max height for a framebuffer
3368 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003369 VkSampleCountFlags framebufferColorSampleCounts
3370 VkSampleCountFlags framebufferDepthSampleCounts
3371 VkSampleCountFlags framebufferStencilSampleCounts
3372 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003373 u32 maxColorAttachments /// max num of framebuffer color attachments
3374
Jesse Hall091ed9e2015-11-30 00:55:29 -08003375 VkSampleCountFlags sampledImageColorSampleCounts
3376 VkSampleCountFlags sampledImageIntegerSampleCounts
3377 VkSampleCountFlags sampledImageDepthSampleCounts
3378 VkSampleCountFlags sampledImageStencilSampleCounts
3379 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003380 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003381 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003382
Jesse Halla9bb62b2015-11-21 19:31:56 -08003383 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003384
3385 u32 maxClipDistances /// max number of clip distances
3386 u32 maxCullDistances /// max number of cull distances
3387 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3388
Jesse Hallfbf97b02015-11-20 14:17:03 -08003389 u32 discreteQueuePriorities
3390
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003391 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3392 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003393 f32 pointSizeGranularity /// granularity of supported point sizes
3394 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003395 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003396 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003397
Jesse Hall65ab5522015-11-30 00:07:16 -08003398 VkDeviceSize optimalBufferCopyOffsetAlignment
3399 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003400 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003401}
3402
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003403class VkPhysicalDeviceSparseProperties {
3404 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 -08003405 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 -07003406 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3407 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 -07003408 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
3409}
3410
Jesse Halld27f6aa2015-08-15 17:58:48 -07003411class VkSemaphoreCreateInfo {
3412 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3413 const void* pNext /// Pointer to next structure
3414 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3415}
3416
3417class VkQueryPoolCreateInfo {
3418 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3419 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003420 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003421 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003422 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003423 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3424}
3425
3426class VkFramebufferCreateInfo {
3427 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3428 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003429 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003430 VkRenderPass renderPass
3431 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003432 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003433 u32 width
3434 u32 height
3435 u32 layers
3436}
3437
Jesse Hall3fbc8562015-11-29 22:10:52 -08003438class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003439 u32 vertexCount
3440 u32 instanceCount
3441 u32 firstVertex
3442 u32 firstInstance
3443}
3444
Jesse Hall3fbc8562015-11-29 22:10:52 -08003445class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003446 u32 indexCount
3447 u32 instanceCount
3448 u32 firstIndex
3449 s32 vertexOffset
3450 u32 firstInstance
3451}
3452
Jesse Hall3fbc8562015-11-29 22:10:52 -08003453class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003454 u32 x
3455 u32 y
3456 u32 z
3457}
3458
Jesse Hallad250842017-03-10 18:35:38 -08003459@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003460class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003461 u32 minImageCount
3462 u32 maxImageCount
3463 VkExtent2D currentExtent
3464 VkExtent2D minImageExtent
3465 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003466 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003467 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003468 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003469 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003470 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003471}
3472
Jesse Hallad250842017-03-10 18:35:38 -08003473@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003474class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003475 VkFormat format
3476 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003477}
3478
Jesse Hallad250842017-03-10 18:35:38 -08003479@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003480class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003481 VkStructureType sType
3482 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003483 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003484 VkSurfaceKHR surface
3485 u32 minImageCount
3486 VkFormat imageFormat
3487 VkColorSpaceKHR imageColorSpace
3488 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003489 u32 imageArrayLayers
3490 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003491 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003492 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003493 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003494 VkSurfaceTransformFlagBitsKHR preTransform
3495 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003496 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003497 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003498 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003499}
3500
Jesse Hallad250842017-03-10 18:35:38 -08003501@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003502class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003503 VkStructureType sType
3504 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003505 u32 waitSemaphoreCount
3506 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003507 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003508 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003509 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003510 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003511}
3512
Jesse Hallad250842017-03-10 18:35:38 -08003513@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003514class VkDisplayPropertiesKHR {
3515 VkDisplayKHR display
3516 const char* displayName
3517 VkExtent2D physicalDimensions
3518 VkExtent2D physicalResolution
3519 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003520 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003521 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003522}
3523
Jesse Hallad250842017-03-10 18:35:38 -08003524@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003525class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003526 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003527 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003528}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003529
Jesse Hallad250842017-03-10 18:35:38 -08003530@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003531class VkDisplayModePropertiesKHR {
3532 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003533 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003534}
3535
Jesse Hallad250842017-03-10 18:35:38 -08003536@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003537class VkDisplayModeCreateInfoKHR {
3538 VkStructureType sType
3539 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003540 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003541 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003542}
3543
Jesse Hallad250842017-03-10 18:35:38 -08003544@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003545class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003546 VkDisplayKHR currentDisplay
3547 u32 currentStackIndex
3548}
3549
Jesse Hallad250842017-03-10 18:35:38 -08003550@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003551class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003552 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3553 VkOffset2D minSrcPosition
3554 VkOffset2D maxSrcPosition
3555 VkExtent2D minSrcExtent
3556 VkExtent2D maxSrcExtent
3557 VkOffset2D minDstPosition
3558 VkOffset2D maxDstPosition
3559 VkExtent2D minDstExtent
3560 VkExtent2D maxDstExtent
3561}
3562
Jesse Hallad250842017-03-10 18:35:38 -08003563@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003564class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003565 VkStructureType sType
3566 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003567 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003568 VkDisplayModeKHR displayMode
3569 u32 planeIndex
3570 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003571 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003572 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003573 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3574 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003575}
3576
Jesse Hallad250842017-03-10 18:35:38 -08003577@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003578class VkDisplayPresentInfoKHR {
3579 VkStructureType sType
3580 const void* pNext
3581 VkRect2D srcRect
3582 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003583 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003584}
3585
Jesse Hallad250842017-03-10 18:35:38 -08003586@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003587class VkXlibSurfaceCreateInfoKHR {
3588 VkStructureType sType
3589 const void* pNext
3590 VkXlibSurfaceCreateFlagsKHR flags
3591 platform.Display* dpy
3592 platform.Window window
3593}
3594
Jesse Hallad250842017-03-10 18:35:38 -08003595@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003596class VkXcbSurfaceCreateInfoKHR {
3597 VkStructureType sType
3598 const void* pNext
3599 VkXcbSurfaceCreateFlagsKHR flags
3600 platform.xcb_connection_t* connection
3601 platform.xcb_window_t window
3602}
3603
Jesse Hallad250842017-03-10 18:35:38 -08003604@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003605class VkWaylandSurfaceCreateInfoKHR {
3606 VkStructureType sType
3607 const void* pNext
3608 VkWaylandSurfaceCreateFlagsKHR flags
3609 platform.wl_display* display
3610 platform.wl_surface* surface
3611}
3612
Jesse Hallad250842017-03-10 18:35:38 -08003613@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003614class VkMirSurfaceCreateInfoKHR {
3615 VkStructureType sType
3616 const void* pNext
3617 VkMirSurfaceCreateFlagsKHR flags
3618 platform.MirConnection* connection
3619 platform.MirSurface* mirSurface
3620}
3621
Jesse Hallad250842017-03-10 18:35:38 -08003622@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003623class VkAndroidSurfaceCreateInfoKHR {
3624 VkStructureType sType
3625 const void* pNext
3626 VkAndroidSurfaceCreateFlagsKHR flags
3627 platform.ANativeWindow* window
3628}
3629
Jesse Hallad250842017-03-10 18:35:38 -08003630@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003631class VkWin32SurfaceCreateInfoKHR {
3632 VkStructureType sType
3633 const void* pNext
3634 VkWin32SurfaceCreateFlagsKHR flags
3635 platform.HINSTANCE hinstance
3636 platform.HWND hwnd
3637}
3638
Jesse Hallad250842017-03-10 18:35:38 -08003639@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003640@internal class Gralloc1Usage {
3641 u64 consumer
3642 u64 producer
3643}
3644
Jesse Hallad250842017-03-10 18:35:38 -08003645@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003646class VkNativeBufferANDROID {
3647 VkStructureType sType
3648 const void* pNext
3649 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003650 s32 stride
3651 s32 format
3652 s32 usage
3653 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003654}
3655
Jesse Hallad250842017-03-10 18:35:38 -08003656@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003657class VkSwapchainImageCreateInfoANDROID {
3658 VkStructureType sType
3659 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003660 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003661}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003662
Jesse Hallad250842017-03-10 18:35:38 -08003663@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003664class VkPhysicalDevicePresentationPropertiesANDROID {
3665 VkStructureType sType
3666 void* pNext
3667 VkBool32 sharedImage
3668}
3669
Jesse Hallad250842017-03-10 18:35:38 -08003670@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003671class VkDebugReportCallbackCreateInfoEXT {
3672 VkStructureType sType
3673 const void* pNext
3674 VkDebugReportFlagsEXT flags
3675 PFN_vkDebugReportCallbackEXT pfnCallback
3676 void* pUserData
3677}
3678
Jesse Hallad250842017-03-10 18:35:38 -08003679@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003680class VkPipelineRasterizationStateRasterizationOrderAMD {
3681 VkStructureType sType
3682 const void* pNext
3683 VkRasterizationOrderAMD rasterizationOrder
3684}
3685
Jesse Hallad250842017-03-10 18:35:38 -08003686@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003687class VkDebugMarkerObjectNameInfoEXT {
3688 VkStructureType sType
3689 const void* pNext
3690 VkDebugReportObjectTypeEXT objectType
3691 u64 object
3692 const char* pObjectName
3693}
3694
Jesse Hallad250842017-03-10 18:35:38 -08003695@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003696class VkDebugMarkerObjectTagInfoEXT {
3697 VkStructureType sType
3698 const void* pNext
3699 VkDebugReportObjectTypeEXT objectType
3700 u64 object
3701 u64 tagName
3702 platform.size_t tagSize
3703 const void* pTag
3704}
3705
Jesse Hallad250842017-03-10 18:35:38 -08003706@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003707class VkDebugMarkerMarkerInfoEXT {
3708 VkStructureType sType
3709 const void* pNext
3710 const char* pMarkerName
3711 f32[4] color
3712}
3713
Jesse Hallad250842017-03-10 18:35:38 -08003714@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003715class VkDedicatedAllocationImageCreateInfoNV {
3716 VkStructureType sType
3717 const void* pNext
3718 VkBool32 dedicatedAllocation
3719}
3720
Jesse Hallad250842017-03-10 18:35:38 -08003721@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003722class VkDedicatedAllocationBufferCreateInfoNV {
3723 VkStructureType sType
3724 const void* pNext
3725 VkBool32 dedicatedAllocation
3726}
3727
Jesse Hallad250842017-03-10 18:35:38 -08003728@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003729class VkDedicatedAllocationMemoryAllocateInfoNV {
3730 VkStructureType sType
3731 const void* pNext
3732 VkImage image
3733 VkBuffer buffer
3734}
3735
Jesse Hall7ba0ac72017-07-07 17:13:23 -07003736@extension("VK_AMD_texture_gather_bias_lod") // 42
3737class VkTextureLODGatherFormatPropertiesAMD {
3738 VkStructureType sType
3739 void* pNext
3740 VkBool32 supportsTextureGatherLODBiasAMD
3741}
3742
Jesse Hallad250842017-03-10 18:35:38 -08003743@extension("VK_KHX_multiview") // 54
3744class VkRenderPassMultiviewCreateInfoKHX {
3745 VkStructureType sType
3746 const void* pNext
3747 u32 subpassCount
3748 const u32* pViewMasks
3749 u32 dependencyCount
3750 const s32* pViewOffsets
3751 u32 correlationMaskCount
3752 const u32* pCorrelationMasks
3753}
3754
3755@extension("VK_KHX_multiview") // 54
3756class VkPhysicalDeviceMultiviewFeaturesKHX {
3757 VkStructureType sType
3758 void* pNext
3759 VkBool32 multiview
3760 VkBool32 multiviewGeometryShader
3761 VkBool32 multiviewTessellationShader
3762}
3763
3764@extension("VK_KHX_multiview") // 54
3765class VkPhysicalDeviceMultiviewPropertiesKHX {
3766 VkStructureType sType
3767 void* pNext
3768 u32 maxMultiviewViewCount
3769 u32 maxMultiviewInstanceIndex
3770}
3771
3772@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003773class VkExternalImageFormatPropertiesNV {
3774 VkImageFormatProperties imageFormatProperties
3775 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3776 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3777 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3778}
3779
Jesse Hallad250842017-03-10 18:35:38 -08003780@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003781class VkExternalMemoryImageCreateInfoNV {
3782 VkStructureType sType
3783 const void* pNext
3784 VkExternalMemoryHandleTypeFlagsNV handleTypes
3785}
3786
Jesse Hallad250842017-03-10 18:35:38 -08003787@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003788class VkExportMemoryAllocateInfoNV {
3789 VkStructureType sType
3790 const void* pNext
3791 VkExternalMemoryHandleTypeFlagsNV handleTypes
3792}
3793
Jesse Hallad250842017-03-10 18:35:38 -08003794@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003795class VkImportMemoryWin32HandleInfoNV {
3796 VkStructureType sType
3797 const void* pNext
3798 VkExternalMemoryHandleTypeFlagsNV handleType
3799 platform.HANDLE handle
3800}
3801
Jesse Hallad250842017-03-10 18:35:38 -08003802@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003803class VkExportMemoryWin32HandleInfoNV {
3804 VkStructureType sType
3805 const void* pNext
3806 const platform.SECURITY_ATTRIBUTES* pAttributes
3807 platform.DWORD dwAccess
3808}
3809
Jesse Hallad250842017-03-10 18:35:38 -08003810@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003811class VkWin32KeyedMutexAcquireReleaseInfoNV {
3812 VkStructureType sType
3813 const void* pNext
3814 u32 acquireCount
3815 const VkDeviceMemory* pAcquireSyncs
3816 const u64* pAcquireKeys
3817 const u32* pAcquireTimeoutMilliseconds
3818 u32 releaseCount
3819 const VkDeviceMemory* pReleaseSyncs
3820 const u64* pReleaseKeys
3821}
3822
Jesse Hallad250842017-03-10 18:35:38 -08003823@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003824class VkPhysicalDeviceFeatures2KHR {
3825 VkStructureType sType
3826 void* pNext
3827 VkPhysicalDeviceFeatures features
3828}
3829
Jesse Hallad250842017-03-10 18:35:38 -08003830@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003831class VkPhysicalDeviceProperties2KHR {
3832 VkStructureType sType
3833 void* pNext
3834 VkPhysicalDeviceProperties properties
3835}
3836
Jesse Hallad250842017-03-10 18:35:38 -08003837@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003838class VkFormatProperties2KHR {
3839 VkStructureType sType
3840 void* pNext
3841 VkFormatProperties formatProperties
3842}
3843
Jesse Hallad250842017-03-10 18:35:38 -08003844@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003845class VkImageFormatProperties2KHR {
3846 VkStructureType sType
3847 void* pNext
3848 VkImageFormatProperties imageFormatProperties
3849}
3850
Jesse Hallad250842017-03-10 18:35:38 -08003851@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003852class VkPhysicalDeviceImageFormatInfo2KHR {
3853 VkStructureType sType
3854 const void* pNext
3855 VkFormat format
3856 VkImageType type
3857 VkImageTiling tiling
3858 VkImageUsageFlags usage
3859 VkImageCreateFlags flags
3860}
3861
Jesse Hallad250842017-03-10 18:35:38 -08003862@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003863class VkQueueFamilyProperties2KHR {
3864 VkStructureType sType
3865 void* pNext
3866 VkQueueFamilyProperties queueFamilyProperties
3867}
3868
Jesse Hallad250842017-03-10 18:35:38 -08003869@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003870class VkPhysicalDeviceMemoryProperties2KHR {
3871 VkStructureType sType
3872 void* pNext
3873 VkPhysicalDeviceMemoryProperties memoryProperties
3874}
3875
Jesse Hallad250842017-03-10 18:35:38 -08003876@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003877class VkSparseImageFormatProperties2KHR {
3878 VkStructureType sType
3879 void* pNext
3880 VkSparseImageFormatProperties properties
3881}
3882
Jesse Hallad250842017-03-10 18:35:38 -08003883@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003884class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3885 VkStructureType sType
3886 const void* pNext
3887 VkFormat format
3888 VkImageType type
3889 VkSampleCountFlagBits samples
3890 VkImageUsageFlags usage
3891 VkImageTiling tiling
3892}
3893
Jesse Hallad250842017-03-10 18:35:38 -08003894@extension("VK_KHX_device_group") // 61
3895class VkMemoryAllocateFlagsInfoKHX {
3896 VkStructureType sType
3897 const void* pNext
3898 VkMemoryAllocateFlagsKHX flags
3899 u32 deviceMask
3900}
3901
3902@extension("VK_KHX_device_group") // 61
3903class VkBindBufferMemoryInfoKHX {
3904 VkStructureType sType
3905 const void* pNext
3906 VkBuffer buffer
3907 VkDeviceMemory memory
3908 VkDeviceSize memoryOffset
3909 u32 deviceIndexCount
3910 const u32* pDeviceIndices
3911}
3912
3913@extension("VK_KHX_device_group") // 61
3914class VkBindImageMemoryInfoKHX {
3915 VkStructureType sType
3916 const void* pNext
3917 VkImage image
3918 VkDeviceMemory memory
3919 VkDeviceSize memoryOffset
3920 u32 deviceIndexCount
3921 const u32* pDeviceIndices
3922 u32 SFRRectCount
3923 const VkRect2D* pSFRRects
3924}
3925
3926@extension("VK_KHX_device_group") // 61
3927class VkDeviceGroupRenderPassBeginInfoKHX {
3928 VkStructureType sType
3929 const void* pNext
3930 u32 deviceMask
3931 u32 deviceRenderAreaCount
3932 const VkRect2D* pDeviceRenderAreas
3933}
3934
3935@extension("VK_KHX_device_group") // 61
3936class VkDeviceGroupCommandBufferBeginInfoKHX {
3937 VkStructureType sType
3938 const void* pNext
3939 u32 deviceMask
3940}
3941
3942@extension("VK_KHX_device_group") // 61
3943class VkDeviceGroupSubmitInfoKHX {
3944 VkStructureType sType
3945 const void* pNext
3946 u32 waitSemaphoreCount
3947 const u32* pWaitSemaphoreDeviceIndices
3948 u32 commandBufferCount
3949 const u32* pCommandBufferDeviceMasks
3950 u32 signalSemaphoreCount
3951 const u32* pSignalSemaphoreDeviceIndices
3952}
3953
3954@extension("VK_KHX_device_group") // 61
3955class VkDeviceGroupBindSparseInfoKHX {
3956 VkStructureType sType
3957 const void* pNext
3958 u32 resourceDeviceIndex
3959 u32 memoryDeviceIndex
3960}
3961
3962@extension("VK_KHX_device_group") // 61
3963class VkDeviceGroupPresentCapabilitiesKHX {
3964 VkStructureType sType
3965 const void* pNext
3966 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3967 VkDeviceGroupPresentModeFlagsKHX modes
3968}
3969
3970@extension("VK_KHX_device_group") // 61
3971class VkImageSwapchainCreateInfoKHX {
3972 VkStructureType sType
3973 const void* pNext
3974 VkSwapchainKHR swapchain
3975}
3976
3977@extension("VK_KHX_device_group") // 61
3978class VkBindImageMemorySwapchainInfoKHX {
3979 VkStructureType sType
3980 const void* pNext
3981 VkSwapchainKHR swapchain
3982 u32 imageIndex
3983}
3984
3985@extension("VK_KHX_device_group") // 61
3986class VkAcquireNextImageInfoKHX {
3987 VkStructureType sType
3988 const void* pNext
3989 VkSwapchainKHR swapchain
3990 u64 timeout
3991 VkSemaphore semaphore
3992 VkFence fence
3993 u32 deviceMask
3994}
3995
3996@extension("VK_KHX_device_group") // 61
3997class VkDeviceGroupPresentInfoKHX {
3998 VkStructureType sType
3999 const void* pNext
4000 u32 swapchainCount
4001 const u32* pDeviceMasks
4002 VkDeviceGroupPresentModeFlagBitsKHX mode
4003}
4004
4005@extension("VK_KHX_device_group") // 61
4006class VkDeviceGroupSwapchainCreateInfoKHX {
4007 VkStructureType sType
4008 const void* pNext
4009 VkDeviceGroupPresentModeFlagsKHX modes
4010}
4011
4012@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13004013class VkValidationFlagsEXT {
4014 VkStructureType sType
4015 const void* pNext
4016 u32 disabledValidationCheckCount
4017 VkValidationCheckEXT* pDisabledValidationChecks
4018}
4019
Jesse Hallad250842017-03-10 18:35:38 -08004020@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08004021class VkViSurfaceCreateInfoNN {
4022 VkStructureType sType
4023 const void* pNext
4024 VkViSurfaceCreateFlagsNN flags
4025 void* window
4026}
4027
Jesse Hallad250842017-03-10 18:35:38 -08004028@extension("VK_KHX_device_group_creation") // 71
4029class VkPhysicalDeviceGroupPropertiesKHX {
4030 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07004031 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004032 u32 physicalDeviceCount
4033 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
4034 VkBool32 subsetAllocation
4035}
4036
4037@extension("VK_KHX_device_group_creation") // 71
4038class VkDeviceGroupDeviceCreateInfoKHX {
4039 VkStructureType sType
4040 const void* pNext
4041 u32 physicalDeviceCount
4042 const VkPhysicalDevice* pPhysicalDevices
4043}
4044
Jesse Hall9492f992017-08-28 12:10:06 -07004045@extension("VK_KHR_external_memory_capabilities") // 72
4046class VkExternalMemoryPropertiesKHR {
4047 VkExternalMemoryFeatureFlagsKHR externalMemoryFeatures
4048 VkExternalMemoryHandleTypeFlagsKHR exportFromImportedHandleTypes
4049 VkExternalMemoryHandleTypeFlagsKHR compatibleHandleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004050}
4051
Jesse Hall9492f992017-08-28 12:10:06 -07004052@extension("VK_KHR_external_memory_capabilities") // 72
4053class VkPhysicalDeviceExternalImageFormatInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004054 VkStructureType sType
4055 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004056 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004057}
4058
Jesse Hall9492f992017-08-28 12:10:06 -07004059@extension("VK_KHR_external_memory_capabilities") // 72
4060class VkExternalImageFormatPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004061 VkStructureType sType
4062 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004063 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08004064}
4065
Jesse Hall9492f992017-08-28 12:10:06 -07004066@extension("VK_KHR_external_memory_capabilities") // 72
4067class VkPhysicalDeviceExternalBufferInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004068 VkStructureType sType
4069 const void* pNext
4070 VkBufferCreateFlags flags
4071 VkBufferUsageFlags usage
Jesse Hall9492f992017-08-28 12:10:06 -07004072 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004073}
4074
Jesse Hall9492f992017-08-28 12:10:06 -07004075@extension("VK_KHR_external_memory_capabilities") // 72
4076class VkExternalBufferPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004077 VkStructureType sType
4078 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004079 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08004080}
4081
Jesse Hall9492f992017-08-28 12:10:06 -07004082@extension("VK_KHR_external_memory_capabilities") // 72
4083class VkPhysicalDeviceIDPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004084 VkStructureType sType
4085 void* pNext
4086 u8[VK_UUID_SIZE] deviceUUID
4087 u8[VK_UUID_SIZE] driverUUID
Jesse Hall9492f992017-08-28 12:10:06 -07004088 u8[VK_LUID_SIZE_KHR] deviceLUID
4089 u32 deviceNodeMask
Jesse Hallad250842017-03-10 18:35:38 -08004090 VkBool32 deviceLUIDValid
4091}
4092
Jesse Hall9492f992017-08-28 12:10:06 -07004093@extension("VK_KHR_external_memory") // 73
4094class VkExternalMemoryImageCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004095 VkStructureType sType
4096 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004097 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004098}
4099
Jesse Hall9492f992017-08-28 12:10:06 -07004100@extension("VK_KHR_external_memory") // 73
4101class VkExternalMemoryBufferCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004102 VkStructureType sType
4103 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004104 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004105}
4106
Jesse Hall9492f992017-08-28 12:10:06 -07004107@extension("VK_KHR_external_memory") // 73
4108class VkExportMemoryAllocateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004109 VkStructureType sType
4110 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004111 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004112}
4113
Jesse Hall9492f992017-08-28 12:10:06 -07004114@extension("VK_KHR_external_memory_win32") // 74
4115class VkImportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004116 VkStructureType sType
4117 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004118 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004119 platform.HANDLE handle
Jesse Hall9492f992017-08-28 12:10:06 -07004120 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08004121}
4122
Jesse Hall9492f992017-08-28 12:10:06 -07004123@extension("VK_KHR_external_memory_win32") // 74
4124class VkExportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004125 VkStructureType sType
4126 const void* pNext
4127 const platform.SECURITY_ATTRIBUTES* pAttributes
4128 platform.DWORD dwAccess
4129 platform.LPCWSTR name
4130}
4131
Jesse Hall9492f992017-08-28 12:10:06 -07004132@extension("VK_KHR_external_memory_win32") // 74
4133class VkMemoryWin32HandlePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004134 VkStructureType sType
4135 void* pNext
4136 u32 memoryTypeBits
4137}
4138
Jesse Hall9492f992017-08-28 12:10:06 -07004139@extension("VK_KHR_external_memory_win32") // 74
4140class VkMemoryGetWin32HandleInfoKHR {
4141 VkStructureType sType
4142 void* pNext
4143 VkDeviceMemory memory
4144 VkExternalMemoryHandleTypeFlagBitsKHR handleType
4145}
4146
4147@extension("VK_KHR_external_memory_fd") // 75
4148class VkImportMemoryFdInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004149 VkStructureType sType
4150 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004151 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004152 int fd
4153}
4154
Jesse Hall9492f992017-08-28 12:10:06 -07004155@extension("VK_KHR_external_memory_fd") // 75
4156class VkMemoryFdPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004157 VkStructureType sType
4158 void* pNext
4159 u32 memoryTypeBits
4160}
4161
Jesse Hall9492f992017-08-28 12:10:06 -07004162@extension("VK_KHR_external_memory_fd") // 75
4163class VkMemoryGetFdInfoKHR {
4164 VkStructureType sType
4165 void* pNext
4166 VkDeviceMemory memory
4167 VkExternalMemoryHandleTypeFlagBitsKHR handleType
4168}
4169
4170@extension("VK_KHR_win32_keyed_mutex") // 76
4171class VkWin32KeyedMutexAcquireReleaseInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004172 VkStructureType sType
4173 const void* pNext
4174 u32 acquireCount
4175 const VkDeviceMemory* pAcquireSyncs
4176 const u64* pAcquireKeys
4177 const u32* pAcquireTimeouts
4178 u32 releaseCount
4179 const VkDeviceMemory* pReleaseSyncs
4180 const u64* pReleaseKeys
4181}
4182
Jesse Hall9492f992017-08-28 12:10:06 -07004183@extension("VK_KHR_external_semaphore_capabilities") // 77
4184class VkPhysicalDeviceExternalSemaphoreInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004185 VkStructureType sType
4186 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004187 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004188}
4189
Jesse Hall9492f992017-08-28 12:10:06 -07004190@extension("VK_KHR_external_semaphore_capabilities") // 77
4191class VkExternalSemaphorePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004192 VkStructureType sType
4193 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004194 VkExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes
4195 VkExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes
4196 VkExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures
Jesse Hallad250842017-03-10 18:35:38 -08004197}
4198
Jesse Hall9492f992017-08-28 12:10:06 -07004199@extension("VK_KHR_external_semaphore") // 78
4200class VkExportSemaphoreCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004201 VkStructureType sType
4202 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07004203 VkExternalSemaphoreHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08004204}
4205
Jesse Hall9492f992017-08-28 12:10:06 -07004206@extension("VK_KHR_external_semaphore_win32") // 79
4207class VkImportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004208 VkStructureType sType
4209 const void* pNext
4210 VkSemaphore semaphore
Jesse Hall9492f992017-08-28 12:10:06 -07004211 VkSemaphoreImportFlagsKHR flags
4212 VkExternalSemaphoreHandleTypeFlagsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004213 platform.HANDLE handle
Jesse Hall9492f992017-08-28 12:10:06 -07004214 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08004215}
4216
Jesse Hall9492f992017-08-28 12:10:06 -07004217@extension("VK_KHR_external_semaphore_win32") // 79
4218class VkExportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004219 VkStructureType sType
4220 const void* pNext
4221 const platform.SECURITY_ATTRIBUTES* pAttributes
4222 platform.DWORD dwAccess
4223 platform.LPCWSTR name
4224}
4225
Jesse Hall9492f992017-08-28 12:10:06 -07004226@extension("VK_KHR_external_semaphore_win32") // 79
4227class VkD3D12FenceSubmitInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004228 VkStructureType sType
4229 const void* pNext
4230 u32 waitSemaphoreValuesCount
4231 const u64* pWaitSemaphoreValues
4232 u32 signalSemaphoreValuesCount
4233 const u64* pSignalSemaphoreValues
4234}
4235
Jesse Hall9492f992017-08-28 12:10:06 -07004236@extension("VK_KHR_external_semaphore_win32") // 79
4237class VkSemaphoreGetWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004238 VkStructureType sType
4239 const void* pNext
4240 VkSemaphore semaphore
Jesse Hall9492f992017-08-28 12:10:06 -07004241 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
4242}
4243
4244@extension("VK_KHR_external_semaphore_fd") // 80
4245class VkImportSemaphoreFdInfoKHR {
4246 VkStructureType sType
4247 const void* pNext
4248 VkSemaphore semaphore
4249 VkSemaphoreImportFlagsKHR flags
4250 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08004251 s32 fd
4252}
4253
Jesse Hall9492f992017-08-28 12:10:06 -07004254@extension("VK_KHR_external_semaphore_fd") // 80
4255class VkSemaphoreGetFdInfoKHR {
4256 VkStructureType sType
4257 const void* pNext
4258 VkSemaphore semaphore
4259 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
4260}
4261
Jesse Hallad250842017-03-10 18:35:38 -08004262@extension("VK_KHR_push_descriptor") // 81
4263class VkPhysicalDevicePushDescriptorPropertiesKHR {
4264 VkStructureType sType
4265 void* pNext
4266 u32 maxPushDescriptors
4267}
4268
Jesse Hall9492f992017-08-28 12:10:06 -07004269@extension("VK_KHR_16bit_storage") // 84
4270class VkPhysicalDevice16BitStorageFeaturesKHR {
4271 VkStructureType sType
4272 void* pNext
4273 VkBool32 storageBuffer16BitAccess
4274 VkBool32 uniformAndStorageBuffer16BitAccess
4275 VkBool32 storagePushConstant16
4276 VkBool32 storageInputOutput16
4277}
4278
Jesse Hallad250842017-03-10 18:35:38 -08004279@extension("VK_KHR_incremental_present") // 85
4280class VkRectLayerKHR {
4281 VkOffset2D offset
4282 VkExtent2D extent
4283 u32 layer
4284}
4285
4286@extension("VK_KHR_incremental_present") // 85
4287class VkPresentRegionKHR {
4288 u32 rectangleCount
4289 const VkRectLayerKHR* pRectangles
4290}
4291
4292@extension("VK_KHR_incremental_present") // 85
4293class VkPresentRegionsKHR {
4294 VkStructureType sType
4295 const void* pNext
4296 u32 swapchainCount
4297 const VkPresentRegionKHR* pRegions
4298}
4299
4300@extension("VK_KHR_descriptor_update_template") // 86
4301class VkDescriptorUpdateTemplateEntryKHR {
4302 u32 dstBinding
4303 u32 dstArrayElement
4304 u32 descriptorCount
4305 VkDescriptorType descriptorType
4306 platform.size_t offset
4307 platform.size_t stride
4308}
4309
4310@extension("VK_KHR_descriptor_update_template") // 86
4311class VkDescriptorUpdateTemplateCreateInfoKHR {
4312 VkStructureType sType
4313 void* pNext
4314 VkDescriptorUpdateTemplateCreateFlagsKHR flags
4315 u32 descriptorUpdateEntryCount
4316 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
4317 VkDescriptorUpdateTemplateTypeKHR templateType
4318 VkDescriptorSetLayout descriptorSetLayout
4319 VkPipelineBindPoint pipelineBindPoint
4320 VkPipelineLayout pipelineLayout
4321 u32 set
4322}
4323
4324@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004325class VkDeviceGeneratedCommandsFeaturesNVX {
4326 VkStructureType sType
4327 const void* pNext
4328 VkBool32 computeBindingPointSupport
4329}
4330
Jesse Hallad250842017-03-10 18:35:38 -08004331@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004332class VkDeviceGeneratedCommandsLimitsNVX {
4333 VkStructureType sType
4334 const void* pNext
4335 u32 maxIndirectCommandsLayoutTokenCount
4336 u32 maxObjectEntryCounts
4337 u32 minSequenceCountBufferOffsetAlignment
4338 u32 minSequenceIndexBufferOffsetAlignment
4339 u32 minCommandsTokenBufferOffsetAlignment
4340}
4341
Jesse Hallad250842017-03-10 18:35:38 -08004342@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004343class VkIndirectCommandsTokenNVX {
4344 VkIndirectCommandsTokenTypeNVX tokenType
4345 VkBuffer buffer
4346 VkDeviceSize offset
4347}
4348
Jesse Hallad250842017-03-10 18:35:38 -08004349@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004350class VkIndirectCommandsLayoutTokenNVX {
4351 VkIndirectCommandsTokenTypeNVX tokenType
4352 u32 bindingUnit
4353 u32 dynamicCount
4354 u32 divisor
4355}
4356
Jesse Hallad250842017-03-10 18:35:38 -08004357@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004358class VkIndirectCommandsLayoutCreateInfoNVX {
4359 VkStructureType sType
4360 const void* pNext
4361 VkPipelineBindPoint pipelineBindPoint
4362 VkIndirectCommandsLayoutUsageFlagsNVX flags
4363 u32 tokenCount
4364 const VkIndirectCommandsLayoutTokenNVX* pTokens
4365}
4366
Jesse Hallad250842017-03-10 18:35:38 -08004367@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004368class VkCmdProcessCommandsInfoNVX {
4369 VkStructureType sType
4370 const void* pNext
4371 VkObjectTableNVX objectTable
4372 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4373 u32 indirectCommandsTokenCount
4374 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4375 u32 maxSequencesCount
4376 VkCommandBuffer targetCommandBuffer
4377 VkBuffer sequencesCountBuffer
4378 VkDeviceSize sequencesCountOffset
4379 VkBuffer sequencesIndexBuffer
4380 VkDeviceSize sequencesIndexOffset
4381}
4382
Jesse Hallad250842017-03-10 18:35:38 -08004383@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004384class VkCmdReserveSpaceForCommandsInfoNVX {
4385 VkStructureType sType
4386 const void* pNext
4387 VkObjectTableNVX objectTable
4388 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4389 u32 maxSequencesCount
4390}
4391
Jesse Hallad250842017-03-10 18:35:38 -08004392@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004393class VkObjectTableCreateInfoNVX {
4394 VkStructureType sType
4395 const void* pNext
4396 u32 objectCount
4397 const VkObjectEntryTypeNVX* pObjectEntryTypes
4398 const u32* pObjectEntryCounts
4399 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4400 u32 maxUniformBuffersPerDescriptor
4401 u32 maxStorageBuffersPerDescriptor
4402 u32 maxStorageImagesPerDescriptor
4403 u32 maxSampledImagesPerDescriptor
4404 u32 maxPipelineLayouts
4405}
4406
Jesse Hallad250842017-03-10 18:35:38 -08004407@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004408class VkObjectTableEntryNVX {
4409 VkObjectEntryTypeNVX type
4410 VkObjectEntryUsageFlagsNVX flags
4411}
4412
Jesse Hallad250842017-03-10 18:35:38 -08004413@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004414class VkObjectTablePipelineEntryNVX {
4415 VkObjectEntryTypeNVX type
4416 VkObjectEntryUsageFlagsNVX flags
4417 VkPipeline pipeline
4418}
4419
Jesse Hallad250842017-03-10 18:35:38 -08004420@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004421class VkObjectTableDescriptorSetEntryNVX {
4422 VkObjectEntryTypeNVX type
4423 VkObjectEntryUsageFlagsNVX flags
4424 VkPipelineLayout pipelineLayout
4425 VkDescriptorSet descriptorSet
4426}
4427
Jesse Hallad250842017-03-10 18:35:38 -08004428@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004429class VkObjectTableVertexBufferEntryNVX {
4430 VkObjectEntryTypeNVX type
4431 VkObjectEntryUsageFlagsNVX flags
4432 VkBuffer buffer
4433}
4434
Jesse Hallad250842017-03-10 18:35:38 -08004435@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004436class VkObjectTableIndexBufferEntryNVX {
4437 VkObjectEntryTypeNVX type
4438 VkObjectEntryUsageFlagsNVX flags
4439 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004440 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004441}
4442
Jesse Hallad250842017-03-10 18:35:38 -08004443@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004444class VkObjectTablePushConstantEntryNVX {
4445 VkObjectEntryTypeNVX type
4446 VkObjectEntryUsageFlagsNVX flags
4447 VkPipelineLayout pipelineLayout
4448 VkShaderStageFlags stageFlags
4449}
4450
Jesse Hallad250842017-03-10 18:35:38 -08004451@extension("VK_NV_clip_space_w_scaling") // 88
4452class VkViewportWScalingNV {
4453 f32 xcoeff
4454 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004455}
4456
Jesse Hallad250842017-03-10 18:35:38 -08004457@extension("VK_NV_clip_space_w_scaling") // 88
4458class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004459 VkStructureType sType
4460 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004461 VkBool32 viewportWScalingEnable
4462 u32 viewportCount
4463 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004464}
4465
Jesse Hallad250842017-03-10 18:35:38 -08004466@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004467class VkSurfaceCapabilities2EXT {
4468 VkStructureType sType
4469 void* pNext
4470 u32 minImageCount
4471 u32 maxImageCount
4472 VkExtent2D currentExtent
4473 VkExtent2D minImageExtent
4474 VkExtent2D maxImageExtent
4475 u32 maxImageArrayLayers
4476 VkSurfaceTransformFlagsKHR supportedTransforms
4477 VkSurfaceTransformFlagBitsKHR currentTransform
4478 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4479 VkImageUsageFlags supportedUsageFlags
4480 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4481}
4482
Jesse Hallad250842017-03-10 18:35:38 -08004483@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004484class VkDisplayPowerInfoEXT {
4485 VkStructureType sType
4486 const void* pNext
4487 VkDisplayPowerStateEXT powerState
4488}
4489
Jesse Hallad250842017-03-10 18:35:38 -08004490@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004491class VkDeviceEventInfoEXT {
4492 VkStructureType sType
4493 const void* pNext
4494 VkDeviceEventTypeEXT deviceEvent
4495}
4496
Jesse Hallad250842017-03-10 18:35:38 -08004497@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004498class VkDisplayEventInfoEXT {
4499 VkStructureType sType
4500 const void* pNext
4501 VkDisplayEventTypeEXT displayEvent
4502}
4503
Jesse Hallad250842017-03-10 18:35:38 -08004504@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004505class VkSwapchainCounterCreateInfoEXT {
4506 VkStructureType sType
4507 const void* pNext
4508 VkSurfaceCounterFlagsEXT surfaceCounters
4509}
4510
Jesse Hallad250842017-03-10 18:35:38 -08004511@extension("VK_GOOGLE_display_timing") // 93
4512class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004513 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08004514}
4515
4516@extension("VK_GOOGLE_display_timing") // 93
4517class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004518 u32 presentID
4519 u64 desiredPresentTime
4520 u64 actualPresentTime
4521 u64 earliestPresentTime
4522 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08004523}
4524
4525@extension("VK_GOOGLE_display_timing") // 93
4526class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004527 u32 presentID
4528 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08004529}
4530
4531@extension("VK_GOOGLE_display_timing") // 93
4532class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004533 VkStructureType sType
4534 const void* pNext
4535 u32 swapchainCount
4536 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08004537}
4538
4539@extension("VK_NVX_multiview_per_view_attributes") // 98
4540class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4541 VkStructureType sType
4542 void* pNext
4543 VkBool32 perViewPositionAllComponents
4544}
4545
4546@extension("VK_NV_viewport_swizzle") // 99
4547class VkViewportSwizzleNV {
4548 VkViewportCoordinateSwizzleNV x
4549 VkViewportCoordinateSwizzleNV y
4550 VkViewportCoordinateSwizzleNV z
4551 VkViewportCoordinateSwizzleNV w
4552}
4553
4554@extension("VK_NV_viewport_swizzle") // 99
4555class VkPipelineViewportSwizzleStateCreateInfoNV {
4556 VkStructureType sType
4557 const void* pNext
4558 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4559 u32 viewportCount
4560 const VkViewportSwizzleNV* pViewportSwizzles
4561}
4562
4563@extension("VK_EXT_discard_rectangles") // 100
4564class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4565 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07004566 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004567 u32 maxDiscardRectangles
4568}
4569
4570@extension("VK_EXT_discard_rectangles") // 100
4571class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004572 VkStructureType sType
4573 const void* pNext
4574 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4575 VkDiscardRectangleModeEXT discardRectangleMode
4576 u32 discardRectangleCount
4577 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08004578}
4579
4580@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004581class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004582 f32 x
4583 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004584}
4585
Jesse Hallad250842017-03-10 18:35:38 -08004586@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004587class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004588 VkStructureType sType
4589 const void* pNext
4590 VkXYColorEXT displayPrimaryRed
4591 VkXYColorEXT displayPrimaryGreen
4592 VkXYColorEXT displayPrimaryBlue
4593 VkXYColorEXT whitePoint
4594 f32 maxLuminance
4595 f32 minLuminance
4596 f32 maxContentLightLevel
4597 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004598}
4599
Jesse Hall05556b12017-05-18 17:40:25 -07004600@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13004601class VkSharedPresentSurfaceCapabilitiesKHR {
4602 VkStructureType sType
4603 const void* pNext
4604 VkImageUsageFlags sharedPresentSupportedUsageFlags
4605}
4606
Jesse Hall9492f992017-08-28 12:10:06 -07004607@extension("VK_KHR_external_fence_capabilities") // 113
4608class VkPhysicalDeviceExternalFenceInfoKHR {
4609 VkStructureType sType
4610 const void* pNext
4611 VkExternalFenceHandleTypeFlagBitsKHR handleType
4612}
4613
4614@extension("VK_KHR_external_fence_capabilities") // 113
4615class VkExternalFencePropertiesKHR {
4616 VkStructureType sType
4617 void* pNext
4618 VkExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes
4619 VkExternalFenceHandleTypeFlagsKHR compatibleHandleTypes
4620 VkExternalFenceFeatureFlagsKHR externalFenceFeatures
4621}
4622
4623@extension("VK_KHR_external_fence") // 114
4624class VkExportFenceCreateInfoKHR {
4625 VkStructureType sType
4626 const void* pNext
4627 VkExternalFenceHandleTypeFlagsKHR handleTypes
4628}
4629
4630@extension("VK_KHR_external_fence_win32") // 115
4631class VkImportFenceWin32HandleInfoKHR {
4632 VkStructureType sType
4633 const void* pNext
4634 VkFence fence
4635 VkFenceImportFlagsKHR flags
4636 VkExternalFenceHandleTypeFlagBitsKHR handleType
4637 platform.HANDLE handle
4638 platform.LPCWSTR name
4639}
4640
4641@extension("VK_KHR_external_fence_win32") // 115
4642class VkExportFenceWin32HandleInfoKHR {
4643 VkStructureType sType
4644 const void* pNext
4645 const platform.SECURITY_ATTRIBUTES* pAttributes
4646 platform.DWORD dwAccess
4647 platform.LPCWSTR name
4648}
4649
4650@extension("VK_KHR_external_fence_win32") // 115
4651class VkFenceGetWin32HandleInfoKHR {
4652 VkStructureType sType
4653 const void* pNext
4654 VkFence fence
4655 VkExternalFenceHandleTypeFlagBitsKHR handleType
4656}
4657
4658@extension("VK_KHR_external_fence_fd") // 116
4659class VkImportFenceFdInfoKHR {
4660 VkStructureType sType
4661 const void* pNext
4662 VkFence fence
4663 VkFenceImportFlagsKHR flags
4664 VkExternalFenceHandleTypeFlagBitsKHR handleType
4665 int fd
4666}
4667
4668@extension("VK_KHR_external_fence_fd") // 116
4669class VkFenceGetFdInfoKHR {
4670 VkStructureType sType
4671 const void* pNext
4672 VkFence fence
4673 VkExternalFenceHandleTypeFlagBitsKHR handleType
4674}
4675
Jesse Hall05556b12017-05-18 17:40:25 -07004676@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004677class VkPhysicalDeviceSurfaceInfo2KHR {
4678 VkStructureType sType
4679 const void* pNext
4680 VkSurfaceKHR surface
4681}
4682
Jesse Hall05556b12017-05-18 17:40:25 -07004683@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004684class VkSurfaceCapabilities2KHR {
4685 VkStructureType sType
4686 void* pNext
4687 VkSurfaceCapabilitiesKHR surfaceCapabilities
4688}
4689
Jesse Hall05556b12017-05-18 17:40:25 -07004690@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004691class VkSurfaceFormat2KHR {
4692 VkStructureType sType
4693 void* pNext
4694 VkSurfaceFormatKHR surfaceFormat
4695}
4696
Jesse Hall9492f992017-08-28 12:10:06 -07004697@extension("VK_KHR_variable_pointers") // 121
4698class VkPhysicalDeviceVariablePointerFeaturesKHR {
4699 VkStructureType sType
4700 void* pNext
4701 VkBool32 variablePointersStorageBuffer
4702 VkBool32 variablePointers
4703}
4704
Jesse Hallad250842017-03-10 18:35:38 -08004705@extension("VK_MVK_ios_surface") // 123
4706class VkIOSSurfaceCreateInfoMVK {
4707 VkStructureType sType
4708 const void* pNext
4709 VkIOSSurfaceCreateFlagsMVK flags
4710 const void* pView
4711}
4712
4713@extension("VK_MVK_macos_surface") // 124
4714class VkMacOSSurfaceCreateInfoMVK {
4715 VkStructureType sType
4716 const void* pNext
4717 VkMacOSSurfaceCreateFlagsMVK flags
4718 const void* pView
4719}
4720
Jesse Hall9492f992017-08-28 12:10:06 -07004721@extension("VK_KHR_dedicated_allocation") // 128
4722class VkMemoryDedicatedRequirementsKHR {
4723 VkStructureType sType
4724 void* pNext
4725 VkBool32 prefersDedicatedAllocation
4726 VkBool32 requiresDedicatedAllocation
4727}
4728
4729@extension("VK_KHR_dedicated_allocation") // 128
4730class VkMemoryDedicatedAllocateInfoKHR {
4731 VkStructureType sType
4732 const void* pNext
4733 VkImage image
4734 VkBuffer buffer
4735}
4736
Jesse Hall7ba0ac72017-07-07 17:13:23 -07004737@extension("VK_EXT_sampler_filter_minmax") // 131
4738class VkSamplerReductionModeCreateInfoEXT {
4739 VkStructureType sType
4740 const void* pNext
4741 VkSamplerReductionModeEXT reductionMode
4742}
4743
4744@extension("VK_EXT_sampler_filter_minmax") // 131
4745class VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
4746 VkStructureType sType
4747 void* pNext
4748 VkBool32 filterMinmaxSingleComponentFormats
4749 VkBool32 filterMinmaxImageComponentMapping
4750}
4751
Jesse Hall9492f992017-08-28 12:10:06 -07004752@extension("VK_KHR_get_memory_requirements2") // 147
4753class VkBufferMemoryRequirementsInfo2KHR {
4754 VkStructureType sType
4755 const void* pNext
4756 VkBuffer buffer
4757}
4758
4759@extension("VK_KHR_get_memory_requirements2") // 147
4760class VkImageMemoryRequirementsInfo2KHR {
4761 VkStructureType sType
4762 const void* pNext
4763 VkImage image
4764}
4765
4766@extension("VK_KHR_get_memory_requirements2") // 147
4767class VkImageSparseMemoryRequirementsInfo2KHR {
4768 VkStructureType sType
4769 const void* pNext
4770 VkImage image
4771}
4772
4773@extension("VK_KHR_get_memory_requirements2") // 147
4774class VkMemoryRequirements2KHR {
4775 VkStructureType sType
4776 void* pNext
4777 VkMemoryRequirements memoryRequirements
4778}
4779
4780@extension("VK_KHR_get_memory_requirements2") // 147
4781class VkSparseImageMemoryRequirements2KHR {
4782 VkStructureType sType
4783 void* pNext
4784 VkSparseImageMemoryRequirements memoryRequirements
4785}
4786
Jesse Hall7ba0ac72017-07-07 17:13:23 -07004787@extension("VK_EXT_blend_operation_advanced") // 149
4788class VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
4789 VkStructureType sType
4790 void* pNext
4791 VkBool32 advancedBlendCoherentOperations
4792}
4793
4794@extension("VK_EXT_blend_operation_advanced") // 149
4795class VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT {
4796 VkStructureType sType
4797 void* pNext
4798 u32 advancedBlendMaxColorAttachments
4799 VkBool32 advancedBlendIndependentBlend
4800 VkBool32 advancedBlendNonPremultipliedSrcColor
4801 VkBool32 advancedBlendNonPremultipliedDstColor
4802 VkBool32 advancedBlendCorrelatedOverlap
4803 VkBool32 advancedBlendAllOperations
4804}
4805
4806@extension("VK_EXT_blend_operation_advanced") // 149
4807class VkPipelineColorBlendAdvancedStateCreateInfoEXT {
4808 VkStructureType sType
4809 const void* pNext
4810 VkBool32 srcPremultiplied
4811 VkBool32 dstPremultiplied
4812 VkBlendOverlapEXT blendOverlap
4813}
4814
4815@extension("VK_NV_fragment_coverage_to_color") // 150
4816class VkPipelineCoverageToColorStateCreateInfoNV {
4817 VkStructureType sType
4818 const void* pNext
4819 VkPipelineCoverageToColorStateCreateFlagsNV flags
4820 VkBool32 coverageToColorEnable
4821 u32 coverageToColorLocation
4822}
4823
4824@extension("VK_NV_framebuffer_mixed_samples") // 153
4825class VkPipelineCoverageModulationStateCreateInfoNV {
4826 VkStructureType sType
4827 const void* pNext
4828 VkPipelineCoverageModulationStateCreateFlagsNV flags
4829 VkCoverageModulationModeNV coverageModulationMode
4830 VkBool32 coverageModulationTableEnable
4831 u32 coverageModulationTableCount
4832 const f32* pCoverageModulationTable
4833}
4834
Jesse Halld27f6aa2015-08-15 17:58:48 -07004835////////////////
4836// Commands //
4837////////////////
4838
4839// Function pointers. TODO: add support for function pointers.
4840
4841@external type void* PFN_vkVoidFunction
4842@pfn cmd void vkVoidFunction() {
4843}
4844
Jesse Hall3fbc8562015-11-29 22:10:52 -08004845@external type void* PFN_vkAllocationFunction
4846@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004847 void* pUserData,
4848 platform.size_t size,
4849 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004850 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004851 return ?
4852}
4853
Jesse Hall3fbc8562015-11-29 22:10:52 -08004854@external type void* PFN_vkReallocationFunction
4855@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004856 void* pUserData,
4857 void* pOriginal,
4858 platform.size_t size,
4859 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004860 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004861 return ?
4862}
4863
4864@external type void* PFN_vkFreeFunction
4865@pfn cmd void vkFreeFunction(
4866 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004867 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004868}
4869
Jesse Hall3fbc8562015-11-29 22:10:52 -08004870@external type void* PFN_vkInternalAllocationNotification
4871@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004872 void* pUserData,
4873 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004874 VkInternalAllocationType allocationType,
4875 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004876}
4877
4878@external type void* PFN_vkInternalFreeNotification
4879@pfn cmd void vkInternalFreeNotification(
4880 void* pUserData,
4881 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004882 VkInternalAllocationType allocationType,
4883 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004884}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004885
4886// Global functions
4887
4888@threadSafety("system")
4889cmd VkResult vkCreateInstance(
4890 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004891 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004892 VkInstance* pInstance) {
4893 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4894
4895 instance := ?
4896 pInstance[0] = instance
4897 State.Instances[instance] = new!InstanceObject()
4898
Jesse Hall3dd678a2016-01-08 21:52:01 -08004899 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4900 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004901
4902 return ?
4903}
4904
4905@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004906cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004907 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004908 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004909 instanceObject := GetInstance(instance)
4910
4911 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004912}
4913
4914@threadSafety("system")
4915cmd VkResult vkEnumeratePhysicalDevices(
4916 VkInstance instance,
4917 u32* pPhysicalDeviceCount,
4918 VkPhysicalDevice* pPhysicalDevices) {
4919 instanceObject := GetInstance(instance)
4920
4921 physicalDeviceCount := as!u32(?)
4922 pPhysicalDeviceCount[0] = physicalDeviceCount
4923 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4924
4925 for i in (0 .. physicalDeviceCount) {
4926 physicalDevice := ?
4927 physicalDevices[i] = physicalDevice
4928 if !(physicalDevice in State.PhysicalDevices) {
4929 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4930 }
4931 }
4932
4933 return ?
4934}
4935
4936cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4937 VkDevice device,
4938 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004939 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004940 device := GetDevice(device)
4941 }
4942
4943 return ?
4944}
4945
4946cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4947 VkInstance instance,
4948 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004949 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004950 instanceObject := GetInstance(instance)
4951 }
4952
4953 return ?
4954}
4955
Jesse Hall606a54e2015-11-19 22:17:28 -08004956cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004957 VkPhysicalDevice physicalDevice,
4958 VkPhysicalDeviceProperties* pProperties) {
4959 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4960
4961 properties := ?
4962 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004963}
4964
Jesse Hall606a54e2015-11-19 22:17:28 -08004965cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004966 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004967 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004968 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004969 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004970 // TODO: Figure out how to express fetch-count-or-properties
4971 // This version fails 'apic validate' with 'fence not allowed in
4972 // *semantic.Branch'. Other attempts have failed with the same or other
4973 // errors.
4974 // if pQueueFamilyProperties != null {
4975 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4976 // for i in (0 .. pCount[0]) {
4977 // queueProperties := as!VkQueueFamilyProperties(?)
4978 // queuesProperties[i] = queueProperties
4979 // }
4980 // } else {
4981 // count := ?
4982 // pCount[0] = count
4983 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004984}
4985
Jesse Hall606a54e2015-11-19 22:17:28 -08004986cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004987 VkPhysicalDevice physicalDevice,
4988 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4989 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4990
4991 memoryProperties := ?
4992 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004993}
4994
Jesse Hall606a54e2015-11-19 22:17:28 -08004995cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004996 VkPhysicalDevice physicalDevice,
4997 VkPhysicalDeviceFeatures* pFeatures) {
4998 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4999
5000 features := ?
5001 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07005002}
5003
Jesse Hall606a54e2015-11-19 22:17:28 -08005004cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005005 VkPhysicalDevice physicalDevice,
5006 VkFormat format,
5007 VkFormatProperties* pFormatProperties) {
5008 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5009
5010 formatProperties := ?
5011 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07005012}
5013
Jesse Halla9e57032015-11-30 01:03:10 -08005014cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005015 VkPhysicalDevice physicalDevice,
5016 VkFormat format,
5017 VkImageType type,
5018 VkImageTiling tiling,
5019 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005020 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005021 VkImageFormatProperties* pImageFormatProperties) {
5022 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5023
5024 imageFormatProperties := ?
5025 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08005026
5027 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07005028}
5029
Jesse Halld27f6aa2015-08-15 17:58:48 -07005030
5031// Device functions
5032
5033@threadSafety("system")
5034cmd VkResult vkCreateDevice(
5035 VkPhysicalDevice physicalDevice,
5036 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005037 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005038 VkDevice* pDevice) {
5039 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
5040 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5041
5042 device := ?
5043 pDevice[0] = device
5044 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
5045
5046 return ?
5047}
5048
5049@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005050cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08005051 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005052 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005053 deviceObject := GetDevice(device)
5054
5055 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005056}
5057
5058
5059// Extension discovery functions
5060
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005061cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08005062 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005063 VkLayerProperties* pProperties) {
5064 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005065 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005066
5067 properties := pProperties[0:count]
5068 for i in (0 .. count) {
5069 property := ?
5070 properties[i] = property
5071 }
5072
5073 return ?
5074}
5075
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005076cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005077 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005078 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005079 VkExtensionProperties* pProperties) {
5080 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005081 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005082
5083 properties := pProperties[0:count]
5084 for i in (0 .. count) {
5085 property := ?
5086 properties[i] = property
5087 }
5088
5089 return ?
5090}
5091
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005092cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005093 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005094 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005095 VkLayerProperties* pProperties) {
5096 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5097 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005098 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005099
5100 properties := pProperties[0:count]
5101 for i in (0 .. count) {
5102 property := ?
5103 properties[i] = property
5104 }
5105
5106 return ?
5107}
5108
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005109cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005110 VkPhysicalDevice physicalDevice,
5111 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005112 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005113 VkExtensionProperties* pProperties) {
5114 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
5115
5116 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08005117 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07005118
5119 properties := pProperties[0:count]
5120 for i in (0 .. count) {
5121 property := ?
5122 properties[i] = property
5123 }
5124
5125 return ?
5126}
5127
5128
5129// Queue functions
5130
5131@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08005132cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005133 VkDevice device,
5134 u32 queueFamilyIndex,
5135 u32 queueIndex,
5136 VkQueue* pQueue) {
5137 deviceObject := GetDevice(device)
5138
5139 queue := ?
5140 pQueue[0] = queue
5141
5142 if !(queue in State.Queues) {
5143 State.Queues[queue] = new!QueueObject(device: device)
5144 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005145}
5146
5147@threadSafety("app")
5148cmd VkResult vkQueueSubmit(
5149 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08005150 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08005151 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005152 VkFence fence) {
5153 queueObject := GetQueue(queue)
5154
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005155 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005156 fenceObject := GetFence(fence)
5157 assert(fenceObject.device == queueObject.device)
5158 }
5159
Jesse Hall3fbc8562015-11-29 22:10:52 -08005160 // commandBuffers := pcommandBuffers[0:commandBufferCount]
5161 // for i in (0 .. commandBufferCount) {
5162 // commandBuffer := commandBuffers[i]
5163 // commandBufferObject := GetCommandBuffer(commandBuffer)
5164 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08005165 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08005166 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
5167 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08005168 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005169
5170 return ?
5171}
5172
5173@threadSafety("system")
5174cmd VkResult vkQueueWaitIdle(
5175 VkQueue queue) {
5176 queueObject := GetQueue(queue)
5177
5178 return ?
5179}
5180
5181@threadSafety("system")
5182cmd VkResult vkDeviceWaitIdle(
5183 VkDevice device) {
5184 deviceObject := GetDevice(device)
5185
5186 return ?
5187}
5188
5189
5190// Memory functions
5191
5192@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005193cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005194 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005195 const VkMemoryAllocateInfo* pAllocateInfo,
5196 const VkAllocationCallbacks* pAllocator,
5197 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005198 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005199 deviceObject := GetDevice(device)
5200
Jesse Hall3fbc8562015-11-29 22:10:52 -08005201 memory := ?
5202 pMemory[0] = memory
5203 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005204 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005205 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005206
5207 return ?
5208}
5209
5210@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005211cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005212 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005213 VkDeviceMemory memory,
5214 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005215 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005216 memoryObject := GetDeviceMemory(memory)
5217 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005218
5219 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005220 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005221 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005222 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
5223 "vkFreeMemory: commandBuffers still bound")
5224 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005225}
5226
5227@threadSafety("app")
5228cmd VkResult vkMapMemory(
5229 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005230 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005231 VkDeviceSize offset,
5232 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005233 VkMemoryMapFlags flags,
5234 void** ppData) {
5235 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005236 memoryObject := GetDeviceMemory(memory)
5237 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005238
5239 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08005240 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005241
5242 return ?
5243}
5244
5245@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005246cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005247 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005248 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005249 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005250 memoryObject := GetDeviceMemory(memory)
5251 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005252}
5253
5254cmd VkResult vkFlushMappedMemoryRanges(
5255 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005256 u32 memoryRangeCount
5257 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005258 deviceObject := GetDevice(device)
5259
Jesse Hall3fbc8562015-11-29 22:10:52 -08005260 memoryRanges := pMemoryRanges[0:memoryRangeCount]
5261 for i in (0 .. memoryRangeCount) {
5262 memoryRange := memoryRanges[i]
5263 memoryObject := GetDeviceMemory(memoryRange.memory)
5264 assert(memoryObject.device == device)
5265 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005266 }
5267
5268 return ?
5269}
5270
5271cmd VkResult vkInvalidateMappedMemoryRanges(
5272 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005273 u32 memoryRangeCount,
5274 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005275 deviceObject := GetDevice(device)
5276
Jesse Hall3fbc8562015-11-29 22:10:52 -08005277 memoryRanges := pMemoryRanges[0:memoryRangeCount]
5278 for i in (0 .. memoryRangeCount) {
5279 memoryRange := memoryRanges[i]
5280 memoryObject := GetDeviceMemory(memoryRange.memory)
5281 assert(memoryObject.device == device)
5282 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005283 }
5284
5285 return ?
5286}
5287
5288
5289// Memory management API functions
5290
Jesse Hall606a54e2015-11-19 22:17:28 -08005291cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005292 VkDevice device,
5293 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005294 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005295 deviceObject := GetDevice(device)
5296
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005297 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005298 memoryObject := GetDeviceMemory(memory)
5299 assert(memoryObject.device == device)
5300 }
5301
5302 committedMemoryInBytes := ?
5303 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07005304}
5305
Jesse Hall606a54e2015-11-19 22:17:28 -08005306cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005307 VkDevice device,
5308 VkBuffer buffer,
5309 VkMemoryRequirements* pMemoryRequirements) {
5310 deviceObject := GetDevice(device)
5311 bufferObject := GetBuffer(buffer)
5312 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005313}
5314
5315cmd VkResult vkBindBufferMemory(
5316 VkDevice device,
5317 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005318 VkDeviceMemory memory,
5319 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005320 deviceObject := GetDevice(device)
5321 bufferObject := GetBuffer(buffer)
5322 assert(bufferObject.device == device)
5323
5324 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005325 if bufferObject.memory != NULL_HANDLE {
5326 memoryObject := GetDeviceMemory(bufferObject.memory)
5327 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005328 }
5329
5330 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005331 if memory != NULL_HANDLE {
5332 memoryObject := GetDeviceMemory(memory)
5333 assert(memoryObject.device == device)
5334 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005335 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005336 bufferObject.memory = memory
5337 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005338
5339 return ?
5340}
5341
Jesse Hall606a54e2015-11-19 22:17:28 -08005342cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005343 VkDevice device,
5344 VkImage image,
5345 VkMemoryRequirements* pMemoryRequirements) {
5346 deviceObject := GetDevice(device)
5347 imageObject := GetImage(image)
5348 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005349}
5350
5351cmd VkResult vkBindImageMemory(
5352 VkDevice device,
5353 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005354 VkDeviceMemory memory,
5355 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005356 deviceObject := GetDevice(device)
5357 imageObject := GetImage(image)
5358 assert(imageObject.device == device)
5359
5360 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005361 if imageObject.memory != NULL_HANDLE {
5362 memoryObject := GetDeviceMemory(imageObject.memory)
5363 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005364 }
5365
5366 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08005367 if memory != NULL_HANDLE {
5368 memoryObject := GetDeviceMemory(memory)
5369 assert(memoryObject.device == device)
5370 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005371 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005372 imageObject.memory = memory
5373 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07005374
5375 return ?
5376}
5377
Jesse Hall606a54e2015-11-19 22:17:28 -08005378cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005379 VkDevice device,
5380 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005381 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005382 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
5383 deviceObject := GetDevice(device)
5384 imageObject := GetImage(image)
5385 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005386}
5387
Jesse Hall606a54e2015-11-19 22:17:28 -08005388cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005389 VkPhysicalDevice physicalDevice,
5390 VkFormat format,
5391 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08005392 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005393 VkImageUsageFlags usage,
5394 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005395 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005396 VkSparseImageFormatProperties* pProperties) {
5397 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005398}
5399
Jesse Halla6429252015-11-29 18:59:42 -08005400cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005401 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005402 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08005403 const VkBindSparseInfo* pBindInfo,
5404 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005405 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005406
5407 return ?
5408}
5409
5410
5411// Fence functions
5412
5413@threadSafety("system")
5414cmd VkResult vkCreateFence(
5415 VkDevice device,
5416 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005417 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005418 VkFence* pFence) {
5419 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
5420 deviceObject := GetDevice(device)
5421
5422 fence := ?
5423 pFence[0] = fence
5424 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08005425 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07005426
5427 return ?
5428}
5429
5430@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005431cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005432 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005433 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005434 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005435 deviceObject := GetDevice(device)
5436 fenceObject := GetFence(fence)
5437 assert(fenceObject.device == device)
5438
5439 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005440}
5441
5442@threadSafety("system")
5443cmd VkResult vkResetFences(
5444 VkDevice device,
5445 u32 fenceCount,
5446 const VkFence* pFences) {
5447 deviceObject := GetDevice(device)
5448
5449 fences := pFences[0:fenceCount]
5450 for i in (0 .. fenceCount) {
5451 fence := fences[i]
5452 fenceObject := GetFence(fence)
5453 assert(fenceObject.device == device)
5454 fenceObject.signaled = false
5455 }
5456
5457 return ?
5458}
5459
5460@threadSafety("system")
5461cmd VkResult vkGetFenceStatus(
5462 VkDevice device,
5463 VkFence fence) {
5464 deviceObject := GetDevice(device)
5465 fenceObject := GetFence(fence)
5466 assert(fenceObject.device == device)
5467
5468 return ?
5469}
5470
5471@threadSafety("system")
5472cmd VkResult vkWaitForFences(
5473 VkDevice device,
5474 u32 fenceCount,
5475 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005476 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005477 u64 timeout) { /// timeout in nanoseconds
5478 deviceObject := GetDevice(device)
5479
5480 fences := pFences[0:fenceCount]
5481 for i in (0 .. fenceCount) {
5482 fence := fences[i]
5483 fenceObject := GetFence(fence)
5484 assert(fenceObject.device == device)
5485 }
5486
5487 return ?
5488}
5489
5490
5491// Queue semaphore functions
5492
5493@threadSafety("system")
5494cmd VkResult vkCreateSemaphore(
5495 VkDevice device,
5496 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005497 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005498 VkSemaphore* pSemaphore) {
5499 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
5500 deviceObject := GetDevice(device)
5501
5502 semaphore := ?
5503 pSemaphore[0] = semaphore
5504 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
5505
5506 return ?
5507}
5508
5509@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005510cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005511 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005512 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005513 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005514 deviceObject := GetDevice(device)
5515 semaphoreObject := GetSemaphore(semaphore)
5516 assert(semaphoreObject.device == device)
5517
5518 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005519}
5520
Jesse Halld27f6aa2015-08-15 17:58:48 -07005521
5522// Event functions
5523
5524@threadSafety("system")
5525cmd VkResult vkCreateEvent(
5526 VkDevice device,
5527 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005528 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005529 VkEvent* pEvent) {
5530 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
5531 deviceObject := GetDevice(device)
5532
5533 event := ?
5534 pEvent[0] = event
5535 State.Events[event] = new!EventObject(device: device)
5536
5537 return ?
5538}
5539
5540@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005541cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005542 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005543 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005544 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005545 deviceObject := GetDevice(device)
5546 eventObject := GetEvent(event)
5547 assert(eventObject.device == device)
5548
5549 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005550}
5551
5552@threadSafety("system")
5553cmd VkResult vkGetEventStatus(
5554 VkDevice device,
5555 VkEvent event) {
5556 deviceObject := GetDevice(device)
5557 eventObject := GetEvent(event)
5558 assert(eventObject.device == device)
5559
5560 return ?
5561}
5562
5563@threadSafety("system")
5564cmd VkResult vkSetEvent(
5565 VkDevice device,
5566 VkEvent event) {
5567 deviceObject := GetDevice(device)
5568 eventObject := GetEvent(event)
5569 assert(eventObject.device == device)
5570
5571 return ?
5572}
5573
5574@threadSafety("system")
5575cmd VkResult vkResetEvent(
5576 VkDevice device,
5577 VkEvent event) {
5578 deviceObject := GetDevice(device)
5579 eventObject := GetEvent(event)
5580 assert(eventObject.device == device)
5581
5582 return ?
5583}
5584
5585
5586// Query functions
5587
5588@threadSafety("system")
5589cmd VkResult vkCreateQueryPool(
5590 VkDevice device,
5591 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005592 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005593 VkQueryPool* pQueryPool) {
5594 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5595 deviceObject := GetDevice(device)
5596
5597 queryPool := ?
5598 pQueryPool[0] = queryPool
5599 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5600
5601 return ?
5602}
5603
5604@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005605cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005606 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005607 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005608 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005609 deviceObject := GetDevice(device)
5610 queryPoolObject := GetQueryPool(queryPool)
5611 assert(queryPoolObject.device == device)
5612
5613 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005614}
5615
5616@threadSafety("system")
5617cmd VkResult vkGetQueryPoolResults(
5618 VkDevice device,
5619 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005620 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005621 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005622 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005623 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005624 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005625 VkQueryResultFlags flags) {
5626 deviceObject := GetDevice(device)
5627 queryPoolObject := GetQueryPool(queryPool)
5628 assert(queryPoolObject.device == device)
5629
Jesse Halld27f6aa2015-08-15 17:58:48 -07005630 data := pData[0:dataSize]
5631
5632 return ?
5633}
5634
5635// Buffer functions
5636
5637@threadSafety("system")
5638cmd VkResult vkCreateBuffer(
5639 VkDevice device,
5640 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005641 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005642 VkBuffer* pBuffer) {
5643 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5644 deviceObject := GetDevice(device)
5645
5646 buffer := ?
5647 pBuffer[0] = buffer
5648 State.Buffers[buffer] = new!BufferObject(device: device)
5649
5650 return ?
5651}
5652
5653@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005654cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005655 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005656 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005657 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005658 deviceObject := GetDevice(device)
5659 bufferObject := GetBuffer(buffer)
5660 assert(bufferObject.device == device)
5661
Jesse Hall3fbc8562015-11-29 22:10:52 -08005662 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005663 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005664}
5665
5666
5667// Buffer view functions
5668
5669@threadSafety("system")
5670cmd VkResult vkCreateBufferView(
5671 VkDevice device,
5672 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005673 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005674 VkBufferView* pView) {
5675 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5676 deviceObject := GetDevice(device)
5677
5678 bufferObject := GetBuffer(pCreateInfo.buffer)
5679 assert(bufferObject.device == device)
5680
5681 view := ?
5682 pView[0] = view
5683 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5684
5685 return ?
5686}
5687
5688@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005689cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005690 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005691 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005692 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005693 deviceObject := GetDevice(device)
5694 bufferViewObject := GetBufferView(bufferView)
5695 assert(bufferViewObject.device == device)
5696
5697 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005698}
5699
5700
5701// Image functions
5702
5703@threadSafety("system")
5704cmd VkResult vkCreateImage(
5705 VkDevice device,
5706 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005707 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005708 VkImage* pImage) {
5709 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5710 deviceObject := GetDevice(device)
5711
5712 image := ?
5713 pImage[0] = image
5714 State.Images[image] = new!ImageObject(device: device)
5715
5716 return ?
5717}
5718
5719@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005720cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005721 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005722 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005723 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005724 deviceObject := GetDevice(device)
5725 imageObject := GetImage(image)
5726 assert(imageObject.device == device)
5727
Jesse Hall3fbc8562015-11-29 22:10:52 -08005728 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005729 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005730}
5731
Jesse Hall606a54e2015-11-19 22:17:28 -08005732cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005733 VkDevice device,
5734 VkImage image,
5735 const VkImageSubresource* pSubresource,
5736 VkSubresourceLayout* pLayout) {
5737 deviceObject := GetDevice(device)
5738 imageObject := GetImage(image)
5739 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005740}
5741
5742
5743// Image view functions
5744
5745@threadSafety("system")
5746cmd VkResult vkCreateImageView(
5747 VkDevice device,
5748 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005749 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005750 VkImageView* pView) {
5751 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5752 deviceObject := GetDevice(device)
5753
5754 imageObject := GetImage(pCreateInfo.image)
5755 assert(imageObject.device == device)
5756
5757 view := ?
5758 pView[0] = view
5759 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5760
5761 return ?
5762}
5763
5764@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005765cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005766 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005767 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005768 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005769 deviceObject := GetDevice(device)
5770 imageViewObject := GetImageView(imageView)
5771 assert(imageViewObject.device == device)
5772
5773 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005774}
5775
5776
5777// Shader functions
5778
5779cmd VkResult vkCreateShaderModule(
5780 VkDevice device,
5781 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005782 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005783 VkShaderModule* pShaderModule) {
5784 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5785 deviceObject := GetDevice(device)
5786
5787 shaderModule := ?
5788 pShaderModule[0] = shaderModule
5789 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5790
5791 return ?
5792}
5793
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005794cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005795 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005796 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005797 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005798 deviceObject := GetDevice(device)
5799 shaderModuleObject := GetShaderModule(shaderModule)
5800 assert(shaderModuleObject.device == device)
5801
5802 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005803}
5804
Jesse Halld27f6aa2015-08-15 17:58:48 -07005805
5806// Pipeline functions
5807
5808cmd VkResult vkCreatePipelineCache(
5809 VkDevice device,
5810 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005811 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005812 VkPipelineCache* pPipelineCache) {
5813 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5814 deviceObject := GetDevice(device)
5815
5816 pipelineCache := ?
5817 pPipelineCache[0] = pipelineCache
5818 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5819
5820 return ?
5821}
5822
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005823cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005824 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005825 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005826 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005827 deviceObject := GetDevice(device)
5828 pipelineCacheObject := GetPipelineCache(pipelineCache)
5829 assert(pipelineCacheObject.device == device)
5830
5831 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005832}
5833
Jesse Halld27f6aa2015-08-15 17:58:48 -07005834cmd VkResult vkGetPipelineCacheData(
5835 VkDevice device,
5836 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005837 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005838 void* pData) {
5839 deviceObject := GetDevice(device)
5840 pipelineCacheObject := GetPipelineCache(pipelineCache)
5841 assert(pipelineCacheObject.device == device)
5842
5843 return ?
5844}
5845
5846cmd VkResult vkMergePipelineCaches(
5847 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005848 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005849 u32 srcCacheCount,
5850 const VkPipelineCache* pSrcCaches) {
5851 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005852 dstCacheObject := GetPipelineCache(dstCache)
5853 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005854
5855 srcCaches := pSrcCaches[0:srcCacheCount]
5856 for i in (0 .. srcCacheCount) {
5857 srcCache := srcCaches[i]
5858 srcCacheObject := GetPipelineCache(srcCache)
5859 assert(srcCacheObject.device == device)
5860 }
5861
5862 return ?
5863}
5864
5865cmd VkResult vkCreateGraphicsPipelines(
5866 VkDevice device,
5867 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005868 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005869 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005870 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005871 VkPipeline* pPipelines) {
5872 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005873 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005874 pipelineCacheObject := GetPipelineCache(pipelineCache)
5875 assert(pipelineCacheObject.device == device)
5876 }
5877
Jesse Hall03b6fe12015-11-24 12:44:21 -08005878 createInfos := pCreateInfos[0:createInfoCount]
5879 pipelines := pPipelines[0:createInfoCount]
5880 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005881 pipeline := ?
5882 pipelines[i] = pipeline
5883 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5884 }
5885
5886 return ?
5887}
5888
5889cmd VkResult vkCreateComputePipelines(
5890 VkDevice device,
5891 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005892 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005893 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005894 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005895 VkPipeline* pPipelines) {
5896 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005897 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005898 pipelineCacheObject := GetPipelineCache(pipelineCache)
5899 assert(pipelineCacheObject.device == device)
5900 }
5901
Jesse Hall03b6fe12015-11-24 12:44:21 -08005902 createInfos := pCreateInfos[0:createInfoCount]
5903 pipelines := pPipelines[0:createInfoCount]
5904 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005905 pipeline := ?
5906 pipelines[i] = pipeline
5907 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5908 }
5909
5910 return ?
5911}
5912
5913@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005914cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005915 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005916 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005917 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005918 deviceObject := GetDevice(device)
5919 pipelineObjects := GetPipeline(pipeline)
5920 assert(pipelineObjects.device == device)
5921
5922 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005923}
5924
5925
5926// Pipeline layout functions
5927
5928@threadSafety("system")
5929cmd VkResult vkCreatePipelineLayout(
5930 VkDevice device,
5931 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005932 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005933 VkPipelineLayout* pPipelineLayout) {
5934 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5935 deviceObject := GetDevice(device)
5936
5937 pipelineLayout := ?
5938 pPipelineLayout[0] = pipelineLayout
5939 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5940
5941 return ?
5942}
5943
5944@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005945cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005946 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005947 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005948 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005949 deviceObject := GetDevice(device)
5950 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5951 assert(pipelineLayoutObjects.device == device)
5952
5953 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005954}
5955
5956
5957// Sampler functions
5958
5959@threadSafety("system")
5960cmd VkResult vkCreateSampler(
5961 VkDevice device,
5962 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005963 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005964 VkSampler* pSampler) {
5965 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5966 deviceObject := GetDevice(device)
5967
5968 sampler := ?
5969 pSampler[0] = sampler
5970 State.Samplers[sampler] = new!SamplerObject(device: device)
5971
5972 return ?
5973}
5974
5975@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005976cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005977 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005978 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005979 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005980 deviceObject := GetDevice(device)
5981 samplerObject := GetSampler(sampler)
5982 assert(samplerObject.device == device)
5983
5984 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005985}
5986
5987
5988// Descriptor set functions
5989
5990@threadSafety("system")
5991cmd VkResult vkCreateDescriptorSetLayout(
5992 VkDevice device,
5993 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005994 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005995 VkDescriptorSetLayout* pSetLayout) {
5996 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5997 deviceObject := GetDevice(device)
5998
5999 setLayout := ?
6000 pSetLayout[0] = setLayout
6001 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
6002
6003 return ?
6004}
6005
6006@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006007cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006008 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006009 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006010 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006011 deviceObject := GetDevice(device)
6012 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
6013 assert(descriptorSetLayoutObject.device == device)
6014
6015 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006016}
6017
6018@threadSafety("system")
6019cmd VkResult vkCreateDescriptorPool(
6020 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006021 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006022 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006023 VkDescriptorPool* pDescriptorPool) {
6024 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
6025 deviceObject := GetDevice(device)
6026
6027 descriptorPool := ?
6028 pDescriptorPool[0] = descriptorPool
6029 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
6030
6031 return ?
6032}
6033
6034@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006035cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006036 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006037 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006038 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006039 deviceObject := GetDevice(device)
6040 descriptorPoolObject := GetDescriptorPool(descriptorPool)
6041 assert(descriptorPoolObject.device == device)
6042
6043 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006044}
6045
6046@threadSafety("app")
6047cmd VkResult vkResetDescriptorPool(
6048 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08006049 VkDescriptorPool descriptorPool,
6050 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006051 deviceObject := GetDevice(device)
6052 descriptorPoolObject := GetDescriptorPool(descriptorPool)
6053 assert(descriptorPoolObject.device == device)
6054
6055 return ?
6056}
6057
6058@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006059cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006060 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006061 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006062 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006063 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006064 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08006065 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006066
Jesse Hall03b6fe12015-11-24 12:44:21 -08006067 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
6068 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006069 setLayout := setLayouts[i]
6070 setLayoutObject := GetDescriptorSetLayout(setLayout)
6071 assert(setLayoutObject.device == device)
6072 }
6073
Jesse Hall03b6fe12015-11-24 12:44:21 -08006074 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
6075 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006076 descriptorSet := ?
6077 descriptorSets[i] = descriptorSet
6078 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
6079 }
6080
6081 return ?
6082}
6083
Jesse Hallf09c6b12015-08-15 19:54:28 -07006084cmd VkResult vkFreeDescriptorSets(
6085 VkDevice device,
6086 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006087 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07006088 const VkDescriptorSet* pDescriptorSets) {
6089 deviceObject := GetDevice(device)
6090 descriptorPoolObject := GetDescriptorPool(descriptorPool)
6091
Jesse Hall03b6fe12015-11-24 12:44:21 -08006092 descriptorSets := pDescriptorSets[0:descriptorSetCount]
6093 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07006094 descriptorSet := descriptorSets[i]
6095 descriptorSetObject := GetDescriptorSet(descriptorSet)
6096 assert(descriptorSetObject.device == device)
6097 State.DescriptorSets[descriptorSet] = null
6098 }
6099
6100 return ?
6101}
6102
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006103cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006104 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08006105 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006106 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08006107 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006108 const VkCopyDescriptorSet* pDescriptorCopies) {
6109 deviceObject := GetDevice(device)
6110
Jesse Hallb00daad2015-11-29 19:46:20 -08006111 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
6112 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006113 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006114 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006115 assert(descriptorWriteObject.device == device)
6116 }
6117
Jesse Hallb00daad2015-11-29 19:46:20 -08006118 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
6119 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006120 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006121 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006122 assert(descriptorCopyObject.device == device)
6123 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006124}
6125
6126
6127// Framebuffer functions
6128
6129@threadSafety("system")
6130cmd VkResult vkCreateFramebuffer(
6131 VkDevice device,
6132 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006133 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006134 VkFramebuffer* pFramebuffer) {
6135 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
6136 deviceObject := GetDevice(device)
6137
6138 framebuffer := ?
6139 pFramebuffer[0] = framebuffer
6140 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
6141
6142 return ?
6143}
6144
6145@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006146cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006147 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006148 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006149 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006150 deviceObject := GetDevice(device)
6151 framebufferObject := GetFramebuffer(framebuffer)
6152 assert(framebufferObject.device == device)
6153
6154 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006155}
6156
6157
6158// Renderpass functions
6159
6160@threadSafety("system")
6161cmd VkResult vkCreateRenderPass(
6162 VkDevice device,
6163 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006164 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006165 VkRenderPass* pRenderPass) {
6166 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
6167 deviceObject := GetDevice(device)
6168
6169 renderpass := ?
6170 pRenderPass[0] = renderpass
6171 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
6172
6173 return ?
6174}
6175
6176@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006177cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006178 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006179 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006180 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006181 deviceObject := GetDevice(device)
6182 renderPassObject := GetRenderPass(renderPass)
6183 assert(renderPassObject.device == device)
6184
6185 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006186}
6187
Jesse Hall606a54e2015-11-19 22:17:28 -08006188cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006189 VkDevice device,
6190 VkRenderPass renderPass,
6191 VkExtent2D* pGranularity) {
6192 deviceObject := GetDevice(device)
6193 renderPassObject := GetRenderPass(renderPass)
6194
6195 granularity := ?
6196 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07006197}
6198
6199// Command pool functions
6200
6201cmd VkResult vkCreateCommandPool(
6202 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006203 const VkCommandPoolCreateInfo* pCreateInfo,
6204 const VkAllocationCallbacks* pAllocator,
6205 VkCommandPool* pCommandPool) {
6206 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006207 deviceObject := GetDevice(device)
6208
Jesse Hall3fbc8562015-11-29 22:10:52 -08006209 commandPool := ?
6210 pCommandPool[0] = commandPool
6211 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006212
6213 return ?
6214}
6215
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006216cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006217 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006218 VkCommandPool commandPool,
6219 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006220 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006221 commandPoolObject := GetCommandPool(commandPool)
6222 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006223
Jesse Hall3fbc8562015-11-29 22:10:52 -08006224 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006225}
6226
6227cmd VkResult vkResetCommandPool(
6228 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006229 VkCommandPool commandPool,
6230 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006231 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006232 commandPoolObject := GetCommandPool(commandPool)
6233 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006234
6235 return ?
6236}
6237
6238// Command buffer functions
6239
Jesse Hall3fbc8562015-11-29 22:10:52 -08006240macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
6241 memoryObject := GetDeviceMemory(memory)
6242 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07006243
Jesse Hall3fbc8562015-11-29 22:10:52 -08006244 commandBufferObject := GetCommandBuffer(commandBuffer)
6245 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07006246}
6247
Jesse Hall3fbc8562015-11-29 22:10:52 -08006248macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
6249 memoryObject := GetDeviceMemory(memory)
6250 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006251
Jesse Hall3fbc8562015-11-29 22:10:52 -08006252 commandBufferObject := GetCommandBuffer(commandBuffer)
6253 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006254}
6255
6256@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006257cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006258 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006259 const VkCommandBufferAllocateInfo* pAllocateInfo,
6260 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006261 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006262
Jesse Hall3dd678a2016-01-08 21:52:01 -08006263 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08006264 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08006265 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006266 commandBuffer := ?
6267 commandBuffers[i] = commandBuffer
6268 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08006269 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006270
6271 return ?
6272}
6273
6274@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08006275cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006276 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006277 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006278 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006279 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006280 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006281
Jesse Hall3fbc8562015-11-29 22:10:52 -08006282 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08006283 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006284 commandBufferObject := GetCommandBuffer(commandBuffers[i])
6285 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08006286 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08006287 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08006288 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006289}
6290
6291@threadSafety("app")
6292cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006293 VkCommandBuffer commandBuffer,
6294 const VkCommandBufferBeginInfo* pBeginInfo) {
6295 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
6296 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006297
6298 // TODO: iterate over boundObjects and clear memory bindings
6299
6300 return ?
6301}
6302
6303@threadSafety("app")
6304cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006305 VkCommandBuffer commandBuffer) {
6306 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006307
6308 return ?
6309}
6310
6311@threadSafety("app")
6312cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006313 VkCommandBuffer commandBuffer,
6314 VkCommandBufferResetFlags flags) {
6315 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006316
6317 // TODO: iterate over boundObjects and clear memory bindings
6318
6319 return ?
6320}
6321
6322
6323// Command buffer building functions
6324
6325@threadSafety("app")
6326cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006327 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006328 VkPipelineBindPoint pipelineBindPoint,
6329 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006330 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006331 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006332 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006333
Jesse Halld8bade02015-11-24 10:24:18 -08006334 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006335 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
6336 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
6337 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006338 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006339}
6340
6341@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006342cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006343 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006344 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006345 u32 viewportCount,
6346 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006347 commandBufferObject := GetCommandBuffer(commandBuffer)
6348 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006349}
6350
6351@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006352cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006353 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006354 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006355 u32 scissorCount,
6356 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006357 commandBufferObject := GetCommandBuffer(commandBuffer)
6358 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006359}
6360
6361@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006362cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006363 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006364 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006365 commandBufferObject := GetCommandBuffer(commandBuffer)
6366 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006367}
6368
6369@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006370cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006371 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006372 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006373 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006374 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006375 commandBufferObject := GetCommandBuffer(commandBuffer)
6376 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006377}
Jesse Halld27f6aa2015-08-15 17:58:48 -07006378
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006379@threadSafety("app")
6380cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006381 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006382 // TODO(jessehall): apic only supports 'const' on pointer types. Using
6383 // an annotation as a quick hack to pass this to the template without
6384 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08006385 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006386 commandBufferObject := GetCommandBuffer(commandBuffer)
6387 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006388}
6389
6390@threadSafety("app")
6391cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006392 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006393 f32 minDepthBounds,
6394 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006395 commandBufferObject := GetCommandBuffer(commandBuffer)
6396 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006397}
6398
6399@threadSafety("app")
6400cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006401 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006402 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08006403 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006404 commandBufferObject := GetCommandBuffer(commandBuffer)
6405 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006406}
6407
6408@threadSafety("app")
6409cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006410 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006411 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08006412 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006413 commandBufferObject := GetCommandBuffer(commandBuffer)
6414 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006415}
6416
6417@threadSafety("app")
6418cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006419 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006420 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08006421 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006422 commandBufferObject := GetCommandBuffer(commandBuffer)
6423 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006424}
6425
6426@threadSafety("app")
6427cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006428 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006429 VkPipelineBindPoint pipelineBindPoint,
6430 VkPipelineLayout layout,
6431 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006432 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006433 const VkDescriptorSet* pDescriptorSets,
6434 u32 dynamicOffsetCount,
6435 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006436 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006437
Jesse Hall03b6fe12015-11-24 12:44:21 -08006438 descriptorSets := pDescriptorSets[0:descriptorSetCount]
6439 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006440 descriptorSet := descriptorSets[i]
6441 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006442 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006443 }
6444
6445 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
6446 for i in (0 .. dynamicOffsetCount) {
6447 dynamicOffset := dynamicOffsets[i]
6448 }
6449
Jesse Halld8bade02015-11-24 10:24:18 -08006450 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006451 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
6452 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
6453 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006454 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006455}
6456
6457@threadSafety("app")
6458cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006459 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006460 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006461 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006462 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006463 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006464 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006465 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006466
Jesse Hall3fbc8562015-11-29 22:10:52 -08006467 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006468
Jesse Hall3fbc8562015-11-29 22:10:52 -08006469 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006470}
6471
6472@threadSafety("app")
6473cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006474 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006475 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006476 u32 bindingCount,
6477 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006478 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006479 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006480
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006481 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07006482 buffers := pBuffers[0:bindingCount]
6483 offsets := pOffsets[0:bindingCount]
6484 for i in (0 .. bindingCount) {
6485 buffer := buffers[i]
6486 offset := offsets[i]
6487 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006488 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006489
Jesse Hall3fbc8562015-11-29 22:10:52 -08006490 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006491 }
6492
Jesse Hall3fbc8562015-11-29 22:10:52 -08006493 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006494}
6495
6496@threadSafety("app")
6497cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006498 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006499 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006500 u32 instanceCount,
6501 u32 firstVertex,
6502 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006503 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006504
Jesse Hall3fbc8562015-11-29 22:10:52 -08006505 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006506}
6507
6508@threadSafety("app")
6509cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006510 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006511 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006512 u32 instanceCount,
6513 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006514 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006515 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006516 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006517
Jesse Hall3fbc8562015-11-29 22:10:52 -08006518 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006519}
6520
6521@threadSafety("app")
6522cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006523 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006524 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006525 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006526 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006527 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006528 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006529 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006530 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006531
Jesse Hall3fbc8562015-11-29 22:10:52 -08006532 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006533
Jesse Hall3fbc8562015-11-29 22:10:52 -08006534 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006535}
6536
6537@threadSafety("app")
6538cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006539 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006540 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006541 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006542 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006543 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006544 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006545 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006546 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006547
Jesse Hall3fbc8562015-11-29 22:10:52 -08006548 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006549
Jesse Hall3fbc8562015-11-29 22:10:52 -08006550 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006551}
6552
6553@threadSafety("app")
6554cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006555 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08006556 u32 groupCountX,
6557 u32 groupCountY,
6558 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006559 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006560
Jesse Hall3fbc8562015-11-29 22:10:52 -08006561 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006562}
6563
6564@threadSafety("app")
6565cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006566 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006567 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006568 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006569 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006570 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006571 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006572
Jesse Hall3fbc8562015-11-29 22:10:52 -08006573 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006574
Jesse Hall3fbc8562015-11-29 22:10:52 -08006575 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006576}
6577
6578@threadSafety("app")
6579cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006580 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006581 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006582 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006583 u32 regionCount,
6584 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006585 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006586 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006587 dstBufferObject := GetBuffer(dstBuffer)
6588 assert(commandBufferObject.device == srcBufferObject.device)
6589 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006590
6591 regions := pRegions[0:regionCount]
6592 for i in (0 .. regionCount) {
6593 region := regions[i]
6594 }
6595
Jesse Hall3fbc8562015-11-29 22:10:52 -08006596 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6597 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006598
Jesse Hall65ab5522015-11-30 00:07:16 -08006599 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006600}
6601
6602@threadSafety("app")
6603cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006604 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006605 VkImage srcImage,
6606 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006607 VkImage dstImage,
6608 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006609 u32 regionCount,
6610 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006611 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006612 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006613 dstImageObject := GetImage(dstImage)
6614 assert(commandBufferObject.device == srcImageObject.device)
6615 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006616
6617 regions := pRegions[0:regionCount]
6618 for i in (0 .. regionCount) {
6619 region := regions[i]
6620 }
6621
Jesse Hall3fbc8562015-11-29 22:10:52 -08006622 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6623 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006624
Jesse Hall65ab5522015-11-30 00:07:16 -08006625 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006626}
6627
6628@threadSafety("app")
6629cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006630 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006631 VkImage srcImage,
6632 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006633 VkImage dstImage,
6634 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006635 u32 regionCount,
6636 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006637 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006638 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006639 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006640 dstImageObject := GetImage(dstImage)
6641 assert(commandBufferObject.device == srcImageObject.device)
6642 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006643
6644 regions := pRegions[0:regionCount]
6645 for i in (0 .. regionCount) {
6646 region := regions[i]
6647 }
6648
Jesse Hall3fbc8562015-11-29 22:10:52 -08006649 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6650 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006651
Jesse Hall3fbc8562015-11-29 22:10:52 -08006652 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006653}
6654
6655@threadSafety("app")
6656cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006657 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006658 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006659 VkImage dstImage,
6660 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006661 u32 regionCount,
6662 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006663 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006664 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006665 dstImageObject := GetImage(dstImage)
6666 assert(commandBufferObject.device == srcBufferObject.device)
6667 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006668
6669 regions := pRegions[0:regionCount]
6670 for i in (0 .. regionCount) {
6671 region := regions[i]
6672 }
6673
Jesse Hall3fbc8562015-11-29 22:10:52 -08006674 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6675 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006676
Jesse Hall65ab5522015-11-30 00:07:16 -08006677 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006678}
6679
6680@threadSafety("app")
6681cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006682 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006683 VkImage srcImage,
6684 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006685 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006686 u32 regionCount,
6687 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006688 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006689 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006690 dstBufferObject := GetBuffer(dstBuffer)
6691 assert(commandBufferObject.device == srcImageObject.device)
6692 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006693
6694 regions := pRegions[0:regionCount]
6695 for i in (0 .. regionCount) {
6696 region := regions[i]
6697 }
6698
Jesse Hall3fbc8562015-11-29 22:10:52 -08006699 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6700 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006701
Jesse Hall65ab5522015-11-30 00:07:16 -08006702 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006703}
6704
6705@threadSafety("app")
6706cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006707 VkCommandBuffer commandBuffer,
6708 VkBuffer dstBuffer,
6709 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006710 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006711 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006712 commandBufferObject := GetCommandBuffer(commandBuffer)
6713 dstBufferObject := GetBuffer(dstBuffer)
6714 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006715
6716 data := pData[0:dataSize]
6717
Jesse Hall3fbc8562015-11-29 22:10:52 -08006718 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006719
Jesse Hall65ab5522015-11-30 00:07:16 -08006720 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006721}
6722
6723@threadSafety("app")
6724cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006725 VkCommandBuffer commandBuffer,
6726 VkBuffer dstBuffer,
6727 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006728 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006729 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006730 commandBufferObject := GetCommandBuffer(commandBuffer)
6731 dstBufferObject := GetBuffer(dstBuffer)
6732 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006733
Jesse Hall65ab5522015-11-30 00:07:16 -08006734 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006735}
6736
6737@threadSafety("app")
6738cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006739 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006740 VkImage image,
6741 VkImageLayout imageLayout,
6742 const VkClearColorValue* pColor,
6743 u32 rangeCount,
6744 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006745 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006746 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006747 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006748
6749 ranges := pRanges[0:rangeCount]
6750 for i in (0 .. rangeCount) {
6751 range := ranges[i]
6752 }
6753
Jesse Hall3fbc8562015-11-29 22:10:52 -08006754 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006755
Jesse Hall3fbc8562015-11-29 22:10:52 -08006756 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006757}
6758
6759@threadSafety("app")
6760cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006761 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006762 VkImage image,
6763 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006764 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006765 u32 rangeCount,
6766 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006767 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006768 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006769 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006770
6771 ranges := pRanges[0:rangeCount]
6772 for i in (0 .. rangeCount) {
6773 range := ranges[i]
6774 }
6775
Jesse Hall3fbc8562015-11-29 22:10:52 -08006776 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006777
Jesse Hall3fbc8562015-11-29 22:10:52 -08006778 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006779}
6780
6781@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006782cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006783 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006784 u32 attachmentCount,
6785 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006786 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006787 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006788 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006789
6790 rects := pRects[0:rectCount]
6791 for i in (0 .. rectCount) {
6792 rect := rects[i]
6793 }
6794
Jesse Hall3fbc8562015-11-29 22:10:52 -08006795 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006796}
6797
6798@threadSafety("app")
6799cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006800 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006801 VkImage srcImage,
6802 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006803 VkImage dstImage,
6804 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006805 u32 regionCount,
6806 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006807 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006808 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006809 dstImageObject := GetImage(dstImage)
6810 assert(commandBufferObject.device == srcImageObject.device)
6811 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006812
6813 regions := pRegions[0:regionCount]
6814 for i in (0 .. regionCount) {
6815 region := regions[i]
6816 }
6817
Jesse Hall3fbc8562015-11-29 22:10:52 -08006818 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6819 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006820
Jesse Hall3fbc8562015-11-29 22:10:52 -08006821 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006822}
6823
6824@threadSafety("app")
6825cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006826 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006827 VkEvent event,
6828 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006829 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006830 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006831 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006832}
6833
6834@threadSafety("app")
6835cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006836 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006837 VkEvent event,
6838 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006839 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006840 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006841 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006842}
6843
6844@threadSafety("app")
6845cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006846 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006847 u32 eventCount,
6848 const VkEvent* pEvents,
6849 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006850 VkPipelineStageFlags dstStageMask,
6851 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006852 const VkMemoryBarrier* pMemoryBarriers,
6853 u32 bufferMemoryBarrierCount,
6854 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6855 u32 imageMemoryBarrierCount,
6856 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006857 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006858
6859 events := pEvents[0:eventCount]
6860 for i in (0 .. eventCount) {
6861 event := events[i]
6862 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006863 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006864 }
6865
Jesse Hall3dd678a2016-01-08 21:52:01 -08006866 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006867 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006868 memoryBarrier := memoryBarriers[i]
6869 }
6870 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6871 for i in (0 .. bufferMemoryBarrierCount) {
6872 bufferMemoryBarrier := bufferMemoryBarriers[i]
6873 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6874 assert(bufferObject.device == commandBufferObject.device)
6875 }
6876 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6877 for i in (0 .. imageMemoryBarrierCount) {
6878 imageMemoryBarrier := imageMemoryBarriers[i]
6879 imageObject := GetImage(imageMemoryBarrier.image)
6880 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006881 }
6882}
6883
6884@threadSafety("app")
6885cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006886 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006887 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006888 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006889 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006890 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006891 const VkMemoryBarrier* pMemoryBarriers,
6892 u32 bufferMemoryBarrierCount,
6893 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6894 u32 imageMemoryBarrierCount,
6895 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006896 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006897
Jesse Hall3dd678a2016-01-08 21:52:01 -08006898 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006899 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006900 memoryBarrier := memoryBarriers[i]
6901 }
6902 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6903 for i in (0 .. bufferMemoryBarrierCount) {
6904 bufferMemoryBarrier := bufferMemoryBarriers[i]
6905 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6906 assert(bufferObject.device == commandBufferObject.device)
6907 }
6908 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6909 for i in (0 .. imageMemoryBarrierCount) {
6910 imageMemoryBarrier := imageMemoryBarriers[i]
6911 imageObject := GetImage(imageMemoryBarrier.image)
6912 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006913 }
6914}
6915
6916@threadSafety("app")
6917cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006918 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006919 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006920 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006921 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006922 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006923 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006924 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006925}
6926
6927@threadSafety("app")
6928cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006929 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006930 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006931 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006932 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006933 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006934 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006935}
6936
6937@threadSafety("app")
6938cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006939 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006940 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006941 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006942 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006943 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006944 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006945 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006946}
6947
6948@threadSafety("app")
6949cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006950 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006951 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006952 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006953 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006954 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006955 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006956 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006957}
6958
6959@threadSafety("app")
6960cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006961 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006962 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006963 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006964 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006965 VkBuffer dstBuffer,
6966 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006967 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006968 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006969 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006970 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006971 dstBufferObject := GetBuffer(dstBuffer)
6972 assert(commandBufferObject.device == queryPoolObject.device)
6973 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006974}
6975
6976cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006977 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006978 VkPipelineLayout layout,
6979 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006980 u32 offset,
6981 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006982 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006983 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006984 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006985 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006986}
6987
6988@threadSafety("app")
6989cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006990 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006991 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006992 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006993 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006994 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6995 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006996 assert(commandBufferObject.device == renderPassObject.device)
6997 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006998
Jesse Hall3fbc8562015-11-29 22:10:52 -08006999 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007000}
7001
7002cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007003 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08007004 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007005 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007006}
7007
7008@threadSafety("app")
7009cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007010 VkCommandBuffer commandBuffer) {
7011 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007012
Jesse Hall3fbc8562015-11-29 22:10:52 -08007013 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007014}
7015
7016cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007017 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08007018 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007019 const VkCommandBuffer* pCommandBuffers) {
7020 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007021
Jesse Hall3dd678a2016-01-08 21:52:01 -08007022 commandBuffers := pCommandBuffers[0:commandBufferCount]
7023 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007024 secondaryCommandBuffer := commandBuffers[i]
7025 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
7026 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007027 }
7028}
7029
Jesse Hallad250842017-03-10 18:35:38 -08007030@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08007031cmd void vkDestroySurfaceKHR(
7032 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08007033 VkSurfaceKHR surface,
7034 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007035 instanceObject := GetInstance(instance)
7036 surfaceObject := GetSurface(surface)
7037 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08007038
Jesse Hall1356b0d2015-11-23 17:24:58 -08007039 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08007040}
7041
Jesse Hallad250842017-03-10 18:35:38 -08007042@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08007043cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007044 VkPhysicalDevice physicalDevice,
7045 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007046 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08007047 VkBool32* pSupported) {
7048 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08007049
7050 return ?
7051}
7052
Jesse Hallad250842017-03-10 18:35:38 -08007053@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08007054cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
7055 VkPhysicalDevice physicalDevice,
7056 VkSurfaceKHR surface,
7057 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
7058 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7059
7060 surfaceCapabilities := ?
7061 pSurfaceCapabilities[0] = surfaceCapabilities
7062
7063 return ?
7064}
7065
Jesse Hallad250842017-03-10 18:35:38 -08007066@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08007067cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
7068 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007069 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007070 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007071 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08007072 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08007073
7074 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08007075 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08007076 surfaceFormats := pSurfaceFormats[0:count]
7077
7078 for i in (0 .. count) {
7079 surfaceFormat := ?
7080 surfaceFormats[i] = surfaceFormat
7081 }
7082
7083 return ?
7084}
7085
Jesse Hallad250842017-03-10 18:35:38 -08007086@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08007087cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
7088 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007089 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007090 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007091 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08007092 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08007093
7094 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08007095 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08007096 presentModes := pPresentModes[0:count]
7097
7098 for i in (0 .. count) {
7099 presentMode := ?
7100 presentModes[i] = presentMode
7101 }
7102
7103 return ?
7104}
7105
Jesse Hallad250842017-03-10 18:35:38 -08007106@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007107cmd VkResult vkCreateSwapchainKHR(
7108 VkDevice device,
7109 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007110 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08007111 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007112 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08007113 deviceObject := GetDevice(device)
7114
7115 swapchain := ?
7116 pSwapchain[0] = swapchain
7117 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
7118
7119 return ?
7120}
7121
Jesse Hallad250842017-03-10 18:35:38 -08007122@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08007123cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08007124 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08007125 VkSwapchainKHR swapchain,
7126 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08007127 deviceObject := GetDevice(device)
7128 swapchainObject := GetSwapchain(swapchain)
7129 assert(swapchainObject.device == device)
7130
7131 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08007132}
7133
Jesse Hallad250842017-03-10 18:35:38 -08007134@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007135cmd VkResult vkGetSwapchainImagesKHR(
7136 VkDevice device,
7137 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007138 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08007139 VkImage* pSwapchainImages) {
7140 deviceObject := GetDevice(device)
7141
7142 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08007143 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08007144 swapchainImages := pSwapchainImages[0:count]
7145
7146 for i in (0 .. count) {
7147 swapchainImage := ?
7148 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08007149 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08007150 }
7151
7152 return ?
7153}
7154
Jesse Hallad250842017-03-10 18:35:38 -08007155@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007156cmd VkResult vkAcquireNextImageKHR(
7157 VkDevice device,
7158 VkSwapchainKHR swapchain,
7159 u64 timeout,
7160 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007161 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08007162 u32* pImageIndex) {
7163 deviceObject := GetDevice(device)
7164 swapchainObject := GetSwapchain(swapchain)
7165
7166 imageIndex := ?
7167 pImageIndex[0] = imageIndex
7168
7169 return ?
7170}
7171
Jesse Hallad250842017-03-10 18:35:38 -08007172@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08007173cmd VkResult vkQueuePresentKHR(
7174 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08007175 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08007176 queueObject := GetQueue(queue)
7177
7178 presentInfo := ?
7179 pPresentInfo[0] = presentInfo
7180
7181 return ?
7182}
7183
Jesse Hallad250842017-03-10 18:35:38 -08007184@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08007185cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
7186 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007187 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007188 VkDisplayPropertiesKHR* pProperties) {
7189 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7190 return ?
7191}
7192
Jesse Hallad250842017-03-10 18:35:38 -08007193@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007194cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
7195 VkPhysicalDevice physicalDevice,
7196 u32* pPropertyCount,
7197 VkDisplayPlanePropertiesKHR* pProperties) {
7198 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7199 return ?
7200}
7201
Jesse Hallad250842017-03-10 18:35:38 -08007202@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007203cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
7204 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08007205 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08007206 u32* pDisplayCount,
7207 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08007208 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7209 return ?
7210}
7211
Jesse Hallad250842017-03-10 18:35:38 -08007212@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08007213cmd VkResult vkGetDisplayModePropertiesKHR(
7214 VkPhysicalDevice physicalDevice,
7215 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007216 u32* pPropertyCount,
7217 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007218 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7219 return ?
7220}
7221
Jesse Hallad250842017-03-10 18:35:38 -08007222@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08007223cmd VkResult vkCreateDisplayModeKHR(
7224 VkPhysicalDevice physicalDevice,
7225 VkDisplayKHR display,
7226 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007227 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007228 VkDisplayModeKHR* pMode) {
7229 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7230 return ?
7231}
7232
Jesse Hallad250842017-03-10 18:35:38 -08007233@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007234cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007235 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08007236 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007237 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08007238 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08007239 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7240 return ?
7241}
7242
Jesse Hallad250842017-03-10 18:35:38 -08007243@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08007244cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
7245 VkInstance instance,
7246 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007247 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08007248 VkSurfaceKHR* pSurface) {
7249 return ?
7250}
7251
Jesse Hallad250842017-03-10 18:35:38 -08007252@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08007253cmd VkResult vkCreateSharedSwapchainsKHR(
7254 VkDevice device,
7255 u32 swapchainCount,
7256 const VkSwapchainCreateInfoKHR* pCreateInfos,
7257 const VkAllocationCallbacks* pAllocator,
7258 VkSwapchainKHR* pSwapchains) {
7259 return ?
7260}
7261
Jesse Hallad250842017-03-10 18:35:38 -08007262@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08007263cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007264 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007265 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007266 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007267 VkSurfaceKHR* pSurface) {
7268 instanceObject := GetInstance(instance)
7269 return ?
7270}
7271
Jesse Hallad250842017-03-10 18:35:38 -08007272@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08007273cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
7274 VkPhysicalDevice physicalDevice,
7275 u32 queueFamilyIndex,
7276 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08007277 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08007278 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7279 return ?
7280}
7281
Jesse Hallad250842017-03-10 18:35:38 -08007282@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007283cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08007284 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007285 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007286 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007287 VkSurfaceKHR* pSurface) {
7288 instanceObject := GetInstance(instance)
7289 return ?
7290}
7291
Jesse Hallad250842017-03-10 18:35:38 -08007292@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08007293cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
7294 VkPhysicalDevice physicalDevice,
7295 u32 queueFamilyIndex,
7296 platform.xcb_connection_t* connection,
7297 platform.xcb_visualid_t visual_id) {
7298 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7299 return ?
7300}
7301
Jesse Hallad250842017-03-10 18:35:38 -08007302@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08007303cmd VkResult vkCreateWaylandSurfaceKHR(
7304 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007305 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007306 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007307 VkSurfaceKHR* pSurface) {
7308 instanceObject := GetInstance(instance)
7309 return ?
7310}
7311
Jesse Hallad250842017-03-10 18:35:38 -08007312@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08007313cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
7314 VkPhysicalDevice physicalDevice,
7315 u32 queueFamilyIndex,
7316 platform.wl_display* display) {
7317 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7318 return ?
7319}
7320
Jesse Hallad250842017-03-10 18:35:38 -08007321@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08007322cmd VkResult vkCreateMirSurfaceKHR(
7323 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007324 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007325 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007326 VkSurfaceKHR* pSurface) {
7327 instanceObject := GetInstance(instance)
7328 return ?
7329}
7330
Jesse Hallad250842017-03-10 18:35:38 -08007331@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08007332cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
7333 VkPhysicalDevice physicalDevice,
7334 u32 queueFamilyIndex,
7335 platform.MirConnection* connection) {
7336 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
7337 return ?
7338}
7339
Jesse Hallad250842017-03-10 18:35:38 -08007340@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08007341cmd VkResult vkCreateAndroidSurfaceKHR(
7342 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007343 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007344 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007345 VkSurfaceKHR* pSurface) {
7346 instanceObject := GetInstance(instance)
7347 return ?
7348}
7349
Jesse Hallad250842017-03-10 18:35:38 -08007350@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08007351cmd VkResult vkCreateWin32SurfaceKHR(
7352 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007353 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08007354 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08007355 VkSurfaceKHR* pSurface) {
7356 instanceObject := GetInstance(instance)
7357 return ?
7358}
7359
Jesse Hallad250842017-03-10 18:35:38 -08007360@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08007361cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
7362 VkPhysicalDevice physicalDevice,
7363 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08007364 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08007365 return ?
7366}
7367
Jesse Hallad250842017-03-10 18:35:38 -08007368@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08007369@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08007370cmd VkResult vkGetSwapchainGrallocUsageANDROID(
7371 VkDevice device,
7372 VkFormat format,
7373 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08007374 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08007375 return ?
7376}
7377
Jesse Hallad250842017-03-10 18:35:38 -08007378@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08007379@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13007380cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
7381 VkDevice device,
7382 VkFormat format,
7383 VkImageUsageFlags imageUsage,
7384 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08007385 u64* grallocConsumerUsage,
7386 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13007387 return ?
7388}
7389
Jesse Hallad250842017-03-10 18:35:38 -08007390@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08007391cmd VkResult vkAcquireImageANDROID(
7392 VkDevice device,
7393 VkImage image,
7394 int nativeFenceFd,
7395 VkSemaphore semaphore,
7396 VkFence fence) {
7397 return ?
7398}
7399
Jesse Hallad250842017-03-10 18:35:38 -08007400@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08007401cmd VkResult vkQueueSignalReleaseImageANDROID(
7402 VkQueue queue,
7403 u32 waitSemaphoreCount,
7404 const VkSemaphore* pWaitSemaphores,
7405 VkImage image,
7406 int* pNativeFenceFd) {
7407 return ?
7408}
7409
Jesse Hallad250842017-03-10 18:35:38 -08007410@extension("VK_EXT_debug_report") // 12
7411@external type void* PFN_vkDebugReportCallbackEXT
7412@extension("VK_EXT_debug_report") // 12
7413@pfn cmd VkBool32 vkDebugReportCallbackEXT(
7414 VkDebugReportFlagsEXT flags,
7415 VkDebugReportObjectTypeEXT objectType,
7416 u64 object,
7417 platform.size_t location,
7418 s32 messageCode,
7419 const char* pLayerPrefix,
7420 const char* pMessage,
7421 void* pUserData) {
7422 return ?
7423}
7424
7425@extension("VK_EXT_debug_report") // 12
7426cmd VkResult vkCreateDebugReportCallbackEXT(
7427 VkInstance instance,
7428 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
7429 const VkAllocationCallbacks* pAllocator,
7430 VkDebugReportCallbackEXT* pCallback) {
7431 return ?
7432}
7433
7434@extension("VK_EXT_debug_report") // 12
7435cmd void vkDestroyDebugReportCallbackEXT(
7436 VkInstance instance,
7437 VkDebugReportCallbackEXT callback,
7438 const VkAllocationCallbacks* pAllocator) {
7439}
7440
7441@extension("VK_EXT_debug_report") // 12
7442cmd void vkDebugReportMessageEXT(
7443 VkInstance instance,
7444 VkDebugReportFlagsEXT flags,
7445 VkDebugReportObjectTypeEXT objectType,
7446 u64 object,
7447 platform.size_t location,
7448 s32 messageCode,
7449 const char* pLayerPrefix,
7450 const char* pMessage) {
7451}
7452
7453@extension("VK_EXT_debug_marker") // 23
7454cmd VkResult vkDebugMarkerSetObjectTagEXT(
7455 VkDevice device,
7456 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
7457 return ?
7458}
7459
7460@extension("VK_EXT_debug_marker") // 23
7461cmd VkResult vkDebugMarkerSetObjectNameEXT(
7462 VkDevice device,
7463 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
7464 return ?
7465}
7466
7467@extension("VK_EXT_debug_marker") // 23
7468cmd void vkCmdDebugMarkerBeginEXT(
7469 VkCommandBuffer commandBuffer,
7470 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
7471}
7472
7473@extension("VK_EXT_debug_marker") // 23
7474cmd void vkCmdDebugMarkerEndEXT(
7475 VkCommandBuffer commandBuffer) {
7476}
7477
7478@extension("VK_EXT_debug_marker") // 23
7479cmd void vkCmdDebugMarkerInsertEXT(
7480 VkCommandBuffer commandBuffer,
7481 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
7482}
7483
7484@extension("VK_AMD_draw_indirect_count") // 34
7485cmd void vkCmdDrawIndirectCountAMD(
7486 VkCommandBuffer commandBuffer,
7487 VkBuffer buffer,
7488 VkDeviceSize offset,
7489 VkBuffer countBuffer,
7490 VkDeviceSize countBufferOffset,
7491 u32 maxDrawCount,
7492 u32 stride) {
7493}
7494
7495@extension("VK_AMD_draw_indirect_count") // 34
7496cmd void vkCmdDrawIndexedIndirectCountAMD(
7497 VkCommandBuffer commandBuffer,
7498 VkBuffer buffer,
7499 VkDeviceSize offset,
7500 VkBuffer countBuffer,
7501 VkDeviceSize countBufferOffset,
7502 u32 maxDrawCount,
7503 u32 stride) {
7504}
7505
7506@extension("VK_NV_external_memory_capabilities") // 56
7507cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
7508 VkPhysicalDevice physicalDevice,
7509 VkFormat format,
7510 VkImageType type,
7511 VkImageTiling tiling,
7512 VkImageUsageFlags usage,
7513 VkImageCreateFlags flags,
7514 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
7515 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
7516 return ?
7517}
7518
7519@extension("VK_NV_external_memory_win32") // 58
7520cmd VkResult vkGetMemoryWin32HandleNV(
7521 VkDevice device,
7522 VkDeviceMemory memory,
7523 VkExternalMemoryHandleTypeFlagsNV handleType,
7524 platform.HANDLE* pHandle) {
7525 return ?
7526}
7527
7528@extension("VK_KHR_get_physical_device_properties2") // 60
7529cmd void vkGetPhysicalDeviceFeatures2KHR(
7530 VkPhysicalDevice physicalDevice,
7531 VkPhysicalDeviceFeatures2KHR* pFeatures) {
7532}
7533
7534@extension("VK_KHR_get_physical_device_properties2") // 60
7535cmd void vkGetPhysicalDeviceProperties2KHR(
7536 VkPhysicalDevice physicalDevice,
7537 VkPhysicalDeviceProperties2KHR* pProperties) {
7538}
7539
7540@extension("VK_KHR_get_physical_device_properties2") // 60
7541cmd void vkGetPhysicalDeviceFormatProperties2KHR(
7542 VkPhysicalDevice physicalDevice,
7543 VkFormat format,
7544 VkFormatProperties2KHR* pFormatProperties) {
7545}
7546
7547@extension("VK_KHR_get_physical_device_properties2") // 60
7548cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
7549 VkPhysicalDevice physicalDevice,
7550 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
7551 VkImageFormatProperties2KHR* pImageFormatProperties) {
7552 return ?
7553}
7554
7555@extension("VK_KHR_get_physical_device_properties2") // 60
7556cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
7557 VkPhysicalDevice physicalDevice,
7558 u32* pQueueFamilyPropertyCount,
7559 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
7560}
7561
7562@extension("VK_KHR_get_physical_device_properties2") // 60
7563cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
7564 VkPhysicalDevice physicalDevice,
7565 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
7566}
7567
7568@extension("VK_KHR_get_physical_device_properties2") // 60
7569cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
7570 VkPhysicalDevice physicalDevice,
7571 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7572 u32* pPropertyCount,
7573 VkSparseImageFormatProperties2KHR* pProperties) {
7574}
7575
7576@extension("VK_KHX_device_group") // 61
7577cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7578 VkDevice device,
7579 u32 heapIndex,
7580 u32 localDeviceIndex,
7581 u32 remoteDeviceIndex,
7582 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7583}
7584
7585@extension("VK_KHX_device_group") // 61
7586cmd VkResult vkBindBufferMemory2KHX(
7587 VkDevice device,
7588 u32 bindInfoCount,
7589 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7590 return ?
7591}
7592
7593@extension("VK_KHX_device_group") // 61
7594cmd VkResult vkBindImageMemory2KHX(
7595 VkDevice device,
7596 u32 bindInfoCount,
7597 const VkBindImageMemoryInfoKHX* pBindInfos) {
7598 return ?
7599}
7600
7601@extension("VK_KHX_device_group") // 61
7602cmd void vkCmdSetDeviceMaskKHX(
7603 VkCommandBuffer commandBuffer,
7604 u32 deviceMask) {
7605}
7606
7607@extension("VK_KHX_device_group") // 61
7608cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7609 VkDevice device,
7610 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7611 return ?
7612}
7613
7614@extension("VK_KHX_device_group") // 61
7615cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7616 VkDevice device,
7617 VkSurfaceKHR surface,
7618 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7619 return ?
7620}
7621
7622@extension("VK_KHX_device_group") // 61
7623cmd VkResult vkAcquireNextImage2KHX(
7624 VkDevice device,
7625 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7626 u32* pImageIndex) {
7627 return ?
7628}
7629
7630@extension("VK_KHX_device_group") // 61
7631cmd void vkCmdDispatchBaseKHX(
7632 VkCommandBuffer commandBuffer,
7633 u32 baseGroupX,
7634 u32 baseGroupY,
7635 u32 baseGroupZ,
7636 u32 groupCountX,
7637 u32 groupCountY,
7638 u32 groupCountZ) {
7639}
7640
7641@extension("VK_KHX_device_group") // 61
7642cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7643 VkPhysicalDevice physicalDevice,
7644 VkSurfaceKHR surface,
7645 u32* pRectCount,
7646 VkRect2D* pRects) {
7647 return ?
7648}
7649
7650@extension("VK_NN_vi_surface") // 63
7651cmd VkResult vkCreateViSurfaceNN(
7652 VkInstance instance,
7653 const VkViSurfaceCreateInfoNN* pCreateInfo,
7654 const VkAllocationCallbacks* pAllocator,
7655 VkSurfaceKHR* pSurface) {
7656 return ?
7657}
7658
7659@extension("VK_KHR_maintenance1") // 70
7660cmd void vkTrimCommandPoolKHR(
7661 VkDevice device,
7662 VkCommandPool commandPool,
7663 VkCommandPoolTrimFlagsKHR flags) {
7664}
7665
7666@extension("VK_KHX_device_group_creation") // 71
7667cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7668 VkInstance instance,
7669 u32* pPhysicalDeviceGroupCount,
7670 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7671 return ?
7672}
7673
Jesse Hall9492f992017-08-28 12:10:06 -07007674@extension("VK_KHR_external_memory_capabilities") // 72
7675cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007676 VkPhysicalDevice physicalDevice,
Jesse Hall9492f992017-08-28 12:10:06 -07007677 const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo,
7678 VkExternalBufferPropertiesKHR* pExternalBufferProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007679}
7680
Jesse Hall9492f992017-08-28 12:10:06 -07007681@extension("VK_KHR_external_memory_win32") // 74
7682cmd VkResult vkGetMemoryWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007683 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007684 const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007685 platform.HANDLE* pHandle) {
7686 return ?
7687}
7688
Jesse Hall9492f992017-08-28 12:10:06 -07007689@extension("VK_KHR_external_memory_win32") // 74
7690cmd VkResult vkGetMemoryWin32HandlePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007691 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007692 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08007693 platform.HANDLE handle,
Jesse Hall9492f992017-08-28 12:10:06 -07007694 VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007695 return ?
7696}
7697
Jesse Hall9492f992017-08-28 12:10:06 -07007698@extension("VK_KHR_external_memory_fd") // 75
7699cmd VkResult vkGetMemoryFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007700 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007701 const VkMemoryGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007702 s32* pFd) {
7703 return ?
7704}
7705
Jesse Hall9492f992017-08-28 12:10:06 -07007706@extension("VK_KHR_external_memory_fd") // 75
7707cmd VkResult vkGetMemoryFdPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007708 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007709 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08007710 s32 fd,
Jesse Hall9492f992017-08-28 12:10:06 -07007711 VkMemoryFdPropertiesKHR* pMemoryFdProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007712 return ?
7713}
7714
Jesse Hall9492f992017-08-28 12:10:06 -07007715@extension("VK_KHR_external_semaphore_capabilities") // 77
7716cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007717 VkPhysicalDevice physicalDevice,
Jesse Hall9492f992017-08-28 12:10:06 -07007718 const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
7719 VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08007720}
7721
Jesse Hall9492f992017-08-28 12:10:06 -07007722@extension("VK_KHR_external_semaphore_win32") // 79
7723cmd VkResult vkImportSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007724 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007725 const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08007726 return ?
7727}
7728
Jesse Hall9492f992017-08-28 12:10:06 -07007729@extension("VK_KHR_external_semaphore_win32") // 79
7730cmd VkResult vkGetSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007731 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007732 const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007733 platform.HANDLE* pHandle) {
7734 return ?
7735}
7736
Jesse Hall9492f992017-08-28 12:10:06 -07007737@extension("VK_KHR_external_semaphore_fd") // 80
7738cmd VkResult vkImportSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007739 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007740 const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08007741 return ?
7742}
7743
Jesse Hall9492f992017-08-28 12:10:06 -07007744@extension("VK_KHR_external_semaphore_fd") // 80
7745cmd VkResult vkGetSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08007746 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07007747 const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08007748 s32* pFd) {
7749 return ?
7750}
7751
7752@extension("VK_KHR_push_descriptor") // 81
7753cmd void vkCmdPushDescriptorSetKHR(
7754 VkCommandBuffer commandBuffer,
7755 VkPipelineBindPoint pipelineBindPoint,
7756 VkPipelineLayout layout,
7757 u32 set,
7758 u32 descriptorWriteCount,
7759 const VkWriteDescriptorSet* pDescriptorWrites) {
7760}
7761
7762@extension("VK_KHR_descriptor_update_template") // 86
7763cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7764 VkDevice device,
7765 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7766 const VkAllocationCallbacks* pAllocator,
7767 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7768 return ?
7769}
7770
7771@extension("VK_KHR_descriptor_update_template") // 86
7772cmd void vkDestroyDescriptorUpdateTemplateKHR(
7773 VkDevice device,
7774 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7775 const VkAllocationCallbacks* pAllocator) {
7776}
7777
7778@extension("VK_KHR_descriptor_update_template") // 86
7779cmd void vkUpdateDescriptorSetWithTemplateKHR(
7780 VkDevice device,
7781 VkDescriptorSet descriptorSet,
7782 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7783 const void* pData) {
7784}
7785
7786@extension("VK_KHR_descriptor_update_template") // 86
7787cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7788 VkCommandBuffer commandBuffer,
7789 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7790 VkPipelineLayout layout,
7791 u32 set,
7792 const void* pData) {
7793}
7794
7795@extension("VK_NVX_device_generated_commands") // 87
7796cmd void vkCmdProcessCommandsNVX(
7797 VkCommandBuffer commandBuffer,
7798 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7799}
7800
7801@extension("VK_NVX_device_generated_commands") // 87
7802cmd void vkCmdReserveSpaceForCommandsNVX(
7803 VkCommandBuffer commandBuffer,
7804 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7805}
7806
7807@extension("VK_NVX_device_generated_commands") // 87
7808cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7809 VkDevice device,
7810 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7811 const VkAllocationCallbacks* pAllocator,
7812 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7813 return ?
7814}
7815
7816@extension("VK_NVX_device_generated_commands") // 87
7817cmd void vkDestroyIndirectCommandsLayoutNVX(
7818 VkDevice device,
7819 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7820 const VkAllocationCallbacks* pAllocator) {
7821}
7822
7823@extension("VK_NVX_device_generated_commands") // 87
7824cmd VkResult vkCreateObjectTableNVX(
7825 VkDevice device,
7826 const VkObjectTableCreateInfoNVX* pCreateInfo,
7827 const VkAllocationCallbacks* pAllocator,
7828 VkObjectTableNVX* pObjectTable) {
7829 return ?
7830}
7831
7832@extension("VK_NVX_device_generated_commands") // 87
7833cmd void vkDestroyObjectTableNVX(
7834 VkDevice device,
7835 VkObjectTableNVX objectTable,
7836 const VkAllocationCallbacks* pAllocator) {
7837}
7838
7839@extension("VK_NVX_device_generated_commands") // 87
7840cmd VkResult vkRegisterObjectsNVX(
7841 VkDevice device,
7842 VkObjectTableNVX objectTable,
7843 u32 objectCount,
7844 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7845 const u32* pObjectIndices) {
7846 return ?
7847}
7848
7849@extension("VK_NVX_device_generated_commands") // 87
7850cmd VkResult vkUnregisterObjectsNVX(
7851 VkDevice device,
7852 VkObjectTableNVX objectTable,
7853 u32 objectCount,
7854 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7855 const u32* pObjectIndices) {
7856 return ?
7857}
7858
7859@extension("VK_NVX_device_generated_commands") // 87
7860cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7861 VkPhysicalDevice physicalDevice,
7862 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7863 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7864}
7865
7866@extension("VK_NV_clip_space_w_scaling") // 88
7867cmd void vkCmdSetViewportWScalingNV(
7868 VkCommandBuffer commandBuffer,
7869 u32 firstViewport,
7870 u32 viewportCount,
7871 const VkViewportWScalingNV* pViewportWScalings) {
7872}
7873
7874@extension("VK_EXT_direct_mode_display") // 89
7875cmd VkResult vkReleaseDisplayEXT(
7876 VkPhysicalDevice physicalDevice,
7877 VkDisplayKHR display) {
7878 return ?
7879}
7880
7881@extension("VK_EXT_acquire_xlib_display") // 90
7882cmd VkResult vkAcquireXlibDisplayEXT(
7883 VkPhysicalDevice physicalDevice,
7884 platform.Display* dpy,
7885 VkDisplayKHR display) {
7886 return ?
7887}
7888
7889@extension("VK_EXT_acquire_xlib_display") // 90
7890cmd VkResult vkGetRandROutputDisplayEXT(
7891 VkPhysicalDevice physicalDevice,
7892 platform.Display* dpy,
7893 platform.RROutput rrOutput,
7894 VkDisplayKHR* pDisplay) {
7895 return ?
7896}
7897
7898@extension("VK_EXT_display_surface_counter") // 91
7899cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7900 VkPhysicalDevice physicalDevice,
7901 VkSurfaceKHR surface,
7902 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7903 return ?
7904}
7905
7906@extension("VK_EXT_display_control") // 92
7907cmd VkResult vkDisplayPowerControlEXT(
7908 VkDevice device,
7909 VkDisplayKHR display,
7910 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7911 return ?
7912}
7913
7914@extension("VK_EXT_display_control") // 92
7915cmd VkResult vkRegisterDeviceEventEXT(
7916 VkDevice device,
7917 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7918 const VkAllocationCallbacks* pAllocator,
7919 VkFence* pFence) {
7920 return ?
7921}
7922
7923@extension("VK_EXT_display_control") // 92
7924cmd VkResult vkRegisterDisplayEventEXT(
7925 VkDevice device,
7926 VkDisplayKHR display,
7927 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7928 const VkAllocationCallbacks* pAllocator,
7929 VkFence* pFence) {
7930 return ?
7931}
7932
7933@extension("VK_EXT_display_control") // 92
7934cmd VkResult vkGetSwapchainCounterEXT(
7935 VkDevice device,
7936 VkSwapchainKHR swapchain,
7937 VkSurfaceCounterFlagBitsEXT counter,
7938 u64* pCounterValue) {
7939 return ?
7940}
7941
7942@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007943cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007944 VkDevice device,
7945 VkSwapchainKHR swapchain,
7946 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007947 deviceObject := GetDevice(device)
7948 swapchainObject := GetSwapchain(swapchain)
7949
7950 displayTimingProperties := ?
7951 pDisplayTimingProperties[0] = displayTimingProperties
7952
7953 return ?
7954}
7955
Jesse Hallad250842017-03-10 18:35:38 -08007956@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007957cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007958 VkDevice device,
7959 VkSwapchainKHR swapchain,
7960 u32* pPresentationTimingCount,
7961 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007962 return ?
7963}
7964
Jesse Hallad250842017-03-10 18:35:38 -08007965@extension("VK_EXT_discard_rectangles") // 100
7966cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007967 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007968 u32 firstDiscardRectangle,
7969 u32 discardRectangleCount,
7970 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007971}
7972
Jesse Hallad250842017-03-10 18:35:38 -08007973@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007974cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007975 VkDevice device,
7976 u32 swapchainCount,
7977 const VkSwapchainKHR* pSwapchains,
7978 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08007979}
7980
Jesse Hallad250842017-03-10 18:35:38 -08007981@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007982cmd VkResult vkGetSwapchainStatusKHR(
7983 VkDevice device,
7984 VkSwapchainKHR swapchain) {
7985 return ?
7986}
7987
Jesse Hall9492f992017-08-28 12:10:06 -07007988@extension("VK_KHR_external_fence_capabilities") // 113
7989cmd void vkGetPhysicalDeviceExternalFencePropertiesKHR(
7990 VkPhysicalDevice physicalDevice,
7991 const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
7992 VkExternalFencePropertiesKHR* pExternalFenceProperties) {
7993}
7994
7995@extension("VK_KHR_external_fence_win32") // 115
7996cmd VkResult vkImportFenceWin32HandleKHR(
7997 VkDevice device,
7998 const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) {
7999 return ?
8000}
8001
8002@extension("VK_KHR_external_fence_win32") // 115
8003cmd VkResult vkGetFenceWin32HandleKHR(
8004 VkDevice device,
8005 const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
8006 platform.HANDLE* pHandle) {
8007 return ?
8008}
8009
8010@extension("VK_KHR_external_fence_fd") // 116
8011cmd VkResult vkImportFenceFdKHR(
8012 VkDevice device,
8013 const VkImportFenceFdInfoKHR* pImportFenceFdInfo) {
8014 return ?
8015}
8016
8017@extension("VK_KHR_external_fence_fd") // 116
8018cmd VkResult vkGetFenceFdKHR(
8019 VkDevice device,
8020 const VkFenceGetFdInfoKHR* pGetFdInfo,
8021 int* pFd) {
8022 return ?
8023}
8024
Jesse Hall05556b12017-05-18 17:40:25 -07008025@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13008026cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
8027 VkPhysicalDevice physicalDevice,
8028 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
8029 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
8030 return ?
8031}
8032
Jesse Hall05556b12017-05-18 17:40:25 -07008033@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13008034cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
8035 VkPhysicalDevice physicalDevice,
8036 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
8037 u32* pSurfaceFormatCount,
8038 VkSurfaceFormat2KHR* pSurfaceFormats) {
8039 return ?
8040}
8041
Jesse Hallad250842017-03-10 18:35:38 -08008042@extension("VK_MVK_ios_surface") // 123
8043cmd VkResult vkCreateIOSSurfaceMVK(
8044 VkInstance instance,
8045 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
8046 const VkAllocationCallbacks* pAllocator,
8047 VkSurfaceKHR* pSurface) {
8048 return ?
8049}
8050
8051@extension("VK_MVK_macos_surface") // 124
8052cmd VkResult vkCreateMacOSSurfaceMVK(
8053 VkInstance instance,
8054 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
8055 const VkAllocationCallbacks* pAllocator,
8056 VkSurfaceKHR* pSurface) {
8057 return ?
8058}
8059
Jesse Hall9492f992017-08-28 12:10:06 -07008060@extension("VK_KHR_get_memory_requirements2") // 147
8061cmd void vkGetImageMemoryRequirements2KHR(
8062 VkDevice device,
8063 const VkImageMemoryRequirementsInfo2KHR* pInfo,
8064 VkMemoryRequirements2KHR* pMemoryRequirements) {
8065}
8066
8067@extension("VK_KHR_get_memory_requirements2") // 147
8068cmd void vkGetBufferMemoryRequirements2KHR(
8069 VkDevice device,
8070 const VkBufferMemoryRequirementsInfo2KHR* pInfo,
8071 VkMemoryRequirements2KHR* pMemoryRequirements) {
8072}
8073
8074@extension("VK_KHR_get_memory_requirements2") // 147
8075cmd void vkGetImageSparseMemoryRequirements2KHR(
8076 VkDevice device,
8077 const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
8078 u32* pSparseMemoryRequirementCount,
8079 VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) {
8080}
8081
Jesse Halld27f6aa2015-08-15 17:58:48 -07008082////////////////
8083// Validation //
8084////////////////
8085
8086extern void validate(string layerName, bool condition, string message)
8087
8088
8089/////////////////////////////
8090// Internal State Tracking //
8091/////////////////////////////
8092
8093StateObject State
8094
8095@internal class StateObject {
8096 // Dispatchable objects.
8097 map!(VkInstance, ref!InstanceObject) Instances
8098 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
8099 map!(VkDevice, ref!DeviceObject) Devices
8100 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08008101 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07008102
8103 // Non-dispatchable objects.
8104 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
8105 map!(VkBuffer, ref!BufferObject) Buffers
8106 map!(VkBufferView, ref!BufferViewObject) BufferViews
8107 map!(VkImage, ref!ImageObject) Images
8108 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07008109 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07008110 map!(VkPipeline, ref!PipelineObject) Pipelines
8111 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
8112 map!(VkSampler, ref!SamplerObject) Samplers
8113 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
8114 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
8115 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07008116 map!(VkFence, ref!FenceObject) Fences
8117 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
8118 map!(VkEvent, ref!EventObject) Events
8119 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
8120 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
8121 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
8122 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08008123 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08008124 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08008125 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07008126}
8127
8128@internal class InstanceObject {
8129}
8130
8131@internal class PhysicalDeviceObject {
8132 VkInstance instance
8133}
8134
8135@internal class DeviceObject {
8136 VkPhysicalDevice physicalDevice
8137}
8138
8139@internal class QueueObject {
8140 VkDevice device
8141 VkQueueFlags flags
8142}
8143
Jesse Hall3fbc8562015-11-29 22:10:52 -08008144@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07008145 VkDevice device
8146 map!(u64, VkDeviceMemory) boundObjects
8147 VkQueueFlags queueFlags
8148}
8149
8150@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008151 VkDevice device
8152 VkDeviceSize allocationSize
8153 map!(u64, VkDeviceSize) boundObjects
8154 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07008155}
8156
8157@internal class BufferObject {
8158 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08008159 VkDeviceMemory memory
8160 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07008161}
8162
8163@internal class BufferViewObject {
8164 VkDevice device
8165 VkBuffer buffer
8166}
8167
8168@internal class ImageObject {
8169 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08008170 VkDeviceMemory memory
8171 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07008172}
8173
8174@internal class ImageViewObject {
8175 VkDevice device
8176 VkImage image
8177}
8178
Jesse Halld27f6aa2015-08-15 17:58:48 -07008179@internal class ShaderObject {
8180 VkDevice device
8181}
8182
8183@internal class ShaderModuleObject {
8184 VkDevice device
8185}
8186
8187@internal class PipelineObject {
8188 VkDevice device
8189}
8190
8191@internal class PipelineLayoutObject {
8192 VkDevice device
8193}
8194
8195@internal class SamplerObject {
8196 VkDevice device
8197}
8198
8199@internal class DescriptorSetObject {
8200 VkDevice device
8201}
8202
8203@internal class DescriptorSetLayoutObject {
8204 VkDevice device
8205}
8206
8207@internal class DescriptorPoolObject {
8208 VkDevice device
8209}
8210
Jesse Halld27f6aa2015-08-15 17:58:48 -07008211@internal class FenceObject {
8212 VkDevice device
8213 bool signaled
8214}
8215
8216@internal class SemaphoreObject {
8217 VkDevice device
8218}
8219
8220@internal class EventObject {
8221 VkDevice device
8222}
8223
8224@internal class QueryPoolObject {
8225 VkDevice device
8226}
8227
8228@internal class FramebufferObject {
8229 VkDevice device
8230}
8231
8232@internal class RenderPassObject {
8233 VkDevice device
8234}
8235
8236@internal class PipelineCacheObject {
8237 VkDevice device
8238}
8239
Jesse Hall3fbc8562015-11-29 22:10:52 -08008240@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07008241 VkDevice device
8242}
8243
Jesse Hall1356b0d2015-11-23 17:24:58 -08008244@internal class SurfaceObject {
8245 VkInstance instance
8246}
8247
Michael Lentine88594d72015-11-12 12:49:45 -08008248@internal class SwapchainObject {
8249 VkDevice device
8250}
8251
Jesse Halld27f6aa2015-08-15 17:58:48 -07008252macro ref!InstanceObject GetInstance(VkInstance instance) {
8253 assert(instance in State.Instances)
8254 return State.Instances[instance]
8255}
8256
8257macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
8258 assert(physicalDevice in State.PhysicalDevices)
8259 return State.PhysicalDevices[physicalDevice]
8260}
8261
8262macro ref!DeviceObject GetDevice(VkDevice device) {
8263 assert(device in State.Devices)
8264 return State.Devices[device]
8265}
8266
8267macro ref!QueueObject GetQueue(VkQueue queue) {
8268 assert(queue in State.Queues)
8269 return State.Queues[queue]
8270}
8271
Jesse Hall3fbc8562015-11-29 22:10:52 -08008272macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
8273 assert(commandBuffer in State.CommandBuffers)
8274 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07008275}
8276
Jesse Hall3fbc8562015-11-29 22:10:52 -08008277macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
8278 assert(memory in State.DeviceMemories)
8279 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07008280}
8281
8282macro ref!BufferObject GetBuffer(VkBuffer buffer) {
8283 assert(buffer in State.Buffers)
8284 return State.Buffers[buffer]
8285}
8286
8287macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
8288 assert(bufferView in State.BufferViews)
8289 return State.BufferViews[bufferView]
8290}
8291
8292macro ref!ImageObject GetImage(VkImage image) {
8293 assert(image in State.Images)
8294 return State.Images[image]
8295}
8296
8297macro ref!ImageViewObject GetImageView(VkImageView imageView) {
8298 assert(imageView in State.ImageViews)
8299 return State.ImageViews[imageView]
8300}
8301
Jesse Halld27f6aa2015-08-15 17:58:48 -07008302macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
8303 assert(shaderModule in State.ShaderModules)
8304 return State.ShaderModules[shaderModule]
8305}
8306
8307macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
8308 assert(pipeline in State.Pipelines)
8309 return State.Pipelines[pipeline]
8310}
8311
8312macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
8313 assert(pipelineLayout in State.PipelineLayouts)
8314 return State.PipelineLayouts[pipelineLayout]
8315}
8316
8317macro ref!SamplerObject GetSampler(VkSampler sampler) {
8318 assert(sampler in State.Samplers)
8319 return State.Samplers[sampler]
8320}
8321
8322macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
8323 assert(descriptorSet in State.DescriptorSets)
8324 return State.DescriptorSets[descriptorSet]
8325}
8326
8327macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
8328 assert(descriptorSetLayout in State.DescriptorSetLayouts)
8329 return State.DescriptorSetLayouts[descriptorSetLayout]
8330}
8331
8332macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
8333 assert(descriptorPool in State.DescriptorPools)
8334 return State.DescriptorPools[descriptorPool]
8335}
8336
Jesse Halld27f6aa2015-08-15 17:58:48 -07008337macro ref!FenceObject GetFence(VkFence fence) {
8338 assert(fence in State.Fences)
8339 return State.Fences[fence]
8340}
8341
8342macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
8343 assert(semaphore in State.Semaphores)
8344 return State.Semaphores[semaphore]
8345}
8346
8347macro ref!EventObject GetEvent(VkEvent event) {
8348 assert(event in State.Events)
8349 return State.Events[event]
8350}
8351
8352macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
8353 assert(queryPool in State.QueryPools)
8354 return State.QueryPools[queryPool]
8355}
8356
8357macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
8358 assert(framebuffer in State.Framebuffers)
8359 return State.Framebuffers[framebuffer]
8360}
8361
8362macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
8363 assert(renderPass in State.RenderPasses)
8364 return State.RenderPasses[renderPass]
8365}
8366
8367macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
8368 assert(pipelineCache in State.PipelineCaches)
8369 return State.PipelineCaches[pipelineCache]
8370}
8371
Jesse Hall3fbc8562015-11-29 22:10:52 -08008372macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
8373 assert(commandPool in State.CommandPools)
8374 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07008375}
Michael Lentine88594d72015-11-12 12:49:45 -08008376
Jesse Hall1356b0d2015-11-23 17:24:58 -08008377macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
8378 assert(surface in State.Surfaces)
8379 return State.Surfaces[surface]
8380}
8381
Michael Lentine88594d72015-11-12 12:49:45 -08008382macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
8383 assert(swapchain in State.Swapchains)
8384 return State.Swapchains[swapchain]
8385}
Jesse Halld8bade02015-11-24 10:24:18 -08008386
8387macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
8388 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
8389}