blob: 11161c6bf6b6bfedda950765b2a890877231c6fc [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 Hall05556b12017-05-18 17:40:25 -070031define VERSION_PATCH 49
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
41define VK_LUID_SIZE_KHX 8
42define VK_QUEUE_FAMILY_EXTERNAL_KHX -2
Jesse Halld27f6aa2015-08-15 17:58:48 -070043
44// API keywords
45define VK_TRUE 1
46define VK_FALSE 0
Jesse Hall5ae3abb2015-10-08 14:00:22 -070047
48// API keyword, but needs special handling by some templates
49define NULL_HANDLE 0
Jesse Halld27f6aa2015-08-15 17:58:48 -070050
Jesse Halleb02c472017-02-24 15:13:45 -080051// 1
Jesse Hall33faaad2016-01-24 21:00:49 -080052@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080053@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080054
Jesse Halleb02c472017-02-24 15:13:45 -080055// 2
Jesse Hall26763382016-05-20 07:13:52 -070056@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080057@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080058
Jesse Halleb02c472017-02-24 15:13:45 -080059// 3
Jesse Hall543a7ff2016-01-08 16:38:30 -080060@extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080061@extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
Jesse Hall1356b0d2015-11-23 17:24:58 -080062
Jesse Halleb02c472017-02-24 15:13:45 -080063// 4
Jesse Hall543a7ff2016-01-08 16:38:30 -080064@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
Jesse Hall0e74f002015-11-30 11:37:59 -080065@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080066
Jesse Halleb02c472017-02-24 15:13:45 -080067// 5
Jesse Hall543a7ff2016-01-08 16:38:30 -080068@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080069@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080070
Jesse Halleb02c472017-02-24 15:13:45 -080071// 6
Jesse Hall543a7ff2016-01-08 16:38:30 -080072@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080073@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080074
Jesse Halleb02c472017-02-24 15:13:45 -080075// 7
Jesse Hallfdc8ab32017-03-10 21:01:57 -080076@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080077@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080078
Jesse Halleb02c472017-02-24 15:13:45 -080079// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080080@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080081@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080082
Jesse Halleb02c472017-02-24 15:13:45 -080083// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080084@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080085@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080086
Jesse Halleb02c472017-02-24 15:13:45 -080087// 10
Jesse Hall543a7ff2016-01-08 16:38:30 -080088@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080089@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080090
Jesse Halleb02c472017-02-24 15:13:45 -080091// 11
Chris Forbes1d4e5542017-02-15 19:38:50 +130092@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7
Chia-I Wub262ddc2016-03-22 07:38:20 +080093@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer"
94
Jesse Halleb02c472017-02-24 15:13:45 -080095// 12
Jesse Hallf5ad48b2017-03-20 13:09:19 -070096@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 6
Jesse Hall715b86a2016-01-16 16:34:29 -080097@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
98
Jesse Halleb02c472017-02-24 15:13:45 -080099// 13
Jesse Hall26763382016-05-20 07:13:52 -0700100@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
101@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
102
Jesse Halleb02c472017-02-24 15:13:45 -0800103// 15
Jesse Hall26763382016-05-20 07:13:52 -0700104@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
105@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
106
Jesse Halleb02c472017-02-24 15:13:45 -0800107// 16
Jesse Hall26763382016-05-20 07:13:52 -0700108@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
109@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
110
Jesse Halleb02c472017-02-24 15:13:45 -0800111// 19
Jesse Hall26763382016-05-20 07:13:52 -0700112@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
113@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
114
Jesse Halleb02c472017-02-24 15:13:45 -0800115// 21
Jesse Hall56d386a2016-07-26 15:20:40 -0700116@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
117@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
118
Jesse Halleb02c472017-02-24 15:13:45 -0800119// 22
Jesse Hall56d386a2016-07-26 15:20:40 -0700120@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
121@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
122
Jesse Halleb02c472017-02-24 15:13:45 -0800123// 23
Jesse Hall8f49fcb2017-03-06 16:02:58 -0800124@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
Jesse Hall26763382016-05-20 07:13:52 -0700125@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker"
126
Jesse Halleb02c472017-02-24 15:13:45 -0800127// 26
Jesse Hall56d386a2016-07-26 15:20:40 -0700128@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1
129@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
130
Jesse Halleb02c472017-02-24 15:13:45 -0800131// 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700132@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
133@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
134
Jesse Halleb02c472017-02-24 15:13:45 -0800135// 28
Chris Forbes289cb792016-12-30 15:03:55 +1300136@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
137@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
138
Jesse Halleb02c472017-02-24 15:13:45 -0800139// 34
140@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
141@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
142
143// 36
144@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
145@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
146
147// 37
148@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
149@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
150
151// 38
152@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
153@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
154
Jesse Hallad250842017-03-10 18:35:38 -0800155// 54
156@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1
157@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview"
158
Jesse Halleb02c472017-02-24 15:13:45 -0800159// 56
Chris Forbes289cb792016-12-30 15:03:55 +1300160@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
161@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
162
Jesse Halleb02c472017-02-24 15:13:45 -0800163// 57
Chris Forbes289cb792016-12-30 15:03:55 +1300164@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
165@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
166
Jesse Halleb02c472017-02-24 15:13:45 -0800167// 58
Chris Forbes289cb792016-12-30 15:03:55 +1300168@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
169@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
170
Jesse Halleb02c472017-02-24 15:13:45 -0800171// 59
Chris Forbes289cb792016-12-30 15:03:55 +1300172@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
173@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
174
Jesse Hall889cd9a2017-02-25 22:12:23 -0800175// 60
176@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
177@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
178
Jesse Hallad250842017-03-10 18:35:38 -0800179// 61
180@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1
181@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group"
182
Jesse Halleb02c472017-02-24 15:13:45 -0800183// 62
Chris Forbes289cb792016-12-30 15:03:55 +1300184@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
185@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
186
Jesse Hall77ad05b2017-03-10 22:02:20 -0800187// 63
188@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1
189@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
190
191// 64
192@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
193@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
194
195// 65
196@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
197@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
198
199// 66
200@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
201@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
202
203// 70
204@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
205@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
206
Jesse Hallad250842017-03-10 18:35:38 -0800207// 71
208@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1
209@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation"
210
211// 72
212@extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
213@extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities"
214
215// 73
216@extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1
217@extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory"
218
219// 74
220@extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
221@extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32"
222
223// 75
224@extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
225@extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd"
226
227// 76
228@extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1
229@extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex"
230
231// 77
232@extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
233@extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities"
234
235// 78
236@extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
237@extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore"
238
239// 79
240@extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
241@extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32"
242
243// 80
244@extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
245@extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd"
246
247// 81
248@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1
249@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
250
Jesse Hall889cd9a2017-02-25 22:12:23 -0800251// 85
252@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700253@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800254
Jesse Hallad250842017-03-10 18:35:38 -0800255// 86
256@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
257@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
258
Jesse Halleb02c472017-02-24 15:13:45 -0800259// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300260@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
261@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
262
Jesse Hallad250842017-03-10 18:35:38 -0800263// 88
264@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
265@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
266
Jesse Hall77ad05b2017-03-10 22:02:20 -0800267// 89
268@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
269@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
270
271// 90
272@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
273@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
274
275// 91
276@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
277@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
278
279// 92
280@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
281@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
282
Jesse Hall889cd9a2017-02-25 22:12:23 -0800283// 93
284@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
Jesse Hallfdc8ab32017-03-10 21:01:57 -0800285@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800286
Jesse Hallad250842017-03-10 18:35:38 -0800287// 95
288@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
289@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
290
291// 96
292@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
293@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
294
295// 97
296@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
297@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
298
299// 98
300@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
301@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
302
303// 99
304@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
305@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
306
307// 100
308@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
309@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
310
Jesse Hall77ad05b2017-03-10 22:02:20 -0800311// 105
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700312@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 2
313@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
Jesse Hall77ad05b2017-03-10 22:02:20 -0800314
Jesse Hall889cd9a2017-02-25 22:12:23 -0800315// 106
316@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
317@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
318
319// 112
Chris Forbes1d5f68c2017-01-31 10:17:01 +1300320@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
321@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 +1300322
Jesse Hall05556b12017-05-18 17:40:25 -0700323// 120
Chris Forbese2d3ee12017-03-16 16:10:15 +1300324@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
325@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
326
Jesse Hallad250842017-03-10 18:35:38 -0800327// 123
328@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
329@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
330
331// 124
332@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
333@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
334
Jesse Halld27f6aa2015-08-15 17:58:48 -0700335/////////////
336// Types //
337/////////////
338
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700339type u32 VkBool32
340type u32 VkFlags
341type u64 VkDeviceSize
342type u32 VkSampleMask
343
Jesse Halld27f6aa2015-08-15 17:58:48 -0700344/// Dispatchable handle types.
345@dispatchHandle type u64 VkInstance
346@dispatchHandle type u64 VkPhysicalDevice
347@dispatchHandle type u64 VkDevice
348@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800349@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700350
351/// Non dispatchable handle types.
352@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800353@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700354@nonDispatchHandle type u64 VkBuffer
355@nonDispatchHandle type u64 VkBufferView
356@nonDispatchHandle type u64 VkImage
357@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700358@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700359@nonDispatchHandle type u64 VkPipeline
360@nonDispatchHandle type u64 VkPipelineLayout
361@nonDispatchHandle type u64 VkSampler
362@nonDispatchHandle type u64 VkDescriptorSet
363@nonDispatchHandle type u64 VkDescriptorSetLayout
364@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700365@nonDispatchHandle type u64 VkFence
366@nonDispatchHandle type u64 VkSemaphore
367@nonDispatchHandle type u64 VkEvent
368@nonDispatchHandle type u64 VkQueryPool
369@nonDispatchHandle type u64 VkFramebuffer
370@nonDispatchHandle type u64 VkRenderPass
371@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800372
Jesse Hallad250842017-03-10 18:35:38 -0800373// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800374@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800375
Jesse Hallad250842017-03-10 18:35:38 -0800376// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800377@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800378
Jesse Hallad250842017-03-10 18:35:38 -0800379// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800380@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
381@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700382
Jesse Hallad250842017-03-10 18:35:38 -0800383// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800384@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
385
Jesse Hallad250842017-03-10 18:35:38 -0800386// 86
387@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
388
389// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300390@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
391@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
392
Jesse Halld27f6aa2015-08-15 17:58:48 -0700393
394/////////////
395// Enums //
396/////////////
397
398enum VkImageLayout {
399 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
400 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
401 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
402 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
403 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
404 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 -0800405 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
406 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 -0700407 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800408
Jesse Hallad250842017-03-10 18:35:38 -0800409 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800410 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Chris Forbesaf3a1112017-01-31 15:37:03 +1300411
Jesse Hall05556b12017-05-18 17:40:25 -0700412 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbesaf3a1112017-01-31 15:37:03 +1300413 VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700414}
415
416enum VkAttachmentLoadOp {
417 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
418 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
419 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
420}
421
422enum VkAttachmentStoreOp {
423 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
424 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
425}
426
427enum VkImageType {
428 VK_IMAGE_TYPE_1D = 0x00000000,
429 VK_IMAGE_TYPE_2D = 0x00000001,
430 VK_IMAGE_TYPE_3D = 0x00000002,
431}
432
433enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800434 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
435 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700436}
437
438enum VkImageViewType {
439 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
440 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
441 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
442 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
443 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
444 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
445 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
446}
447
Jesse Hall3fbc8562015-11-29 22:10:52 -0800448enum VkCommandBufferLevel {
449 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
450 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700451}
452
Jesse Hall65ab5522015-11-30 00:07:16 -0800453enum VkComponentSwizzle {
454 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
455 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
456 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
457 VK_COMPONENT_SWIZZLE_R = 0x00000003,
458 VK_COMPONENT_SWIZZLE_G = 0x00000004,
459 VK_COMPONENT_SWIZZLE_B = 0x00000005,
460 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700461}
462
463enum VkDescriptorType {
464 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
465 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
466 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
467 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
468 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
469 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
470 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
471 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
472 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
473 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
474 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
475}
476
Jesse Halld27f6aa2015-08-15 17:58:48 -0700477enum VkQueryType {
478 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
479 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800480 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700481}
482
Jesse Halld27f6aa2015-08-15 17:58:48 -0700483enum VkBorderColor {
484 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
485 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
486 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
487 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
488 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
489 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
490}
491
492enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800493 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
494 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700495}
496
497enum VkPrimitiveTopology {
498 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
499 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
500 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
501 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
502 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
503 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800504 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
505 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
506 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
507 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800508 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700509}
510
511enum VkSharingMode {
512 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
513 VK_SHARING_MODE_CONCURRENT = 0x00000001,
514}
515
516enum VkIndexType {
517 VK_INDEX_TYPE_UINT16 = 0x00000000,
518 VK_INDEX_TYPE_UINT32 = 0x00000001,
519}
520
Jesse Hall23ff73f2015-11-29 14:36:39 -0800521enum VkFilter {
522 VK_FILTER_NEAREST = 0x00000000,
523 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700524
Jesse Hallad250842017-03-10 18:35:38 -0800525 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700526 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700527}
528
Jesse Hall23ff73f2015-11-29 14:36:39 -0800529enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800530 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
531 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700532}
533
Jesse Hall23ff73f2015-11-29 14:36:39 -0800534enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800535 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
536 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
537 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
538 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
539 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700540}
541
542enum VkCompareOp {
543 VK_COMPARE_OP_NEVER = 0x00000000,
544 VK_COMPARE_OP_LESS = 0x00000001,
545 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800546 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700547 VK_COMPARE_OP_GREATER = 0x00000004,
548 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800549 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700550 VK_COMPARE_OP_ALWAYS = 0x00000007,
551}
552
Jesse Hall65ab5522015-11-30 00:07:16 -0800553enum VkPolygonMode {
554 VK_POLYGON_MODE_FILL = 0x00000000,
555 VK_POLYGON_MODE_LINE = 0x00000001,
556 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700557}
558
559enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800560 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
561 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700562}
563
Jesse Hall65ab5522015-11-30 00:07:16 -0800564enum VkBlendFactor {
565 VK_BLEND_FACTOR_ZERO = 0x00000000,
566 VK_BLEND_FACTOR_ONE = 0x00000001,
567 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
568 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
569 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
570 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
571 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
572 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
573 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
574 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
575 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
576 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
577 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
578 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
579 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
580 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
581 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
582 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
583 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700584}
585
586enum VkBlendOp {
587 VK_BLEND_OP_ADD = 0x00000000,
588 VK_BLEND_OP_SUBTRACT = 0x00000001,
589 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
590 VK_BLEND_OP_MIN = 0x00000003,
591 VK_BLEND_OP_MAX = 0x00000004,
592}
593
594enum VkStencilOp {
595 VK_STENCIL_OP_KEEP = 0x00000000,
596 VK_STENCIL_OP_ZERO = 0x00000001,
597 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800598 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
599 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700600 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800601 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
602 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700603}
604
605enum VkLogicOp {
606 VK_LOGIC_OP_CLEAR = 0x00000000,
607 VK_LOGIC_OP_AND = 0x00000001,
608 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
609 VK_LOGIC_OP_COPY = 0x00000003,
610 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800611 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700612 VK_LOGIC_OP_XOR = 0x00000006,
613 VK_LOGIC_OP_OR = 0x00000007,
614 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800615 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700616 VK_LOGIC_OP_INVERT = 0x0000000a,
617 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
618 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
619 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
620 VK_LOGIC_OP_NAND = 0x0000000e,
621 VK_LOGIC_OP_SET = 0x0000000f,
622}
623
Jesse Hall3fbc8562015-11-29 22:10:52 -0800624enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800625 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800626 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
627 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
628 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
629 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800630}
631
Jesse Hall3fbc8562015-11-29 22:10:52 -0800632enum VkInternalAllocationType {
633 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700634}
635
636enum VkPhysicalDeviceType {
637 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
638 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
639 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
640 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
641 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
642}
643
Jesse Hall65ab5522015-11-30 00:07:16 -0800644enum VkVertexInputRate {
645 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
646 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700647}
648
649/// Vulkan format definitions
650enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800651 VK_FORMAT_UNDEFINED = 0,
652 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
653 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
654 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
655 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
656 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
657 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
658 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
659 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
660 VK_FORMAT_R8_UNORM = 9,
661 VK_FORMAT_R8_SNORM = 10,
662 VK_FORMAT_R8_USCALED = 11,
663 VK_FORMAT_R8_SSCALED = 12,
664 VK_FORMAT_R8_UINT = 13,
665 VK_FORMAT_R8_SINT = 14,
666 VK_FORMAT_R8_SRGB = 15,
667 VK_FORMAT_R8G8_UNORM = 16,
668 VK_FORMAT_R8G8_SNORM = 17,
669 VK_FORMAT_R8G8_USCALED = 18,
670 VK_FORMAT_R8G8_SSCALED = 19,
671 VK_FORMAT_R8G8_UINT = 20,
672 VK_FORMAT_R8G8_SINT = 21,
673 VK_FORMAT_R8G8_SRGB = 22,
674 VK_FORMAT_R8G8B8_UNORM = 23,
675 VK_FORMAT_R8G8B8_SNORM = 24,
676 VK_FORMAT_R8G8B8_USCALED = 25,
677 VK_FORMAT_R8G8B8_SSCALED = 26,
678 VK_FORMAT_R8G8B8_UINT = 27,
679 VK_FORMAT_R8G8B8_SINT = 28,
680 VK_FORMAT_R8G8B8_SRGB = 29,
681 VK_FORMAT_B8G8R8_UNORM = 30,
682 VK_FORMAT_B8G8R8_SNORM = 31,
683 VK_FORMAT_B8G8R8_USCALED = 32,
684 VK_FORMAT_B8G8R8_SSCALED = 33,
685 VK_FORMAT_B8G8R8_UINT = 34,
686 VK_FORMAT_B8G8R8_SINT = 35,
687 VK_FORMAT_B8G8R8_SRGB = 36,
688 VK_FORMAT_R8G8B8A8_UNORM = 37,
689 VK_FORMAT_R8G8B8A8_SNORM = 38,
690 VK_FORMAT_R8G8B8A8_USCALED = 39,
691 VK_FORMAT_R8G8B8A8_SSCALED = 40,
692 VK_FORMAT_R8G8B8A8_UINT = 41,
693 VK_FORMAT_R8G8B8A8_SINT = 42,
694 VK_FORMAT_R8G8B8A8_SRGB = 43,
695 VK_FORMAT_B8G8R8A8_UNORM = 44,
696 VK_FORMAT_B8G8R8A8_SNORM = 45,
697 VK_FORMAT_B8G8R8A8_USCALED = 46,
698 VK_FORMAT_B8G8R8A8_SSCALED = 47,
699 VK_FORMAT_B8G8R8A8_UINT = 48,
700 VK_FORMAT_B8G8R8A8_SINT = 49,
701 VK_FORMAT_B8G8R8A8_SRGB = 50,
702 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
703 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
704 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
705 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
706 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
707 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
708 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
709 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
710 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
711 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
712 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
713 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
714 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
715 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
716 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
717 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
718 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
719 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
720 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
721 VK_FORMAT_R16_UNORM = 70,
722 VK_FORMAT_R16_SNORM = 71,
723 VK_FORMAT_R16_USCALED = 72,
724 VK_FORMAT_R16_SSCALED = 73,
725 VK_FORMAT_R16_UINT = 74,
726 VK_FORMAT_R16_SINT = 75,
727 VK_FORMAT_R16_SFLOAT = 76,
728 VK_FORMAT_R16G16_UNORM = 77,
729 VK_FORMAT_R16G16_SNORM = 78,
730 VK_FORMAT_R16G16_USCALED = 79,
731 VK_FORMAT_R16G16_SSCALED = 80,
732 VK_FORMAT_R16G16_UINT = 81,
733 VK_FORMAT_R16G16_SINT = 82,
734 VK_FORMAT_R16G16_SFLOAT = 83,
735 VK_FORMAT_R16G16B16_UNORM = 84,
736 VK_FORMAT_R16G16B16_SNORM = 85,
737 VK_FORMAT_R16G16B16_USCALED = 86,
738 VK_FORMAT_R16G16B16_SSCALED = 87,
739 VK_FORMAT_R16G16B16_UINT = 88,
740 VK_FORMAT_R16G16B16_SINT = 89,
741 VK_FORMAT_R16G16B16_SFLOAT = 90,
742 VK_FORMAT_R16G16B16A16_UNORM = 91,
743 VK_FORMAT_R16G16B16A16_SNORM = 92,
744 VK_FORMAT_R16G16B16A16_USCALED = 93,
745 VK_FORMAT_R16G16B16A16_SSCALED = 94,
746 VK_FORMAT_R16G16B16A16_UINT = 95,
747 VK_FORMAT_R16G16B16A16_SINT = 96,
748 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
749 VK_FORMAT_R32_UINT = 98,
750 VK_FORMAT_R32_SINT = 99,
751 VK_FORMAT_R32_SFLOAT = 100,
752 VK_FORMAT_R32G32_UINT = 101,
753 VK_FORMAT_R32G32_SINT = 102,
754 VK_FORMAT_R32G32_SFLOAT = 103,
755 VK_FORMAT_R32G32B32_UINT = 104,
756 VK_FORMAT_R32G32B32_SINT = 105,
757 VK_FORMAT_R32G32B32_SFLOAT = 106,
758 VK_FORMAT_R32G32B32A32_UINT = 107,
759 VK_FORMAT_R32G32B32A32_SINT = 108,
760 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
761 VK_FORMAT_R64_UINT = 110,
762 VK_FORMAT_R64_SINT = 111,
763 VK_FORMAT_R64_SFLOAT = 112,
764 VK_FORMAT_R64G64_UINT = 113,
765 VK_FORMAT_R64G64_SINT = 114,
766 VK_FORMAT_R64G64_SFLOAT = 115,
767 VK_FORMAT_R64G64B64_UINT = 116,
768 VK_FORMAT_R64G64B64_SINT = 117,
769 VK_FORMAT_R64G64B64_SFLOAT = 118,
770 VK_FORMAT_R64G64B64A64_UINT = 119,
771 VK_FORMAT_R64G64B64A64_SINT = 120,
772 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
773 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
774 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
775 VK_FORMAT_D16_UNORM = 124,
776 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
777 VK_FORMAT_D32_SFLOAT = 126,
778 VK_FORMAT_S8_UINT = 127,
779 VK_FORMAT_D16_UNORM_S8_UINT = 128,
780 VK_FORMAT_D24_UNORM_S8_UINT = 129,
781 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
782 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
783 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
784 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
785 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
786 VK_FORMAT_BC2_UNORM_BLOCK = 135,
787 VK_FORMAT_BC2_SRGB_BLOCK = 136,
788 VK_FORMAT_BC3_UNORM_BLOCK = 137,
789 VK_FORMAT_BC3_SRGB_BLOCK = 138,
790 VK_FORMAT_BC4_UNORM_BLOCK = 139,
791 VK_FORMAT_BC4_SNORM_BLOCK = 140,
792 VK_FORMAT_BC5_UNORM_BLOCK = 141,
793 VK_FORMAT_BC5_SNORM_BLOCK = 142,
794 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
795 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
796 VK_FORMAT_BC7_UNORM_BLOCK = 145,
797 VK_FORMAT_BC7_SRGB_BLOCK = 146,
798 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
799 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
800 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
801 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
802 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
803 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
804 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
805 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
806 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
807 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
808 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
809 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
810 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
811 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
812 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
813 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
814 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
815 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
816 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
817 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
818 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
819 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
820 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
821 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
822 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
823 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
824 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
825 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
826 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
827 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
828 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
829 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
830 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
831 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
832 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
833 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
834 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
835 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Chris Forbes289cb792016-12-30 15:03:55 +1300836
Jesse Hallad250842017-03-10 18:35:38 -0800837 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -0800838 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
839 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
840 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
841 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
842 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
843 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
844 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
845 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700846}
847
Jesse Halld27f6aa2015-08-15 17:58:48 -0700848/// Structure type enumerant
849enum VkStructureType {
850 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -0800851 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
852 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
853 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
854 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800855 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -0800856 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
857 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
858 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
859 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700860 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -0800861 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
862 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
863 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
864 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
865 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
866 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800867 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
868 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
869 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
870 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
871 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
872 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
873 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
874 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
875 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
876 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
877 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
878 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
879 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
880 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
881 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
882 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
883 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800884 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800885 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
886 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
887 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
888 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
889 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800890 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -0800891 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
892 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
893 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
894 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
895 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
896 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
897 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
898 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800899
Jesse Hallad250842017-03-10 18:35:38 -0800900 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800901 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
902 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800903
Jesse Hallad250842017-03-10 18:35:38 -0800904 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -0800905 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
906 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800907
Jesse Hallad250842017-03-10 18:35:38 -0800908 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -0800909 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800910
Jesse Hallad250842017-03-10 18:35:38 -0800911 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800912 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
913
Jesse Hallad250842017-03-10 18:35:38 -0800914 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800915 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
916
Jesse Hallad250842017-03-10 18:35:38 -0800917 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800918 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
919
Jesse Hallad250842017-03-10 18:35:38 -0800920 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800921 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
922
Jesse Hallad250842017-03-10 18:35:38 -0800923 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800924 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
925
Jesse Hallad250842017-03-10 18:35:38 -0800926 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800927 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -0800928
Jesse Hallad250842017-03-10 18:35:38 -0800929 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +0800930 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
Chris Forbes8e4438b2016-12-07 16:26:49 +1300931 VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001,
Chris Forbes1d4e5542017-02-15 19:38:50 +1300932 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002,
Chia-I Wub262ddc2016-03-22 07:38:20 +0800933
Jesse Hallad250842017-03-10 18:35:38 -0800934 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -0700935 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
936
Jesse Hallad250842017-03-10 18:35:38 -0800937 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -0700938 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
939
Jesse Hallad250842017-03-10 18:35:38 -0800940 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -0700941 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -0700942 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -0700943 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall56d386a2016-07-26 15:20:40 -0700944
Jesse Hallad250842017-03-10 18:35:38 -0800945 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700946 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall56d386a2016-07-26 15:20:40 -0700947 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall56d386a2016-07-26 15:20:40 -0700948 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Chris Forbes289cb792016-12-30 15:03:55 +1300949
Jesse Hallad250842017-03-10 18:35:38 -0800950 //@extension("VK_KHX_multiview") // 54
951 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
952 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
953 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
954
955 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -0800956 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
957 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
Chris Forbes289cb792016-12-30 15:03:55 +1300958
Jesse Hallad250842017-03-10 18:35:38 -0800959 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -0800960 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
961 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
Chris Forbes289cb792016-12-30 15:03:55 +1300962
Jesse Hallad250842017-03-10 18:35:38 -0800963 //@extension("VK_NV_win32_keyed_mutex") // 59
Chris Forbes289cb792016-12-30 15:03:55 +1300964 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
965
Jesse Hallad250842017-03-10 18:35:38 -0800966 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall889cd9a2017-02-25 22:12:23 -0800967 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
968 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
969 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
970 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
971 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
972 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
973 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
974 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
Chris Forbes1194ede2016-12-30 16:29:25 +1300975 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
976
Jesse Hallad250842017-03-10 18:35:38 -0800977 //@extension("VK_KHX_device_group") // 61
978 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
979 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
980 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
981 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
982 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
983 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
984 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
985 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
986 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
987 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
988 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
989 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
990 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
991
992 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -0800993 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
Chris Forbes289cb792016-12-30 15:03:55 +1300994
Jesse Hallad250842017-03-10 18:35:38 -0800995 //@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -0800996 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
997
Jesse Hallad250842017-03-10 18:35:38 -0800998 //@extension("VK_KHX_device_group_creation") // 71
999 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
1000 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
1001
1002 //@extension("VK_KHX_external_memory_capabilities") // 72
1003 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000,
1004 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001,
1005 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002,
1006 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003,
1007 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004,
Jesse Hallad250842017-03-10 18:35:38 -08001008
1009 //@extension("VK_KHX_external_memory") // 73
1010 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
1011 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
1012 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
1013
1014 //@extension("VK_KHX_external_memory_win32") // 74
1015 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
1016 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
1017 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
1018
1019 //@extension("VK_KHX_external_memory_fd") // 75
1020 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
1021 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
1022
1023 //@extension("VK_KHX_win32_keyed_mutex") // 76
1024 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
1025
1026 //@extension("VK_KHX_external_semaphore_capabilities") // 77
1027 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
1028 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
1029
1030 //@extension("VK_KHX_external_semaphore") // 78
1031 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
1032
1033 //@extension("VK_KHX_external_semaphore_win32") // 79
1034 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
1035 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
1036 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
1037
1038 //@extension("VK_KHX_external_semaphore_fd") // 80
1039 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
1040
1041 //@extension("VK_KHR_push_descriptor") // 81
1042 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1043
1044 //@extension("VK_KHR_incremental_present") // 85
Jesse Hall889cd9a2017-02-25 22:12:23 -08001045 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
Chris Forbes289cb792016-12-30 15:03:55 +13001046
Jesse Hallad250842017-03-10 18:35:38 -08001047 //@extension("VK_KHR_descriptor_update_template") // 86
1048 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1049
1050 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001051 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1052 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1053 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1054 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1055 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1056 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001057
Jesse Hallad250842017-03-10 18:35:38 -08001058 //@extension("VK_NV_clip_space_w_scaling") // 88
1059 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1060
1061 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08001062 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1063
Jesse Hallad250842017-03-10 18:35:38 -08001064 //@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001065 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1066 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1067 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1068 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Hallad250842017-03-10 18:35:38 -08001069
1070 //@extension("VK_GOOGLE_display_timing") // 93
1071 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1072
1073 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1074 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1075
1076 //@extension("VK_NV_viewport_swizzle") // 99
1077 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1078
1079 //@extension("VK_EXT_discard_rectangles") // 100
1080 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1081 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1082
Jesse Hallfdc8ab32017-03-10 21:01:57 -08001083 //@extension("VK_EXT_hdr_metadata") // 106
1084 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1085
Jesse Hall05556b12017-05-18 17:40:25 -07001086 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13001087 VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
1088
Jesse Hall05556b12017-05-18 17:40:25 -07001089 //@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13001090 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
1091 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
1092 VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
1093
Jesse Hallad250842017-03-10 18:35:38 -08001094 //@extension("VK_MVK_ios_surface") // 123
1095 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1096
1097 //@extension("VK_MVK_macos_surface") // 124
1098 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001099}
1100
Jesse Hall65ab5522015-11-30 00:07:16 -08001101enum VkSubpassContents {
1102 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1103 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001104}
1105
Jesse Hall543a7ff2016-01-08 16:38:30 -08001106enum VkPipelineCacheHeaderVersion {
1107 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1108}
1109
Jesse Hallbd888842015-11-30 21:44:14 -08001110@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001111/// Error and return codes
1112enum VkResult {
1113 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001114 VK_SUCCESS = 0,
1115 VK_NOT_READY = 1,
1116 VK_TIMEOUT = 2,
1117 VK_EVENT_SET = 3,
1118 VK_EVENT_RESET = 4,
1119 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001120
Jesse Hallad250842017-03-10 18:35:38 -08001121 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001122 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001123
Jesse Halld27f6aa2015-08-15 17:58:48 -07001124 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001125 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1126 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1127 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1128 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1129 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1130 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1131 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1132 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1133 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1134 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1135 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001136 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001137
Jesse Hallad250842017-03-10 18:35:38 -08001138 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001139 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001140 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001141
Jesse Hallad250842017-03-10 18:35:38 -08001142 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001143 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001144
Jesse Hallad250842017-03-10 18:35:38 -08001145 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001146 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001147
Jesse Hallad250842017-03-10 18:35:38 -08001148 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001149 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001150
Jesse Hallad250842017-03-10 18:35:38 -08001151 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001152 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001153
Jesse Hallad250842017-03-10 18:35:38 -08001154 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001155 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001156
1157 //@extension("VK_KHX_external_memory") // 73
1158 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001159}
1160
1161enum VkDynamicState {
1162 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1163 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1164 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1165 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1166 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1167 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1168 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1169 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1170 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001171
1172 //@extension("VK_NV_clip_space_w_scaling") // 88
1173 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1174
1175 //@extension("VK_EXT_discard_rectangles") // 100
1176 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001177}
1178
Jesse Hall05556b12017-05-18 17:40:25 -07001179enum VkObjectType {
1180 VK_OBJECT_TYPE_UNKNOWN = 0,
1181 VK_OBJECT_TYPE_INSTANCE = 1,
1182 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
1183 VK_OBJECT_TYPE_DEVICE = 3,
1184 VK_OBJECT_TYPE_QUEUE = 4,
1185 VK_OBJECT_TYPE_SEMAPHORE = 5,
1186 VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
1187 VK_OBJECT_TYPE_FENCE = 7,
1188 VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
1189 VK_OBJECT_TYPE_BUFFER = 9,
1190 VK_OBJECT_TYPE_IMAGE = 10,
1191 VK_OBJECT_TYPE_EVENT = 11,
1192 VK_OBJECT_TYPE_QUERY_POOL = 12,
1193 VK_OBJECT_TYPE_BUFFER_VIEW = 13,
1194 VK_OBJECT_TYPE_IMAGE_VIEW = 14,
1195 VK_OBJECT_TYPE_SHADER_MODULE = 15,
1196 VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
1197 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
1198 VK_OBJECT_TYPE_RENDER_PASS = 18,
1199 VK_OBJECT_TYPE_PIPELINE = 19,
1200 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
1201 VK_OBJECT_TYPE_SAMPLER = 21,
1202 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
1203 VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
1204 VK_OBJECT_TYPE_FRAMEBUFFER = 24,
1205 VK_OBJECT_TYPE_COMMAND_POOL = 25,
1206
1207 //@extension("VK_KHR_surface") // 1
1208 VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
1209
1210 //@extension("VK_KHR_swapchain") // 2
1211 VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
1212
1213 //@extension("VK_KHR_display") // 3
1214 VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000,
1215 VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001,
1216
1217 //@extension("VK_KHR_debug_report") // 12
1218 VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000,
1219
1220 //@extension("VK_KHR_descriptor_update_template") // 86
1221 VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
1222
1223 //@extension("VK_NVX_device_generated_commands") // 87
1224 VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000,
1225 VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001,
1226}
1227
Jesse Hallad250842017-03-10 18:35:38 -08001228@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001229enum VkPresentModeKHR {
1230 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1231 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1232 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001233 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001234
Jesse Hall05556b12017-05-18 17:40:25 -07001235 //@extension("VK_KHR_shared_presentable_image") // 112
Jesse Hall77ad05b2017-03-10 22:02:20 -08001236 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1237 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001238}
1239
Jesse Hallad250842017-03-10 18:35:38 -08001240@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001241enum VkColorSpaceKHR {
1242 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001243
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001244 //@extension("VK_EXT_swapchain_colorspace") // 105
1245 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
1246 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
1247 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
1248 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
1249 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
1250 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
1251 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
1252 VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
1253 VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
1254 VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001255 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1256 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001257 VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
Courtney Goeltzenleuchteredc88e72017-07-09 12:50:57 -06001258 VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
Michael Lentine88594d72015-11-12 12:49:45 -08001259}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001260
Jesse Hallad250842017-03-10 18:35:38 -08001261@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001262enum VkDebugReportObjectTypeEXT {
1263 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1264 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1265 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1266 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1267 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1268 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1269 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1270 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1271 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1272 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1273 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1274 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1275 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1276 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1277 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1278 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1279 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1280 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1281 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1282 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1283 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1284 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1285 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1286 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1287 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1288 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1289 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1290 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1291 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001292 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1293 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1294 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1295 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001296
1297 //extension("VK_KHR_descriptor_update_template") // 86
1298 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001299}
1300
Jesse Hallad250842017-03-10 18:35:38 -08001301@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001302enum VkDebugReportErrorEXT {
1303 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1304 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1305}
1306
Jesse Hallad250842017-03-10 18:35:38 -08001307@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001308enum VkRasterizationOrderAMD {
1309 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1310 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1311}
1312
Jesse Hallad250842017-03-10 18:35:38 -08001313@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001314enum VkValidationCheckEXT {
1315 VK_VALIDATION_CHECK_ALL_EXT = 0,
1316}
1317
Jesse Hallad250842017-03-10 18:35:38 -08001318@extension("VK_KHR_descriptor_update_template") // 86
1319enum VkDescriptorUpdateTemplateTypeKHR {
1320 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1321 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1322}
1323
1324@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001325enum VkIndirectCommandsTokenTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001326 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1327 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1328 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1329 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1330 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1331 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1332 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1333 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001334}
1335
Jesse Hallad250842017-03-10 18:35:38 -08001336@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001337enum VkObjectEntryTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001338 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1339 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1340 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1341 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1342 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001343}
Jesse Hall715b86a2016-01-16 16:34:29 -08001344
Jesse Hallad250842017-03-10 18:35:38 -08001345@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001346enum VkDisplayPowerStateEXT {
1347 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1348 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1349 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1350}
1351
Jesse Hallad250842017-03-10 18:35:38 -08001352@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001353enum VkDeviceEventTypeEXT {
1354 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1355}
1356
Jesse Hallad250842017-03-10 18:35:38 -08001357@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001358enum VkDisplayEventTypeEXT {
1359 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1360}
1361
Jesse Hallad250842017-03-10 18:35:38 -08001362@extension("VK_NV_viewport_swizzle") // 99
1363enum VkViewportCoordinateSwizzleNV {
1364 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1365 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1366 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1367 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1368 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1369 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1370 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1371 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1372}
1373
1374@extension("VK_EXT_discard_rectangles") // 100
1375enum VkDiscardRectangleModeEXT {
1376 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1377 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1378}
1379
Jesse Halld27f6aa2015-08-15 17:58:48 -07001380/////////////////
1381// Bitfields //
1382/////////////////
1383
Jesse Halld27f6aa2015-08-15 17:58:48 -07001384/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001385type VkFlags VkQueueFlags
1386bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001387 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1388 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001389 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001390 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001391}
1392
1393/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001394type VkFlags VkMemoryPropertyFlags
1395bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001396 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1397 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1398 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1399 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1400 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001401}
1402
1403/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001404type VkFlags VkMemoryHeapFlags
1405bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001406 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001407
1408 //@extension("VK_KHX_device_group_creation") // 71
1409 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001410}
1411
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001412/// Access flags
1413type VkFlags VkAccessFlags
1414bitfield VkAccessFlagBits {
1415 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1416 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1417 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1418 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1419 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1420 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1421 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1422 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1423 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1424 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1425 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1426 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1427 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1428 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1429 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1430 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1431 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001432
Jesse Hallad250842017-03-10 18:35:38 -08001433 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001434 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001435 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001436}
1437
1438/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001439type VkFlags VkBufferUsageFlags
1440bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001441 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1442 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001443 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1444 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1445 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1446 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1447 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1448 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1449 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1450}
1451
1452/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001453type VkFlags VkBufferCreateFlags
1454bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001455 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001456 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1457 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1458}
1459
1460/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001461type VkFlags VkShaderStageFlags
1462bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001463 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001464 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1465 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001466 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1467 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1468 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001469 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001470
1471 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1472}
1473
Jesse Hallfbf97b02015-11-20 14:17:03 -08001474/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001475type VkFlags VkDescriptorPoolCreateFlags
1476bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001477 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1478}
1479
1480/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001481type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001482//bitfield VkDescriptorPoolResetFlagBits {
1483//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001484
Jesse Halld27f6aa2015-08-15 17:58:48 -07001485/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001486type VkFlags VkImageUsageFlags
1487bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001488 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1489 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001490 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1491 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1492 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001493 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001494 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1495 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1496}
1497
1498/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001499type VkFlags VkImageCreateFlags
1500bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001501 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001502 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1503 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 -07001504 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1505 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 -08001506
Jesse Hallad250842017-03-10 18:35:38 -08001507 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001508 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001509
1510 //@extension("VK_KHX_device_group") // 61
1511 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001512}
1513
Jesse Hallb00daad2015-11-29 19:46:20 -08001514/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001515type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001516//bitfield VkImageViewCreateFlagBits {
1517//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001518
1519/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001520type VkFlags VkPipelineCreateFlags
1521bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001522 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1523 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1524 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001525
1526 //@extension("VK_KHX_device_group") // 61
1527 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1528 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001529}
1530
Jesse Hall65ab5522015-11-30 00:07:16 -08001531/// Color component flags
1532type VkFlags VkColorComponentFlags
1533bitfield VkColorComponentFlagBits {
1534 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1535 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1536 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1537 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001538}
1539
1540/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001541type VkFlags VkFenceCreateFlags
1542bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001543 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1544}
1545
1546/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001547type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001548//bitfield VkSemaphoreCreateFlagBits {
1549//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001550
1551/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001552type VkFlags VkFormatFeatureFlags
1553bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001554 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1555 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1556 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1557 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1558 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1559 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1560 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1561 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1562 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1563 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001564 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1565 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 -08001566 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001567
Jesse Hallad250842017-03-10 18:35:38 -08001568 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001569 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001570
Jesse Hallad250842017-03-10 18:35:38 -08001571 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001572 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1573 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001574}
1575
1576/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001577type VkFlags VkQueryControlFlags
1578bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001579 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001580}
1581
1582/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001583type VkFlags VkQueryResultFlags
1584bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001585 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1586 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1587 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1588 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1589}
1590
1591/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001592type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001593//bitfield VkShaderModuleCreateFlagBits {
1594//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001595
Jesse Halld27f6aa2015-08-15 17:58:48 -07001596/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001597type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001598//bitfield VkEventCreateFlagBits {
1599//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001600
Jesse Halla15a4bf2015-11-19 22:48:02 -08001601/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001602type VkFlags VkCommandBufferUsageFlags
1603bitfield VkCommandBufferUsageFlagBits {
1604 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1605 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1606 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001607}
1608
1609/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001610type VkFlags VkQueryPipelineStatisticFlags
1611bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001612 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1613 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1614 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1615 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1616 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1617 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1618 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1619 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1620 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1621 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1622 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001623}
1624
1625/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001626type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001627//bitfield VkMemoryMapFlagBits {
1628//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001629
1630/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001631type VkFlags VkImageAspectFlags
1632bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001633 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1634 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1635 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1636 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1637}
1638
1639/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001640type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001641bitfield VkSparseMemoryBindFlagBits {
1642 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1643}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001644
1645/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001646type VkFlags VkSparseImageFormatFlags
1647bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001648 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1649 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.
1650 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001651}
1652
1653/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001654type VkFlags VkPipelineStageFlags
1655bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001656 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1657 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1658 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1659 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001660 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1661 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001662 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1663 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1664 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1665 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1666 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1667 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1668 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001669 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1670 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001671
Jesse Hall543a7ff2016-01-08 16:38:30 -08001672 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1673 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001674
Jesse Hallad250842017-03-10 18:35:38 -08001675 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001676 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001677}
1678
1679/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001680type VkFlags VkAttachmentDescriptionFlags
1681bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001682 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 -07001683}
1684
1685/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001686type VkFlags VkSubpassDescriptionFlags
1687bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001688 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1689 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1690 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001691}
1692
1693/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001694type VkFlags VkCommandPoolCreateFlags
1695bitfield VkCommandPoolCreateFlagBits {
1696 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1697 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001698}
1699
1700/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001701type VkFlags VkCommandPoolResetFlags
1702bitfield VkCommandPoolResetFlagBits {
1703 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001704}
1705
Jesse Hall3fbc8562015-11-29 22:10:52 -08001706type VkFlags VkCommandBufferResetFlags
1707bitfield VkCommandBufferResetFlagBits {
1708 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001709}
1710
Jesse Halld8bade02015-11-24 10:24:18 -08001711type VkFlags VkSampleCountFlags
1712bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001713 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1714 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1715 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1716 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1717 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1718 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1719 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1720}
1721
Jesse Halld8bade02015-11-24 10:24:18 -08001722type VkFlags VkStencilFaceFlags
1723bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001724 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1725 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001726 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001727}
1728
Jesse Halla6429252015-11-29 18:59:42 -08001729/// Instance creation flags
1730type VkFlags VkInstanceCreateFlags
1731//bitfield VkInstanceCreateFlagBits {
1732//}
1733
1734/// Device creation flags
1735type VkFlags VkDeviceCreateFlags
1736//bitfield VkDeviceCreateFlagBits {
1737//}
1738
1739/// Device queue creation flags
1740type VkFlags VkDeviceQueueCreateFlags
1741//bitfield VkDeviceQueueCreateFlagBits {
1742//}
1743
1744/// Query pool creation flags
1745type VkFlags VkQueryPoolCreateFlags
1746//bitfield VkQueryPoolCreateFlagBits {
1747//}
1748
1749/// Buffer view creation flags
1750type VkFlags VkBufferViewCreateFlags
1751//bitfield VkBufferViewCreateFlagBits {
1752//}
1753
1754/// Pipeline cache creation flags
1755type VkFlags VkPipelineCacheCreateFlags
1756//bitfield VkPipelineCacheCreateFlagBits {
1757//}
1758
1759/// Pipeline shader stage creation flags
1760type VkFlags VkPipelineShaderStageCreateFlags
1761//bitfield VkPipelineShaderStageCreateFlagBits {
1762//}
1763
1764/// Descriptor set layout creation flags
1765type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001766bitfield VkDescriptorSetLayoutCreateFlagBits {
1767 //@extension("VK_KHR_push_descriptor") // 81
1768 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1769}
Jesse Halla6429252015-11-29 18:59:42 -08001770
1771/// Pipeline vertex input state creation flags
1772type VkFlags VkPipelineVertexInputStateCreateFlags
1773//bitfield VkPipelineVertexInputStateCreateFlagBits {
1774//}
1775
1776/// Pipeline input assembly state creation flags
1777type VkFlags VkPipelineInputAssemblyStateCreateFlags
1778//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1779//}
1780
1781/// Tessellation state creation flags
1782type VkFlags VkPipelineTessellationStateCreateFlags
1783//bitfield VkPipelineTessellationStateCreateFlagBits {
1784//}
1785
1786/// Viewport state creation flags
1787type VkFlags VkPipelineViewportStateCreateFlags
1788//bitfield VkPipelineViewportStateCreateFlagBits {
1789//}
1790
Jesse Hall3fbc8562015-11-29 22:10:52 -08001791/// Rasterization state creation flags
1792type VkFlags VkPipelineRasterizationStateCreateFlags
1793//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001794//}
1795
1796/// Multisample state creation flags
1797type VkFlags VkPipelineMultisampleStateCreateFlags
1798//bitfield VkPipelineMultisampleStateCreateFlagBits {
1799//}
1800
1801/// Color blend state creation flags
1802type VkFlags VkPipelineColorBlendStateCreateFlags
1803//bitfield VkPipelineColorBlendStateCreateFlagBits {
1804//}
1805
1806/// Depth/stencil state creation flags
1807type VkFlags VkPipelineDepthStencilStateCreateFlags
1808//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1809//}
1810
1811/// Dynamic state creation flags
1812type VkFlags VkPipelineDynamicStateCreateFlags
1813//bitfield VkPipelineDynamicStateCreateFlagBits {
1814//}
1815
1816/// Pipeline layout creation flags
1817type VkFlags VkPipelineLayoutCreateFlags
1818//bitfield VkPipelineLayoutCreateFlagBits {
1819//}
1820
1821/// Sampler creation flags
1822type VkFlags VkSamplerCreateFlags
1823//bitfield VkSamplerCreateFlagBits {
1824//}
1825
1826/// Render pass creation flags
1827type VkFlags VkRenderPassCreateFlags
1828//bitfield VkRenderPassCreateFlagBits {
1829//}
1830
1831/// Framebuffer creation flags
1832type VkFlags VkFramebufferCreateFlags
1833//bitfield VkFramebufferCreateFlagBits {
1834//}
1835
Jesse Halldc6d36c2015-11-29 19:12:15 -08001836/// Dependency flags
1837type VkFlags VkDependencyFlags
1838bitfield VkDependencyFlagBits {
1839 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001840
1841 //@extension("VK_KHX_multiview") // 54
1842 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1843
1844 //@extension("VK_KHX_device_group") // 61
1845 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001846}
1847
Jesse Hallc7467b72015-11-29 21:05:26 -08001848/// Cull mode flags
1849type VkFlags VkCullModeFlags
1850bitfield VkCullModeFlagBits {
1851 VK_CULL_MODE_NONE = 0x00000000,
1852 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1853 VK_CULL_MODE_BACK_BIT = 0x00000002,
1854 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1855}
1856
Jesse Hallad250842017-03-10 18:35:38 -08001857@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001858type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001859@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001860bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001861 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001862 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1863 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1864 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1865 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1866 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1867 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1868 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1869 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001870}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001871
Jesse Hallad250842017-03-10 18:35:38 -08001872@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001873type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001874@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001875bitfield VkCompositeAlphaFlagBitsKHR {
1876 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1877 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1878 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1879 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1880}
1881
Jesse Hallad250842017-03-10 18:35:38 -08001882@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001883type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001884@extension("VK_KHR_swapchain") // 2
1885bitfield VkSwapchainCreateFlagBitsKHR {
1886 //@extension("VK_KHX_device_group") // 61
1887 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1888}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001889
Jesse Hallad250842017-03-10 18:35:38 -08001890@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001891type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001892@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001893bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001894 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1895 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1896 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1897 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001898}
1899
Jesse Hallad250842017-03-10 18:35:38 -08001900@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001901type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001902//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001903//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1904//}
1905
Jesse Hallad250842017-03-10 18:35:38 -08001906@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001907type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001908//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001909//bitfield VkDisplayModeCreateFlagBitsKHR {
1910//}
1911
Jesse Hallad250842017-03-10 18:35:38 -08001912@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001913type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001914//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001915//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1916//}
1917
Jesse Hallad250842017-03-10 18:35:38 -08001918@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001919type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001920//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001921//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1922//}
1923
Jesse Hallad250842017-03-10 18:35:38 -08001924@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001925type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001926//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001927//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1928//}
1929
Jesse Hallad250842017-03-10 18:35:38 -08001930@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001931type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001932//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001933//bitfield VkMirSurfaceCreateFlagBitsKHR {
1934//}
1935
Jesse Hallad250842017-03-10 18:35:38 -08001936@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001937type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001938//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001939//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1940//}
1941
Jesse Hallad250842017-03-10 18:35:38 -08001942@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001943type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001944//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001945//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1946//}
1947
Jesse Hallad250842017-03-10 18:35:38 -08001948@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001949type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08001950@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001951bitfield VkSwapchainImageUsageFlagBitsANDROID {
1952 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
1953}
1954
Jesse Hallad250842017-03-10 18:35:38 -08001955@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001956type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08001957@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001958bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001959 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1960 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1961 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001962 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1963 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1964}
1965
Jesse Hallad250842017-03-10 18:35:38 -08001966@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001967type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001968@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001969bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001970 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1971 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1972 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1973 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13001974}
1975
Jesse Hallad250842017-03-10 18:35:38 -08001976@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001977type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001978@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001979bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001980 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1981 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1982 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13001983}
1984
Jesse Hallad250842017-03-10 18:35:38 -08001985@extension("VK_KHX_device_group") // 61
1986type VkFlags VkPeerMemoryFeatureFlagsKHX
1987@extension("VK_KHX_device_group") // 61
1988bitfield VkPeerMemoryFeatureFlagBitsKHX {
1989 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1990 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1991 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1992 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1993}
1994
1995@extension("VK_KHX_device_group") // 61
1996type VkFlags VkMemoryAllocateFlagsKHX
1997@extension("VK_KHX_device_group") // 61
1998bitfield VkMemoryAllocateFlagBitsKHX {
1999 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
2000}
2001
2002@extension("VK_KHX_device_group") // 61
2003type VkFlags VkDeviceGroupPresentModeFlagsKHX
2004@extension("VK_KHX_device_group") // 61
2005bitfield VkDeviceGroupPresentModeFlagBitsKHX {
2006 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
2007 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
2008 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
2009 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
2010}
2011
2012@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002013type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08002014//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002015//bitfield VkViSurfaceCreateFlagBitsNN {
2016//}
2017
Jesse Hallad250842017-03-10 18:35:38 -08002018@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002019type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002020//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002021//bitfield VkCommandPoolTrimFlagBitsKHR {
2022//}
2023
Jesse Hallad250842017-03-10 18:35:38 -08002024@extension("VK_KHX_external_memory_capabilities") // 72
2025type VkFlags VkExternalMemoryHandleTypeFlagsKHX
2026@extension("VK_KHX_external_memory_capabilities") // 72
2027bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
2028 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
2029 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
2030 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
2031 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
2032 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
2033 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
2034 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
2035}
2036
2037@extension("VK_KHX_external_memory_capabilities") // 72
2038type VkFlags VkExternalMemoryFeatureFlagsKHX
2039@extension("VK_KHX_external_memory_capabilities") // 72
2040bitfield VkExternalMemoryFeatureFlagBitsKHX {
2041 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
2042 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
2043 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
2044}
2045
2046@extension("VK_KHX_external_semaphore_capabilities") // 77
2047type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
2048@extension("VK_KHX_external_semaphore_capabilities") // 77
2049bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
2050 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
2051 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
2052 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
2053 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
2054 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
2055}
2056
2057@extension("VK_KHX_external_semaphore_capabilities") // 77
2058type VkFlags VkExternalSemaphoreFeatureFlagsKHX
2059@extension("VK_KHX_external_semaphore_capabilities") // 77
2060bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
2061 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
2062 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
2063}
2064
2065@extension("VK_KHR_descriptor_update_template") // 86
2066type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2067//@extension("VK_KHR_descriptor_update_template") // 86
2068//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2069//}
2070
2071@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002072type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002073@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002074bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002075 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2076 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2077 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2078 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002079}
2080
Jesse Hallad250842017-03-10 18:35:38 -08002081@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002082type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002083@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002084bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002085 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2086 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002087}
2088
Jesse Hallad250842017-03-10 18:35:38 -08002089@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002090type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002091@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002092bitfield VkSurfaceCounterFlagBitsEXT {
2093 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2094}
2095
Jesse Hallad250842017-03-10 18:35:38 -08002096@extension("VK_NV_viewport_swizzle") // 99
2097type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2098//@extension("VK_NV_viewport_swizzle") // 99
2099//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2100//}
2101
2102@extension("VK_EXT_discard_rectangles") // 100
2103type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2104//@extension("VK_EXT_discard_rectangles") // 100
2105//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2106//}
2107
2108@extension("VK_MVK_ios_surface") // 123
2109type VkFlags VkIOSSurfaceCreateFlagsMVK
2110//@extension("VK_MVK_ios_surface") // 123
2111//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2112//}
2113
2114@extension("VK_MVK_macos_surface") // 124
2115type VkFlags VkMacOSSurfaceCreateFlagsMVK
2116//@extension("VK_MVK_macos_surface") // 124
2117//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2118//}
2119
Jesse Halld27f6aa2015-08-15 17:58:48 -07002120//////////////////
2121// Structures //
2122//////////////////
2123
2124class VkOffset2D {
2125 s32 x
2126 s32 y
2127}
2128
2129class VkOffset3D {
2130 s32 x
2131 s32 y
2132 s32 z
2133}
2134
2135class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002136 u32 width
2137 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002138}
2139
2140class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002141 u32 width
2142 u32 height
2143 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002144}
2145
2146class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002147 f32 x
2148 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002149 f32 width
2150 f32 height
2151 f32 minDepth
2152 f32 maxDepth
2153}
2154
2155class VkRect2D {
2156 VkOffset2D offset
2157 VkExtent2D extent
2158}
2159
Jesse Halla15a4bf2015-11-19 22:48:02 -08002160class VkClearRect {
2161 VkRect2D rect
2162 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002163 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002164}
2165
Jesse Hall65ab5522015-11-30 00:07:16 -08002166class VkComponentMapping {
2167 VkComponentSwizzle r
2168 VkComponentSwizzle g
2169 VkComponentSwizzle b
2170 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002171}
2172
2173class VkPhysicalDeviceProperties {
2174 u32 apiVersion
2175 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002176 u32 vendorID
2177 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002178 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002179 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2180 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002181 VkPhysicalDeviceLimits limits
2182 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002183}
2184
2185class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002186 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002187 u32 specVersion /// version of the extension specification implemented
2188}
2189
2190class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002191 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002192 u32 specVersion /// version of the layer specification implemented
2193 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002194 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002195}
2196
Jesse Halla366a512015-11-19 22:30:07 -08002197class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002198 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2199 const void* pNext /// Next structure in chain
2200 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002201 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002202 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002203 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002204 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002205 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002206 const VkSemaphore* pSignalSemaphores
2207}
2208
Jesse Halld27f6aa2015-08-15 17:58:48 -07002209class VkApplicationInfo {
2210 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2211 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002212 const char* pApplicationName
2213 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002214 const char* pEngineName
2215 u32 engineVersion
2216 u32 apiVersion
2217}
2218
Jesse Hall3fbc8562015-11-29 22:10:52 -08002219class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002220 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002221 PFN_vkAllocationFunction pfnAllocation
2222 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002223 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002224 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002225 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002226}
2227
2228class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002229 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2230 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002231 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002232 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002233 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002234 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002235}
2236
2237class VkDeviceCreateInfo {
2238 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2239 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002240 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002241 u32 queueCreateInfoCount
2242 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002243 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002244 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002245 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002246 const char* const* ppEnabledExtensionNames
2247 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002248}
2249
2250class VkInstanceCreateInfo {
2251 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2252 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002253 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002254 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002255 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002256 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002257 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002258 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2259}
2260
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002261class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002262 VkQueueFlags queueFlags /// Queue flags
2263 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002264 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002265 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002266}
2267
2268class VkPhysicalDeviceMemoryProperties {
2269 u32 memoryTypeCount
2270 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2271 u32 memoryHeapCount
2272 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2273}
2274
Jesse Hall3fbc8562015-11-29 22:10:52 -08002275class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002276 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002277 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002278 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002279 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2280}
2281
2282class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002283 VkDeviceSize size /// Specified in bytes
2284 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002285 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2286}
2287
2288class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002289 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002290 VkExtent3D imageGranularity
2291 VkSparseImageFormatFlags flags
2292}
2293
2294class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002295 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002296 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002297 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2298 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2299 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002300}
2301
2302class VkMemoryType {
2303 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2304 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2305}
2306
2307class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002308 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002309 VkMemoryHeapFlags flags /// Flags for the heap
2310}
2311
2312class VkMappedMemoryRange {
2313 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2314 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002315 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002316 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2317 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002318}
2319
2320class VkFormatProperties {
2321 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2322 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002323 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002324}
2325
2326class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002327 VkExtent3D maxExtent /// max image dimensions for this resource type
2328 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002329 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002330 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2331 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2332}
2333
Jesse Halla15a4bf2015-11-19 22:48:02 -08002334class VkDescriptorImageInfo {
2335 VkSampler sampler
2336 VkImageView imageView
2337 VkImageLayout imageLayout
2338}
2339
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002340class VkDescriptorBufferInfo {
2341 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2342 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2343 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002344}
2345
Jesse Halld27f6aa2015-08-15 17:58:48 -07002346class VkWriteDescriptorSet {
2347 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2348 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002349 VkDescriptorSet dstSet /// Destination descriptor set
2350 u32 dstBinding /// Binding within the destination descriptor set to write
2351 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002352 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002353 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 -08002354 const VkDescriptorImageInfo* pImageInfo
2355 const VkDescriptorBufferInfo* pBufferInfo
2356 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002357}
2358
2359class VkCopyDescriptorSet {
2360 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2361 const void* pNext /// Pointer to next structure
2362 VkDescriptorSet srcSet /// Source descriptor set
2363 u32 srcBinding /// Binding within the source descriptor set to copy from
2364 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002365 VkDescriptorSet dstSet /// Destination descriptor set
2366 u32 dstBinding /// Binding within the destination descriptor set to copy to
2367 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002368 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002369}
2370
2371class VkBufferCreateInfo {
2372 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2373 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002374 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002375 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002376 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002377 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002378 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002379 const u32* pQueueFamilyIndices
2380}
2381
2382class VkBufferViewCreateInfo {
2383 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2384 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002385 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002386 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002387 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002388 VkDeviceSize offset /// Specified in bytes
2389 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002390}
2391
2392class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002393 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002394 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002395 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002396}
2397
2398class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002399 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002400 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002401 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002402 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002403 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002404}
2405
2406class VkMemoryBarrier {
2407 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2408 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002409 VkAccessFlags srcAccessMask
2410 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002411}
2412
2413class VkBufferMemoryBarrier {
2414 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2415 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002416 VkAccessFlags srcAccessMask
2417 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002418 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002419 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002420 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002421 VkDeviceSize offset /// Offset within the buffer to sync
2422 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002423}
2424
2425class VkImageMemoryBarrier {
2426 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2427 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002428 VkAccessFlags srcAccessMask
2429 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002430 VkImageLayout oldLayout /// Current layout of the image
2431 VkImageLayout newLayout /// New layout to transition the image to
2432 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002433 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002434 VkImage image /// Image to sync
2435 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2436}
2437
2438class VkImageCreateInfo {
2439 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2440 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002441 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002442 VkImageType imageType
2443 VkFormat format
2444 VkExtent3D extent
2445 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002446 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002447 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002448 VkImageTiling tiling
2449 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002450 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002451 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002452 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002453 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002454}
2455
2456class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002457 VkDeviceSize offset /// Specified in bytes
2458 VkDeviceSize size /// Specified in bytes
2459 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002460 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002461 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002462}
2463
2464class VkImageViewCreateInfo {
2465 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2466 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002467 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002468 VkImage image
2469 VkImageViewType viewType
2470 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002471 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002472 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002473}
2474
2475class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002476 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002477 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002478 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002479}
2480
Jesse Halla6429252015-11-29 18:59:42 -08002481class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002482 VkDeviceSize resourceOffset /// Specified in bytes
2483 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002484 VkDeviceMemory memory
2485 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002486 VkSparseMemoryBindFlags flags
2487}
2488
Jesse Halla6429252015-11-29 18:59:42 -08002489class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002490 VkImageSubresource subresource
2491 VkOffset3D offset
2492 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002493 VkDeviceMemory memory
2494 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002495 VkSparseMemoryBindFlags flags
2496}
2497
Jesse Halla6429252015-11-29 18:59:42 -08002498class VkSparseBufferMemoryBindInfo {
2499 VkBuffer buffer
2500 u32 bindCount
2501 const VkSparseMemoryBind* pBinds
2502}
2503
2504class VkSparseImageOpaqueMemoryBindInfo {
2505 VkImage image
2506 u32 bindCount
2507 const VkSparseMemoryBind* pBinds
2508}
2509
2510class VkSparseImageMemoryBindInfo {
2511 VkImage image
2512 u32 bindCount
2513 const VkSparseMemoryBind* pBinds
2514}
2515
2516class VkBindSparseInfo {
2517 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2518 const void* pNext
2519 u32 waitSemaphoreCount
2520 const VkSemaphore* pWaitSemaphores
2521 u32 numBufferBinds
2522 const VkSparseBufferMemoryBindInfo* pBufferBinds
2523 u32 numImageOpaqueBinds
2524 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2525 u32 numImageBinds
2526 const VkSparseImageMemoryBindInfo* pImageBinds
2527 u32 signalSemaphoreCount
2528 const VkSemaphore* pSignalSemaphores
2529}
2530
Jesse Hall65ab5522015-11-30 00:07:16 -08002531class VkImageSubresourceLayers {
2532 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002533 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002534 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002535 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002536}
2537
Jesse Halld27f6aa2015-08-15 17:58:48 -07002538class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002539 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002540 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002541 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002542 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002543 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2544}
2545
2546class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002547 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002548 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002549 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002550 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002551}
2552
2553class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002554 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002555 u32 bufferRowLength /// Specified in texels
2556 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002557 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002558 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2559 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2560}
2561
2562class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002563 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002564 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002565 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002566 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002567 VkExtent3D extent
2568}
2569
2570class VkShaderModuleCreateInfo {
2571 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2572 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002573 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002574 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002575 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002576}
2577
Jesse Halld27f6aa2015-08-15 17:58:48 -07002578class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002579 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002580 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002581 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002582 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2583 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2584}
2585
2586class VkDescriptorSetLayoutCreateInfo {
2587 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2588 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002589 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002590 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002591 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002592}
2593
Jesse Hall65ab5522015-11-30 00:07:16 -08002594class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002595 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002596 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002597}
2598
2599class VkDescriptorPoolCreateInfo {
2600 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2601 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002602 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002603 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002604 u32 poolSizeCount
2605 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002606}
2607
Jesse Hall3fbc8562015-11-29 22:10:52 -08002608class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002609 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002610 const void* pNext /// Pointer to next structure
2611 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002612 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002613 const VkDescriptorSetLayout* pSetLayouts
2614}
2615
Jesse Halld27f6aa2015-08-15 17:58:48 -07002616class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002617 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002618 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002619 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002620}
2621
2622class VkSpecializationInfo {
2623 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002624 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002625 platform.size_t dataSize /// Size in bytes of pData
2626 const void* pData /// Pointer to SpecConstant data
2627}
2628
2629class VkPipelineShaderStageCreateInfo {
2630 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2631 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002632 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002633 VkShaderStageFlagBits stage
2634 VkShaderModule module
2635 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002636 const VkSpecializationInfo* pSpecializationInfo
2637}
2638
2639class VkComputePipelineCreateInfo {
2640 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2641 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002642 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002643 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002644 VkPipelineLayout layout /// Interface layout of the pipeline
2645 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
2646 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
2647}
2648
2649class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002650 u32 binding /// Vertex buffer binding id
2651 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002652 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002653}
2654
2655class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002656 u32 location /// location of the shader vertex attrib
2657 u32 binding /// Vertex buffer binding id
2658 VkFormat format /// format of source data
2659 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002660}
2661
2662class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002663 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2664 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002665 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002666 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002667 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002668 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002669 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2670}
2671
2672class VkPipelineInputAssemblyStateCreateInfo {
2673 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2674 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002675 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002676 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002677 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002678}
2679
2680class VkPipelineTessellationStateCreateInfo {
2681 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2682 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002683 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002684 u32 patchControlPoints
2685}
2686
2687class VkPipelineViewportStateCreateInfo {
2688 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2689 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002690 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002691 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002692 const VkViewport* pViewports
2693 u32 scissorCount
2694 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002695}
2696
Jesse Hall3fbc8562015-11-29 22:10:52 -08002697class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002698 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002699 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002700 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002701 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002702 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002703 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002704 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002705 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002706 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002707 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002708 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002709 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002710 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002711}
2712
2713class VkPipelineMultisampleStateCreateInfo {
2714 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2715 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002716 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002717 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002718 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002719 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002720 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002721 VkBool32 alphaToCoverageEnable
2722 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002723}
2724
2725class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002726 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002727 VkBlendFactor srcColorBlendFactor
2728 VkBlendFactor dstColorBlendFactor
2729 VkBlendOp colorBlendOp
2730 VkBlendFactor srcAlphaBlendFactor
2731 VkBlendFactor dstAlphaBlendFactor
2732 VkBlendOp alphaBlendOp
2733 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002734}
2735
2736class VkPipelineColorBlendStateCreateInfo {
2737 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2738 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002739 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002740 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002741 VkLogicOp logicOp
2742 u32 attachmentCount /// # of pAttachments
2743 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002744 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002745}
2746
2747class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002748 VkStencilOp failOp
2749 VkStencilOp passOp
2750 VkStencilOp depthFailOp
2751 VkCompareOp compareOp
2752 u32 compareMask
2753 u32 writeMask
2754 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002755}
2756
2757class VkPipelineDepthStencilStateCreateInfo {
2758 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2759 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002760 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002761 VkBool32 depthTestEnable
2762 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002763 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002764 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2765 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002766 VkStencilOpState front
2767 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002768 f32 minDepthBounds
2769 f32 maxDepthBounds
2770}
2771
2772class VkPipelineDynamicStateCreateInfo {
2773 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2774 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002775 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002776 u32 dynamicStateCount
2777 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002778}
2779
2780class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002781 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2782 const void* pNext /// Pointer to next structure
2783 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002784 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002785 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002786 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2787 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2788 const VkPipelineTessellationStateCreateInfo* pTessellationState
2789 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002790 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002791 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2792 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2793 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002794 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002795 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002796 VkRenderPass renderPass
2797 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002798 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
2799 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 -07002800}
2801
2802class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002803 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2804 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002805 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002806 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2807 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002808}
2809
2810class VkPushConstantRange {
2811 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002812 u32 offset /// Start of the range, in bytes
2813 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002814}
2815
2816class VkPipelineLayoutCreateInfo {
2817 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2818 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002819 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002820 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002821 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2822 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2823 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2824}
2825
2826class VkSamplerCreateInfo {
2827 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2828 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002829 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002830 VkFilter magFilter /// Filter mode for magnification
2831 VkFilter minFilter /// Filter mode for minifiation
2832 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2833 VkSamplerAddressMode addressModeU
2834 VkSamplerAddressMode addressModeV
2835 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002836 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002837 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002838 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002839 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002840 VkCompareOp compareOp
2841 f32 minLod
2842 f32 maxLod
2843 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002844 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002845}
2846
Jesse Hall3fbc8562015-11-29 22:10:52 -08002847class VkCommandPoolCreateInfo {
2848 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002849 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002850 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002851 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002852}
2853
Jesse Hall3fbc8562015-11-29 22:10:52 -08002854class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002855 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002856 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002857 VkCommandPool commandPool
2858 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002859 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002860}
2861
Jesse Hall3dd678a2016-01-08 21:52:01 -08002862class VkCommandBufferInheritanceInfo {
2863 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002864 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002865 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002866 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002867 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002868 VkBool32 occlusionQueryEnable
2869 VkQueryControlFlags queryFlags
2870 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002871}
2872
Jesse Hall3dd678a2016-01-08 21:52:01 -08002873class VkCommandBufferBeginInfo {
2874 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2875 const void* pNext /// Pointer to next structure
2876 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2877 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2878}
2879
Jesse Halld27f6aa2015-08-15 17:58:48 -07002880class VkRenderPassBeginInfo {
2881 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2882 const void* pNext /// Pointer to next structure
2883 VkRenderPass renderPass
2884 VkFramebuffer framebuffer
2885 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002886 u32 clearValueCount
2887 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002888}
2889
2890@union
2891/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2892class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002893 f32[4] float32
2894 s32[4] int32
2895 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002896}
2897
2898class VkClearDepthStencilValue {
2899 f32 depth
2900 u32 stencil
2901}
2902
2903@union
2904/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2905class VkClearValue {
2906 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002907 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002908}
2909
Jesse Hallae38f732015-11-19 21:32:50 -08002910class VkClearAttachment {
2911 VkImageAspectFlags aspectMask
2912 u32 colorAttachment
2913 VkClearValue clearValue
2914}
2915
Jesse Halld27f6aa2015-08-15 17:58:48 -07002916class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002917 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002918 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002919 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002920 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2921 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2922 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2923 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2924 VkImageLayout initialLayout
2925 VkImageLayout finalLayout
2926}
2927
2928class VkAttachmentReference {
2929 u32 attachment
2930 VkImageLayout layout
2931}
2932
2933class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002934 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002935 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002936 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002937 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002938 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002939 const VkAttachmentReference* pColorAttachments
2940 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002941 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002942 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002943 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002944}
2945
2946class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002947 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002948 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002949 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002950 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002951 VkAccessFlags srcAccessMask
2952 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002953 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002954}
2955
2956class VkRenderPassCreateInfo {
2957 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2958 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002959 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002960 u32 attachmentCount
2961 const VkAttachmentDescription* pAttachments
2962 u32 subpassCount
2963 const VkSubpassDescription* pSubpasses
2964 u32 dependencyCount
2965 const VkSubpassDependency* pDependencies
2966}
2967
2968class VkEventCreateInfo {
2969 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2970 const void* pNext /// Pointer to next structure
2971 VkEventCreateFlags flags /// Event creation flags
2972}
2973
2974class VkFenceCreateInfo {
2975 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2976 const void* pNext /// Pointer to next structure
2977 VkFenceCreateFlags flags /// Fence creation flags
2978}
2979
2980class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002981 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2982 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2983 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2984 VkBool32 independentBlend /// blending operations are controlled per-attachment
2985 VkBool32 geometryShader /// geometry stage
2986 VkBool32 tessellationShader /// tessellation control and evaluation stage
2987 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002988 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002989 VkBool32 logicOp /// logic operations
2990 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002991 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002992 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002993 VkBool32 depthBiasClamp /// depth bias clamping
2994 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2995 VkBool32 depthBounds /// depth bounds test
2996 VkBool32 wideLines /// lines with width greater than 1
2997 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002998 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2999 VkBool32 multiViewport
3000 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003001 VkBool32 textureCompressionETC2 /// ETC texture compression formats
3002 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
3003 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08003004 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003005 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08003006 VkBool32 vertexPipelineStoresAndAtomics
3007 VkBool32 fragmentStoresAndAtomics
3008 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003009 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
3010 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
3011 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08003012 VkBool32 shaderStorageImageReadWithoutFormat
3013 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003014 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
3015 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
3016 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
3017 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
3018 VkBool32 shaderClipDistance /// clip distance in shaders
3019 VkBool32 shaderCullDistance /// cull distance in shaders
3020 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
3021 VkBool32 shaderInt64 /// 64-bit integers in shaders
3022 VkBool32 shaderInt16 /// 16-bit integers in shaders
3023 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08003024 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003025 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
3026 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
3027 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
3028 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
3029 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
3030 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
3031 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
3032 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
3033 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08003034 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003035 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003036}
3037
3038class VkPhysicalDeviceLimits {
3039 /// resource maximum sizes
3040 u32 maxImageDimension1D /// max 1D image dimension
3041 u32 maxImageDimension2D /// max 2D image dimension
3042 u32 maxImageDimension3D /// max 3D image dimension
3043 u32 maxImageDimensionCube /// max cubemap image dimension
3044 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08003045 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08003046 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
3047 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003048 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
3049 /// memory limits
3050 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003051 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003052 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3053 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003054 /// descriptor set limits
3055 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003056 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3057 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3058 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3059 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3060 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003061 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003062 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003063 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3064 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003065 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003066 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003067 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003068 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3069 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003070 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003071 /// vertex stage limits
3072 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003073 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003074 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3075 u32 maxVertexInputBindingStride /// max vertex input binding stride
3076 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3077 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003078 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003079 u32 maxTessellationPatchSize /// max patch size (vertices)
3080 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3081 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3082 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3083 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3084 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3085 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003086 /// geometry stage limits
3087 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3088 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3089 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3090 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3091 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3092 /// fragment stage limits
3093 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003094 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003095 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003096 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3097 /// compute stage limits
3098 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3099 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3100 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3101 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3102
3103 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3104 u32 subTexelPrecisionBits /// num bits of subtexel precision
3105 u32 mipmapPrecisionBits /// num bits of mipmap precision
3106
3107 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003108 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003109
3110 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3111 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3112
3113 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003114 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3115 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3116 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3117
Jesse Halldc6d36c2015-11-29 19:12:15 -08003118 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3119 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3120 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3121 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003122
Jesse Hallfbf97b02015-11-20 14:17:03 -08003123 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003124 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003125 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003126 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3127 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3128 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3129 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3130
3131 u32 maxFramebufferWidth /// max width for a framebuffer
3132 u32 maxFramebufferHeight /// max height for a framebuffer
3133 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003134 VkSampleCountFlags framebufferColorSampleCounts
3135 VkSampleCountFlags framebufferDepthSampleCounts
3136 VkSampleCountFlags framebufferStencilSampleCounts
3137 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003138 u32 maxColorAttachments /// max num of framebuffer color attachments
3139
Jesse Hall091ed9e2015-11-30 00:55:29 -08003140 VkSampleCountFlags sampledImageColorSampleCounts
3141 VkSampleCountFlags sampledImageIntegerSampleCounts
3142 VkSampleCountFlags sampledImageDepthSampleCounts
3143 VkSampleCountFlags sampledImageStencilSampleCounts
3144 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003145 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003146 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003147
Jesse Halla9bb62b2015-11-21 19:31:56 -08003148 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003149
3150 u32 maxClipDistances /// max number of clip distances
3151 u32 maxCullDistances /// max number of cull distances
3152 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3153
Jesse Hallfbf97b02015-11-20 14:17:03 -08003154 u32 discreteQueuePriorities
3155
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003156 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3157 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003158 f32 pointSizeGranularity /// granularity of supported point sizes
3159 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003160 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003161 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003162
Jesse Hall65ab5522015-11-30 00:07:16 -08003163 VkDeviceSize optimalBufferCopyOffsetAlignment
3164 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003165 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003166}
3167
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003168class VkPhysicalDeviceSparseProperties {
3169 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 -08003170 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 -07003171 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3172 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 -07003173 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
3174}
3175
Jesse Halld27f6aa2015-08-15 17:58:48 -07003176class VkSemaphoreCreateInfo {
3177 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3178 const void* pNext /// Pointer to next structure
3179 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3180}
3181
3182class VkQueryPoolCreateInfo {
3183 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3184 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003185 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003186 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003187 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003188 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3189}
3190
3191class VkFramebufferCreateInfo {
3192 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3193 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003194 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003195 VkRenderPass renderPass
3196 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003197 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003198 u32 width
3199 u32 height
3200 u32 layers
3201}
3202
Jesse Hall3fbc8562015-11-29 22:10:52 -08003203class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003204 u32 vertexCount
3205 u32 instanceCount
3206 u32 firstVertex
3207 u32 firstInstance
3208}
3209
Jesse Hall3fbc8562015-11-29 22:10:52 -08003210class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003211 u32 indexCount
3212 u32 instanceCount
3213 u32 firstIndex
3214 s32 vertexOffset
3215 u32 firstInstance
3216}
3217
Jesse Hall3fbc8562015-11-29 22:10:52 -08003218class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003219 u32 x
3220 u32 y
3221 u32 z
3222}
3223
Jesse Hallad250842017-03-10 18:35:38 -08003224@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003225class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003226 u32 minImageCount
3227 u32 maxImageCount
3228 VkExtent2D currentExtent
3229 VkExtent2D minImageExtent
3230 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003231 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003232 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003233 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003234 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003235 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003236}
3237
Jesse Hallad250842017-03-10 18:35:38 -08003238@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003239class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003240 VkFormat format
3241 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003242}
3243
Jesse Hallad250842017-03-10 18:35:38 -08003244@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003245class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003246 VkStructureType sType
3247 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003248 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003249 VkSurfaceKHR surface
3250 u32 minImageCount
3251 VkFormat imageFormat
3252 VkColorSpaceKHR imageColorSpace
3253 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003254 u32 imageArrayLayers
3255 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003256 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003257 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003258 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003259 VkSurfaceTransformFlagBitsKHR preTransform
3260 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003261 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003262 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003263 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003264}
3265
Jesse Hallad250842017-03-10 18:35:38 -08003266@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003267class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003268 VkStructureType sType
3269 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003270 u32 waitSemaphoreCount
3271 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003272 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003273 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003274 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003275 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003276}
3277
Jesse Hallad250842017-03-10 18:35:38 -08003278@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003279class VkDisplayPropertiesKHR {
3280 VkDisplayKHR display
3281 const char* displayName
3282 VkExtent2D physicalDimensions
3283 VkExtent2D physicalResolution
3284 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003285 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003286 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003287}
3288
Jesse Hallad250842017-03-10 18:35:38 -08003289@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003290class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003291 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003292 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003293}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003294
Jesse Hallad250842017-03-10 18:35:38 -08003295@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003296class VkDisplayModePropertiesKHR {
3297 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003298 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003299}
3300
Jesse Hallad250842017-03-10 18:35:38 -08003301@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003302class VkDisplayModeCreateInfoKHR {
3303 VkStructureType sType
3304 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003305 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003306 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003307}
3308
Jesse Hallad250842017-03-10 18:35:38 -08003309@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003310class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003311 VkDisplayKHR currentDisplay
3312 u32 currentStackIndex
3313}
3314
Jesse Hallad250842017-03-10 18:35:38 -08003315@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003316class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003317 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3318 VkOffset2D minSrcPosition
3319 VkOffset2D maxSrcPosition
3320 VkExtent2D minSrcExtent
3321 VkExtent2D maxSrcExtent
3322 VkOffset2D minDstPosition
3323 VkOffset2D maxDstPosition
3324 VkExtent2D minDstExtent
3325 VkExtent2D maxDstExtent
3326}
3327
Jesse Hallad250842017-03-10 18:35:38 -08003328@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003329class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003330 VkStructureType sType
3331 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003332 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003333 VkDisplayModeKHR displayMode
3334 u32 planeIndex
3335 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003336 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003337 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003338 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3339 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003340}
3341
Jesse Hallad250842017-03-10 18:35:38 -08003342@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003343class VkDisplayPresentInfoKHR {
3344 VkStructureType sType
3345 const void* pNext
3346 VkRect2D srcRect
3347 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003348 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003349}
3350
Jesse Hallad250842017-03-10 18:35:38 -08003351@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003352class VkXlibSurfaceCreateInfoKHR {
3353 VkStructureType sType
3354 const void* pNext
3355 VkXlibSurfaceCreateFlagsKHR flags
3356 platform.Display* dpy
3357 platform.Window window
3358}
3359
Jesse Hallad250842017-03-10 18:35:38 -08003360@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003361class VkXcbSurfaceCreateInfoKHR {
3362 VkStructureType sType
3363 const void* pNext
3364 VkXcbSurfaceCreateFlagsKHR flags
3365 platform.xcb_connection_t* connection
3366 platform.xcb_window_t window
3367}
3368
Jesse Hallad250842017-03-10 18:35:38 -08003369@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003370class VkWaylandSurfaceCreateInfoKHR {
3371 VkStructureType sType
3372 const void* pNext
3373 VkWaylandSurfaceCreateFlagsKHR flags
3374 platform.wl_display* display
3375 platform.wl_surface* surface
3376}
3377
Jesse Hallad250842017-03-10 18:35:38 -08003378@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003379class VkMirSurfaceCreateInfoKHR {
3380 VkStructureType sType
3381 const void* pNext
3382 VkMirSurfaceCreateFlagsKHR flags
3383 platform.MirConnection* connection
3384 platform.MirSurface* mirSurface
3385}
3386
Jesse Hallad250842017-03-10 18:35:38 -08003387@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003388class VkAndroidSurfaceCreateInfoKHR {
3389 VkStructureType sType
3390 const void* pNext
3391 VkAndroidSurfaceCreateFlagsKHR flags
3392 platform.ANativeWindow* window
3393}
3394
Jesse Hallad250842017-03-10 18:35:38 -08003395@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003396class VkWin32SurfaceCreateInfoKHR {
3397 VkStructureType sType
3398 const void* pNext
3399 VkWin32SurfaceCreateFlagsKHR flags
3400 platform.HINSTANCE hinstance
3401 platform.HWND hwnd
3402}
3403
Jesse Hallad250842017-03-10 18:35:38 -08003404@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003405@internal class Gralloc1Usage {
3406 u64 consumer
3407 u64 producer
3408}
3409
Jesse Hallad250842017-03-10 18:35:38 -08003410@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003411class VkNativeBufferANDROID {
3412 VkStructureType sType
3413 const void* pNext
3414 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003415 s32 stride
3416 s32 format
3417 s32 usage
3418 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003419}
3420
Jesse Hallad250842017-03-10 18:35:38 -08003421@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003422class VkSwapchainImageCreateInfoANDROID {
3423 VkStructureType sType
3424 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003425 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003426}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003427
Jesse Hallad250842017-03-10 18:35:38 -08003428@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003429class VkPhysicalDevicePresentationPropertiesANDROID {
3430 VkStructureType sType
3431 void* pNext
3432 VkBool32 sharedImage
3433}
3434
Jesse Hallad250842017-03-10 18:35:38 -08003435@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003436class VkDebugReportCallbackCreateInfoEXT {
3437 VkStructureType sType
3438 const void* pNext
3439 VkDebugReportFlagsEXT flags
3440 PFN_vkDebugReportCallbackEXT pfnCallback
3441 void* pUserData
3442}
3443
Jesse Hallad250842017-03-10 18:35:38 -08003444@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003445class VkPipelineRasterizationStateRasterizationOrderAMD {
3446 VkStructureType sType
3447 const void* pNext
3448 VkRasterizationOrderAMD rasterizationOrder
3449}
3450
Jesse Hallad250842017-03-10 18:35:38 -08003451@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003452class VkDebugMarkerObjectNameInfoEXT {
3453 VkStructureType sType
3454 const void* pNext
3455 VkDebugReportObjectTypeEXT objectType
3456 u64 object
3457 const char* pObjectName
3458}
3459
Jesse Hallad250842017-03-10 18:35:38 -08003460@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003461class VkDebugMarkerObjectTagInfoEXT {
3462 VkStructureType sType
3463 const void* pNext
3464 VkDebugReportObjectTypeEXT objectType
3465 u64 object
3466 u64 tagName
3467 platform.size_t tagSize
3468 const void* pTag
3469}
3470
Jesse Hallad250842017-03-10 18:35:38 -08003471@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003472class VkDebugMarkerMarkerInfoEXT {
3473 VkStructureType sType
3474 const void* pNext
3475 const char* pMarkerName
3476 f32[4] color
3477}
3478
Jesse Hallad250842017-03-10 18:35:38 -08003479@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003480class VkDedicatedAllocationImageCreateInfoNV {
3481 VkStructureType sType
3482 const void* pNext
3483 VkBool32 dedicatedAllocation
3484}
3485
Jesse Hallad250842017-03-10 18:35:38 -08003486@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003487class VkDedicatedAllocationBufferCreateInfoNV {
3488 VkStructureType sType
3489 const void* pNext
3490 VkBool32 dedicatedAllocation
3491}
3492
Jesse Hallad250842017-03-10 18:35:38 -08003493@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003494class VkDedicatedAllocationMemoryAllocateInfoNV {
3495 VkStructureType sType
3496 const void* pNext
3497 VkImage image
3498 VkBuffer buffer
3499}
3500
Jesse Hallad250842017-03-10 18:35:38 -08003501@extension("VK_KHX_multiview") // 54
3502class VkRenderPassMultiviewCreateInfoKHX {
3503 VkStructureType sType
3504 const void* pNext
3505 u32 subpassCount
3506 const u32* pViewMasks
3507 u32 dependencyCount
3508 const s32* pViewOffsets
3509 u32 correlationMaskCount
3510 const u32* pCorrelationMasks
3511}
3512
3513@extension("VK_KHX_multiview") // 54
3514class VkPhysicalDeviceMultiviewFeaturesKHX {
3515 VkStructureType sType
3516 void* pNext
3517 VkBool32 multiview
3518 VkBool32 multiviewGeometryShader
3519 VkBool32 multiviewTessellationShader
3520}
3521
3522@extension("VK_KHX_multiview") // 54
3523class VkPhysicalDeviceMultiviewPropertiesKHX {
3524 VkStructureType sType
3525 void* pNext
3526 u32 maxMultiviewViewCount
3527 u32 maxMultiviewInstanceIndex
3528}
3529
3530@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003531class VkExternalImageFormatPropertiesNV {
3532 VkImageFormatProperties imageFormatProperties
3533 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3534 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3535 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3536}
3537
Jesse Hallad250842017-03-10 18:35:38 -08003538@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003539class VkExternalMemoryImageCreateInfoNV {
3540 VkStructureType sType
3541 const void* pNext
3542 VkExternalMemoryHandleTypeFlagsNV handleTypes
3543}
3544
Jesse Hallad250842017-03-10 18:35:38 -08003545@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003546class VkExportMemoryAllocateInfoNV {
3547 VkStructureType sType
3548 const void* pNext
3549 VkExternalMemoryHandleTypeFlagsNV handleTypes
3550}
3551
Jesse Hallad250842017-03-10 18:35:38 -08003552@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003553class VkImportMemoryWin32HandleInfoNV {
3554 VkStructureType sType
3555 const void* pNext
3556 VkExternalMemoryHandleTypeFlagsNV handleType
3557 platform.HANDLE handle
3558}
3559
Jesse Hallad250842017-03-10 18:35:38 -08003560@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003561class VkExportMemoryWin32HandleInfoNV {
3562 VkStructureType sType
3563 const void* pNext
3564 const platform.SECURITY_ATTRIBUTES* pAttributes
3565 platform.DWORD dwAccess
3566}
3567
Jesse Hallad250842017-03-10 18:35:38 -08003568@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003569class VkWin32KeyedMutexAcquireReleaseInfoNV {
3570 VkStructureType sType
3571 const void* pNext
3572 u32 acquireCount
3573 const VkDeviceMemory* pAcquireSyncs
3574 const u64* pAcquireKeys
3575 const u32* pAcquireTimeoutMilliseconds
3576 u32 releaseCount
3577 const VkDeviceMemory* pReleaseSyncs
3578 const u64* pReleaseKeys
3579}
3580
Jesse Hallad250842017-03-10 18:35:38 -08003581@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003582class VkPhysicalDeviceFeatures2KHR {
3583 VkStructureType sType
3584 void* pNext
3585 VkPhysicalDeviceFeatures features
3586}
3587
Jesse Hallad250842017-03-10 18:35:38 -08003588@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003589class VkPhysicalDeviceProperties2KHR {
3590 VkStructureType sType
3591 void* pNext
3592 VkPhysicalDeviceProperties properties
3593}
3594
Jesse Hallad250842017-03-10 18:35:38 -08003595@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003596class VkFormatProperties2KHR {
3597 VkStructureType sType
3598 void* pNext
3599 VkFormatProperties formatProperties
3600}
3601
Jesse Hallad250842017-03-10 18:35:38 -08003602@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003603class VkImageFormatProperties2KHR {
3604 VkStructureType sType
3605 void* pNext
3606 VkImageFormatProperties imageFormatProperties
3607}
3608
Jesse Hallad250842017-03-10 18:35:38 -08003609@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003610class VkPhysicalDeviceImageFormatInfo2KHR {
3611 VkStructureType sType
3612 const void* pNext
3613 VkFormat format
3614 VkImageType type
3615 VkImageTiling tiling
3616 VkImageUsageFlags usage
3617 VkImageCreateFlags flags
3618}
3619
Jesse Hallad250842017-03-10 18:35:38 -08003620@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003621class VkQueueFamilyProperties2KHR {
3622 VkStructureType sType
3623 void* pNext
3624 VkQueueFamilyProperties queueFamilyProperties
3625}
3626
Jesse Hallad250842017-03-10 18:35:38 -08003627@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003628class VkPhysicalDeviceMemoryProperties2KHR {
3629 VkStructureType sType
3630 void* pNext
3631 VkPhysicalDeviceMemoryProperties memoryProperties
3632}
3633
Jesse Hallad250842017-03-10 18:35:38 -08003634@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003635class VkSparseImageFormatProperties2KHR {
3636 VkStructureType sType
3637 void* pNext
3638 VkSparseImageFormatProperties properties
3639}
3640
Jesse Hallad250842017-03-10 18:35:38 -08003641@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003642class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3643 VkStructureType sType
3644 const void* pNext
3645 VkFormat format
3646 VkImageType type
3647 VkSampleCountFlagBits samples
3648 VkImageUsageFlags usage
3649 VkImageTiling tiling
3650}
3651
Jesse Hallad250842017-03-10 18:35:38 -08003652@extension("VK_KHX_device_group") // 61
3653class VkMemoryAllocateFlagsInfoKHX {
3654 VkStructureType sType
3655 const void* pNext
3656 VkMemoryAllocateFlagsKHX flags
3657 u32 deviceMask
3658}
3659
3660@extension("VK_KHX_device_group") // 61
3661class VkBindBufferMemoryInfoKHX {
3662 VkStructureType sType
3663 const void* pNext
3664 VkBuffer buffer
3665 VkDeviceMemory memory
3666 VkDeviceSize memoryOffset
3667 u32 deviceIndexCount
3668 const u32* pDeviceIndices
3669}
3670
3671@extension("VK_KHX_device_group") // 61
3672class VkBindImageMemoryInfoKHX {
3673 VkStructureType sType
3674 const void* pNext
3675 VkImage image
3676 VkDeviceMemory memory
3677 VkDeviceSize memoryOffset
3678 u32 deviceIndexCount
3679 const u32* pDeviceIndices
3680 u32 SFRRectCount
3681 const VkRect2D* pSFRRects
3682}
3683
3684@extension("VK_KHX_device_group") // 61
3685class VkDeviceGroupRenderPassBeginInfoKHX {
3686 VkStructureType sType
3687 const void* pNext
3688 u32 deviceMask
3689 u32 deviceRenderAreaCount
3690 const VkRect2D* pDeviceRenderAreas
3691}
3692
3693@extension("VK_KHX_device_group") // 61
3694class VkDeviceGroupCommandBufferBeginInfoKHX {
3695 VkStructureType sType
3696 const void* pNext
3697 u32 deviceMask
3698}
3699
3700@extension("VK_KHX_device_group") // 61
3701class VkDeviceGroupSubmitInfoKHX {
3702 VkStructureType sType
3703 const void* pNext
3704 u32 waitSemaphoreCount
3705 const u32* pWaitSemaphoreDeviceIndices
3706 u32 commandBufferCount
3707 const u32* pCommandBufferDeviceMasks
3708 u32 signalSemaphoreCount
3709 const u32* pSignalSemaphoreDeviceIndices
3710}
3711
3712@extension("VK_KHX_device_group") // 61
3713class VkDeviceGroupBindSparseInfoKHX {
3714 VkStructureType sType
3715 const void* pNext
3716 u32 resourceDeviceIndex
3717 u32 memoryDeviceIndex
3718}
3719
3720@extension("VK_KHX_device_group") // 61
3721class VkDeviceGroupPresentCapabilitiesKHX {
3722 VkStructureType sType
3723 const void* pNext
3724 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3725 VkDeviceGroupPresentModeFlagsKHX modes
3726}
3727
3728@extension("VK_KHX_device_group") // 61
3729class VkImageSwapchainCreateInfoKHX {
3730 VkStructureType sType
3731 const void* pNext
3732 VkSwapchainKHR swapchain
3733}
3734
3735@extension("VK_KHX_device_group") // 61
3736class VkBindImageMemorySwapchainInfoKHX {
3737 VkStructureType sType
3738 const void* pNext
3739 VkSwapchainKHR swapchain
3740 u32 imageIndex
3741}
3742
3743@extension("VK_KHX_device_group") // 61
3744class VkAcquireNextImageInfoKHX {
3745 VkStructureType sType
3746 const void* pNext
3747 VkSwapchainKHR swapchain
3748 u64 timeout
3749 VkSemaphore semaphore
3750 VkFence fence
3751 u32 deviceMask
3752}
3753
3754@extension("VK_KHX_device_group") // 61
3755class VkDeviceGroupPresentInfoKHX {
3756 VkStructureType sType
3757 const void* pNext
3758 u32 swapchainCount
3759 const u32* pDeviceMasks
3760 VkDeviceGroupPresentModeFlagBitsKHX mode
3761}
3762
3763@extension("VK_KHX_device_group") // 61
3764class VkDeviceGroupSwapchainCreateInfoKHX {
3765 VkStructureType sType
3766 const void* pNext
3767 VkDeviceGroupPresentModeFlagsKHX modes
3768}
3769
3770@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13003771class VkValidationFlagsEXT {
3772 VkStructureType sType
3773 const void* pNext
3774 u32 disabledValidationCheckCount
3775 VkValidationCheckEXT* pDisabledValidationChecks
3776}
3777
Jesse Hallad250842017-03-10 18:35:38 -08003778@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08003779class VkViSurfaceCreateInfoNN {
3780 VkStructureType sType
3781 const void* pNext
3782 VkViSurfaceCreateFlagsNN flags
3783 void* window
3784}
3785
Jesse Hallad250842017-03-10 18:35:38 -08003786@extension("VK_KHX_device_group_creation") // 71
3787class VkPhysicalDeviceGroupPropertiesKHX {
3788 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07003789 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08003790 u32 physicalDeviceCount
3791 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3792 VkBool32 subsetAllocation
3793}
3794
3795@extension("VK_KHX_device_group_creation") // 71
3796class VkDeviceGroupDeviceCreateInfoKHX {
3797 VkStructureType sType
3798 const void* pNext
3799 u32 physicalDeviceCount
3800 const VkPhysicalDevice* pPhysicalDevices
3801}
3802
3803@extension("VK_KHX_external_memory_capabilities") // 72
3804class VkExternalMemoryPropertiesKHX {
3805 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3806 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3807 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3808}
3809
3810@extension("VK_KHX_external_memory_capabilities") // 72
3811class VkPhysicalDeviceExternalImageFormatInfoKHX {
3812 VkStructureType sType
3813 const void* pNext
3814 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3815}
3816
3817@extension("VK_KHX_external_memory_capabilities") // 72
3818class VkExternalImageFormatPropertiesKHX {
3819 VkStructureType sType
3820 void* pNext
3821 VkExternalMemoryPropertiesKHX externalMemoryProperties
3822}
3823
3824@extension("VK_KHX_external_memory_capabilities") // 72
3825class VkPhysicalDeviceExternalBufferInfoKHX {
3826 VkStructureType sType
3827 const void* pNext
3828 VkBufferCreateFlags flags
3829 VkBufferUsageFlags usage
3830 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3831}
3832
3833@extension("VK_KHX_external_memory_capabilities") // 72
3834class VkExternalBufferPropertiesKHX {
3835 VkStructureType sType
3836 void* pNext
3837 VkExternalMemoryPropertiesKHX externalMemoryProperties
3838}
3839
3840@extension("VK_KHX_external_memory_capabilities") // 72
3841class VkPhysicalDeviceIDPropertiesKHX {
3842 VkStructureType sType
3843 void* pNext
3844 u8[VK_UUID_SIZE] deviceUUID
3845 u8[VK_UUID_SIZE] driverUUID
3846 u8[VK_LUID_SIZE_KHX] deviceLUID
3847 VkBool32 deviceLUIDValid
3848}
3849
Jesse Hallad250842017-03-10 18:35:38 -08003850@extension("VK_KHX_external_memory") // 73
3851class VkExternalMemoryImageCreateInfoKHX {
3852 VkStructureType sType
3853 const void* pNext
3854 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3855}
3856
3857@extension("VK_KHX_external_memory") // 73
3858class VkExternalMemoryBufferCreateInfoKHX {
3859 VkStructureType sType
3860 const void* pNext
3861 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3862}
3863
3864@extension("VK_KHX_external_memory") // 73
3865class VkExportMemoryAllocateInfoKHX {
3866 VkStructureType sType
3867 const void* pNext
3868 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3869}
3870
3871@extension("VK_KHX_external_memory_win32") // 74
3872class VkImportMemoryWin32HandleInfoKHX {
3873 VkStructureType sType
3874 const void* pNext
3875 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3876 platform.HANDLE handle
3877}
3878
3879@extension("VK_KHX_external_memory_win32") // 74
3880class VkExportMemoryWin32HandleInfoKHX {
3881 VkStructureType sType
3882 const void* pNext
3883 const platform.SECURITY_ATTRIBUTES* pAttributes
3884 platform.DWORD dwAccess
3885 platform.LPCWSTR name
3886}
3887
3888@extension("VK_KHX_external_memory_win32") // 74
3889class VkMemoryWin32HandlePropertiesKHX {
3890 VkStructureType sType
3891 void* pNext
3892 u32 memoryTypeBits
3893}
3894
3895@extension("VK_KHX_external_memory_fd") // 75
3896class VkImportMemoryFdInfoKHX {
3897 VkStructureType sType
3898 const void* pNext
3899 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3900 int fd
3901}
3902
3903@extension("VK_KHX_external_memory_fd") // 75
3904class VkMemoryFdPropertiesKHX {
3905 VkStructureType sType
3906 void* pNext
3907 u32 memoryTypeBits
3908}
3909
3910@extension("VK_KHX_win32_keyed_mutex") // 76
3911class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3912 VkStructureType sType
3913 const void* pNext
3914 u32 acquireCount
3915 const VkDeviceMemory* pAcquireSyncs
3916 const u64* pAcquireKeys
3917 const u32* pAcquireTimeouts
3918 u32 releaseCount
3919 const VkDeviceMemory* pReleaseSyncs
3920 const u64* pReleaseKeys
3921}
3922
3923@extension("VK_KHX_external_semaphore_capabilities") // 77
3924class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3925 VkStructureType sType
3926 const void* pNext
3927 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3928}
3929
3930@extension("VK_KHX_external_semaphore_capabilities") // 77
3931class VkExternalSemaphorePropertiesKHX {
3932 VkStructureType sType
3933 void* pNext
3934 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3935 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3936 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3937}
3938
3939@extension("VK_KHX_external_semaphore") // 78
3940class VkExportSemaphoreCreateInfoKHX {
3941 VkStructureType sType
3942 const void* pNext
3943 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3944}
3945
3946@extension("VK_KHX_external_semaphore_win32") // 79
3947class VkImportSemaphoreWin32HandleInfoKHX {
3948 VkStructureType sType
3949 const void* pNext
3950 VkSemaphore semaphore
3951 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3952 platform.HANDLE handle
3953}
3954
3955@extension("VK_KHX_external_semaphore_win32") // 79
3956class VkExportSemaphoreWin32HandleInfoKHX {
3957 VkStructureType sType
3958 const void* pNext
3959 const platform.SECURITY_ATTRIBUTES* pAttributes
3960 platform.DWORD dwAccess
3961 platform.LPCWSTR name
3962}
3963
3964@extension("VK_KHX_external_semaphore_win32") // 79
3965class VkD3D12FenceSubmitInfoKHX {
3966 VkStructureType sType
3967 const void* pNext
3968 u32 waitSemaphoreValuesCount
3969 const u64* pWaitSemaphoreValues
3970 u32 signalSemaphoreValuesCount
3971 const u64* pSignalSemaphoreValues
3972}
3973
3974@extension("VK_KHX_external_semaphore_fd") // 80
3975class VkImportSemaphoreFdInfoKHX {
3976 VkStructureType sType
3977 const void* pNext
3978 VkSemaphore semaphore
3979 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3980 s32 fd
3981}
3982
3983@extension("VK_KHR_push_descriptor") // 81
3984class VkPhysicalDevicePushDescriptorPropertiesKHR {
3985 VkStructureType sType
3986 void* pNext
3987 u32 maxPushDescriptors
3988}
3989
3990@extension("VK_KHR_incremental_present") // 85
3991class VkRectLayerKHR {
3992 VkOffset2D offset
3993 VkExtent2D extent
3994 u32 layer
3995}
3996
3997@extension("VK_KHR_incremental_present") // 85
3998class VkPresentRegionKHR {
3999 u32 rectangleCount
4000 const VkRectLayerKHR* pRectangles
4001}
4002
4003@extension("VK_KHR_incremental_present") // 85
4004class VkPresentRegionsKHR {
4005 VkStructureType sType
4006 const void* pNext
4007 u32 swapchainCount
4008 const VkPresentRegionKHR* pRegions
4009}
4010
4011@extension("VK_KHR_descriptor_update_template") // 86
4012class VkDescriptorUpdateTemplateEntryKHR {
4013 u32 dstBinding
4014 u32 dstArrayElement
4015 u32 descriptorCount
4016 VkDescriptorType descriptorType
4017 platform.size_t offset
4018 platform.size_t stride
4019}
4020
4021@extension("VK_KHR_descriptor_update_template") // 86
4022class VkDescriptorUpdateTemplateCreateInfoKHR {
4023 VkStructureType sType
4024 void* pNext
4025 VkDescriptorUpdateTemplateCreateFlagsKHR flags
4026 u32 descriptorUpdateEntryCount
4027 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
4028 VkDescriptorUpdateTemplateTypeKHR templateType
4029 VkDescriptorSetLayout descriptorSetLayout
4030 VkPipelineBindPoint pipelineBindPoint
4031 VkPipelineLayout pipelineLayout
4032 u32 set
4033}
4034
4035@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004036class VkDeviceGeneratedCommandsFeaturesNVX {
4037 VkStructureType sType
4038 const void* pNext
4039 VkBool32 computeBindingPointSupport
4040}
4041
Jesse Hallad250842017-03-10 18:35:38 -08004042@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004043class VkDeviceGeneratedCommandsLimitsNVX {
4044 VkStructureType sType
4045 const void* pNext
4046 u32 maxIndirectCommandsLayoutTokenCount
4047 u32 maxObjectEntryCounts
4048 u32 minSequenceCountBufferOffsetAlignment
4049 u32 minSequenceIndexBufferOffsetAlignment
4050 u32 minCommandsTokenBufferOffsetAlignment
4051}
4052
Jesse Hallad250842017-03-10 18:35:38 -08004053@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004054class VkIndirectCommandsTokenNVX {
4055 VkIndirectCommandsTokenTypeNVX tokenType
4056 VkBuffer buffer
4057 VkDeviceSize offset
4058}
4059
Jesse Hallad250842017-03-10 18:35:38 -08004060@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004061class VkIndirectCommandsLayoutTokenNVX {
4062 VkIndirectCommandsTokenTypeNVX tokenType
4063 u32 bindingUnit
4064 u32 dynamicCount
4065 u32 divisor
4066}
4067
Jesse Hallad250842017-03-10 18:35:38 -08004068@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004069class VkIndirectCommandsLayoutCreateInfoNVX {
4070 VkStructureType sType
4071 const void* pNext
4072 VkPipelineBindPoint pipelineBindPoint
4073 VkIndirectCommandsLayoutUsageFlagsNVX flags
4074 u32 tokenCount
4075 const VkIndirectCommandsLayoutTokenNVX* pTokens
4076}
4077
Jesse Hallad250842017-03-10 18:35:38 -08004078@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004079class VkCmdProcessCommandsInfoNVX {
4080 VkStructureType sType
4081 const void* pNext
4082 VkObjectTableNVX objectTable
4083 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4084 u32 indirectCommandsTokenCount
4085 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4086 u32 maxSequencesCount
4087 VkCommandBuffer targetCommandBuffer
4088 VkBuffer sequencesCountBuffer
4089 VkDeviceSize sequencesCountOffset
4090 VkBuffer sequencesIndexBuffer
4091 VkDeviceSize sequencesIndexOffset
4092}
4093
Jesse Hallad250842017-03-10 18:35:38 -08004094@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004095class VkCmdReserveSpaceForCommandsInfoNVX {
4096 VkStructureType sType
4097 const void* pNext
4098 VkObjectTableNVX objectTable
4099 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4100 u32 maxSequencesCount
4101}
4102
Jesse Hallad250842017-03-10 18:35:38 -08004103@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004104class VkObjectTableCreateInfoNVX {
4105 VkStructureType sType
4106 const void* pNext
4107 u32 objectCount
4108 const VkObjectEntryTypeNVX* pObjectEntryTypes
4109 const u32* pObjectEntryCounts
4110 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4111 u32 maxUniformBuffersPerDescriptor
4112 u32 maxStorageBuffersPerDescriptor
4113 u32 maxStorageImagesPerDescriptor
4114 u32 maxSampledImagesPerDescriptor
4115 u32 maxPipelineLayouts
4116}
4117
Jesse Hallad250842017-03-10 18:35:38 -08004118@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004119class VkObjectTableEntryNVX {
4120 VkObjectEntryTypeNVX type
4121 VkObjectEntryUsageFlagsNVX flags
4122}
4123
Jesse Hallad250842017-03-10 18:35:38 -08004124@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004125class VkObjectTablePipelineEntryNVX {
4126 VkObjectEntryTypeNVX type
4127 VkObjectEntryUsageFlagsNVX flags
4128 VkPipeline pipeline
4129}
4130
Jesse Hallad250842017-03-10 18:35:38 -08004131@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004132class VkObjectTableDescriptorSetEntryNVX {
4133 VkObjectEntryTypeNVX type
4134 VkObjectEntryUsageFlagsNVX flags
4135 VkPipelineLayout pipelineLayout
4136 VkDescriptorSet descriptorSet
4137}
4138
Jesse Hallad250842017-03-10 18:35:38 -08004139@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004140class VkObjectTableVertexBufferEntryNVX {
4141 VkObjectEntryTypeNVX type
4142 VkObjectEntryUsageFlagsNVX flags
4143 VkBuffer buffer
4144}
4145
Jesse Hallad250842017-03-10 18:35:38 -08004146@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004147class VkObjectTableIndexBufferEntryNVX {
4148 VkObjectEntryTypeNVX type
4149 VkObjectEntryUsageFlagsNVX flags
4150 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004151 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004152}
4153
Jesse Hallad250842017-03-10 18:35:38 -08004154@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004155class VkObjectTablePushConstantEntryNVX {
4156 VkObjectEntryTypeNVX type
4157 VkObjectEntryUsageFlagsNVX flags
4158 VkPipelineLayout pipelineLayout
4159 VkShaderStageFlags stageFlags
4160}
4161
Jesse Hallad250842017-03-10 18:35:38 -08004162@extension("VK_NV_clip_space_w_scaling") // 88
4163class VkViewportWScalingNV {
4164 f32 xcoeff
4165 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004166}
4167
Jesse Hallad250842017-03-10 18:35:38 -08004168@extension("VK_NV_clip_space_w_scaling") // 88
4169class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004170 VkStructureType sType
4171 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004172 VkBool32 viewportWScalingEnable
4173 u32 viewportCount
4174 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004175}
4176
Jesse Hallad250842017-03-10 18:35:38 -08004177@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004178class VkSurfaceCapabilities2EXT {
4179 VkStructureType sType
4180 void* pNext
4181 u32 minImageCount
4182 u32 maxImageCount
4183 VkExtent2D currentExtent
4184 VkExtent2D minImageExtent
4185 VkExtent2D maxImageExtent
4186 u32 maxImageArrayLayers
4187 VkSurfaceTransformFlagsKHR supportedTransforms
4188 VkSurfaceTransformFlagBitsKHR currentTransform
4189 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4190 VkImageUsageFlags supportedUsageFlags
4191 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4192}
4193
Jesse Hallad250842017-03-10 18:35:38 -08004194@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004195class VkDisplayPowerInfoEXT {
4196 VkStructureType sType
4197 const void* pNext
4198 VkDisplayPowerStateEXT powerState
4199}
4200
Jesse Hallad250842017-03-10 18:35:38 -08004201@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004202class VkDeviceEventInfoEXT {
4203 VkStructureType sType
4204 const void* pNext
4205 VkDeviceEventTypeEXT deviceEvent
4206}
4207
Jesse Hallad250842017-03-10 18:35:38 -08004208@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004209class VkDisplayEventInfoEXT {
4210 VkStructureType sType
4211 const void* pNext
4212 VkDisplayEventTypeEXT displayEvent
4213}
4214
Jesse Hallad250842017-03-10 18:35:38 -08004215@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004216class VkSwapchainCounterCreateInfoEXT {
4217 VkStructureType sType
4218 const void* pNext
4219 VkSurfaceCounterFlagsEXT surfaceCounters
4220}
4221
Jesse Hallad250842017-03-10 18:35:38 -08004222@extension("VK_GOOGLE_display_timing") // 93
4223class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004224 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08004225}
4226
4227@extension("VK_GOOGLE_display_timing") // 93
4228class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004229 u32 presentID
4230 u64 desiredPresentTime
4231 u64 actualPresentTime
4232 u64 earliestPresentTime
4233 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08004234}
4235
4236@extension("VK_GOOGLE_display_timing") // 93
4237class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004238 u32 presentID
4239 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08004240}
4241
4242@extension("VK_GOOGLE_display_timing") // 93
4243class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004244 VkStructureType sType
4245 const void* pNext
4246 u32 swapchainCount
4247 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08004248}
4249
4250@extension("VK_NVX_multiview_per_view_attributes") // 98
4251class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4252 VkStructureType sType
4253 void* pNext
4254 VkBool32 perViewPositionAllComponents
4255}
4256
4257@extension("VK_NV_viewport_swizzle") // 99
4258class VkViewportSwizzleNV {
4259 VkViewportCoordinateSwizzleNV x
4260 VkViewportCoordinateSwizzleNV y
4261 VkViewportCoordinateSwizzleNV z
4262 VkViewportCoordinateSwizzleNV w
4263}
4264
4265@extension("VK_NV_viewport_swizzle") // 99
4266class VkPipelineViewportSwizzleStateCreateInfoNV {
4267 VkStructureType sType
4268 const void* pNext
4269 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4270 u32 viewportCount
4271 const VkViewportSwizzleNV* pViewportSwizzles
4272}
4273
4274@extension("VK_EXT_discard_rectangles") // 100
4275class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4276 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07004277 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004278 u32 maxDiscardRectangles
4279}
4280
4281@extension("VK_EXT_discard_rectangles") // 100
4282class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004283 VkStructureType sType
4284 const void* pNext
4285 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4286 VkDiscardRectangleModeEXT discardRectangleMode
4287 u32 discardRectangleCount
4288 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08004289}
4290
4291@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004292class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004293 f32 x
4294 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004295}
4296
Jesse Hallad250842017-03-10 18:35:38 -08004297@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004298class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004299 VkStructureType sType
4300 const void* pNext
4301 VkXYColorEXT displayPrimaryRed
4302 VkXYColorEXT displayPrimaryGreen
4303 VkXYColorEXT displayPrimaryBlue
4304 VkXYColorEXT whitePoint
4305 f32 maxLuminance
4306 f32 minLuminance
4307 f32 maxContentLightLevel
4308 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004309}
4310
Jesse Hall05556b12017-05-18 17:40:25 -07004311@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13004312class VkSharedPresentSurfaceCapabilitiesKHR {
4313 VkStructureType sType
4314 const void* pNext
4315 VkImageUsageFlags sharedPresentSupportedUsageFlags
4316}
4317
Jesse Hall05556b12017-05-18 17:40:25 -07004318@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004319class VkPhysicalDeviceSurfaceInfo2KHR {
4320 VkStructureType sType
4321 const void* pNext
4322 VkSurfaceKHR surface
4323}
4324
Jesse Hall05556b12017-05-18 17:40:25 -07004325@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004326class VkSurfaceCapabilities2KHR {
4327 VkStructureType sType
4328 void* pNext
4329 VkSurfaceCapabilitiesKHR surfaceCapabilities
4330}
4331
Jesse Hall05556b12017-05-18 17:40:25 -07004332@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13004333class VkSurfaceFormat2KHR {
4334 VkStructureType sType
4335 void* pNext
4336 VkSurfaceFormatKHR surfaceFormat
4337}
4338
Jesse Hallad250842017-03-10 18:35:38 -08004339@extension("VK_MVK_ios_surface") // 123
4340class VkIOSSurfaceCreateInfoMVK {
4341 VkStructureType sType
4342 const void* pNext
4343 VkIOSSurfaceCreateFlagsMVK flags
4344 const void* pView
4345}
4346
4347@extension("VK_MVK_macos_surface") // 124
4348class VkMacOSSurfaceCreateInfoMVK {
4349 VkStructureType sType
4350 const void* pNext
4351 VkMacOSSurfaceCreateFlagsMVK flags
4352 const void* pView
4353}
4354
Jesse Halld27f6aa2015-08-15 17:58:48 -07004355////////////////
4356// Commands //
4357////////////////
4358
4359// Function pointers. TODO: add support for function pointers.
4360
4361@external type void* PFN_vkVoidFunction
4362@pfn cmd void vkVoidFunction() {
4363}
4364
Jesse Hall3fbc8562015-11-29 22:10:52 -08004365@external type void* PFN_vkAllocationFunction
4366@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004367 void* pUserData,
4368 platform.size_t size,
4369 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004370 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004371 return ?
4372}
4373
Jesse Hall3fbc8562015-11-29 22:10:52 -08004374@external type void* PFN_vkReallocationFunction
4375@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004376 void* pUserData,
4377 void* pOriginal,
4378 platform.size_t size,
4379 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004380 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004381 return ?
4382}
4383
4384@external type void* PFN_vkFreeFunction
4385@pfn cmd void vkFreeFunction(
4386 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004387 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004388}
4389
Jesse Hall3fbc8562015-11-29 22:10:52 -08004390@external type void* PFN_vkInternalAllocationNotification
4391@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004392 void* pUserData,
4393 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004394 VkInternalAllocationType allocationType,
4395 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004396}
4397
4398@external type void* PFN_vkInternalFreeNotification
4399@pfn cmd void vkInternalFreeNotification(
4400 void* pUserData,
4401 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004402 VkInternalAllocationType allocationType,
4403 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004404}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004405
4406// Global functions
4407
4408@threadSafety("system")
4409cmd VkResult vkCreateInstance(
4410 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004411 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004412 VkInstance* pInstance) {
4413 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4414
4415 instance := ?
4416 pInstance[0] = instance
4417 State.Instances[instance] = new!InstanceObject()
4418
Jesse Hall3dd678a2016-01-08 21:52:01 -08004419 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4420 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004421
4422 return ?
4423}
4424
4425@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004426cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004427 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004428 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004429 instanceObject := GetInstance(instance)
4430
4431 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004432}
4433
4434@threadSafety("system")
4435cmd VkResult vkEnumeratePhysicalDevices(
4436 VkInstance instance,
4437 u32* pPhysicalDeviceCount,
4438 VkPhysicalDevice* pPhysicalDevices) {
4439 instanceObject := GetInstance(instance)
4440
4441 physicalDeviceCount := as!u32(?)
4442 pPhysicalDeviceCount[0] = physicalDeviceCount
4443 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4444
4445 for i in (0 .. physicalDeviceCount) {
4446 physicalDevice := ?
4447 physicalDevices[i] = physicalDevice
4448 if !(physicalDevice in State.PhysicalDevices) {
4449 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4450 }
4451 }
4452
4453 return ?
4454}
4455
4456cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4457 VkDevice device,
4458 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004459 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004460 device := GetDevice(device)
4461 }
4462
4463 return ?
4464}
4465
4466cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4467 VkInstance instance,
4468 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004469 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004470 instanceObject := GetInstance(instance)
4471 }
4472
4473 return ?
4474}
4475
Jesse Hall606a54e2015-11-19 22:17:28 -08004476cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004477 VkPhysicalDevice physicalDevice,
4478 VkPhysicalDeviceProperties* pProperties) {
4479 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4480
4481 properties := ?
4482 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004483}
4484
Jesse Hall606a54e2015-11-19 22:17:28 -08004485cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004486 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004487 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004488 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004489 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004490 // TODO: Figure out how to express fetch-count-or-properties
4491 // This version fails 'apic validate' with 'fence not allowed in
4492 // *semantic.Branch'. Other attempts have failed with the same or other
4493 // errors.
4494 // if pQueueFamilyProperties != null {
4495 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4496 // for i in (0 .. pCount[0]) {
4497 // queueProperties := as!VkQueueFamilyProperties(?)
4498 // queuesProperties[i] = queueProperties
4499 // }
4500 // } else {
4501 // count := ?
4502 // pCount[0] = count
4503 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004504}
4505
Jesse Hall606a54e2015-11-19 22:17:28 -08004506cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004507 VkPhysicalDevice physicalDevice,
4508 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4509 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4510
4511 memoryProperties := ?
4512 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004513}
4514
Jesse Hall606a54e2015-11-19 22:17:28 -08004515cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004516 VkPhysicalDevice physicalDevice,
4517 VkPhysicalDeviceFeatures* pFeatures) {
4518 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4519
4520 features := ?
4521 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004522}
4523
Jesse Hall606a54e2015-11-19 22:17:28 -08004524cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004525 VkPhysicalDevice physicalDevice,
4526 VkFormat format,
4527 VkFormatProperties* pFormatProperties) {
4528 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4529
4530 formatProperties := ?
4531 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004532}
4533
Jesse Halla9e57032015-11-30 01:03:10 -08004534cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004535 VkPhysicalDevice physicalDevice,
4536 VkFormat format,
4537 VkImageType type,
4538 VkImageTiling tiling,
4539 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004540 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004541 VkImageFormatProperties* pImageFormatProperties) {
4542 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4543
4544 imageFormatProperties := ?
4545 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004546
4547 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004548}
4549
Jesse Halld27f6aa2015-08-15 17:58:48 -07004550
4551// Device functions
4552
4553@threadSafety("system")
4554cmd VkResult vkCreateDevice(
4555 VkPhysicalDevice physicalDevice,
4556 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004557 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004558 VkDevice* pDevice) {
4559 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4560 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4561
4562 device := ?
4563 pDevice[0] = device
4564 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4565
4566 return ?
4567}
4568
4569@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004570cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004571 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004572 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004573 deviceObject := GetDevice(device)
4574
4575 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004576}
4577
4578
4579// Extension discovery functions
4580
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004581cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004582 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004583 VkLayerProperties* pProperties) {
4584 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004585 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004586
4587 properties := pProperties[0:count]
4588 for i in (0 .. count) {
4589 property := ?
4590 properties[i] = property
4591 }
4592
4593 return ?
4594}
4595
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004596cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004597 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004598 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004599 VkExtensionProperties* pProperties) {
4600 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004601 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004602
4603 properties := pProperties[0:count]
4604 for i in (0 .. count) {
4605 property := ?
4606 properties[i] = property
4607 }
4608
4609 return ?
4610}
4611
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004612cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004613 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004614 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004615 VkLayerProperties* pProperties) {
4616 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4617 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004618 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004619
4620 properties := pProperties[0:count]
4621 for i in (0 .. count) {
4622 property := ?
4623 properties[i] = property
4624 }
4625
4626 return ?
4627}
4628
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004629cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004630 VkPhysicalDevice physicalDevice,
4631 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004632 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004633 VkExtensionProperties* pProperties) {
4634 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4635
4636 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004637 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004638
4639 properties := pProperties[0:count]
4640 for i in (0 .. count) {
4641 property := ?
4642 properties[i] = property
4643 }
4644
4645 return ?
4646}
4647
4648
4649// Queue functions
4650
4651@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004652cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004653 VkDevice device,
4654 u32 queueFamilyIndex,
4655 u32 queueIndex,
4656 VkQueue* pQueue) {
4657 deviceObject := GetDevice(device)
4658
4659 queue := ?
4660 pQueue[0] = queue
4661
4662 if !(queue in State.Queues) {
4663 State.Queues[queue] = new!QueueObject(device: device)
4664 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004665}
4666
4667@threadSafety("app")
4668cmd VkResult vkQueueSubmit(
4669 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004670 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004671 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004672 VkFence fence) {
4673 queueObject := GetQueue(queue)
4674
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004675 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004676 fenceObject := GetFence(fence)
4677 assert(fenceObject.device == queueObject.device)
4678 }
4679
Jesse Hall3fbc8562015-11-29 22:10:52 -08004680 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4681 // for i in (0 .. commandBufferCount) {
4682 // commandBuffer := commandBuffers[i]
4683 // commandBufferObject := GetCommandBuffer(commandBuffer)
4684 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004685 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004686 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4687 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004688 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004689
4690 return ?
4691}
4692
4693@threadSafety("system")
4694cmd VkResult vkQueueWaitIdle(
4695 VkQueue queue) {
4696 queueObject := GetQueue(queue)
4697
4698 return ?
4699}
4700
4701@threadSafety("system")
4702cmd VkResult vkDeviceWaitIdle(
4703 VkDevice device) {
4704 deviceObject := GetDevice(device)
4705
4706 return ?
4707}
4708
4709
4710// Memory functions
4711
4712@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004713cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004714 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004715 const VkMemoryAllocateInfo* pAllocateInfo,
4716 const VkAllocationCallbacks* pAllocator,
4717 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004718 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004719 deviceObject := GetDevice(device)
4720
Jesse Hall3fbc8562015-11-29 22:10:52 -08004721 memory := ?
4722 pMemory[0] = memory
4723 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004724 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004725 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004726
4727 return ?
4728}
4729
4730@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004731cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004732 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004733 VkDeviceMemory memory,
4734 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004735 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004736 memoryObject := GetDeviceMemory(memory)
4737 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004738
4739 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004740 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004741 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004742 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4743 "vkFreeMemory: commandBuffers still bound")
4744 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004745}
4746
4747@threadSafety("app")
4748cmd VkResult vkMapMemory(
4749 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004750 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004751 VkDeviceSize offset,
4752 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004753 VkMemoryMapFlags flags,
4754 void** ppData) {
4755 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004756 memoryObject := GetDeviceMemory(memory)
4757 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004758
4759 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004760 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004761
4762 return ?
4763}
4764
4765@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004766cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004767 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004768 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004769 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004770 memoryObject := GetDeviceMemory(memory)
4771 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004772}
4773
4774cmd VkResult vkFlushMappedMemoryRanges(
4775 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004776 u32 memoryRangeCount
4777 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004778 deviceObject := GetDevice(device)
4779
Jesse Hall3fbc8562015-11-29 22:10:52 -08004780 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4781 for i in (0 .. memoryRangeCount) {
4782 memoryRange := memoryRanges[i]
4783 memoryObject := GetDeviceMemory(memoryRange.memory)
4784 assert(memoryObject.device == device)
4785 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004786 }
4787
4788 return ?
4789}
4790
4791cmd VkResult vkInvalidateMappedMemoryRanges(
4792 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004793 u32 memoryRangeCount,
4794 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004795 deviceObject := GetDevice(device)
4796
Jesse Hall3fbc8562015-11-29 22:10:52 -08004797 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4798 for i in (0 .. memoryRangeCount) {
4799 memoryRange := memoryRanges[i]
4800 memoryObject := GetDeviceMemory(memoryRange.memory)
4801 assert(memoryObject.device == device)
4802 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004803 }
4804
4805 return ?
4806}
4807
4808
4809// Memory management API functions
4810
Jesse Hall606a54e2015-11-19 22:17:28 -08004811cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004812 VkDevice device,
4813 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004814 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004815 deviceObject := GetDevice(device)
4816
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004817 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004818 memoryObject := GetDeviceMemory(memory)
4819 assert(memoryObject.device == device)
4820 }
4821
4822 committedMemoryInBytes := ?
4823 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004824}
4825
Jesse Hall606a54e2015-11-19 22:17:28 -08004826cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004827 VkDevice device,
4828 VkBuffer buffer,
4829 VkMemoryRequirements* pMemoryRequirements) {
4830 deviceObject := GetDevice(device)
4831 bufferObject := GetBuffer(buffer)
4832 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004833}
4834
4835cmd VkResult vkBindBufferMemory(
4836 VkDevice device,
4837 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004838 VkDeviceMemory memory,
4839 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004840 deviceObject := GetDevice(device)
4841 bufferObject := GetBuffer(buffer)
4842 assert(bufferObject.device == device)
4843
4844 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004845 if bufferObject.memory != NULL_HANDLE {
4846 memoryObject := GetDeviceMemory(bufferObject.memory)
4847 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004848 }
4849
4850 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004851 if memory != NULL_HANDLE {
4852 memoryObject := GetDeviceMemory(memory)
4853 assert(memoryObject.device == device)
4854 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004855 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004856 bufferObject.memory = memory
4857 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004858
4859 return ?
4860}
4861
Jesse Hall606a54e2015-11-19 22:17:28 -08004862cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004863 VkDevice device,
4864 VkImage image,
4865 VkMemoryRequirements* pMemoryRequirements) {
4866 deviceObject := GetDevice(device)
4867 imageObject := GetImage(image)
4868 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004869}
4870
4871cmd VkResult vkBindImageMemory(
4872 VkDevice device,
4873 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004874 VkDeviceMemory memory,
4875 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004876 deviceObject := GetDevice(device)
4877 imageObject := GetImage(image)
4878 assert(imageObject.device == device)
4879
4880 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004881 if imageObject.memory != NULL_HANDLE {
4882 memoryObject := GetDeviceMemory(imageObject.memory)
4883 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004884 }
4885
4886 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004887 if memory != NULL_HANDLE {
4888 memoryObject := GetDeviceMemory(memory)
4889 assert(memoryObject.device == device)
4890 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004891 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004892 imageObject.memory = memory
4893 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004894
4895 return ?
4896}
4897
Jesse Hall606a54e2015-11-19 22:17:28 -08004898cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004899 VkDevice device,
4900 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004901 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004902 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4903 deviceObject := GetDevice(device)
4904 imageObject := GetImage(image)
4905 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004906}
4907
Jesse Hall606a54e2015-11-19 22:17:28 -08004908cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004909 VkPhysicalDevice physicalDevice,
4910 VkFormat format,
4911 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004912 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004913 VkImageUsageFlags usage,
4914 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004915 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004916 VkSparseImageFormatProperties* pProperties) {
4917 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004918}
4919
Jesse Halla6429252015-11-29 18:59:42 -08004920cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004921 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004922 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004923 const VkBindSparseInfo* pBindInfo,
4924 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004925 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004926
4927 return ?
4928}
4929
4930
4931// Fence functions
4932
4933@threadSafety("system")
4934cmd VkResult vkCreateFence(
4935 VkDevice device,
4936 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004937 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004938 VkFence* pFence) {
4939 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4940 deviceObject := GetDevice(device)
4941
4942 fence := ?
4943 pFence[0] = fence
4944 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004945 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004946
4947 return ?
4948}
4949
4950@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004951cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004952 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004953 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004954 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004955 deviceObject := GetDevice(device)
4956 fenceObject := GetFence(fence)
4957 assert(fenceObject.device == device)
4958
4959 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004960}
4961
4962@threadSafety("system")
4963cmd VkResult vkResetFences(
4964 VkDevice device,
4965 u32 fenceCount,
4966 const VkFence* pFences) {
4967 deviceObject := GetDevice(device)
4968
4969 fences := pFences[0:fenceCount]
4970 for i in (0 .. fenceCount) {
4971 fence := fences[i]
4972 fenceObject := GetFence(fence)
4973 assert(fenceObject.device == device)
4974 fenceObject.signaled = false
4975 }
4976
4977 return ?
4978}
4979
4980@threadSafety("system")
4981cmd VkResult vkGetFenceStatus(
4982 VkDevice device,
4983 VkFence fence) {
4984 deviceObject := GetDevice(device)
4985 fenceObject := GetFence(fence)
4986 assert(fenceObject.device == device)
4987
4988 return ?
4989}
4990
4991@threadSafety("system")
4992cmd VkResult vkWaitForFences(
4993 VkDevice device,
4994 u32 fenceCount,
4995 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004996 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004997 u64 timeout) { /// timeout in nanoseconds
4998 deviceObject := GetDevice(device)
4999
5000 fences := pFences[0:fenceCount]
5001 for i in (0 .. fenceCount) {
5002 fence := fences[i]
5003 fenceObject := GetFence(fence)
5004 assert(fenceObject.device == device)
5005 }
5006
5007 return ?
5008}
5009
5010
5011// Queue semaphore functions
5012
5013@threadSafety("system")
5014cmd VkResult vkCreateSemaphore(
5015 VkDevice device,
5016 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005017 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005018 VkSemaphore* pSemaphore) {
5019 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
5020 deviceObject := GetDevice(device)
5021
5022 semaphore := ?
5023 pSemaphore[0] = semaphore
5024 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
5025
5026 return ?
5027}
5028
5029@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005030cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005031 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005032 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005033 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005034 deviceObject := GetDevice(device)
5035 semaphoreObject := GetSemaphore(semaphore)
5036 assert(semaphoreObject.device == device)
5037
5038 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005039}
5040
Jesse Halld27f6aa2015-08-15 17:58:48 -07005041
5042// Event functions
5043
5044@threadSafety("system")
5045cmd VkResult vkCreateEvent(
5046 VkDevice device,
5047 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005048 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005049 VkEvent* pEvent) {
5050 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
5051 deviceObject := GetDevice(device)
5052
5053 event := ?
5054 pEvent[0] = event
5055 State.Events[event] = new!EventObject(device: device)
5056
5057 return ?
5058}
5059
5060@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005061cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005062 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005063 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005064 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005065 deviceObject := GetDevice(device)
5066 eventObject := GetEvent(event)
5067 assert(eventObject.device == device)
5068
5069 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005070}
5071
5072@threadSafety("system")
5073cmd VkResult vkGetEventStatus(
5074 VkDevice device,
5075 VkEvent event) {
5076 deviceObject := GetDevice(device)
5077 eventObject := GetEvent(event)
5078 assert(eventObject.device == device)
5079
5080 return ?
5081}
5082
5083@threadSafety("system")
5084cmd VkResult vkSetEvent(
5085 VkDevice device,
5086 VkEvent event) {
5087 deviceObject := GetDevice(device)
5088 eventObject := GetEvent(event)
5089 assert(eventObject.device == device)
5090
5091 return ?
5092}
5093
5094@threadSafety("system")
5095cmd VkResult vkResetEvent(
5096 VkDevice device,
5097 VkEvent event) {
5098 deviceObject := GetDevice(device)
5099 eventObject := GetEvent(event)
5100 assert(eventObject.device == device)
5101
5102 return ?
5103}
5104
5105
5106// Query functions
5107
5108@threadSafety("system")
5109cmd VkResult vkCreateQueryPool(
5110 VkDevice device,
5111 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005112 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005113 VkQueryPool* pQueryPool) {
5114 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5115 deviceObject := GetDevice(device)
5116
5117 queryPool := ?
5118 pQueryPool[0] = queryPool
5119 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5120
5121 return ?
5122}
5123
5124@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005125cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005126 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005127 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005128 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005129 deviceObject := GetDevice(device)
5130 queryPoolObject := GetQueryPool(queryPool)
5131 assert(queryPoolObject.device == device)
5132
5133 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005134}
5135
5136@threadSafety("system")
5137cmd VkResult vkGetQueryPoolResults(
5138 VkDevice device,
5139 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005140 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005141 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005142 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005143 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005144 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005145 VkQueryResultFlags flags) {
5146 deviceObject := GetDevice(device)
5147 queryPoolObject := GetQueryPool(queryPool)
5148 assert(queryPoolObject.device == device)
5149
Jesse Halld27f6aa2015-08-15 17:58:48 -07005150 data := pData[0:dataSize]
5151
5152 return ?
5153}
5154
5155// Buffer functions
5156
5157@threadSafety("system")
5158cmd VkResult vkCreateBuffer(
5159 VkDevice device,
5160 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005161 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005162 VkBuffer* pBuffer) {
5163 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5164 deviceObject := GetDevice(device)
5165
5166 buffer := ?
5167 pBuffer[0] = buffer
5168 State.Buffers[buffer] = new!BufferObject(device: device)
5169
5170 return ?
5171}
5172
5173@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005174cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005175 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005176 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005177 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005178 deviceObject := GetDevice(device)
5179 bufferObject := GetBuffer(buffer)
5180 assert(bufferObject.device == device)
5181
Jesse Hall3fbc8562015-11-29 22:10:52 -08005182 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005183 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005184}
5185
5186
5187// Buffer view functions
5188
5189@threadSafety("system")
5190cmd VkResult vkCreateBufferView(
5191 VkDevice device,
5192 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005193 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005194 VkBufferView* pView) {
5195 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5196 deviceObject := GetDevice(device)
5197
5198 bufferObject := GetBuffer(pCreateInfo.buffer)
5199 assert(bufferObject.device == device)
5200
5201 view := ?
5202 pView[0] = view
5203 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5204
5205 return ?
5206}
5207
5208@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005209cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005210 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005211 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005212 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005213 deviceObject := GetDevice(device)
5214 bufferViewObject := GetBufferView(bufferView)
5215 assert(bufferViewObject.device == device)
5216
5217 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005218}
5219
5220
5221// Image functions
5222
5223@threadSafety("system")
5224cmd VkResult vkCreateImage(
5225 VkDevice device,
5226 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005227 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005228 VkImage* pImage) {
5229 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5230 deviceObject := GetDevice(device)
5231
5232 image := ?
5233 pImage[0] = image
5234 State.Images[image] = new!ImageObject(device: device)
5235
5236 return ?
5237}
5238
5239@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005240cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005241 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005242 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005243 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005244 deviceObject := GetDevice(device)
5245 imageObject := GetImage(image)
5246 assert(imageObject.device == device)
5247
Jesse Hall3fbc8562015-11-29 22:10:52 -08005248 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005249 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005250}
5251
Jesse Hall606a54e2015-11-19 22:17:28 -08005252cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005253 VkDevice device,
5254 VkImage image,
5255 const VkImageSubresource* pSubresource,
5256 VkSubresourceLayout* pLayout) {
5257 deviceObject := GetDevice(device)
5258 imageObject := GetImage(image)
5259 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005260}
5261
5262
5263// Image view functions
5264
5265@threadSafety("system")
5266cmd VkResult vkCreateImageView(
5267 VkDevice device,
5268 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005269 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005270 VkImageView* pView) {
5271 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5272 deviceObject := GetDevice(device)
5273
5274 imageObject := GetImage(pCreateInfo.image)
5275 assert(imageObject.device == device)
5276
5277 view := ?
5278 pView[0] = view
5279 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5280
5281 return ?
5282}
5283
5284@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005285cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005286 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005287 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005288 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005289 deviceObject := GetDevice(device)
5290 imageViewObject := GetImageView(imageView)
5291 assert(imageViewObject.device == device)
5292
5293 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005294}
5295
5296
5297// Shader functions
5298
5299cmd VkResult vkCreateShaderModule(
5300 VkDevice device,
5301 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005302 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005303 VkShaderModule* pShaderModule) {
5304 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5305 deviceObject := GetDevice(device)
5306
5307 shaderModule := ?
5308 pShaderModule[0] = shaderModule
5309 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5310
5311 return ?
5312}
5313
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005314cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005315 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005316 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005317 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005318 deviceObject := GetDevice(device)
5319 shaderModuleObject := GetShaderModule(shaderModule)
5320 assert(shaderModuleObject.device == device)
5321
5322 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005323}
5324
Jesse Halld27f6aa2015-08-15 17:58:48 -07005325
5326// Pipeline functions
5327
5328cmd VkResult vkCreatePipelineCache(
5329 VkDevice device,
5330 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005331 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005332 VkPipelineCache* pPipelineCache) {
5333 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5334 deviceObject := GetDevice(device)
5335
5336 pipelineCache := ?
5337 pPipelineCache[0] = pipelineCache
5338 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5339
5340 return ?
5341}
5342
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005343cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005344 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005345 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005346 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005347 deviceObject := GetDevice(device)
5348 pipelineCacheObject := GetPipelineCache(pipelineCache)
5349 assert(pipelineCacheObject.device == device)
5350
5351 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005352}
5353
Jesse Halld27f6aa2015-08-15 17:58:48 -07005354cmd VkResult vkGetPipelineCacheData(
5355 VkDevice device,
5356 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005357 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005358 void* pData) {
5359 deviceObject := GetDevice(device)
5360 pipelineCacheObject := GetPipelineCache(pipelineCache)
5361 assert(pipelineCacheObject.device == device)
5362
5363 return ?
5364}
5365
5366cmd VkResult vkMergePipelineCaches(
5367 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005368 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005369 u32 srcCacheCount,
5370 const VkPipelineCache* pSrcCaches) {
5371 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005372 dstCacheObject := GetPipelineCache(dstCache)
5373 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005374
5375 srcCaches := pSrcCaches[0:srcCacheCount]
5376 for i in (0 .. srcCacheCount) {
5377 srcCache := srcCaches[i]
5378 srcCacheObject := GetPipelineCache(srcCache)
5379 assert(srcCacheObject.device == device)
5380 }
5381
5382 return ?
5383}
5384
5385cmd VkResult vkCreateGraphicsPipelines(
5386 VkDevice device,
5387 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005388 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005389 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005390 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005391 VkPipeline* pPipelines) {
5392 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005393 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005394 pipelineCacheObject := GetPipelineCache(pipelineCache)
5395 assert(pipelineCacheObject.device == device)
5396 }
5397
Jesse Hall03b6fe12015-11-24 12:44:21 -08005398 createInfos := pCreateInfos[0:createInfoCount]
5399 pipelines := pPipelines[0:createInfoCount]
5400 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005401 pipeline := ?
5402 pipelines[i] = pipeline
5403 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5404 }
5405
5406 return ?
5407}
5408
5409cmd VkResult vkCreateComputePipelines(
5410 VkDevice device,
5411 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005412 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005413 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005414 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005415 VkPipeline* pPipelines) {
5416 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005417 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005418 pipelineCacheObject := GetPipelineCache(pipelineCache)
5419 assert(pipelineCacheObject.device == device)
5420 }
5421
Jesse Hall03b6fe12015-11-24 12:44:21 -08005422 createInfos := pCreateInfos[0:createInfoCount]
5423 pipelines := pPipelines[0:createInfoCount]
5424 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005425 pipeline := ?
5426 pipelines[i] = pipeline
5427 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5428 }
5429
5430 return ?
5431}
5432
5433@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005434cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005435 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005436 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005437 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005438 deviceObject := GetDevice(device)
5439 pipelineObjects := GetPipeline(pipeline)
5440 assert(pipelineObjects.device == device)
5441
5442 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005443}
5444
5445
5446// Pipeline layout functions
5447
5448@threadSafety("system")
5449cmd VkResult vkCreatePipelineLayout(
5450 VkDevice device,
5451 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005452 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005453 VkPipelineLayout* pPipelineLayout) {
5454 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5455 deviceObject := GetDevice(device)
5456
5457 pipelineLayout := ?
5458 pPipelineLayout[0] = pipelineLayout
5459 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5460
5461 return ?
5462}
5463
5464@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005465cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005466 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005467 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005468 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005469 deviceObject := GetDevice(device)
5470 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5471 assert(pipelineLayoutObjects.device == device)
5472
5473 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005474}
5475
5476
5477// Sampler functions
5478
5479@threadSafety("system")
5480cmd VkResult vkCreateSampler(
5481 VkDevice device,
5482 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005483 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005484 VkSampler* pSampler) {
5485 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5486 deviceObject := GetDevice(device)
5487
5488 sampler := ?
5489 pSampler[0] = sampler
5490 State.Samplers[sampler] = new!SamplerObject(device: device)
5491
5492 return ?
5493}
5494
5495@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005496cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005497 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005498 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005499 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005500 deviceObject := GetDevice(device)
5501 samplerObject := GetSampler(sampler)
5502 assert(samplerObject.device == device)
5503
5504 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005505}
5506
5507
5508// Descriptor set functions
5509
5510@threadSafety("system")
5511cmd VkResult vkCreateDescriptorSetLayout(
5512 VkDevice device,
5513 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005514 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005515 VkDescriptorSetLayout* pSetLayout) {
5516 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5517 deviceObject := GetDevice(device)
5518
5519 setLayout := ?
5520 pSetLayout[0] = setLayout
5521 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5522
5523 return ?
5524}
5525
5526@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005527cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005528 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005529 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005530 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005531 deviceObject := GetDevice(device)
5532 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5533 assert(descriptorSetLayoutObject.device == device)
5534
5535 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005536}
5537
5538@threadSafety("system")
5539cmd VkResult vkCreateDescriptorPool(
5540 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005541 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005542 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005543 VkDescriptorPool* pDescriptorPool) {
5544 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5545 deviceObject := GetDevice(device)
5546
5547 descriptorPool := ?
5548 pDescriptorPool[0] = descriptorPool
5549 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5550
5551 return ?
5552}
5553
5554@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005555cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005556 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005557 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005558 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005559 deviceObject := GetDevice(device)
5560 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5561 assert(descriptorPoolObject.device == device)
5562
5563 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005564}
5565
5566@threadSafety("app")
5567cmd VkResult vkResetDescriptorPool(
5568 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005569 VkDescriptorPool descriptorPool,
5570 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005571 deviceObject := GetDevice(device)
5572 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5573 assert(descriptorPoolObject.device == device)
5574
5575 return ?
5576}
5577
5578@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005579cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005580 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005581 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005582 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005583 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005584 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005585 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005586
Jesse Hall03b6fe12015-11-24 12:44:21 -08005587 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5588 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005589 setLayout := setLayouts[i]
5590 setLayoutObject := GetDescriptorSetLayout(setLayout)
5591 assert(setLayoutObject.device == device)
5592 }
5593
Jesse Hall03b6fe12015-11-24 12:44:21 -08005594 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5595 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005596 descriptorSet := ?
5597 descriptorSets[i] = descriptorSet
5598 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5599 }
5600
5601 return ?
5602}
5603
Jesse Hallf09c6b12015-08-15 19:54:28 -07005604cmd VkResult vkFreeDescriptorSets(
5605 VkDevice device,
5606 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005607 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005608 const VkDescriptorSet* pDescriptorSets) {
5609 deviceObject := GetDevice(device)
5610 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5611
Jesse Hall03b6fe12015-11-24 12:44:21 -08005612 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5613 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005614 descriptorSet := descriptorSets[i]
5615 descriptorSetObject := GetDescriptorSet(descriptorSet)
5616 assert(descriptorSetObject.device == device)
5617 State.DescriptorSets[descriptorSet] = null
5618 }
5619
5620 return ?
5621}
5622
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005623cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005624 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005625 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005626 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005627 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005628 const VkCopyDescriptorSet* pDescriptorCopies) {
5629 deviceObject := GetDevice(device)
5630
Jesse Hallb00daad2015-11-29 19:46:20 -08005631 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5632 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005633 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005634 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005635 assert(descriptorWriteObject.device == device)
5636 }
5637
Jesse Hallb00daad2015-11-29 19:46:20 -08005638 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5639 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005640 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005641 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005642 assert(descriptorCopyObject.device == device)
5643 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005644}
5645
5646
5647// Framebuffer functions
5648
5649@threadSafety("system")
5650cmd VkResult vkCreateFramebuffer(
5651 VkDevice device,
5652 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005653 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005654 VkFramebuffer* pFramebuffer) {
5655 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5656 deviceObject := GetDevice(device)
5657
5658 framebuffer := ?
5659 pFramebuffer[0] = framebuffer
5660 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5661
5662 return ?
5663}
5664
5665@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005666cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005667 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005668 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005669 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005670 deviceObject := GetDevice(device)
5671 framebufferObject := GetFramebuffer(framebuffer)
5672 assert(framebufferObject.device == device)
5673
5674 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005675}
5676
5677
5678// Renderpass functions
5679
5680@threadSafety("system")
5681cmd VkResult vkCreateRenderPass(
5682 VkDevice device,
5683 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005684 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005685 VkRenderPass* pRenderPass) {
5686 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5687 deviceObject := GetDevice(device)
5688
5689 renderpass := ?
5690 pRenderPass[0] = renderpass
5691 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5692
5693 return ?
5694}
5695
5696@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005697cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005698 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005699 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005700 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005701 deviceObject := GetDevice(device)
5702 renderPassObject := GetRenderPass(renderPass)
5703 assert(renderPassObject.device == device)
5704
5705 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005706}
5707
Jesse Hall606a54e2015-11-19 22:17:28 -08005708cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005709 VkDevice device,
5710 VkRenderPass renderPass,
5711 VkExtent2D* pGranularity) {
5712 deviceObject := GetDevice(device)
5713 renderPassObject := GetRenderPass(renderPass)
5714
5715 granularity := ?
5716 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005717}
5718
5719// Command pool functions
5720
5721cmd VkResult vkCreateCommandPool(
5722 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005723 const VkCommandPoolCreateInfo* pCreateInfo,
5724 const VkAllocationCallbacks* pAllocator,
5725 VkCommandPool* pCommandPool) {
5726 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005727 deviceObject := GetDevice(device)
5728
Jesse Hall3fbc8562015-11-29 22:10:52 -08005729 commandPool := ?
5730 pCommandPool[0] = commandPool
5731 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005732
5733 return ?
5734}
5735
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005736cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005737 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005738 VkCommandPool commandPool,
5739 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005740 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005741 commandPoolObject := GetCommandPool(commandPool)
5742 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005743
Jesse Hall3fbc8562015-11-29 22:10:52 -08005744 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005745}
5746
5747cmd VkResult vkResetCommandPool(
5748 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005749 VkCommandPool commandPool,
5750 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005751 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005752 commandPoolObject := GetCommandPool(commandPool)
5753 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005754
5755 return ?
5756}
5757
5758// Command buffer functions
5759
Jesse Hall3fbc8562015-11-29 22:10:52 -08005760macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5761 memoryObject := GetDeviceMemory(memory)
5762 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005763
Jesse Hall3fbc8562015-11-29 22:10:52 -08005764 commandBufferObject := GetCommandBuffer(commandBuffer)
5765 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005766}
5767
Jesse Hall3fbc8562015-11-29 22:10:52 -08005768macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5769 memoryObject := GetDeviceMemory(memory)
5770 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005771
Jesse Hall3fbc8562015-11-29 22:10:52 -08005772 commandBufferObject := GetCommandBuffer(commandBuffer)
5773 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005774}
5775
5776@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005777cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005778 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005779 const VkCommandBufferAllocateInfo* pAllocateInfo,
5780 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005781 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005782
Jesse Hall3dd678a2016-01-08 21:52:01 -08005783 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005784 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005785 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005786 commandBuffer := ?
5787 commandBuffers[i] = commandBuffer
5788 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005789 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005790
5791 return ?
5792}
5793
5794@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005795cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005796 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005797 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005798 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005799 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005800 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005801
Jesse Hall3fbc8562015-11-29 22:10:52 -08005802 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005803 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005804 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5805 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005806 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005807 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005808 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005809}
5810
5811@threadSafety("app")
5812cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005813 VkCommandBuffer commandBuffer,
5814 const VkCommandBufferBeginInfo* pBeginInfo) {
5815 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5816 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005817
5818 // TODO: iterate over boundObjects and clear memory bindings
5819
5820 return ?
5821}
5822
5823@threadSafety("app")
5824cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005825 VkCommandBuffer commandBuffer) {
5826 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005827
5828 return ?
5829}
5830
5831@threadSafety("app")
5832cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005833 VkCommandBuffer commandBuffer,
5834 VkCommandBufferResetFlags flags) {
5835 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005836
5837 // TODO: iterate over boundObjects and clear memory bindings
5838
5839 return ?
5840}
5841
5842
5843// Command buffer building functions
5844
5845@threadSafety("app")
5846cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005847 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005848 VkPipelineBindPoint pipelineBindPoint,
5849 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005850 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005851 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005852 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005853
Jesse Halld8bade02015-11-24 10:24:18 -08005854 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005855 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5856 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5857 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005858 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005859}
5860
5861@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005862cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005863 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005864 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005865 u32 viewportCount,
5866 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005867 commandBufferObject := GetCommandBuffer(commandBuffer)
5868 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005869}
5870
5871@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005872cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005873 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005874 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005875 u32 scissorCount,
5876 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005877 commandBufferObject := GetCommandBuffer(commandBuffer)
5878 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005879}
5880
5881@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005882cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005883 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005884 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005885 commandBufferObject := GetCommandBuffer(commandBuffer)
5886 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005887}
5888
5889@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005890cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005891 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005892 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005893 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005894 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005895 commandBufferObject := GetCommandBuffer(commandBuffer)
5896 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005897}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005898
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005899@threadSafety("app")
5900cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005901 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005902 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5903 // an annotation as a quick hack to pass this to the template without
5904 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005905 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005906 commandBufferObject := GetCommandBuffer(commandBuffer)
5907 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005908}
5909
5910@threadSafety("app")
5911cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005912 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005913 f32 minDepthBounds,
5914 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005915 commandBufferObject := GetCommandBuffer(commandBuffer)
5916 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005917}
5918
5919@threadSafety("app")
5920cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005921 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005922 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005923 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005924 commandBufferObject := GetCommandBuffer(commandBuffer)
5925 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005926}
5927
5928@threadSafety("app")
5929cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005930 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005931 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005932 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005933 commandBufferObject := GetCommandBuffer(commandBuffer)
5934 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005935}
5936
5937@threadSafety("app")
5938cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005939 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005940 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005941 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005942 commandBufferObject := GetCommandBuffer(commandBuffer)
5943 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005944}
5945
5946@threadSafety("app")
5947cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005948 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005949 VkPipelineBindPoint pipelineBindPoint,
5950 VkPipelineLayout layout,
5951 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005952 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005953 const VkDescriptorSet* pDescriptorSets,
5954 u32 dynamicOffsetCount,
5955 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005956 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005957
Jesse Hall03b6fe12015-11-24 12:44:21 -08005958 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5959 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005960 descriptorSet := descriptorSets[i]
5961 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005962 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005963 }
5964
5965 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5966 for i in (0 .. dynamicOffsetCount) {
5967 dynamicOffset := dynamicOffsets[i]
5968 }
5969
Jesse Halld8bade02015-11-24 10:24:18 -08005970 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005971 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5972 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5973 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005974 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005975}
5976
5977@threadSafety("app")
5978cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005979 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005980 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005981 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005982 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005983 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005984 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005985 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005986
Jesse Hall3fbc8562015-11-29 22:10:52 -08005987 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005988
Jesse Hall3fbc8562015-11-29 22:10:52 -08005989 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005990}
5991
5992@threadSafety("app")
5993cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005994 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005995 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005996 u32 bindingCount,
5997 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005998 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005999 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006000
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006001 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07006002 buffers := pBuffers[0:bindingCount]
6003 offsets := pOffsets[0:bindingCount]
6004 for i in (0 .. bindingCount) {
6005 buffer := buffers[i]
6006 offset := offsets[i]
6007 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006008 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006009
Jesse Hall3fbc8562015-11-29 22:10:52 -08006010 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006011 }
6012
Jesse Hall3fbc8562015-11-29 22:10:52 -08006013 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006014}
6015
6016@threadSafety("app")
6017cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006018 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006019 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006020 u32 instanceCount,
6021 u32 firstVertex,
6022 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006023 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006024
Jesse Hall3fbc8562015-11-29 22:10:52 -08006025 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006026}
6027
6028@threadSafety("app")
6029cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006030 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006031 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006032 u32 instanceCount,
6033 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006034 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006035 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006036 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006037
Jesse Hall3fbc8562015-11-29 22:10:52 -08006038 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006039}
6040
6041@threadSafety("app")
6042cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006043 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006044 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006045 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006046 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006047 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006048 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006049 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006050 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006051
Jesse Hall3fbc8562015-11-29 22:10:52 -08006052 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006053
Jesse Hall3fbc8562015-11-29 22:10:52 -08006054 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006055}
6056
6057@threadSafety("app")
6058cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006059 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006060 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006061 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006062 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006063 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006064 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006065 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006066 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006067
Jesse Hall3fbc8562015-11-29 22:10:52 -08006068 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006069
Jesse Hall3fbc8562015-11-29 22:10:52 -08006070 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006071}
6072
6073@threadSafety("app")
6074cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006075 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08006076 u32 groupCountX,
6077 u32 groupCountY,
6078 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006079 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006080
Jesse Hall3fbc8562015-11-29 22:10:52 -08006081 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006082}
6083
6084@threadSafety("app")
6085cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006086 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006087 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006088 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006089 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006090 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006091 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006092
Jesse Hall3fbc8562015-11-29 22:10:52 -08006093 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006094
Jesse Hall3fbc8562015-11-29 22:10:52 -08006095 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006096}
6097
6098@threadSafety("app")
6099cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006100 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006101 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006102 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006103 u32 regionCount,
6104 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006105 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006106 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006107 dstBufferObject := GetBuffer(dstBuffer)
6108 assert(commandBufferObject.device == srcBufferObject.device)
6109 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006110
6111 regions := pRegions[0:regionCount]
6112 for i in (0 .. regionCount) {
6113 region := regions[i]
6114 }
6115
Jesse Hall3fbc8562015-11-29 22:10:52 -08006116 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6117 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006118
Jesse Hall65ab5522015-11-30 00:07:16 -08006119 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006120}
6121
6122@threadSafety("app")
6123cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006124 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006125 VkImage srcImage,
6126 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006127 VkImage dstImage,
6128 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006129 u32 regionCount,
6130 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006131 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006132 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006133 dstImageObject := GetImage(dstImage)
6134 assert(commandBufferObject.device == srcImageObject.device)
6135 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006136
6137 regions := pRegions[0:regionCount]
6138 for i in (0 .. regionCount) {
6139 region := regions[i]
6140 }
6141
Jesse Hall3fbc8562015-11-29 22:10:52 -08006142 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6143 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006144
Jesse Hall65ab5522015-11-30 00:07:16 -08006145 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006146}
6147
6148@threadSafety("app")
6149cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006150 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006151 VkImage srcImage,
6152 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006153 VkImage dstImage,
6154 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006155 u32 regionCount,
6156 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006157 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006158 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006159 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006160 dstImageObject := GetImage(dstImage)
6161 assert(commandBufferObject.device == srcImageObject.device)
6162 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006163
6164 regions := pRegions[0:regionCount]
6165 for i in (0 .. regionCount) {
6166 region := regions[i]
6167 }
6168
Jesse Hall3fbc8562015-11-29 22:10:52 -08006169 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6170 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006171
Jesse Hall3fbc8562015-11-29 22:10:52 -08006172 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006173}
6174
6175@threadSafety("app")
6176cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006177 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006178 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006179 VkImage dstImage,
6180 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006181 u32 regionCount,
6182 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006183 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006184 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006185 dstImageObject := GetImage(dstImage)
6186 assert(commandBufferObject.device == srcBufferObject.device)
6187 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006188
6189 regions := pRegions[0:regionCount]
6190 for i in (0 .. regionCount) {
6191 region := regions[i]
6192 }
6193
Jesse Hall3fbc8562015-11-29 22:10:52 -08006194 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6195 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006196
Jesse Hall65ab5522015-11-30 00:07:16 -08006197 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006198}
6199
6200@threadSafety("app")
6201cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006202 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006203 VkImage srcImage,
6204 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006205 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006206 u32 regionCount,
6207 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006208 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006209 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006210 dstBufferObject := GetBuffer(dstBuffer)
6211 assert(commandBufferObject.device == srcImageObject.device)
6212 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006213
6214 regions := pRegions[0:regionCount]
6215 for i in (0 .. regionCount) {
6216 region := regions[i]
6217 }
6218
Jesse Hall3fbc8562015-11-29 22:10:52 -08006219 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6220 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006221
Jesse Hall65ab5522015-11-30 00:07:16 -08006222 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006223}
6224
6225@threadSafety("app")
6226cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006227 VkCommandBuffer commandBuffer,
6228 VkBuffer dstBuffer,
6229 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006230 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006231 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006232 commandBufferObject := GetCommandBuffer(commandBuffer)
6233 dstBufferObject := GetBuffer(dstBuffer)
6234 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006235
6236 data := pData[0:dataSize]
6237
Jesse Hall3fbc8562015-11-29 22:10:52 -08006238 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006239
Jesse Hall65ab5522015-11-30 00:07:16 -08006240 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006241}
6242
6243@threadSafety("app")
6244cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006245 VkCommandBuffer commandBuffer,
6246 VkBuffer dstBuffer,
6247 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006248 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006249 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006250 commandBufferObject := GetCommandBuffer(commandBuffer)
6251 dstBufferObject := GetBuffer(dstBuffer)
6252 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006253
Jesse Hall65ab5522015-11-30 00:07:16 -08006254 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006255}
6256
6257@threadSafety("app")
6258cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006259 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006260 VkImage image,
6261 VkImageLayout imageLayout,
6262 const VkClearColorValue* pColor,
6263 u32 rangeCount,
6264 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006265 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006266 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006267 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006268
6269 ranges := pRanges[0:rangeCount]
6270 for i in (0 .. rangeCount) {
6271 range := ranges[i]
6272 }
6273
Jesse Hall3fbc8562015-11-29 22:10:52 -08006274 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006275
Jesse Hall3fbc8562015-11-29 22:10:52 -08006276 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006277}
6278
6279@threadSafety("app")
6280cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006281 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006282 VkImage image,
6283 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006284 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006285 u32 rangeCount,
6286 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006287 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006288 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006289 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006290
6291 ranges := pRanges[0:rangeCount]
6292 for i in (0 .. rangeCount) {
6293 range := ranges[i]
6294 }
6295
Jesse Hall3fbc8562015-11-29 22:10:52 -08006296 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006297
Jesse Hall3fbc8562015-11-29 22:10:52 -08006298 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006299}
6300
6301@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006302cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006303 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006304 u32 attachmentCount,
6305 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006306 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006307 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006308 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006309
6310 rects := pRects[0:rectCount]
6311 for i in (0 .. rectCount) {
6312 rect := rects[i]
6313 }
6314
Jesse Hall3fbc8562015-11-29 22:10:52 -08006315 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006316}
6317
6318@threadSafety("app")
6319cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006320 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006321 VkImage srcImage,
6322 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006323 VkImage dstImage,
6324 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006325 u32 regionCount,
6326 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006327 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006328 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006329 dstImageObject := GetImage(dstImage)
6330 assert(commandBufferObject.device == srcImageObject.device)
6331 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006332
6333 regions := pRegions[0:regionCount]
6334 for i in (0 .. regionCount) {
6335 region := regions[i]
6336 }
6337
Jesse Hall3fbc8562015-11-29 22:10:52 -08006338 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6339 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006340
Jesse Hall3fbc8562015-11-29 22:10:52 -08006341 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006342}
6343
6344@threadSafety("app")
6345cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006346 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006347 VkEvent event,
6348 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006349 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006350 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006351 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006352}
6353
6354@threadSafety("app")
6355cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006356 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006357 VkEvent event,
6358 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006359 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006360 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006361 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006362}
6363
6364@threadSafety("app")
6365cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006366 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006367 u32 eventCount,
6368 const VkEvent* pEvents,
6369 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006370 VkPipelineStageFlags dstStageMask,
6371 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006372 const VkMemoryBarrier* pMemoryBarriers,
6373 u32 bufferMemoryBarrierCount,
6374 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6375 u32 imageMemoryBarrierCount,
6376 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006377 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006378
6379 events := pEvents[0:eventCount]
6380 for i in (0 .. eventCount) {
6381 event := events[i]
6382 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006383 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006384 }
6385
Jesse Hall3dd678a2016-01-08 21:52:01 -08006386 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006387 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006388 memoryBarrier := memoryBarriers[i]
6389 }
6390 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6391 for i in (0 .. bufferMemoryBarrierCount) {
6392 bufferMemoryBarrier := bufferMemoryBarriers[i]
6393 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6394 assert(bufferObject.device == commandBufferObject.device)
6395 }
6396 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6397 for i in (0 .. imageMemoryBarrierCount) {
6398 imageMemoryBarrier := imageMemoryBarriers[i]
6399 imageObject := GetImage(imageMemoryBarrier.image)
6400 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006401 }
6402}
6403
6404@threadSafety("app")
6405cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006406 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006407 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006408 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006409 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006410 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006411 const VkMemoryBarrier* pMemoryBarriers,
6412 u32 bufferMemoryBarrierCount,
6413 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6414 u32 imageMemoryBarrierCount,
6415 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006416 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006417
Jesse Hall3dd678a2016-01-08 21:52:01 -08006418 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006419 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006420 memoryBarrier := memoryBarriers[i]
6421 }
6422 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6423 for i in (0 .. bufferMemoryBarrierCount) {
6424 bufferMemoryBarrier := bufferMemoryBarriers[i]
6425 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6426 assert(bufferObject.device == commandBufferObject.device)
6427 }
6428 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6429 for i in (0 .. imageMemoryBarrierCount) {
6430 imageMemoryBarrier := imageMemoryBarriers[i]
6431 imageObject := GetImage(imageMemoryBarrier.image)
6432 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006433 }
6434}
6435
6436@threadSafety("app")
6437cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006438 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006439 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006440 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006441 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006442 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006443 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006444 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006445}
6446
6447@threadSafety("app")
6448cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006449 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006450 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006451 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006452 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006453 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006454 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006455}
6456
6457@threadSafety("app")
6458cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006459 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006460 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006461 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006462 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006463 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006464 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006465 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006466}
6467
6468@threadSafety("app")
6469cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006470 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006471 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006472 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006473 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006474 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006475 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006476 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006477}
6478
6479@threadSafety("app")
6480cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006481 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006482 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006483 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006484 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006485 VkBuffer dstBuffer,
6486 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006487 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006488 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006489 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006490 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006491 dstBufferObject := GetBuffer(dstBuffer)
6492 assert(commandBufferObject.device == queryPoolObject.device)
6493 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006494}
6495
6496cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006497 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006498 VkPipelineLayout layout,
6499 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006500 u32 offset,
6501 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006502 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006503 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006504 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006505 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006506}
6507
6508@threadSafety("app")
6509cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006510 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006511 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006512 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006513 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006514 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6515 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006516 assert(commandBufferObject.device == renderPassObject.device)
6517 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006518
Jesse Hall3fbc8562015-11-29 22:10:52 -08006519 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006520}
6521
6522cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006523 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006524 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006525 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006526}
6527
6528@threadSafety("app")
6529cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006530 VkCommandBuffer commandBuffer) {
6531 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006532
Jesse Hall3fbc8562015-11-29 22:10:52 -08006533 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006534}
6535
6536cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006537 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006538 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006539 const VkCommandBuffer* pCommandBuffers) {
6540 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006541
Jesse Hall3dd678a2016-01-08 21:52:01 -08006542 commandBuffers := pCommandBuffers[0:commandBufferCount]
6543 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006544 secondaryCommandBuffer := commandBuffers[i]
6545 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6546 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006547 }
6548}
6549
Jesse Hallad250842017-03-10 18:35:38 -08006550@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006551cmd void vkDestroySurfaceKHR(
6552 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006553 VkSurfaceKHR surface,
6554 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006555 instanceObject := GetInstance(instance)
6556 surfaceObject := GetSurface(surface)
6557 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006558
Jesse Hall1356b0d2015-11-23 17:24:58 -08006559 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006560}
6561
Jesse Hallad250842017-03-10 18:35:38 -08006562@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006563cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006564 VkPhysicalDevice physicalDevice,
6565 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006566 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006567 VkBool32* pSupported) {
6568 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006569
6570 return ?
6571}
6572
Jesse Hallad250842017-03-10 18:35:38 -08006573@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006574cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6575 VkPhysicalDevice physicalDevice,
6576 VkSurfaceKHR surface,
6577 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6578 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6579
6580 surfaceCapabilities := ?
6581 pSurfaceCapabilities[0] = surfaceCapabilities
6582
6583 return ?
6584}
6585
Jesse Hallad250842017-03-10 18:35:38 -08006586@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006587cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6588 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006589 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006590 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006591 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006592 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006593
6594 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006595 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006596 surfaceFormats := pSurfaceFormats[0:count]
6597
6598 for i in (0 .. count) {
6599 surfaceFormat := ?
6600 surfaceFormats[i] = surfaceFormat
6601 }
6602
6603 return ?
6604}
6605
Jesse Hallad250842017-03-10 18:35:38 -08006606@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006607cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6608 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006609 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006610 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006611 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006612 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006613
6614 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006615 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006616 presentModes := pPresentModes[0:count]
6617
6618 for i in (0 .. count) {
6619 presentMode := ?
6620 presentModes[i] = presentMode
6621 }
6622
6623 return ?
6624}
6625
Jesse Hallad250842017-03-10 18:35:38 -08006626@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006627cmd VkResult vkCreateSwapchainKHR(
6628 VkDevice device,
6629 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006630 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006631 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006632 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006633 deviceObject := GetDevice(device)
6634
6635 swapchain := ?
6636 pSwapchain[0] = swapchain
6637 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6638
6639 return ?
6640}
6641
Jesse Hallad250842017-03-10 18:35:38 -08006642@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006643cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006644 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006645 VkSwapchainKHR swapchain,
6646 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006647 deviceObject := GetDevice(device)
6648 swapchainObject := GetSwapchain(swapchain)
6649 assert(swapchainObject.device == device)
6650
6651 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006652}
6653
Jesse Hallad250842017-03-10 18:35:38 -08006654@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006655cmd VkResult vkGetSwapchainImagesKHR(
6656 VkDevice device,
6657 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006658 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006659 VkImage* pSwapchainImages) {
6660 deviceObject := GetDevice(device)
6661
6662 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006663 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006664 swapchainImages := pSwapchainImages[0:count]
6665
6666 for i in (0 .. count) {
6667 swapchainImage := ?
6668 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006669 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006670 }
6671
6672 return ?
6673}
6674
Jesse Hallad250842017-03-10 18:35:38 -08006675@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006676cmd VkResult vkAcquireNextImageKHR(
6677 VkDevice device,
6678 VkSwapchainKHR swapchain,
6679 u64 timeout,
6680 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006681 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006682 u32* pImageIndex) {
6683 deviceObject := GetDevice(device)
6684 swapchainObject := GetSwapchain(swapchain)
6685
6686 imageIndex := ?
6687 pImageIndex[0] = imageIndex
6688
6689 return ?
6690}
6691
Jesse Hallad250842017-03-10 18:35:38 -08006692@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006693cmd VkResult vkQueuePresentKHR(
6694 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006695 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006696 queueObject := GetQueue(queue)
6697
6698 presentInfo := ?
6699 pPresentInfo[0] = presentInfo
6700
6701 return ?
6702}
6703
Jesse Hallad250842017-03-10 18:35:38 -08006704@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006705cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6706 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006707 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006708 VkDisplayPropertiesKHR* pProperties) {
6709 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6710 return ?
6711}
6712
Jesse Hallad250842017-03-10 18:35:38 -08006713@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006714cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6715 VkPhysicalDevice physicalDevice,
6716 u32* pPropertyCount,
6717 VkDisplayPlanePropertiesKHR* pProperties) {
6718 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6719 return ?
6720}
6721
Jesse Hallad250842017-03-10 18:35:38 -08006722@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006723cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6724 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006725 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006726 u32* pDisplayCount,
6727 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006728 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6729 return ?
6730}
6731
Jesse Hallad250842017-03-10 18:35:38 -08006732@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006733cmd VkResult vkGetDisplayModePropertiesKHR(
6734 VkPhysicalDevice physicalDevice,
6735 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006736 u32* pPropertyCount,
6737 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006738 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6739 return ?
6740}
6741
Jesse Hallad250842017-03-10 18:35:38 -08006742@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006743cmd VkResult vkCreateDisplayModeKHR(
6744 VkPhysicalDevice physicalDevice,
6745 VkDisplayKHR display,
6746 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006747 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006748 VkDisplayModeKHR* pMode) {
6749 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6750 return ?
6751}
6752
Jesse Hallad250842017-03-10 18:35:38 -08006753@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006754cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006755 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006756 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006757 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006758 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006759 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6760 return ?
6761}
6762
Jesse Hallad250842017-03-10 18:35:38 -08006763@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006764cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6765 VkInstance instance,
6766 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006767 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006768 VkSurfaceKHR* pSurface) {
6769 return ?
6770}
6771
Jesse Hallad250842017-03-10 18:35:38 -08006772@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006773cmd VkResult vkCreateSharedSwapchainsKHR(
6774 VkDevice device,
6775 u32 swapchainCount,
6776 const VkSwapchainCreateInfoKHR* pCreateInfos,
6777 const VkAllocationCallbacks* pAllocator,
6778 VkSwapchainKHR* pSwapchains) {
6779 return ?
6780}
6781
Jesse Hallad250842017-03-10 18:35:38 -08006782@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006783cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006784 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006785 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006786 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006787 VkSurfaceKHR* pSurface) {
6788 instanceObject := GetInstance(instance)
6789 return ?
6790}
6791
Jesse Hallad250842017-03-10 18:35:38 -08006792@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006793cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6794 VkPhysicalDevice physicalDevice,
6795 u32 queueFamilyIndex,
6796 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006797 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006798 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6799 return ?
6800}
6801
Jesse Hallad250842017-03-10 18:35:38 -08006802@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006803cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006804 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006805 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006806 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006807 VkSurfaceKHR* pSurface) {
6808 instanceObject := GetInstance(instance)
6809 return ?
6810}
6811
Jesse Hallad250842017-03-10 18:35:38 -08006812@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006813cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6814 VkPhysicalDevice physicalDevice,
6815 u32 queueFamilyIndex,
6816 platform.xcb_connection_t* connection,
6817 platform.xcb_visualid_t visual_id) {
6818 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6819 return ?
6820}
6821
Jesse Hallad250842017-03-10 18:35:38 -08006822@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006823cmd VkResult vkCreateWaylandSurfaceKHR(
6824 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006825 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006826 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006827 VkSurfaceKHR* pSurface) {
6828 instanceObject := GetInstance(instance)
6829 return ?
6830}
6831
Jesse Hallad250842017-03-10 18:35:38 -08006832@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006833cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6834 VkPhysicalDevice physicalDevice,
6835 u32 queueFamilyIndex,
6836 platform.wl_display* display) {
6837 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6838 return ?
6839}
6840
Jesse Hallad250842017-03-10 18:35:38 -08006841@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006842cmd VkResult vkCreateMirSurfaceKHR(
6843 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006844 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006845 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006846 VkSurfaceKHR* pSurface) {
6847 instanceObject := GetInstance(instance)
6848 return ?
6849}
6850
Jesse Hallad250842017-03-10 18:35:38 -08006851@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006852cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6853 VkPhysicalDevice physicalDevice,
6854 u32 queueFamilyIndex,
6855 platform.MirConnection* connection) {
6856 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6857 return ?
6858}
6859
Jesse Hallad250842017-03-10 18:35:38 -08006860@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006861cmd VkResult vkCreateAndroidSurfaceKHR(
6862 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006863 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006864 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006865 VkSurfaceKHR* pSurface) {
6866 instanceObject := GetInstance(instance)
6867 return ?
6868}
6869
Jesse Hallad250842017-03-10 18:35:38 -08006870@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006871cmd VkResult vkCreateWin32SurfaceKHR(
6872 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006873 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006874 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006875 VkSurfaceKHR* pSurface) {
6876 instanceObject := GetInstance(instance)
6877 return ?
6878}
6879
Jesse Hallad250842017-03-10 18:35:38 -08006880@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006881cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6882 VkPhysicalDevice physicalDevice,
6883 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006884 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006885 return ?
6886}
6887
Jesse Hallad250842017-03-10 18:35:38 -08006888@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006889@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08006890cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6891 VkDevice device,
6892 VkFormat format,
6893 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006894 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08006895 return ?
6896}
6897
Jesse Hallad250842017-03-10 18:35:38 -08006898@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006899@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13006900cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
6901 VkDevice device,
6902 VkFormat format,
6903 VkImageUsageFlags imageUsage,
6904 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006905 u64* grallocConsumerUsage,
6906 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13006907 return ?
6908}
6909
Jesse Hallad250842017-03-10 18:35:38 -08006910@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006911cmd VkResult vkAcquireImageANDROID(
6912 VkDevice device,
6913 VkImage image,
6914 int nativeFenceFd,
6915 VkSemaphore semaphore,
6916 VkFence fence) {
6917 return ?
6918}
6919
Jesse Hallad250842017-03-10 18:35:38 -08006920@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006921cmd VkResult vkQueueSignalReleaseImageANDROID(
6922 VkQueue queue,
6923 u32 waitSemaphoreCount,
6924 const VkSemaphore* pWaitSemaphores,
6925 VkImage image,
6926 int* pNativeFenceFd) {
6927 return ?
6928}
6929
Jesse Hallad250842017-03-10 18:35:38 -08006930@extension("VK_EXT_debug_report") // 12
6931@external type void* PFN_vkDebugReportCallbackEXT
6932@extension("VK_EXT_debug_report") // 12
6933@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6934 VkDebugReportFlagsEXT flags,
6935 VkDebugReportObjectTypeEXT objectType,
6936 u64 object,
6937 platform.size_t location,
6938 s32 messageCode,
6939 const char* pLayerPrefix,
6940 const char* pMessage,
6941 void* pUserData) {
6942 return ?
6943}
6944
6945@extension("VK_EXT_debug_report") // 12
6946cmd VkResult vkCreateDebugReportCallbackEXT(
6947 VkInstance instance,
6948 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6949 const VkAllocationCallbacks* pAllocator,
6950 VkDebugReportCallbackEXT* pCallback) {
6951 return ?
6952}
6953
6954@extension("VK_EXT_debug_report") // 12
6955cmd void vkDestroyDebugReportCallbackEXT(
6956 VkInstance instance,
6957 VkDebugReportCallbackEXT callback,
6958 const VkAllocationCallbacks* pAllocator) {
6959}
6960
6961@extension("VK_EXT_debug_report") // 12
6962cmd void vkDebugReportMessageEXT(
6963 VkInstance instance,
6964 VkDebugReportFlagsEXT flags,
6965 VkDebugReportObjectTypeEXT objectType,
6966 u64 object,
6967 platform.size_t location,
6968 s32 messageCode,
6969 const char* pLayerPrefix,
6970 const char* pMessage) {
6971}
6972
6973@extension("VK_EXT_debug_marker") // 23
6974cmd VkResult vkDebugMarkerSetObjectTagEXT(
6975 VkDevice device,
6976 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6977 return ?
6978}
6979
6980@extension("VK_EXT_debug_marker") // 23
6981cmd VkResult vkDebugMarkerSetObjectNameEXT(
6982 VkDevice device,
6983 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6984 return ?
6985}
6986
6987@extension("VK_EXT_debug_marker") // 23
6988cmd void vkCmdDebugMarkerBeginEXT(
6989 VkCommandBuffer commandBuffer,
6990 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6991}
6992
6993@extension("VK_EXT_debug_marker") // 23
6994cmd void vkCmdDebugMarkerEndEXT(
6995 VkCommandBuffer commandBuffer) {
6996}
6997
6998@extension("VK_EXT_debug_marker") // 23
6999cmd void vkCmdDebugMarkerInsertEXT(
7000 VkCommandBuffer commandBuffer,
7001 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
7002}
7003
7004@extension("VK_AMD_draw_indirect_count") // 34
7005cmd void vkCmdDrawIndirectCountAMD(
7006 VkCommandBuffer commandBuffer,
7007 VkBuffer buffer,
7008 VkDeviceSize offset,
7009 VkBuffer countBuffer,
7010 VkDeviceSize countBufferOffset,
7011 u32 maxDrawCount,
7012 u32 stride) {
7013}
7014
7015@extension("VK_AMD_draw_indirect_count") // 34
7016cmd void vkCmdDrawIndexedIndirectCountAMD(
7017 VkCommandBuffer commandBuffer,
7018 VkBuffer buffer,
7019 VkDeviceSize offset,
7020 VkBuffer countBuffer,
7021 VkDeviceSize countBufferOffset,
7022 u32 maxDrawCount,
7023 u32 stride) {
7024}
7025
7026@extension("VK_NV_external_memory_capabilities") // 56
7027cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
7028 VkPhysicalDevice physicalDevice,
7029 VkFormat format,
7030 VkImageType type,
7031 VkImageTiling tiling,
7032 VkImageUsageFlags usage,
7033 VkImageCreateFlags flags,
7034 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
7035 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
7036 return ?
7037}
7038
7039@extension("VK_NV_external_memory_win32") // 58
7040cmd VkResult vkGetMemoryWin32HandleNV(
7041 VkDevice device,
7042 VkDeviceMemory memory,
7043 VkExternalMemoryHandleTypeFlagsNV handleType,
7044 platform.HANDLE* pHandle) {
7045 return ?
7046}
7047
7048@extension("VK_KHR_get_physical_device_properties2") // 60
7049cmd void vkGetPhysicalDeviceFeatures2KHR(
7050 VkPhysicalDevice physicalDevice,
7051 VkPhysicalDeviceFeatures2KHR* pFeatures) {
7052}
7053
7054@extension("VK_KHR_get_physical_device_properties2") // 60
7055cmd void vkGetPhysicalDeviceProperties2KHR(
7056 VkPhysicalDevice physicalDevice,
7057 VkPhysicalDeviceProperties2KHR* pProperties) {
7058}
7059
7060@extension("VK_KHR_get_physical_device_properties2") // 60
7061cmd void vkGetPhysicalDeviceFormatProperties2KHR(
7062 VkPhysicalDevice physicalDevice,
7063 VkFormat format,
7064 VkFormatProperties2KHR* pFormatProperties) {
7065}
7066
7067@extension("VK_KHR_get_physical_device_properties2") // 60
7068cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
7069 VkPhysicalDevice physicalDevice,
7070 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
7071 VkImageFormatProperties2KHR* pImageFormatProperties) {
7072 return ?
7073}
7074
7075@extension("VK_KHR_get_physical_device_properties2") // 60
7076cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
7077 VkPhysicalDevice physicalDevice,
7078 u32* pQueueFamilyPropertyCount,
7079 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
7080}
7081
7082@extension("VK_KHR_get_physical_device_properties2") // 60
7083cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
7084 VkPhysicalDevice physicalDevice,
7085 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
7086}
7087
7088@extension("VK_KHR_get_physical_device_properties2") // 60
7089cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
7090 VkPhysicalDevice physicalDevice,
7091 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7092 u32* pPropertyCount,
7093 VkSparseImageFormatProperties2KHR* pProperties) {
7094}
7095
7096@extension("VK_KHX_device_group") // 61
7097cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7098 VkDevice device,
7099 u32 heapIndex,
7100 u32 localDeviceIndex,
7101 u32 remoteDeviceIndex,
7102 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7103}
7104
7105@extension("VK_KHX_device_group") // 61
7106cmd VkResult vkBindBufferMemory2KHX(
7107 VkDevice device,
7108 u32 bindInfoCount,
7109 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7110 return ?
7111}
7112
7113@extension("VK_KHX_device_group") // 61
7114cmd VkResult vkBindImageMemory2KHX(
7115 VkDevice device,
7116 u32 bindInfoCount,
7117 const VkBindImageMemoryInfoKHX* pBindInfos) {
7118 return ?
7119}
7120
7121@extension("VK_KHX_device_group") // 61
7122cmd void vkCmdSetDeviceMaskKHX(
7123 VkCommandBuffer commandBuffer,
7124 u32 deviceMask) {
7125}
7126
7127@extension("VK_KHX_device_group") // 61
7128cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7129 VkDevice device,
7130 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7131 return ?
7132}
7133
7134@extension("VK_KHX_device_group") // 61
7135cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7136 VkDevice device,
7137 VkSurfaceKHR surface,
7138 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7139 return ?
7140}
7141
7142@extension("VK_KHX_device_group") // 61
7143cmd VkResult vkAcquireNextImage2KHX(
7144 VkDevice device,
7145 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7146 u32* pImageIndex) {
7147 return ?
7148}
7149
7150@extension("VK_KHX_device_group") // 61
7151cmd void vkCmdDispatchBaseKHX(
7152 VkCommandBuffer commandBuffer,
7153 u32 baseGroupX,
7154 u32 baseGroupY,
7155 u32 baseGroupZ,
7156 u32 groupCountX,
7157 u32 groupCountY,
7158 u32 groupCountZ) {
7159}
7160
7161@extension("VK_KHX_device_group") // 61
7162cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7163 VkPhysicalDevice physicalDevice,
7164 VkSurfaceKHR surface,
7165 u32* pRectCount,
7166 VkRect2D* pRects) {
7167 return ?
7168}
7169
7170@extension("VK_NN_vi_surface") // 63
7171cmd VkResult vkCreateViSurfaceNN(
7172 VkInstance instance,
7173 const VkViSurfaceCreateInfoNN* pCreateInfo,
7174 const VkAllocationCallbacks* pAllocator,
7175 VkSurfaceKHR* pSurface) {
7176 return ?
7177}
7178
7179@extension("VK_KHR_maintenance1") // 70
7180cmd void vkTrimCommandPoolKHR(
7181 VkDevice device,
7182 VkCommandPool commandPool,
7183 VkCommandPoolTrimFlagsKHR flags) {
7184}
7185
7186@extension("VK_KHX_device_group_creation") // 71
7187cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7188 VkInstance instance,
7189 u32* pPhysicalDeviceGroupCount,
7190 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7191 return ?
7192}
7193
7194@extension("VK_KHX_external_memory_capabilities") // 72
7195cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7196 VkPhysicalDevice physicalDevice,
7197 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7198 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7199}
7200
Jesse Hallad250842017-03-10 18:35:38 -08007201@extension("VK_KHX_external_memory_win32") // 74
7202cmd VkResult vkGetMemoryWin32HandleKHX(
7203 VkDevice device,
7204 VkDeviceMemory memory,
7205 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7206 platform.HANDLE* pHandle) {
7207 return ?
7208}
7209
7210@extension("VK_KHX_external_memory_win32") // 74
7211cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7212 VkDevice device,
7213 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7214 platform.HANDLE handle,
7215 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7216 return ?
7217}
7218
7219@extension("VK_KHX_external_memory_fd") // 75
7220cmd VkResult vkGetMemoryFdKHX(
7221 VkDevice device,
7222 VkDeviceMemory memory,
7223 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7224 s32* pFd) {
7225 return ?
7226}
7227
7228@extension("VK_KHX_external_memory_fd") // 75
7229cmd VkResult vkGetMemoryFdPropertiesKHX(
7230 VkDevice device,
7231 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7232 s32 fd,
7233 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7234 return ?
7235}
7236
7237@extension("VK_KHX_external_semaphore_capabilities") // 77
7238cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7239 VkPhysicalDevice physicalDevice,
7240 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7241 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7242}
7243
7244@extension("VK_KHX_external_semaphore_win32") // 79
7245cmd VkResult vkImportSemaphoreWin32HandleKHX(
7246 VkDevice device,
7247 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7248 return ?
7249}
7250
7251@extension("VK_KHX_external_semaphore_win32") // 79
7252cmd VkResult vkGetSemaphoreWin32HandleKHX(
7253 VkDevice device,
7254 VkSemaphore semaphore,
7255 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7256 platform.HANDLE* pHandle) {
7257 return ?
7258}
7259
7260@extension("VK_KHX_external_semaphore_fd") // 80
7261cmd VkResult vkImportSemaphoreFdKHX(
7262 VkDevice device,
7263 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7264 return ?
7265}
7266
7267@extension("VK_KHX_external_semaphore_fd") // 80
7268cmd VkResult vkGetSemaphoreFdKHX(
7269 VkDevice device,
7270 VkSemaphore semaphore,
7271 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7272 s32* pFd) {
7273 return ?
7274}
7275
7276@extension("VK_KHR_push_descriptor") // 81
7277cmd void vkCmdPushDescriptorSetKHR(
7278 VkCommandBuffer commandBuffer,
7279 VkPipelineBindPoint pipelineBindPoint,
7280 VkPipelineLayout layout,
7281 u32 set,
7282 u32 descriptorWriteCount,
7283 const VkWriteDescriptorSet* pDescriptorWrites) {
7284}
7285
7286@extension("VK_KHR_descriptor_update_template") // 86
7287cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7288 VkDevice device,
7289 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7290 const VkAllocationCallbacks* pAllocator,
7291 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7292 return ?
7293}
7294
7295@extension("VK_KHR_descriptor_update_template") // 86
7296cmd void vkDestroyDescriptorUpdateTemplateKHR(
7297 VkDevice device,
7298 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7299 const VkAllocationCallbacks* pAllocator) {
7300}
7301
7302@extension("VK_KHR_descriptor_update_template") // 86
7303cmd void vkUpdateDescriptorSetWithTemplateKHR(
7304 VkDevice device,
7305 VkDescriptorSet descriptorSet,
7306 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7307 const void* pData) {
7308}
7309
7310@extension("VK_KHR_descriptor_update_template") // 86
7311cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7312 VkCommandBuffer commandBuffer,
7313 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7314 VkPipelineLayout layout,
7315 u32 set,
7316 const void* pData) {
7317}
7318
7319@extension("VK_NVX_device_generated_commands") // 87
7320cmd void vkCmdProcessCommandsNVX(
7321 VkCommandBuffer commandBuffer,
7322 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7323}
7324
7325@extension("VK_NVX_device_generated_commands") // 87
7326cmd void vkCmdReserveSpaceForCommandsNVX(
7327 VkCommandBuffer commandBuffer,
7328 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7329}
7330
7331@extension("VK_NVX_device_generated_commands") // 87
7332cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7333 VkDevice device,
7334 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7335 const VkAllocationCallbacks* pAllocator,
7336 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7337 return ?
7338}
7339
7340@extension("VK_NVX_device_generated_commands") // 87
7341cmd void vkDestroyIndirectCommandsLayoutNVX(
7342 VkDevice device,
7343 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7344 const VkAllocationCallbacks* pAllocator) {
7345}
7346
7347@extension("VK_NVX_device_generated_commands") // 87
7348cmd VkResult vkCreateObjectTableNVX(
7349 VkDevice device,
7350 const VkObjectTableCreateInfoNVX* pCreateInfo,
7351 const VkAllocationCallbacks* pAllocator,
7352 VkObjectTableNVX* pObjectTable) {
7353 return ?
7354}
7355
7356@extension("VK_NVX_device_generated_commands") // 87
7357cmd void vkDestroyObjectTableNVX(
7358 VkDevice device,
7359 VkObjectTableNVX objectTable,
7360 const VkAllocationCallbacks* pAllocator) {
7361}
7362
7363@extension("VK_NVX_device_generated_commands") // 87
7364cmd VkResult vkRegisterObjectsNVX(
7365 VkDevice device,
7366 VkObjectTableNVX objectTable,
7367 u32 objectCount,
7368 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7369 const u32* pObjectIndices) {
7370 return ?
7371}
7372
7373@extension("VK_NVX_device_generated_commands") // 87
7374cmd VkResult vkUnregisterObjectsNVX(
7375 VkDevice device,
7376 VkObjectTableNVX objectTable,
7377 u32 objectCount,
7378 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7379 const u32* pObjectIndices) {
7380 return ?
7381}
7382
7383@extension("VK_NVX_device_generated_commands") // 87
7384cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7385 VkPhysicalDevice physicalDevice,
7386 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7387 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7388}
7389
7390@extension("VK_NV_clip_space_w_scaling") // 88
7391cmd void vkCmdSetViewportWScalingNV(
7392 VkCommandBuffer commandBuffer,
7393 u32 firstViewport,
7394 u32 viewportCount,
7395 const VkViewportWScalingNV* pViewportWScalings) {
7396}
7397
7398@extension("VK_EXT_direct_mode_display") // 89
7399cmd VkResult vkReleaseDisplayEXT(
7400 VkPhysicalDevice physicalDevice,
7401 VkDisplayKHR display) {
7402 return ?
7403}
7404
7405@extension("VK_EXT_acquire_xlib_display") // 90
7406cmd VkResult vkAcquireXlibDisplayEXT(
7407 VkPhysicalDevice physicalDevice,
7408 platform.Display* dpy,
7409 VkDisplayKHR display) {
7410 return ?
7411}
7412
7413@extension("VK_EXT_acquire_xlib_display") // 90
7414cmd VkResult vkGetRandROutputDisplayEXT(
7415 VkPhysicalDevice physicalDevice,
7416 platform.Display* dpy,
7417 platform.RROutput rrOutput,
7418 VkDisplayKHR* pDisplay) {
7419 return ?
7420}
7421
7422@extension("VK_EXT_display_surface_counter") // 91
7423cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7424 VkPhysicalDevice physicalDevice,
7425 VkSurfaceKHR surface,
7426 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7427 return ?
7428}
7429
7430@extension("VK_EXT_display_control") // 92
7431cmd VkResult vkDisplayPowerControlEXT(
7432 VkDevice device,
7433 VkDisplayKHR display,
7434 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7435 return ?
7436}
7437
7438@extension("VK_EXT_display_control") // 92
7439cmd VkResult vkRegisterDeviceEventEXT(
7440 VkDevice device,
7441 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7442 const VkAllocationCallbacks* pAllocator,
7443 VkFence* pFence) {
7444 return ?
7445}
7446
7447@extension("VK_EXT_display_control") // 92
7448cmd VkResult vkRegisterDisplayEventEXT(
7449 VkDevice device,
7450 VkDisplayKHR display,
7451 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7452 const VkAllocationCallbacks* pAllocator,
7453 VkFence* pFence) {
7454 return ?
7455}
7456
7457@extension("VK_EXT_display_control") // 92
7458cmd VkResult vkGetSwapchainCounterEXT(
7459 VkDevice device,
7460 VkSwapchainKHR swapchain,
7461 VkSurfaceCounterFlagBitsEXT counter,
7462 u64* pCounterValue) {
7463 return ?
7464}
7465
7466@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007467cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007468 VkDevice device,
7469 VkSwapchainKHR swapchain,
7470 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007471 deviceObject := GetDevice(device)
7472 swapchainObject := GetSwapchain(swapchain)
7473
7474 displayTimingProperties := ?
7475 pDisplayTimingProperties[0] = displayTimingProperties
7476
7477 return ?
7478}
7479
Jesse Hallad250842017-03-10 18:35:38 -08007480@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007481cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007482 VkDevice device,
7483 VkSwapchainKHR swapchain,
7484 u32* pPresentationTimingCount,
7485 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007486 return ?
7487}
7488
Jesse Hallad250842017-03-10 18:35:38 -08007489@extension("VK_EXT_discard_rectangles") // 100
7490cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007491 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007492 u32 firstDiscardRectangle,
7493 u32 discardRectangleCount,
7494 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007495}
7496
Jesse Hallad250842017-03-10 18:35:38 -08007497@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007498cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007499 VkDevice device,
7500 u32 swapchainCount,
7501 const VkSwapchainKHR* pSwapchains,
7502 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08007503}
7504
Jesse Hallad250842017-03-10 18:35:38 -08007505@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007506cmd VkResult vkGetSwapchainStatusKHR(
7507 VkDevice device,
7508 VkSwapchainKHR swapchain) {
7509 return ?
7510}
7511
Jesse Hall05556b12017-05-18 17:40:25 -07007512@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13007513cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
7514 VkPhysicalDevice physicalDevice,
7515 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
7516 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
7517 return ?
7518}
7519
Jesse Hall05556b12017-05-18 17:40:25 -07007520@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13007521cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
7522 VkPhysicalDevice physicalDevice,
7523 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
7524 u32* pSurfaceFormatCount,
7525 VkSurfaceFormat2KHR* pSurfaceFormats) {
7526 return ?
7527}
7528
Jesse Hallad250842017-03-10 18:35:38 -08007529@extension("VK_MVK_ios_surface") // 123
7530cmd VkResult vkCreateIOSSurfaceMVK(
7531 VkInstance instance,
7532 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7533 const VkAllocationCallbacks* pAllocator,
7534 VkSurfaceKHR* pSurface) {
7535 return ?
7536}
7537
7538@extension("VK_MVK_macos_surface") // 124
7539cmd VkResult vkCreateMacOSSurfaceMVK(
7540 VkInstance instance,
7541 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7542 const VkAllocationCallbacks* pAllocator,
7543 VkSurfaceKHR* pSurface) {
7544 return ?
7545}
7546
Jesse Halld27f6aa2015-08-15 17:58:48 -07007547////////////////
7548// Validation //
7549////////////////
7550
7551extern void validate(string layerName, bool condition, string message)
7552
7553
7554/////////////////////////////
7555// Internal State Tracking //
7556/////////////////////////////
7557
7558StateObject State
7559
7560@internal class StateObject {
7561 // Dispatchable objects.
7562 map!(VkInstance, ref!InstanceObject) Instances
7563 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7564 map!(VkDevice, ref!DeviceObject) Devices
7565 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007566 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007567
7568 // Non-dispatchable objects.
7569 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7570 map!(VkBuffer, ref!BufferObject) Buffers
7571 map!(VkBufferView, ref!BufferViewObject) BufferViews
7572 map!(VkImage, ref!ImageObject) Images
7573 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007574 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007575 map!(VkPipeline, ref!PipelineObject) Pipelines
7576 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7577 map!(VkSampler, ref!SamplerObject) Samplers
7578 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7579 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7580 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007581 map!(VkFence, ref!FenceObject) Fences
7582 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7583 map!(VkEvent, ref!EventObject) Events
7584 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7585 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7586 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7587 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007588 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007589 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007590 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007591}
7592
7593@internal class InstanceObject {
7594}
7595
7596@internal class PhysicalDeviceObject {
7597 VkInstance instance
7598}
7599
7600@internal class DeviceObject {
7601 VkPhysicalDevice physicalDevice
7602}
7603
7604@internal class QueueObject {
7605 VkDevice device
7606 VkQueueFlags flags
7607}
7608
Jesse Hall3fbc8562015-11-29 22:10:52 -08007609@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007610 VkDevice device
7611 map!(u64, VkDeviceMemory) boundObjects
7612 VkQueueFlags queueFlags
7613}
7614
7615@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007616 VkDevice device
7617 VkDeviceSize allocationSize
7618 map!(u64, VkDeviceSize) boundObjects
7619 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007620}
7621
7622@internal class BufferObject {
7623 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007624 VkDeviceMemory memory
7625 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007626}
7627
7628@internal class BufferViewObject {
7629 VkDevice device
7630 VkBuffer buffer
7631}
7632
7633@internal class ImageObject {
7634 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007635 VkDeviceMemory memory
7636 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007637}
7638
7639@internal class ImageViewObject {
7640 VkDevice device
7641 VkImage image
7642}
7643
Jesse Halld27f6aa2015-08-15 17:58:48 -07007644@internal class ShaderObject {
7645 VkDevice device
7646}
7647
7648@internal class ShaderModuleObject {
7649 VkDevice device
7650}
7651
7652@internal class PipelineObject {
7653 VkDevice device
7654}
7655
7656@internal class PipelineLayoutObject {
7657 VkDevice device
7658}
7659
7660@internal class SamplerObject {
7661 VkDevice device
7662}
7663
7664@internal class DescriptorSetObject {
7665 VkDevice device
7666}
7667
7668@internal class DescriptorSetLayoutObject {
7669 VkDevice device
7670}
7671
7672@internal class DescriptorPoolObject {
7673 VkDevice device
7674}
7675
Jesse Halld27f6aa2015-08-15 17:58:48 -07007676@internal class FenceObject {
7677 VkDevice device
7678 bool signaled
7679}
7680
7681@internal class SemaphoreObject {
7682 VkDevice device
7683}
7684
7685@internal class EventObject {
7686 VkDevice device
7687}
7688
7689@internal class QueryPoolObject {
7690 VkDevice device
7691}
7692
7693@internal class FramebufferObject {
7694 VkDevice device
7695}
7696
7697@internal class RenderPassObject {
7698 VkDevice device
7699}
7700
7701@internal class PipelineCacheObject {
7702 VkDevice device
7703}
7704
Jesse Hall3fbc8562015-11-29 22:10:52 -08007705@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007706 VkDevice device
7707}
7708
Jesse Hall1356b0d2015-11-23 17:24:58 -08007709@internal class SurfaceObject {
7710 VkInstance instance
7711}
7712
Michael Lentine88594d72015-11-12 12:49:45 -08007713@internal class SwapchainObject {
7714 VkDevice device
7715}
7716
Jesse Halld27f6aa2015-08-15 17:58:48 -07007717macro ref!InstanceObject GetInstance(VkInstance instance) {
7718 assert(instance in State.Instances)
7719 return State.Instances[instance]
7720}
7721
7722macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7723 assert(physicalDevice in State.PhysicalDevices)
7724 return State.PhysicalDevices[physicalDevice]
7725}
7726
7727macro ref!DeviceObject GetDevice(VkDevice device) {
7728 assert(device in State.Devices)
7729 return State.Devices[device]
7730}
7731
7732macro ref!QueueObject GetQueue(VkQueue queue) {
7733 assert(queue in State.Queues)
7734 return State.Queues[queue]
7735}
7736
Jesse Hall3fbc8562015-11-29 22:10:52 -08007737macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7738 assert(commandBuffer in State.CommandBuffers)
7739 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007740}
7741
Jesse Hall3fbc8562015-11-29 22:10:52 -08007742macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7743 assert(memory in State.DeviceMemories)
7744 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007745}
7746
7747macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7748 assert(buffer in State.Buffers)
7749 return State.Buffers[buffer]
7750}
7751
7752macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7753 assert(bufferView in State.BufferViews)
7754 return State.BufferViews[bufferView]
7755}
7756
7757macro ref!ImageObject GetImage(VkImage image) {
7758 assert(image in State.Images)
7759 return State.Images[image]
7760}
7761
7762macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7763 assert(imageView in State.ImageViews)
7764 return State.ImageViews[imageView]
7765}
7766
Jesse Halld27f6aa2015-08-15 17:58:48 -07007767macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7768 assert(shaderModule in State.ShaderModules)
7769 return State.ShaderModules[shaderModule]
7770}
7771
7772macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7773 assert(pipeline in State.Pipelines)
7774 return State.Pipelines[pipeline]
7775}
7776
7777macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7778 assert(pipelineLayout in State.PipelineLayouts)
7779 return State.PipelineLayouts[pipelineLayout]
7780}
7781
7782macro ref!SamplerObject GetSampler(VkSampler sampler) {
7783 assert(sampler in State.Samplers)
7784 return State.Samplers[sampler]
7785}
7786
7787macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7788 assert(descriptorSet in State.DescriptorSets)
7789 return State.DescriptorSets[descriptorSet]
7790}
7791
7792macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7793 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7794 return State.DescriptorSetLayouts[descriptorSetLayout]
7795}
7796
7797macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7798 assert(descriptorPool in State.DescriptorPools)
7799 return State.DescriptorPools[descriptorPool]
7800}
7801
Jesse Halld27f6aa2015-08-15 17:58:48 -07007802macro ref!FenceObject GetFence(VkFence fence) {
7803 assert(fence in State.Fences)
7804 return State.Fences[fence]
7805}
7806
7807macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7808 assert(semaphore in State.Semaphores)
7809 return State.Semaphores[semaphore]
7810}
7811
7812macro ref!EventObject GetEvent(VkEvent event) {
7813 assert(event in State.Events)
7814 return State.Events[event]
7815}
7816
7817macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7818 assert(queryPool in State.QueryPools)
7819 return State.QueryPools[queryPool]
7820}
7821
7822macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7823 assert(framebuffer in State.Framebuffers)
7824 return State.Framebuffers[framebuffer]
7825}
7826
7827macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7828 assert(renderPass in State.RenderPasses)
7829 return State.RenderPasses[renderPass]
7830}
7831
7832macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7833 assert(pipelineCache in State.PipelineCaches)
7834 return State.PipelineCaches[pipelineCache]
7835}
7836
Jesse Hall3fbc8562015-11-29 22:10:52 -08007837macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7838 assert(commandPool in State.CommandPools)
7839 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007840}
Michael Lentine88594d72015-11-12 12:49:45 -08007841
Jesse Hall1356b0d2015-11-23 17:24:58 -08007842macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7843 assert(surface in State.Surfaces)
7844 return State.Surfaces[surface]
7845}
7846
Michael Lentine88594d72015-11-12 12:49:45 -08007847macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7848 assert(swapchain in State.Swapchains)
7849 return State.Swapchains[swapchain]
7850}
Jesse Halld8bade02015-11-24 10:24:18 -08007851
7852macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7853 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7854}