blob: 86dd0016ffdc9233711bcc63284cc204486a45d2 [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 Hallfdc8ab32017-03-10 21:01:57 -080031define VERSION_PATCH 43
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 Hall8f49fcb2017-03-06 16:02:58 -080096@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 5
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
253@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME "VK_KHR_incremental_present"
254
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
312@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 1
313@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_COUNTER_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
314
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
Chris Forbese2d3ee12017-03-16 16:10:15 +1300323// 119
324@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
412 //@extension("VK_KHR_shared_presentable_image")
413 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,
1008 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005,
1009 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006,
1010 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007,
1011
1012 //@extension("VK_KHX_external_memory") // 73
1013 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
1014 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
1015 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
1016
1017 //@extension("VK_KHX_external_memory_win32") // 74
1018 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
1019 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
1020 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
1021
1022 //@extension("VK_KHX_external_memory_fd") // 75
1023 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
1024 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
1025
1026 //@extension("VK_KHX_win32_keyed_mutex") // 76
1027 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
1028
1029 //@extension("VK_KHX_external_semaphore_capabilities") // 77
1030 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
1031 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
1032
1033 //@extension("VK_KHX_external_semaphore") // 78
1034 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
1035
1036 //@extension("VK_KHX_external_semaphore_win32") // 79
1037 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
1038 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
1039 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
1040
1041 //@extension("VK_KHX_external_semaphore_fd") // 80
1042 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
1043
1044 //@extension("VK_KHR_push_descriptor") // 81
1045 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1046
1047 //@extension("VK_KHR_incremental_present") // 85
Jesse Hall889cd9a2017-02-25 22:12:23 -08001048 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
Chris Forbes289cb792016-12-30 15:03:55 +13001049
Jesse Hallad250842017-03-10 18:35:38 -08001050 //@extension("VK_KHR_descriptor_update_template") // 86
1051 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1052
1053 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001054 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1055 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1056 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1057 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1058 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1059 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001060
Jesse Hallad250842017-03-10 18:35:38 -08001061 //@extension("VK_NV_clip_space_w_scaling") // 88
1062 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1063
1064 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08001065 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1066
Jesse Hallad250842017-03-10 18:35:38 -08001067 //@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001068 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1069 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1070 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1071 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Hallad250842017-03-10 18:35:38 -08001072
1073 //@extension("VK_GOOGLE_display_timing") // 93
1074 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1075
1076 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1077 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1078
1079 //@extension("VK_NV_viewport_swizzle") // 99
1080 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1081
1082 //@extension("VK_EXT_discard_rectangles") // 100
1083 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1084 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1085
Jesse Hallfdc8ab32017-03-10 21:01:57 -08001086 //@extension("VK_EXT_hdr_metadata") // 106
1087 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1088
Chris Forbese2d3ee12017-03-16 16:10:15 +13001089 //@extension("VK_KHR_shared_presentable_image") // 111
1090 VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
1091
1092 //@extension("VK_KHR_get_surface_capabilities2") // 119
1093 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
1094 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
1095 VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
1096
Jesse Hallad250842017-03-10 18:35:38 -08001097 //@extension("VK_MVK_ios_surface") // 123
1098 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1099
1100 //@extension("VK_MVK_macos_surface") // 124
1101 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001102}
1103
Jesse Hall65ab5522015-11-30 00:07:16 -08001104enum VkSubpassContents {
1105 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1106 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001107}
1108
Jesse Hall543a7ff2016-01-08 16:38:30 -08001109enum VkPipelineCacheHeaderVersion {
1110 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1111}
1112
Jesse Hallbd888842015-11-30 21:44:14 -08001113@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001114/// Error and return codes
1115enum VkResult {
1116 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001117 VK_SUCCESS = 0,
1118 VK_NOT_READY = 1,
1119 VK_TIMEOUT = 2,
1120 VK_EVENT_SET = 3,
1121 VK_EVENT_RESET = 4,
1122 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001123
Jesse Hallad250842017-03-10 18:35:38 -08001124 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001125 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001126
Jesse Halld27f6aa2015-08-15 17:58:48 -07001127 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001128 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1129 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1130 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1131 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1132 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1133 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1134 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1135 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1136 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1137 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1138 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001139 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001140
Jesse Hallad250842017-03-10 18:35:38 -08001141 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001142 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001143 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001144
Jesse Hallad250842017-03-10 18:35:38 -08001145 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001146 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001147
Jesse Hallad250842017-03-10 18:35:38 -08001148 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001149 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001150
Jesse Hallad250842017-03-10 18:35:38 -08001151 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001152 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001153
Jesse Hallad250842017-03-10 18:35:38 -08001154 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001155 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001156
Jesse Hallad250842017-03-10 18:35:38 -08001157 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001158 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001159
1160 //@extension("VK_KHX_external_memory") // 73
1161 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001162}
1163
1164enum VkDynamicState {
1165 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1166 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1167 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1168 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1169 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1170 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1171 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1172 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1173 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001174
1175 //@extension("VK_NV_clip_space_w_scaling") // 88
1176 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1177
1178 //@extension("VK_EXT_discard_rectangles") // 100
1179 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001180}
1181
Jesse Hallad250842017-03-10 18:35:38 -08001182@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001183enum VkPresentModeKHR {
1184 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1185 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1186 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001187 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001188
Chris Forbes1d5f68c2017-01-31 10:17:01 +13001189 //@extension("VK_KHR_shared_presentable_image")
Jesse Hall77ad05b2017-03-10 22:02:20 -08001190 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1191 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001192}
1193
Jesse Hallad250842017-03-10 18:35:38 -08001194@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001195enum VkColorSpaceKHR {
1196 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001197
1198 //@extension("VK_EXT_swapchain_colorspace")
Jesse Hall889cd9a2017-02-25 22:12:23 -08001199 VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001200 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002,
1201 VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003,
1202 VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004,
1203 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005,
1204 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006,
1205 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007,
1206 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008,
1207 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009,
1208 VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010,
1209 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1210 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Michael Lentine88594d72015-11-12 12:49:45 -08001211}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001212
Jesse Hallad250842017-03-10 18:35:38 -08001213@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001214enum VkDebugReportObjectTypeEXT {
1215 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1216 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1217 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1218 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1219 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1220 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1221 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1222 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1223 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1224 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1225 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1226 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1227 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1228 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1229 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1230 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1231 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1232 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1233 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1234 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1235 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1236 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1237 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1238 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1239 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1240 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1241 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1242 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1243 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001244 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1245 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1246 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1247 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hall715b86a2016-01-16 16:34:29 -08001248}
1249
Jesse Hallad250842017-03-10 18:35:38 -08001250@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001251enum VkDebugReportErrorEXT {
1252 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1253 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1254}
1255
Jesse Hallad250842017-03-10 18:35:38 -08001256@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001257enum VkRasterizationOrderAMD {
1258 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1259 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1260}
1261
Jesse Hallad250842017-03-10 18:35:38 -08001262@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001263enum VkValidationCheckEXT {
1264 VK_VALIDATION_CHECK_ALL_EXT = 0,
1265}
1266
Jesse Hallad250842017-03-10 18:35:38 -08001267@extension("VK_KHR_descriptor_update_template") // 86
1268enum VkDescriptorUpdateTemplateTypeKHR {
1269 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1270 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1271}
1272
1273@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001274enum VkIndirectCommandsTokenTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001275 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1276 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1277 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1278 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1279 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1280 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1281 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1282 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001283}
1284
Jesse Hallad250842017-03-10 18:35:38 -08001285@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001286enum VkObjectEntryTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001287 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1288 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1289 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1290 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1291 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001292}
Jesse Hall715b86a2016-01-16 16:34:29 -08001293
Jesse Hallad250842017-03-10 18:35:38 -08001294@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001295enum VkDisplayPowerStateEXT {
1296 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1297 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1298 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1299}
1300
Jesse Hallad250842017-03-10 18:35:38 -08001301@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001302enum VkDeviceEventTypeEXT {
1303 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1304}
1305
Jesse Hallad250842017-03-10 18:35:38 -08001306@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001307enum VkDisplayEventTypeEXT {
1308 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1309}
1310
Jesse Hallad250842017-03-10 18:35:38 -08001311@extension("VK_NV_viewport_swizzle") // 99
1312enum VkViewportCoordinateSwizzleNV {
1313 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1314 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1315 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1316 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1317 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1318 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1319 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1320 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1321}
1322
1323@extension("VK_EXT_discard_rectangles") // 100
1324enum VkDiscardRectangleModeEXT {
1325 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1326 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1327}
1328
Jesse Halld27f6aa2015-08-15 17:58:48 -07001329/////////////////
1330// Bitfields //
1331/////////////////
1332
Jesse Halld27f6aa2015-08-15 17:58:48 -07001333/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001334type VkFlags VkQueueFlags
1335bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001336 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1337 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001338 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001339 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001340}
1341
1342/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001343type VkFlags VkMemoryPropertyFlags
1344bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001345 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1346 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1347 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1348 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1349 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001350}
1351
1352/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001353type VkFlags VkMemoryHeapFlags
1354bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001355 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001356
1357 //@extension("VK_KHX_device_group_creation") // 71
1358 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001359}
1360
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001361/// Access flags
1362type VkFlags VkAccessFlags
1363bitfield VkAccessFlagBits {
1364 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1365 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1366 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1367 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1368 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1369 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1370 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1371 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1372 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1373 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1374 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1375 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1376 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1377 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1378 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1379 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1380 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001381
Jesse Hallad250842017-03-10 18:35:38 -08001382 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001383 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001384 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001385}
1386
1387/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001388type VkFlags VkBufferUsageFlags
1389bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001390 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1391 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001392 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1393 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1394 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1395 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1396 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1397 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1398 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1399}
1400
1401/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001402type VkFlags VkBufferCreateFlags
1403bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001404 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001405 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1406 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1407}
1408
1409/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001410type VkFlags VkShaderStageFlags
1411bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001412 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001413 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1414 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001415 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1416 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1417 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001418 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001419
1420 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1421}
1422
Jesse Hallfbf97b02015-11-20 14:17:03 -08001423/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001424type VkFlags VkDescriptorPoolCreateFlags
1425bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001426 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1427}
1428
1429/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001430type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001431//bitfield VkDescriptorPoolResetFlagBits {
1432//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001433
Jesse Halld27f6aa2015-08-15 17:58:48 -07001434/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001435type VkFlags VkImageUsageFlags
1436bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001437 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1438 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001439 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1440 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1441 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001442 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001443 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1444 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1445}
1446
1447/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001448type VkFlags VkImageCreateFlags
1449bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001450 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001451 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1452 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 -07001453 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1454 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 -08001455
Jesse Hallad250842017-03-10 18:35:38 -08001456 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001457 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001458
1459 //@extension("VK_KHX_device_group") // 61
1460 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001461}
1462
Jesse Hallb00daad2015-11-29 19:46:20 -08001463/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001464type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001465//bitfield VkImageViewCreateFlagBits {
1466//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001467
1468/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001469type VkFlags VkPipelineCreateFlags
1470bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001471 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1472 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1473 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001474
1475 //@extension("VK_KHX_device_group") // 61
1476 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1477 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001478}
1479
Jesse Hall65ab5522015-11-30 00:07:16 -08001480/// Color component flags
1481type VkFlags VkColorComponentFlags
1482bitfield VkColorComponentFlagBits {
1483 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1484 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1485 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1486 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001487}
1488
1489/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001490type VkFlags VkFenceCreateFlags
1491bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001492 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1493}
1494
1495/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001496type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001497//bitfield VkSemaphoreCreateFlagBits {
1498//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001499
1500/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001501type VkFlags VkFormatFeatureFlags
1502bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001503 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1504 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1505 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1506 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1507 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1508 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1509 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1510 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1511 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1512 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001513 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1514 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 -08001515 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001516
Jesse Hallad250842017-03-10 18:35:38 -08001517 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001518 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001519
Jesse Hallad250842017-03-10 18:35:38 -08001520 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001521 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1522 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001523}
1524
1525/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001526type VkFlags VkQueryControlFlags
1527bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001528 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001529}
1530
1531/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001532type VkFlags VkQueryResultFlags
1533bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001534 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1535 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1536 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1537 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1538}
1539
1540/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001541type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001542//bitfield VkShaderModuleCreateFlagBits {
1543//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001544
Jesse Halld27f6aa2015-08-15 17:58:48 -07001545/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001546type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001547//bitfield VkEventCreateFlagBits {
1548//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001549
Jesse Halla15a4bf2015-11-19 22:48:02 -08001550/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001551type VkFlags VkCommandBufferUsageFlags
1552bitfield VkCommandBufferUsageFlagBits {
1553 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1554 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1555 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001556}
1557
1558/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001559type VkFlags VkQueryPipelineStatisticFlags
1560bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001561 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1562 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1563 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1564 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1565 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1566 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1567 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1568 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1569 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1570 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1571 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001572}
1573
1574/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001575type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001576//bitfield VkMemoryMapFlagBits {
1577//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001578
1579/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001580type VkFlags VkImageAspectFlags
1581bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001582 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1583 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1584 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1585 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1586}
1587
1588/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001589type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001590bitfield VkSparseMemoryBindFlagBits {
1591 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1592}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001593
1594/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001595type VkFlags VkSparseImageFormatFlags
1596bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001597 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1598 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.
1599 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001600}
1601
1602/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001603type VkFlags VkPipelineStageFlags
1604bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001605 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1606 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1607 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1608 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001609 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1610 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001611 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1612 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1613 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1614 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1615 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1616 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1617 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001618 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1619 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001620
Jesse Hall543a7ff2016-01-08 16:38:30 -08001621 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1622 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001623
Jesse Hallad250842017-03-10 18:35:38 -08001624 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001625 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001626}
1627
1628/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001629type VkFlags VkAttachmentDescriptionFlags
1630bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001631 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 -07001632}
1633
1634/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001635type VkFlags VkSubpassDescriptionFlags
1636bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001637 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1638 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1639 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001640}
1641
1642/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001643type VkFlags VkCommandPoolCreateFlags
1644bitfield VkCommandPoolCreateFlagBits {
1645 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1646 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001647}
1648
1649/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001650type VkFlags VkCommandPoolResetFlags
1651bitfield VkCommandPoolResetFlagBits {
1652 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001653}
1654
Jesse Hall3fbc8562015-11-29 22:10:52 -08001655type VkFlags VkCommandBufferResetFlags
1656bitfield VkCommandBufferResetFlagBits {
1657 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001658}
1659
Jesse Halld8bade02015-11-24 10:24:18 -08001660type VkFlags VkSampleCountFlags
1661bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001662 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1663 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1664 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1665 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1666 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1667 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1668 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1669}
1670
Jesse Halld8bade02015-11-24 10:24:18 -08001671type VkFlags VkStencilFaceFlags
1672bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001673 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1674 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001675 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001676}
1677
Jesse Halla6429252015-11-29 18:59:42 -08001678/// Instance creation flags
1679type VkFlags VkInstanceCreateFlags
1680//bitfield VkInstanceCreateFlagBits {
1681//}
1682
1683/// Device creation flags
1684type VkFlags VkDeviceCreateFlags
1685//bitfield VkDeviceCreateFlagBits {
1686//}
1687
1688/// Device queue creation flags
1689type VkFlags VkDeviceQueueCreateFlags
1690//bitfield VkDeviceQueueCreateFlagBits {
1691//}
1692
1693/// Query pool creation flags
1694type VkFlags VkQueryPoolCreateFlags
1695//bitfield VkQueryPoolCreateFlagBits {
1696//}
1697
1698/// Buffer view creation flags
1699type VkFlags VkBufferViewCreateFlags
1700//bitfield VkBufferViewCreateFlagBits {
1701//}
1702
1703/// Pipeline cache creation flags
1704type VkFlags VkPipelineCacheCreateFlags
1705//bitfield VkPipelineCacheCreateFlagBits {
1706//}
1707
1708/// Pipeline shader stage creation flags
1709type VkFlags VkPipelineShaderStageCreateFlags
1710//bitfield VkPipelineShaderStageCreateFlagBits {
1711//}
1712
1713/// Descriptor set layout creation flags
1714type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001715bitfield VkDescriptorSetLayoutCreateFlagBits {
1716 //@extension("VK_KHR_push_descriptor") // 81
1717 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1718}
Jesse Halla6429252015-11-29 18:59:42 -08001719
1720/// Pipeline vertex input state creation flags
1721type VkFlags VkPipelineVertexInputStateCreateFlags
1722//bitfield VkPipelineVertexInputStateCreateFlagBits {
1723//}
1724
1725/// Pipeline input assembly state creation flags
1726type VkFlags VkPipelineInputAssemblyStateCreateFlags
1727//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1728//}
1729
1730/// Tessellation state creation flags
1731type VkFlags VkPipelineTessellationStateCreateFlags
1732//bitfield VkPipelineTessellationStateCreateFlagBits {
1733//}
1734
1735/// Viewport state creation flags
1736type VkFlags VkPipelineViewportStateCreateFlags
1737//bitfield VkPipelineViewportStateCreateFlagBits {
1738//}
1739
Jesse Hall3fbc8562015-11-29 22:10:52 -08001740/// Rasterization state creation flags
1741type VkFlags VkPipelineRasterizationStateCreateFlags
1742//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001743//}
1744
1745/// Multisample state creation flags
1746type VkFlags VkPipelineMultisampleStateCreateFlags
1747//bitfield VkPipelineMultisampleStateCreateFlagBits {
1748//}
1749
1750/// Color blend state creation flags
1751type VkFlags VkPipelineColorBlendStateCreateFlags
1752//bitfield VkPipelineColorBlendStateCreateFlagBits {
1753//}
1754
1755/// Depth/stencil state creation flags
1756type VkFlags VkPipelineDepthStencilStateCreateFlags
1757//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1758//}
1759
1760/// Dynamic state creation flags
1761type VkFlags VkPipelineDynamicStateCreateFlags
1762//bitfield VkPipelineDynamicStateCreateFlagBits {
1763//}
1764
1765/// Pipeline layout creation flags
1766type VkFlags VkPipelineLayoutCreateFlags
1767//bitfield VkPipelineLayoutCreateFlagBits {
1768//}
1769
1770/// Sampler creation flags
1771type VkFlags VkSamplerCreateFlags
1772//bitfield VkSamplerCreateFlagBits {
1773//}
1774
1775/// Render pass creation flags
1776type VkFlags VkRenderPassCreateFlags
1777//bitfield VkRenderPassCreateFlagBits {
1778//}
1779
1780/// Framebuffer creation flags
1781type VkFlags VkFramebufferCreateFlags
1782//bitfield VkFramebufferCreateFlagBits {
1783//}
1784
Jesse Halldc6d36c2015-11-29 19:12:15 -08001785/// Dependency flags
1786type VkFlags VkDependencyFlags
1787bitfield VkDependencyFlagBits {
1788 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001789
1790 //@extension("VK_KHX_multiview") // 54
1791 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1792
1793 //@extension("VK_KHX_device_group") // 61
1794 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001795}
1796
Jesse Hallc7467b72015-11-29 21:05:26 -08001797/// Cull mode flags
1798type VkFlags VkCullModeFlags
1799bitfield VkCullModeFlagBits {
1800 VK_CULL_MODE_NONE = 0x00000000,
1801 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1802 VK_CULL_MODE_BACK_BIT = 0x00000002,
1803 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1804}
1805
Jesse Hallad250842017-03-10 18:35:38 -08001806@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001807type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001808@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001809bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001810 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001811 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1812 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1813 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1814 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1815 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1816 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1817 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1818 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001819}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001820
Jesse Hallad250842017-03-10 18:35:38 -08001821@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001822type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001823@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001824bitfield VkCompositeAlphaFlagBitsKHR {
1825 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1826 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1827 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1828 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1829}
1830
Jesse Hallad250842017-03-10 18:35:38 -08001831@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001832type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001833@extension("VK_KHR_swapchain") // 2
1834bitfield VkSwapchainCreateFlagBitsKHR {
1835 //@extension("VK_KHX_device_group") // 61
1836 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1837}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001838
Jesse Hallad250842017-03-10 18:35:38 -08001839@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001840type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001841@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001842bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001843 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1844 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1845 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1846 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001847}
1848
Jesse Hallad250842017-03-10 18:35:38 -08001849@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001850type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001851//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001852//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1853//}
1854
Jesse Hallad250842017-03-10 18:35:38 -08001855@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001856type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001857//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001858//bitfield VkDisplayModeCreateFlagBitsKHR {
1859//}
1860
Jesse Hallad250842017-03-10 18:35:38 -08001861@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001862type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001863//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001864//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1865//}
1866
Jesse Hallad250842017-03-10 18:35:38 -08001867@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001868type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001869//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001870//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1871//}
1872
Jesse Hallad250842017-03-10 18:35:38 -08001873@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001874type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001875//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001876//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1877//}
1878
Jesse Hallad250842017-03-10 18:35:38 -08001879@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001880type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001881//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001882//bitfield VkMirSurfaceCreateFlagBitsKHR {
1883//}
1884
Jesse Hallad250842017-03-10 18:35:38 -08001885@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001886type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001887//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001888//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1889//}
1890
Jesse Hallad250842017-03-10 18:35:38 -08001891@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001892type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001893//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001894//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1895//}
1896
Jesse Hallad250842017-03-10 18:35:38 -08001897@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001898type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08001899@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001900bitfield VkSwapchainImageUsageFlagBitsANDROID {
1901 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
1902}
1903
Jesse Hallad250842017-03-10 18:35:38 -08001904@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001905type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08001906@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001907bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001908 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1909 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1910 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001911 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1912 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1913}
1914
Jesse Hallad250842017-03-10 18:35:38 -08001915@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001916type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001917@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001918bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001919 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1920 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1921 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1922 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13001923}
1924
Jesse Hallad250842017-03-10 18:35:38 -08001925@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001926type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001927@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001928bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001929 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1930 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1931 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13001932}
1933
Jesse Hallad250842017-03-10 18:35:38 -08001934@extension("VK_KHX_device_group") // 61
1935type VkFlags VkPeerMemoryFeatureFlagsKHX
1936@extension("VK_KHX_device_group") // 61
1937bitfield VkPeerMemoryFeatureFlagBitsKHX {
1938 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1939 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1940 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1941 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1942}
1943
1944@extension("VK_KHX_device_group") // 61
1945type VkFlags VkMemoryAllocateFlagsKHX
1946@extension("VK_KHX_device_group") // 61
1947bitfield VkMemoryAllocateFlagBitsKHX {
1948 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1949}
1950
1951@extension("VK_KHX_device_group") // 61
1952type VkFlags VkDeviceGroupPresentModeFlagsKHX
1953@extension("VK_KHX_device_group") // 61
1954bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1955 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1956 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1957 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1958 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1959}
1960
1961@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001962type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08001963//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001964//bitfield VkViSurfaceCreateFlagBitsNN {
1965//}
1966
Jesse Hallad250842017-03-10 18:35:38 -08001967@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001968type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001969//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001970//bitfield VkCommandPoolTrimFlagBitsKHR {
1971//}
1972
Jesse Hallad250842017-03-10 18:35:38 -08001973@extension("VK_KHX_external_memory_capabilities") // 72
1974type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1975@extension("VK_KHX_external_memory_capabilities") // 72
1976bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1977 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1978 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1979 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1980 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1981 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1982 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1983 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1984}
1985
1986@extension("VK_KHX_external_memory_capabilities") // 72
1987type VkFlags VkExternalMemoryFeatureFlagsKHX
1988@extension("VK_KHX_external_memory_capabilities") // 72
1989bitfield VkExternalMemoryFeatureFlagBitsKHX {
1990 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1991 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1992 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1993}
1994
1995@extension("VK_KHX_external_semaphore_capabilities") // 77
1996type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
1997@extension("VK_KHX_external_semaphore_capabilities") // 77
1998bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
1999 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
2000 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
2001 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
2002 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
2003 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
2004}
2005
2006@extension("VK_KHX_external_semaphore_capabilities") // 77
2007type VkFlags VkExternalSemaphoreFeatureFlagsKHX
2008@extension("VK_KHX_external_semaphore_capabilities") // 77
2009bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
2010 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
2011 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
2012}
2013
2014@extension("VK_KHR_descriptor_update_template") // 86
2015type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2016//@extension("VK_KHR_descriptor_update_template") // 86
2017//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2018//}
2019
2020@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002021type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002022@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002023bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002024 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2025 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2026 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2027 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002028}
2029
Jesse Hallad250842017-03-10 18:35:38 -08002030@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002031type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002032@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002033bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002034 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2035 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002036}
2037
Jesse Hallad250842017-03-10 18:35:38 -08002038@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002039type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002040@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002041bitfield VkSurfaceCounterFlagBitsEXT {
2042 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2043}
2044
Jesse Hallad250842017-03-10 18:35:38 -08002045@extension("VK_NV_viewport_swizzle") // 99
2046type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2047//@extension("VK_NV_viewport_swizzle") // 99
2048//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2049//}
2050
2051@extension("VK_EXT_discard_rectangles") // 100
2052type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2053//@extension("VK_EXT_discard_rectangles") // 100
2054//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2055//}
2056
2057@extension("VK_MVK_ios_surface") // 123
2058type VkFlags VkIOSSurfaceCreateFlagsMVK
2059//@extension("VK_MVK_ios_surface") // 123
2060//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2061//}
2062
2063@extension("VK_MVK_macos_surface") // 124
2064type VkFlags VkMacOSSurfaceCreateFlagsMVK
2065//@extension("VK_MVK_macos_surface") // 124
2066//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2067//}
2068
Jesse Halld27f6aa2015-08-15 17:58:48 -07002069//////////////////
2070// Structures //
2071//////////////////
2072
2073class VkOffset2D {
2074 s32 x
2075 s32 y
2076}
2077
2078class VkOffset3D {
2079 s32 x
2080 s32 y
2081 s32 z
2082}
2083
2084class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002085 u32 width
2086 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002087}
2088
2089class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002090 u32 width
2091 u32 height
2092 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002093}
2094
2095class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002096 f32 x
2097 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002098 f32 width
2099 f32 height
2100 f32 minDepth
2101 f32 maxDepth
2102}
2103
2104class VkRect2D {
2105 VkOffset2D offset
2106 VkExtent2D extent
2107}
2108
Jesse Halla15a4bf2015-11-19 22:48:02 -08002109class VkClearRect {
2110 VkRect2D rect
2111 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002112 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002113}
2114
Jesse Hall65ab5522015-11-30 00:07:16 -08002115class VkComponentMapping {
2116 VkComponentSwizzle r
2117 VkComponentSwizzle g
2118 VkComponentSwizzle b
2119 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002120}
2121
2122class VkPhysicalDeviceProperties {
2123 u32 apiVersion
2124 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002125 u32 vendorID
2126 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002127 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002128 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2129 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002130 VkPhysicalDeviceLimits limits
2131 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002132}
2133
2134class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002135 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002136 u32 specVersion /// version of the extension specification implemented
2137}
2138
2139class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002140 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002141 u32 specVersion /// version of the layer specification implemented
2142 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002143 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002144}
2145
Jesse Halla366a512015-11-19 22:30:07 -08002146class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002147 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2148 const void* pNext /// Next structure in chain
2149 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002150 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002151 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002152 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002153 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002154 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002155 const VkSemaphore* pSignalSemaphores
2156}
2157
Jesse Halld27f6aa2015-08-15 17:58:48 -07002158class VkApplicationInfo {
2159 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2160 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002161 const char* pApplicationName
2162 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002163 const char* pEngineName
2164 u32 engineVersion
2165 u32 apiVersion
2166}
2167
Jesse Hall3fbc8562015-11-29 22:10:52 -08002168class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002169 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002170 PFN_vkAllocationFunction pfnAllocation
2171 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002172 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002173 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002174 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002175}
2176
2177class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002178 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2179 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002180 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002181 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002182 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002183 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002184}
2185
2186class VkDeviceCreateInfo {
2187 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2188 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002189 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002190 u32 queueCreateInfoCount
2191 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002192 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002193 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002194 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002195 const char* const* ppEnabledExtensionNames
2196 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002197}
2198
2199class VkInstanceCreateInfo {
2200 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2201 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002202 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002203 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002204 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002205 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002206 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002207 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2208}
2209
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002210class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002211 VkQueueFlags queueFlags /// Queue flags
2212 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002213 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002214 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002215}
2216
2217class VkPhysicalDeviceMemoryProperties {
2218 u32 memoryTypeCount
2219 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2220 u32 memoryHeapCount
2221 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2222}
2223
Jesse Hall3fbc8562015-11-29 22:10:52 -08002224class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002225 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002226 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002227 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002228 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2229}
2230
2231class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002232 VkDeviceSize size /// Specified in bytes
2233 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002234 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2235}
2236
2237class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002238 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002239 VkExtent3D imageGranularity
2240 VkSparseImageFormatFlags flags
2241}
2242
2243class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002244 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002245 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002246 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2247 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2248 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002249}
2250
2251class VkMemoryType {
2252 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2253 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2254}
2255
2256class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002257 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002258 VkMemoryHeapFlags flags /// Flags for the heap
2259}
2260
2261class VkMappedMemoryRange {
2262 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2263 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002264 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002265 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2266 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002267}
2268
2269class VkFormatProperties {
2270 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2271 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002272 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002273}
2274
2275class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002276 VkExtent3D maxExtent /// max image dimensions for this resource type
2277 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002278 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002279 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2280 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2281}
2282
Jesse Halla15a4bf2015-11-19 22:48:02 -08002283class VkDescriptorImageInfo {
2284 VkSampler sampler
2285 VkImageView imageView
2286 VkImageLayout imageLayout
2287}
2288
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002289class VkDescriptorBufferInfo {
2290 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2291 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2292 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002293}
2294
Jesse Halld27f6aa2015-08-15 17:58:48 -07002295class VkWriteDescriptorSet {
2296 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2297 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002298 VkDescriptorSet dstSet /// Destination descriptor set
2299 u32 dstBinding /// Binding within the destination descriptor set to write
2300 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002301 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002302 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 -08002303 const VkDescriptorImageInfo* pImageInfo
2304 const VkDescriptorBufferInfo* pBufferInfo
2305 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002306}
2307
2308class VkCopyDescriptorSet {
2309 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2310 const void* pNext /// Pointer to next structure
2311 VkDescriptorSet srcSet /// Source descriptor set
2312 u32 srcBinding /// Binding within the source descriptor set to copy from
2313 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002314 VkDescriptorSet dstSet /// Destination descriptor set
2315 u32 dstBinding /// Binding within the destination descriptor set to copy to
2316 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002317 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002318}
2319
2320class VkBufferCreateInfo {
2321 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2322 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002323 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002324 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002325 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002326 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002327 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002328 const u32* pQueueFamilyIndices
2329}
2330
2331class VkBufferViewCreateInfo {
2332 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2333 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002334 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002335 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002336 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002337 VkDeviceSize offset /// Specified in bytes
2338 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002339}
2340
2341class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002342 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002343 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002344 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002345}
2346
2347class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002348 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002349 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002350 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002351 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002352 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002353}
2354
2355class VkMemoryBarrier {
2356 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2357 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002358 VkAccessFlags srcAccessMask
2359 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002360}
2361
2362class VkBufferMemoryBarrier {
2363 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2364 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002365 VkAccessFlags srcAccessMask
2366 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002367 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002368 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002369 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002370 VkDeviceSize offset /// Offset within the buffer to sync
2371 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002372}
2373
2374class VkImageMemoryBarrier {
2375 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2376 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002377 VkAccessFlags srcAccessMask
2378 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002379 VkImageLayout oldLayout /// Current layout of the image
2380 VkImageLayout newLayout /// New layout to transition the image to
2381 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002382 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002383 VkImage image /// Image to sync
2384 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2385}
2386
2387class VkImageCreateInfo {
2388 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2389 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002390 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002391 VkImageType imageType
2392 VkFormat format
2393 VkExtent3D extent
2394 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002395 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002396 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002397 VkImageTiling tiling
2398 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002399 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002400 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002401 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002402 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002403}
2404
2405class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002406 VkDeviceSize offset /// Specified in bytes
2407 VkDeviceSize size /// Specified in bytes
2408 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002409 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002410 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002411}
2412
2413class VkImageViewCreateInfo {
2414 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2415 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002416 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002417 VkImage image
2418 VkImageViewType viewType
2419 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002420 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002421 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002422}
2423
2424class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002425 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002426 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002427 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002428}
2429
Jesse Halla6429252015-11-29 18:59:42 -08002430class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002431 VkDeviceSize resourceOffset /// Specified in bytes
2432 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002433 VkDeviceMemory memory
2434 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002435 VkSparseMemoryBindFlags flags
2436}
2437
Jesse Halla6429252015-11-29 18:59:42 -08002438class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002439 VkImageSubresource subresource
2440 VkOffset3D offset
2441 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002442 VkDeviceMemory memory
2443 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002444 VkSparseMemoryBindFlags flags
2445}
2446
Jesse Halla6429252015-11-29 18:59:42 -08002447class VkSparseBufferMemoryBindInfo {
2448 VkBuffer buffer
2449 u32 bindCount
2450 const VkSparseMemoryBind* pBinds
2451}
2452
2453class VkSparseImageOpaqueMemoryBindInfo {
2454 VkImage image
2455 u32 bindCount
2456 const VkSparseMemoryBind* pBinds
2457}
2458
2459class VkSparseImageMemoryBindInfo {
2460 VkImage image
2461 u32 bindCount
2462 const VkSparseMemoryBind* pBinds
2463}
2464
2465class VkBindSparseInfo {
2466 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2467 const void* pNext
2468 u32 waitSemaphoreCount
2469 const VkSemaphore* pWaitSemaphores
2470 u32 numBufferBinds
2471 const VkSparseBufferMemoryBindInfo* pBufferBinds
2472 u32 numImageOpaqueBinds
2473 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2474 u32 numImageBinds
2475 const VkSparseImageMemoryBindInfo* pImageBinds
2476 u32 signalSemaphoreCount
2477 const VkSemaphore* pSignalSemaphores
2478}
2479
Jesse Hall65ab5522015-11-30 00:07:16 -08002480class VkImageSubresourceLayers {
2481 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002482 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002483 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002484 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002485}
2486
Jesse Halld27f6aa2015-08-15 17:58:48 -07002487class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002488 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002489 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002490 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002491 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002492 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2493}
2494
2495class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002496 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002497 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002498 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002499 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002500}
2501
2502class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002503 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002504 u32 bufferRowLength /// Specified in texels
2505 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002506 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002507 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2508 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2509}
2510
2511class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002512 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002513 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002514 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002515 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002516 VkExtent3D extent
2517}
2518
2519class VkShaderModuleCreateInfo {
2520 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2521 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002522 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002523 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002524 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002525}
2526
Jesse Halld27f6aa2015-08-15 17:58:48 -07002527class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002528 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002529 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002530 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002531 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2532 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2533}
2534
2535class VkDescriptorSetLayoutCreateInfo {
2536 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2537 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002538 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002539 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002540 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002541}
2542
Jesse Hall65ab5522015-11-30 00:07:16 -08002543class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002544 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002545 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002546}
2547
2548class VkDescriptorPoolCreateInfo {
2549 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2550 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002551 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002552 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002553 u32 poolSizeCount
2554 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002555}
2556
Jesse Hall3fbc8562015-11-29 22:10:52 -08002557class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002558 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002559 const void* pNext /// Pointer to next structure
2560 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002561 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002562 const VkDescriptorSetLayout* pSetLayouts
2563}
2564
Jesse Halld27f6aa2015-08-15 17:58:48 -07002565class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002566 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002567 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002568 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002569}
2570
2571class VkSpecializationInfo {
2572 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002573 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002574 platform.size_t dataSize /// Size in bytes of pData
2575 const void* pData /// Pointer to SpecConstant data
2576}
2577
2578class VkPipelineShaderStageCreateInfo {
2579 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2580 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002581 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002582 VkShaderStageFlagBits stage
2583 VkShaderModule module
2584 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002585 const VkSpecializationInfo* pSpecializationInfo
2586}
2587
2588class VkComputePipelineCreateInfo {
2589 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2590 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002591 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002592 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002593 VkPipelineLayout layout /// Interface layout of the pipeline
2594 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
2595 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
2596}
2597
2598class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002599 u32 binding /// Vertex buffer binding id
2600 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002601 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002602}
2603
2604class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002605 u32 location /// location of the shader vertex attrib
2606 u32 binding /// Vertex buffer binding id
2607 VkFormat format /// format of source data
2608 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002609}
2610
2611class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002612 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2613 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002614 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002615 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002616 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002617 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002618 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2619}
2620
2621class VkPipelineInputAssemblyStateCreateInfo {
2622 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2623 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002624 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002625 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002626 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002627}
2628
2629class VkPipelineTessellationStateCreateInfo {
2630 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2631 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002632 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002633 u32 patchControlPoints
2634}
2635
2636class VkPipelineViewportStateCreateInfo {
2637 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2638 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002639 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002640 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002641 const VkViewport* pViewports
2642 u32 scissorCount
2643 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002644}
2645
Jesse Hall3fbc8562015-11-29 22:10:52 -08002646class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002647 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002648 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002649 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002650 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002651 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002652 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002653 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002654 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002655 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002656 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002657 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002658 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002659 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002660}
2661
2662class VkPipelineMultisampleStateCreateInfo {
2663 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2664 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002665 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002666 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002667 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002668 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002669 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002670 VkBool32 alphaToCoverageEnable
2671 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002672}
2673
2674class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002675 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002676 VkBlendFactor srcColorBlendFactor
2677 VkBlendFactor dstColorBlendFactor
2678 VkBlendOp colorBlendOp
2679 VkBlendFactor srcAlphaBlendFactor
2680 VkBlendFactor dstAlphaBlendFactor
2681 VkBlendOp alphaBlendOp
2682 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002683}
2684
2685class VkPipelineColorBlendStateCreateInfo {
2686 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2687 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002688 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002689 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002690 VkLogicOp logicOp
2691 u32 attachmentCount /// # of pAttachments
2692 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002693 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002694}
2695
2696class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002697 VkStencilOp failOp
2698 VkStencilOp passOp
2699 VkStencilOp depthFailOp
2700 VkCompareOp compareOp
2701 u32 compareMask
2702 u32 writeMask
2703 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002704}
2705
2706class VkPipelineDepthStencilStateCreateInfo {
2707 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2708 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002709 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002710 VkBool32 depthTestEnable
2711 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002712 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002713 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2714 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002715 VkStencilOpState front
2716 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002717 f32 minDepthBounds
2718 f32 maxDepthBounds
2719}
2720
2721class VkPipelineDynamicStateCreateInfo {
2722 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2723 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002724 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002725 u32 dynamicStateCount
2726 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002727}
2728
2729class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002730 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2731 const void* pNext /// Pointer to next structure
2732 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002733 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002734 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002735 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2736 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2737 const VkPipelineTessellationStateCreateInfo* pTessellationState
2738 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002739 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002740 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2741 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2742 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002743 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002744 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002745 VkRenderPass renderPass
2746 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002747 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
2748 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 -07002749}
2750
2751class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002752 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2753 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002754 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002755 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2756 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002757}
2758
2759class VkPushConstantRange {
2760 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002761 u32 offset /// Start of the range, in bytes
2762 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002763}
2764
2765class VkPipelineLayoutCreateInfo {
2766 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2767 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002768 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002769 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002770 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2771 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2772 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2773}
2774
2775class VkSamplerCreateInfo {
2776 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2777 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002778 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002779 VkFilter magFilter /// Filter mode for magnification
2780 VkFilter minFilter /// Filter mode for minifiation
2781 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2782 VkSamplerAddressMode addressModeU
2783 VkSamplerAddressMode addressModeV
2784 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002785 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002786 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002787 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002788 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002789 VkCompareOp compareOp
2790 f32 minLod
2791 f32 maxLod
2792 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002793 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002794}
2795
Jesse Hall3fbc8562015-11-29 22:10:52 -08002796class VkCommandPoolCreateInfo {
2797 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002798 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002799 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002800 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002801}
2802
Jesse Hall3fbc8562015-11-29 22:10:52 -08002803class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002804 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002805 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002806 VkCommandPool commandPool
2807 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002808 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002809}
2810
Jesse Hall3dd678a2016-01-08 21:52:01 -08002811class VkCommandBufferInheritanceInfo {
2812 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002813 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002814 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002815 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002816 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002817 VkBool32 occlusionQueryEnable
2818 VkQueryControlFlags queryFlags
2819 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002820}
2821
Jesse Hall3dd678a2016-01-08 21:52:01 -08002822class VkCommandBufferBeginInfo {
2823 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2824 const void* pNext /// Pointer to next structure
2825 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2826 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2827}
2828
Jesse Halld27f6aa2015-08-15 17:58:48 -07002829class VkRenderPassBeginInfo {
2830 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2831 const void* pNext /// Pointer to next structure
2832 VkRenderPass renderPass
2833 VkFramebuffer framebuffer
2834 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002835 u32 clearValueCount
2836 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002837}
2838
2839@union
2840/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2841class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002842 f32[4] float32
2843 s32[4] int32
2844 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002845}
2846
2847class VkClearDepthStencilValue {
2848 f32 depth
2849 u32 stencil
2850}
2851
2852@union
2853/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2854class VkClearValue {
2855 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002856 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002857}
2858
Jesse Hallae38f732015-11-19 21:32:50 -08002859class VkClearAttachment {
2860 VkImageAspectFlags aspectMask
2861 u32 colorAttachment
2862 VkClearValue clearValue
2863}
2864
Jesse Halld27f6aa2015-08-15 17:58:48 -07002865class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002866 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002867 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002868 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002869 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2870 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2871 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2872 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2873 VkImageLayout initialLayout
2874 VkImageLayout finalLayout
2875}
2876
2877class VkAttachmentReference {
2878 u32 attachment
2879 VkImageLayout layout
2880}
2881
2882class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002883 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002884 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002885 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002886 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002887 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002888 const VkAttachmentReference* pColorAttachments
2889 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002890 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002891 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002892 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002893}
2894
2895class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002896 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002897 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002898 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002899 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002900 VkAccessFlags srcAccessMask
2901 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002902 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002903}
2904
2905class VkRenderPassCreateInfo {
2906 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2907 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002908 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002909 u32 attachmentCount
2910 const VkAttachmentDescription* pAttachments
2911 u32 subpassCount
2912 const VkSubpassDescription* pSubpasses
2913 u32 dependencyCount
2914 const VkSubpassDependency* pDependencies
2915}
2916
2917class VkEventCreateInfo {
2918 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2919 const void* pNext /// Pointer to next structure
2920 VkEventCreateFlags flags /// Event creation flags
2921}
2922
2923class VkFenceCreateInfo {
2924 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2925 const void* pNext /// Pointer to next structure
2926 VkFenceCreateFlags flags /// Fence creation flags
2927}
2928
2929class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002930 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2931 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2932 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2933 VkBool32 independentBlend /// blending operations are controlled per-attachment
2934 VkBool32 geometryShader /// geometry stage
2935 VkBool32 tessellationShader /// tessellation control and evaluation stage
2936 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002937 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002938 VkBool32 logicOp /// logic operations
2939 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002940 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002941 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002942 VkBool32 depthBiasClamp /// depth bias clamping
2943 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2944 VkBool32 depthBounds /// depth bounds test
2945 VkBool32 wideLines /// lines with width greater than 1
2946 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002947 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2948 VkBool32 multiViewport
2949 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002950 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2951 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2952 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002953 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002954 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002955 VkBool32 vertexPipelineStoresAndAtomics
2956 VkBool32 fragmentStoresAndAtomics
2957 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002958 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2959 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2960 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002961 VkBool32 shaderStorageImageReadWithoutFormat
2962 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002963 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2964 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2965 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2966 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2967 VkBool32 shaderClipDistance /// clip distance in shaders
2968 VkBool32 shaderCullDistance /// cull distance in shaders
2969 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2970 VkBool32 shaderInt64 /// 64-bit integers in shaders
2971 VkBool32 shaderInt16 /// 16-bit integers in shaders
2972 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002973 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002974 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2975 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2976 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2977 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2978 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2979 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2980 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2981 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2982 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002983 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002984 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002985}
2986
2987class VkPhysicalDeviceLimits {
2988 /// resource maximum sizes
2989 u32 maxImageDimension1D /// max 1D image dimension
2990 u32 maxImageDimension2D /// max 2D image dimension
2991 u32 maxImageDimension3D /// max 3D image dimension
2992 u32 maxImageDimensionCube /// max cubemap image dimension
2993 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002994 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002995 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
2996 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002997 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
2998 /// memory limits
2999 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003000 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003001 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3002 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003003 /// descriptor set limits
3004 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003005 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3006 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3007 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3008 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3009 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003010 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003011 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003012 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3013 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003014 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003015 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003016 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003017 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3018 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003019 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003020 /// vertex stage limits
3021 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003022 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003023 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3024 u32 maxVertexInputBindingStride /// max vertex input binding stride
3025 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3026 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003027 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003028 u32 maxTessellationPatchSize /// max patch size (vertices)
3029 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3030 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3031 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3032 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3033 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3034 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003035 /// geometry stage limits
3036 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3037 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3038 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3039 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3040 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3041 /// fragment stage limits
3042 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003043 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003044 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003045 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3046 /// compute stage limits
3047 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3048 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3049 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3050 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3051
3052 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3053 u32 subTexelPrecisionBits /// num bits of subtexel precision
3054 u32 mipmapPrecisionBits /// num bits of mipmap precision
3055
3056 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003057 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003058
3059 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3060 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3061
3062 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003063 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3064 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3065 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3066
Jesse Halldc6d36c2015-11-29 19:12:15 -08003067 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3068 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3069 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3070 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003071
Jesse Hallfbf97b02015-11-20 14:17:03 -08003072 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003073 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003074 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003075 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3076 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3077 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3078 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3079
3080 u32 maxFramebufferWidth /// max width for a framebuffer
3081 u32 maxFramebufferHeight /// max height for a framebuffer
3082 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003083 VkSampleCountFlags framebufferColorSampleCounts
3084 VkSampleCountFlags framebufferDepthSampleCounts
3085 VkSampleCountFlags framebufferStencilSampleCounts
3086 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003087 u32 maxColorAttachments /// max num of framebuffer color attachments
3088
Jesse Hall091ed9e2015-11-30 00:55:29 -08003089 VkSampleCountFlags sampledImageColorSampleCounts
3090 VkSampleCountFlags sampledImageIntegerSampleCounts
3091 VkSampleCountFlags sampledImageDepthSampleCounts
3092 VkSampleCountFlags sampledImageStencilSampleCounts
3093 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003094 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003095 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003096
Jesse Halla9bb62b2015-11-21 19:31:56 -08003097 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003098
3099 u32 maxClipDistances /// max number of clip distances
3100 u32 maxCullDistances /// max number of cull distances
3101 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3102
Jesse Hallfbf97b02015-11-20 14:17:03 -08003103 u32 discreteQueuePriorities
3104
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003105 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3106 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003107 f32 pointSizeGranularity /// granularity of supported point sizes
3108 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003109 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003110 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003111
Jesse Hall65ab5522015-11-30 00:07:16 -08003112 VkDeviceSize optimalBufferCopyOffsetAlignment
3113 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003114 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003115}
3116
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003117class VkPhysicalDeviceSparseProperties {
3118 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 -08003119 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 -07003120 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3121 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 -07003122 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
3123}
3124
Jesse Halld27f6aa2015-08-15 17:58:48 -07003125class VkSemaphoreCreateInfo {
3126 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3127 const void* pNext /// Pointer to next structure
3128 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3129}
3130
3131class VkQueryPoolCreateInfo {
3132 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3133 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003134 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003135 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003136 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003137 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3138}
3139
3140class VkFramebufferCreateInfo {
3141 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3142 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003143 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003144 VkRenderPass renderPass
3145 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003146 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003147 u32 width
3148 u32 height
3149 u32 layers
3150}
3151
Jesse Hall3fbc8562015-11-29 22:10:52 -08003152class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003153 u32 vertexCount
3154 u32 instanceCount
3155 u32 firstVertex
3156 u32 firstInstance
3157}
3158
Jesse Hall3fbc8562015-11-29 22:10:52 -08003159class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003160 u32 indexCount
3161 u32 instanceCount
3162 u32 firstIndex
3163 s32 vertexOffset
3164 u32 firstInstance
3165}
3166
Jesse Hall3fbc8562015-11-29 22:10:52 -08003167class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003168 u32 x
3169 u32 y
3170 u32 z
3171}
3172
Jesse Hallad250842017-03-10 18:35:38 -08003173@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003174class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003175 u32 minImageCount
3176 u32 maxImageCount
3177 VkExtent2D currentExtent
3178 VkExtent2D minImageExtent
3179 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003180 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003181 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003182 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003183 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003184 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003185}
3186
Jesse Hallad250842017-03-10 18:35:38 -08003187@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003188class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003189 VkFormat format
3190 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003191}
3192
Jesse Hallad250842017-03-10 18:35:38 -08003193@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003194class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003195 VkStructureType sType
3196 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003197 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003198 VkSurfaceKHR surface
3199 u32 minImageCount
3200 VkFormat imageFormat
3201 VkColorSpaceKHR imageColorSpace
3202 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003203 u32 imageArrayLayers
3204 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003205 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003206 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003207 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003208 VkSurfaceTransformFlagBitsKHR preTransform
3209 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003210 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003211 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003212 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003213}
3214
Jesse Hallad250842017-03-10 18:35:38 -08003215@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003216class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003217 VkStructureType sType
3218 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003219 u32 waitSemaphoreCount
3220 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003221 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003222 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003223 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003224 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003225}
3226
Jesse Hallad250842017-03-10 18:35:38 -08003227@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003228class VkDisplayPropertiesKHR {
3229 VkDisplayKHR display
3230 const char* displayName
3231 VkExtent2D physicalDimensions
3232 VkExtent2D physicalResolution
3233 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003234 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003235 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003236}
3237
Jesse Hallad250842017-03-10 18:35:38 -08003238@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003239class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003240 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003241 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003242}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003243
Jesse Hallad250842017-03-10 18:35:38 -08003244@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003245class VkDisplayModePropertiesKHR {
3246 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003247 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003248}
3249
Jesse Hallad250842017-03-10 18:35:38 -08003250@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003251class VkDisplayModeCreateInfoKHR {
3252 VkStructureType sType
3253 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003254 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003255 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003256}
3257
Jesse Hallad250842017-03-10 18:35:38 -08003258@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003259class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003260 VkDisplayKHR currentDisplay
3261 u32 currentStackIndex
3262}
3263
Jesse Hallad250842017-03-10 18:35:38 -08003264@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003265class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003266 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3267 VkOffset2D minSrcPosition
3268 VkOffset2D maxSrcPosition
3269 VkExtent2D minSrcExtent
3270 VkExtent2D maxSrcExtent
3271 VkOffset2D minDstPosition
3272 VkOffset2D maxDstPosition
3273 VkExtent2D minDstExtent
3274 VkExtent2D maxDstExtent
3275}
3276
Jesse Hallad250842017-03-10 18:35:38 -08003277@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003278class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003279 VkStructureType sType
3280 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003281 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003282 VkDisplayModeKHR displayMode
3283 u32 planeIndex
3284 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003285 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003286 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003287 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3288 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003289}
3290
Jesse Hallad250842017-03-10 18:35:38 -08003291@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003292class VkDisplayPresentInfoKHR {
3293 VkStructureType sType
3294 const void* pNext
3295 VkRect2D srcRect
3296 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003297 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003298}
3299
Jesse Hallad250842017-03-10 18:35:38 -08003300@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003301class VkXlibSurfaceCreateInfoKHR {
3302 VkStructureType sType
3303 const void* pNext
3304 VkXlibSurfaceCreateFlagsKHR flags
3305 platform.Display* dpy
3306 platform.Window window
3307}
3308
Jesse Hallad250842017-03-10 18:35:38 -08003309@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003310class VkXcbSurfaceCreateInfoKHR {
3311 VkStructureType sType
3312 const void* pNext
3313 VkXcbSurfaceCreateFlagsKHR flags
3314 platform.xcb_connection_t* connection
3315 platform.xcb_window_t window
3316}
3317
Jesse Hallad250842017-03-10 18:35:38 -08003318@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003319class VkWaylandSurfaceCreateInfoKHR {
3320 VkStructureType sType
3321 const void* pNext
3322 VkWaylandSurfaceCreateFlagsKHR flags
3323 platform.wl_display* display
3324 platform.wl_surface* surface
3325}
3326
Jesse Hallad250842017-03-10 18:35:38 -08003327@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003328class VkMirSurfaceCreateInfoKHR {
3329 VkStructureType sType
3330 const void* pNext
3331 VkMirSurfaceCreateFlagsKHR flags
3332 platform.MirConnection* connection
3333 platform.MirSurface* mirSurface
3334}
3335
Jesse Hallad250842017-03-10 18:35:38 -08003336@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003337class VkAndroidSurfaceCreateInfoKHR {
3338 VkStructureType sType
3339 const void* pNext
3340 VkAndroidSurfaceCreateFlagsKHR flags
3341 platform.ANativeWindow* window
3342}
3343
Jesse Hallad250842017-03-10 18:35:38 -08003344@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003345class VkWin32SurfaceCreateInfoKHR {
3346 VkStructureType sType
3347 const void* pNext
3348 VkWin32SurfaceCreateFlagsKHR flags
3349 platform.HINSTANCE hinstance
3350 platform.HWND hwnd
3351}
3352
Jesse Hallad250842017-03-10 18:35:38 -08003353@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003354@internal class Gralloc1Usage {
3355 u64 consumer
3356 u64 producer
3357}
3358
Jesse Hallad250842017-03-10 18:35:38 -08003359@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003360class VkNativeBufferANDROID {
3361 VkStructureType sType
3362 const void* pNext
3363 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003364 s32 stride
3365 s32 format
3366 s32 usage
3367 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003368}
3369
Jesse Hallad250842017-03-10 18:35:38 -08003370@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003371class VkSwapchainImageCreateInfoANDROID {
3372 VkStructureType sType
3373 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003374 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003375}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003376
Jesse Hallad250842017-03-10 18:35:38 -08003377@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003378class VkPhysicalDevicePresentationPropertiesANDROID {
3379 VkStructureType sType
3380 void* pNext
3381 VkBool32 sharedImage
3382}
3383
Jesse Hallad250842017-03-10 18:35:38 -08003384@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003385class VkDebugReportCallbackCreateInfoEXT {
3386 VkStructureType sType
3387 const void* pNext
3388 VkDebugReportFlagsEXT flags
3389 PFN_vkDebugReportCallbackEXT pfnCallback
3390 void* pUserData
3391}
3392
Jesse Hallad250842017-03-10 18:35:38 -08003393@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003394class VkPipelineRasterizationStateRasterizationOrderAMD {
3395 VkStructureType sType
3396 const void* pNext
3397 VkRasterizationOrderAMD rasterizationOrder
3398}
3399
Jesse Hallad250842017-03-10 18:35:38 -08003400@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003401class VkDebugMarkerObjectNameInfoEXT {
3402 VkStructureType sType
3403 const void* pNext
3404 VkDebugReportObjectTypeEXT objectType
3405 u64 object
3406 const char* pObjectName
3407}
3408
Jesse Hallad250842017-03-10 18:35:38 -08003409@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003410class VkDebugMarkerObjectTagInfoEXT {
3411 VkStructureType sType
3412 const void* pNext
3413 VkDebugReportObjectTypeEXT objectType
3414 u64 object
3415 u64 tagName
3416 platform.size_t tagSize
3417 const void* pTag
3418}
3419
Jesse Hallad250842017-03-10 18:35:38 -08003420@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003421class VkDebugMarkerMarkerInfoEXT {
3422 VkStructureType sType
3423 const void* pNext
3424 const char* pMarkerName
3425 f32[4] color
3426}
3427
Jesse Hallad250842017-03-10 18:35:38 -08003428@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003429class VkDedicatedAllocationImageCreateInfoNV {
3430 VkStructureType sType
3431 const void* pNext
3432 VkBool32 dedicatedAllocation
3433}
3434
Jesse Hallad250842017-03-10 18:35:38 -08003435@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003436class VkDedicatedAllocationBufferCreateInfoNV {
3437 VkStructureType sType
3438 const void* pNext
3439 VkBool32 dedicatedAllocation
3440}
3441
Jesse Hallad250842017-03-10 18:35:38 -08003442@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003443class VkDedicatedAllocationMemoryAllocateInfoNV {
3444 VkStructureType sType
3445 const void* pNext
3446 VkImage image
3447 VkBuffer buffer
3448}
3449
Jesse Hallad250842017-03-10 18:35:38 -08003450@extension("VK_KHX_multiview") // 54
3451class VkRenderPassMultiviewCreateInfoKHX {
3452 VkStructureType sType
3453 const void* pNext
3454 u32 subpassCount
3455 const u32* pViewMasks
3456 u32 dependencyCount
3457 const s32* pViewOffsets
3458 u32 correlationMaskCount
3459 const u32* pCorrelationMasks
3460}
3461
3462@extension("VK_KHX_multiview") // 54
3463class VkPhysicalDeviceMultiviewFeaturesKHX {
3464 VkStructureType sType
3465 void* pNext
3466 VkBool32 multiview
3467 VkBool32 multiviewGeometryShader
3468 VkBool32 multiviewTessellationShader
3469}
3470
3471@extension("VK_KHX_multiview") // 54
3472class VkPhysicalDeviceMultiviewPropertiesKHX {
3473 VkStructureType sType
3474 void* pNext
3475 u32 maxMultiviewViewCount
3476 u32 maxMultiviewInstanceIndex
3477}
3478
3479@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003480class VkExternalImageFormatPropertiesNV {
3481 VkImageFormatProperties imageFormatProperties
3482 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3483 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3484 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3485}
3486
Jesse Hallad250842017-03-10 18:35:38 -08003487@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003488class VkExternalMemoryImageCreateInfoNV {
3489 VkStructureType sType
3490 const void* pNext
3491 VkExternalMemoryHandleTypeFlagsNV handleTypes
3492}
3493
Jesse Hallad250842017-03-10 18:35:38 -08003494@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003495class VkExportMemoryAllocateInfoNV {
3496 VkStructureType sType
3497 const void* pNext
3498 VkExternalMemoryHandleTypeFlagsNV handleTypes
3499}
3500
Jesse Hallad250842017-03-10 18:35:38 -08003501@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003502class VkImportMemoryWin32HandleInfoNV {
3503 VkStructureType sType
3504 const void* pNext
3505 VkExternalMemoryHandleTypeFlagsNV handleType
3506 platform.HANDLE handle
3507}
3508
Jesse Hallad250842017-03-10 18:35:38 -08003509@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003510class VkExportMemoryWin32HandleInfoNV {
3511 VkStructureType sType
3512 const void* pNext
3513 const platform.SECURITY_ATTRIBUTES* pAttributes
3514 platform.DWORD dwAccess
3515}
3516
Jesse Hallad250842017-03-10 18:35:38 -08003517@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003518class VkWin32KeyedMutexAcquireReleaseInfoNV {
3519 VkStructureType sType
3520 const void* pNext
3521 u32 acquireCount
3522 const VkDeviceMemory* pAcquireSyncs
3523 const u64* pAcquireKeys
3524 const u32* pAcquireTimeoutMilliseconds
3525 u32 releaseCount
3526 const VkDeviceMemory* pReleaseSyncs
3527 const u64* pReleaseKeys
3528}
3529
Jesse Hallad250842017-03-10 18:35:38 -08003530@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003531class VkPhysicalDeviceFeatures2KHR {
3532 VkStructureType sType
3533 void* pNext
3534 VkPhysicalDeviceFeatures features
3535}
3536
Jesse Hallad250842017-03-10 18:35:38 -08003537@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003538class VkPhysicalDeviceProperties2KHR {
3539 VkStructureType sType
3540 void* pNext
3541 VkPhysicalDeviceProperties properties
3542}
3543
Jesse Hallad250842017-03-10 18:35:38 -08003544@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003545class VkFormatProperties2KHR {
3546 VkStructureType sType
3547 void* pNext
3548 VkFormatProperties formatProperties
3549}
3550
Jesse Hallad250842017-03-10 18:35:38 -08003551@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003552class VkImageFormatProperties2KHR {
3553 VkStructureType sType
3554 void* pNext
3555 VkImageFormatProperties imageFormatProperties
3556}
3557
Jesse Hallad250842017-03-10 18:35:38 -08003558@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003559class VkPhysicalDeviceImageFormatInfo2KHR {
3560 VkStructureType sType
3561 const void* pNext
3562 VkFormat format
3563 VkImageType type
3564 VkImageTiling tiling
3565 VkImageUsageFlags usage
3566 VkImageCreateFlags flags
3567}
3568
Jesse Hallad250842017-03-10 18:35:38 -08003569@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003570class VkQueueFamilyProperties2KHR {
3571 VkStructureType sType
3572 void* pNext
3573 VkQueueFamilyProperties queueFamilyProperties
3574}
3575
Jesse Hallad250842017-03-10 18:35:38 -08003576@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003577class VkPhysicalDeviceMemoryProperties2KHR {
3578 VkStructureType sType
3579 void* pNext
3580 VkPhysicalDeviceMemoryProperties memoryProperties
3581}
3582
Jesse Hallad250842017-03-10 18:35:38 -08003583@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003584class VkSparseImageFormatProperties2KHR {
3585 VkStructureType sType
3586 void* pNext
3587 VkSparseImageFormatProperties properties
3588}
3589
Jesse Hallad250842017-03-10 18:35:38 -08003590@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003591class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3592 VkStructureType sType
3593 const void* pNext
3594 VkFormat format
3595 VkImageType type
3596 VkSampleCountFlagBits samples
3597 VkImageUsageFlags usage
3598 VkImageTiling tiling
3599}
3600
Jesse Hallad250842017-03-10 18:35:38 -08003601@extension("VK_KHX_device_group") // 61
3602class VkMemoryAllocateFlagsInfoKHX {
3603 VkStructureType sType
3604 const void* pNext
3605 VkMemoryAllocateFlagsKHX flags
3606 u32 deviceMask
3607}
3608
3609@extension("VK_KHX_device_group") // 61
3610class VkBindBufferMemoryInfoKHX {
3611 VkStructureType sType
3612 const void* pNext
3613 VkBuffer buffer
3614 VkDeviceMemory memory
3615 VkDeviceSize memoryOffset
3616 u32 deviceIndexCount
3617 const u32* pDeviceIndices
3618}
3619
3620@extension("VK_KHX_device_group") // 61
3621class VkBindImageMemoryInfoKHX {
3622 VkStructureType sType
3623 const void* pNext
3624 VkImage image
3625 VkDeviceMemory memory
3626 VkDeviceSize memoryOffset
3627 u32 deviceIndexCount
3628 const u32* pDeviceIndices
3629 u32 SFRRectCount
3630 const VkRect2D* pSFRRects
3631}
3632
3633@extension("VK_KHX_device_group") // 61
3634class VkDeviceGroupRenderPassBeginInfoKHX {
3635 VkStructureType sType
3636 const void* pNext
3637 u32 deviceMask
3638 u32 deviceRenderAreaCount
3639 const VkRect2D* pDeviceRenderAreas
3640}
3641
3642@extension("VK_KHX_device_group") // 61
3643class VkDeviceGroupCommandBufferBeginInfoKHX {
3644 VkStructureType sType
3645 const void* pNext
3646 u32 deviceMask
3647}
3648
3649@extension("VK_KHX_device_group") // 61
3650class VkDeviceGroupSubmitInfoKHX {
3651 VkStructureType sType
3652 const void* pNext
3653 u32 waitSemaphoreCount
3654 const u32* pWaitSemaphoreDeviceIndices
3655 u32 commandBufferCount
3656 const u32* pCommandBufferDeviceMasks
3657 u32 signalSemaphoreCount
3658 const u32* pSignalSemaphoreDeviceIndices
3659}
3660
3661@extension("VK_KHX_device_group") // 61
3662class VkDeviceGroupBindSparseInfoKHX {
3663 VkStructureType sType
3664 const void* pNext
3665 u32 resourceDeviceIndex
3666 u32 memoryDeviceIndex
3667}
3668
3669@extension("VK_KHX_device_group") // 61
3670class VkDeviceGroupPresentCapabilitiesKHX {
3671 VkStructureType sType
3672 const void* pNext
3673 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3674 VkDeviceGroupPresentModeFlagsKHX modes
3675}
3676
3677@extension("VK_KHX_device_group") // 61
3678class VkImageSwapchainCreateInfoKHX {
3679 VkStructureType sType
3680 const void* pNext
3681 VkSwapchainKHR swapchain
3682}
3683
3684@extension("VK_KHX_device_group") // 61
3685class VkBindImageMemorySwapchainInfoKHX {
3686 VkStructureType sType
3687 const void* pNext
3688 VkSwapchainKHR swapchain
3689 u32 imageIndex
3690}
3691
3692@extension("VK_KHX_device_group") // 61
3693class VkAcquireNextImageInfoKHX {
3694 VkStructureType sType
3695 const void* pNext
3696 VkSwapchainKHR swapchain
3697 u64 timeout
3698 VkSemaphore semaphore
3699 VkFence fence
3700 u32 deviceMask
3701}
3702
3703@extension("VK_KHX_device_group") // 61
3704class VkDeviceGroupPresentInfoKHX {
3705 VkStructureType sType
3706 const void* pNext
3707 u32 swapchainCount
3708 const u32* pDeviceMasks
3709 VkDeviceGroupPresentModeFlagBitsKHX mode
3710}
3711
3712@extension("VK_KHX_device_group") // 61
3713class VkDeviceGroupSwapchainCreateInfoKHX {
3714 VkStructureType sType
3715 const void* pNext
3716 VkDeviceGroupPresentModeFlagsKHX modes
3717}
3718
3719@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13003720class VkValidationFlagsEXT {
3721 VkStructureType sType
3722 const void* pNext
3723 u32 disabledValidationCheckCount
3724 VkValidationCheckEXT* pDisabledValidationChecks
3725}
3726
Jesse Hallad250842017-03-10 18:35:38 -08003727@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08003728class VkViSurfaceCreateInfoNN {
3729 VkStructureType sType
3730 const void* pNext
3731 VkViSurfaceCreateFlagsNN flags
3732 void* window
3733}
3734
Jesse Hallad250842017-03-10 18:35:38 -08003735@extension("VK_KHX_device_group_creation") // 71
3736class VkPhysicalDeviceGroupPropertiesKHX {
3737 VkStructureType sType
3738 const void* pNext
3739 u32 physicalDeviceCount
3740 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3741 VkBool32 subsetAllocation
3742}
3743
3744@extension("VK_KHX_device_group_creation") // 71
3745class VkDeviceGroupDeviceCreateInfoKHX {
3746 VkStructureType sType
3747 const void* pNext
3748 u32 physicalDeviceCount
3749 const VkPhysicalDevice* pPhysicalDevices
3750}
3751
3752@extension("VK_KHX_external_memory_capabilities") // 72
3753class VkExternalMemoryPropertiesKHX {
3754 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3755 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3756 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3757}
3758
3759@extension("VK_KHX_external_memory_capabilities") // 72
3760class VkPhysicalDeviceExternalImageFormatInfoKHX {
3761 VkStructureType sType
3762 const void* pNext
3763 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3764}
3765
3766@extension("VK_KHX_external_memory_capabilities") // 72
3767class VkExternalImageFormatPropertiesKHX {
3768 VkStructureType sType
3769 void* pNext
3770 VkExternalMemoryPropertiesKHX externalMemoryProperties
3771}
3772
3773@extension("VK_KHX_external_memory_capabilities") // 72
3774class VkPhysicalDeviceExternalBufferInfoKHX {
3775 VkStructureType sType
3776 const void* pNext
3777 VkBufferCreateFlags flags
3778 VkBufferUsageFlags usage
3779 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3780}
3781
3782@extension("VK_KHX_external_memory_capabilities") // 72
3783class VkExternalBufferPropertiesKHX {
3784 VkStructureType sType
3785 void* pNext
3786 VkExternalMemoryPropertiesKHX externalMemoryProperties
3787}
3788
3789@extension("VK_KHX_external_memory_capabilities") // 72
3790class VkPhysicalDeviceIDPropertiesKHX {
3791 VkStructureType sType
3792 void* pNext
3793 u8[VK_UUID_SIZE] deviceUUID
3794 u8[VK_UUID_SIZE] driverUUID
3795 u8[VK_LUID_SIZE_KHX] deviceLUID
3796 VkBool32 deviceLUIDValid
3797}
3798
Jesse Hallad250842017-03-10 18:35:38 -08003799@extension("VK_KHX_external_memory") // 73
3800class VkExternalMemoryImageCreateInfoKHX {
3801 VkStructureType sType
3802 const void* pNext
3803 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3804}
3805
3806@extension("VK_KHX_external_memory") // 73
3807class VkExternalMemoryBufferCreateInfoKHX {
3808 VkStructureType sType
3809 const void* pNext
3810 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3811}
3812
3813@extension("VK_KHX_external_memory") // 73
3814class VkExportMemoryAllocateInfoKHX {
3815 VkStructureType sType
3816 const void* pNext
3817 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3818}
3819
3820@extension("VK_KHX_external_memory_win32") // 74
3821class VkImportMemoryWin32HandleInfoKHX {
3822 VkStructureType sType
3823 const void* pNext
3824 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3825 platform.HANDLE handle
3826}
3827
3828@extension("VK_KHX_external_memory_win32") // 74
3829class VkExportMemoryWin32HandleInfoKHX {
3830 VkStructureType sType
3831 const void* pNext
3832 const platform.SECURITY_ATTRIBUTES* pAttributes
3833 platform.DWORD dwAccess
3834 platform.LPCWSTR name
3835}
3836
3837@extension("VK_KHX_external_memory_win32") // 74
3838class VkMemoryWin32HandlePropertiesKHX {
3839 VkStructureType sType
3840 void* pNext
3841 u32 memoryTypeBits
3842}
3843
3844@extension("VK_KHX_external_memory_fd") // 75
3845class VkImportMemoryFdInfoKHX {
3846 VkStructureType sType
3847 const void* pNext
3848 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3849 int fd
3850}
3851
3852@extension("VK_KHX_external_memory_fd") // 75
3853class VkMemoryFdPropertiesKHX {
3854 VkStructureType sType
3855 void* pNext
3856 u32 memoryTypeBits
3857}
3858
3859@extension("VK_KHX_win32_keyed_mutex") // 76
3860class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3861 VkStructureType sType
3862 const void* pNext
3863 u32 acquireCount
3864 const VkDeviceMemory* pAcquireSyncs
3865 const u64* pAcquireKeys
3866 const u32* pAcquireTimeouts
3867 u32 releaseCount
3868 const VkDeviceMemory* pReleaseSyncs
3869 const u64* pReleaseKeys
3870}
3871
3872@extension("VK_KHX_external_semaphore_capabilities") // 77
3873class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3874 VkStructureType sType
3875 const void* pNext
3876 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3877}
3878
3879@extension("VK_KHX_external_semaphore_capabilities") // 77
3880class VkExternalSemaphorePropertiesKHX {
3881 VkStructureType sType
3882 void* pNext
3883 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3884 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3885 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3886}
3887
3888@extension("VK_KHX_external_semaphore") // 78
3889class VkExportSemaphoreCreateInfoKHX {
3890 VkStructureType sType
3891 const void* pNext
3892 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3893}
3894
3895@extension("VK_KHX_external_semaphore_win32") // 79
3896class VkImportSemaphoreWin32HandleInfoKHX {
3897 VkStructureType sType
3898 const void* pNext
3899 VkSemaphore semaphore
3900 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3901 platform.HANDLE handle
3902}
3903
3904@extension("VK_KHX_external_semaphore_win32") // 79
3905class VkExportSemaphoreWin32HandleInfoKHX {
3906 VkStructureType sType
3907 const void* pNext
3908 const platform.SECURITY_ATTRIBUTES* pAttributes
3909 platform.DWORD dwAccess
3910 platform.LPCWSTR name
3911}
3912
3913@extension("VK_KHX_external_semaphore_win32") // 79
3914class VkD3D12FenceSubmitInfoKHX {
3915 VkStructureType sType
3916 const void* pNext
3917 u32 waitSemaphoreValuesCount
3918 const u64* pWaitSemaphoreValues
3919 u32 signalSemaphoreValuesCount
3920 const u64* pSignalSemaphoreValues
3921}
3922
3923@extension("VK_KHX_external_semaphore_fd") // 80
3924class VkImportSemaphoreFdInfoKHX {
3925 VkStructureType sType
3926 const void* pNext
3927 VkSemaphore semaphore
3928 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3929 s32 fd
3930}
3931
3932@extension("VK_KHR_push_descriptor") // 81
3933class VkPhysicalDevicePushDescriptorPropertiesKHR {
3934 VkStructureType sType
3935 void* pNext
3936 u32 maxPushDescriptors
3937}
3938
3939@extension("VK_KHR_incremental_present") // 85
3940class VkRectLayerKHR {
3941 VkOffset2D offset
3942 VkExtent2D extent
3943 u32 layer
3944}
3945
3946@extension("VK_KHR_incremental_present") // 85
3947class VkPresentRegionKHR {
3948 u32 rectangleCount
3949 const VkRectLayerKHR* pRectangles
3950}
3951
3952@extension("VK_KHR_incremental_present") // 85
3953class VkPresentRegionsKHR {
3954 VkStructureType sType
3955 const void* pNext
3956 u32 swapchainCount
3957 const VkPresentRegionKHR* pRegions
3958}
3959
3960@extension("VK_KHR_descriptor_update_template") // 86
3961class VkDescriptorUpdateTemplateEntryKHR {
3962 u32 dstBinding
3963 u32 dstArrayElement
3964 u32 descriptorCount
3965 VkDescriptorType descriptorType
3966 platform.size_t offset
3967 platform.size_t stride
3968}
3969
3970@extension("VK_KHR_descriptor_update_template") // 86
3971class VkDescriptorUpdateTemplateCreateInfoKHR {
3972 VkStructureType sType
3973 void* pNext
3974 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3975 u32 descriptorUpdateEntryCount
3976 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3977 VkDescriptorUpdateTemplateTypeKHR templateType
3978 VkDescriptorSetLayout descriptorSetLayout
3979 VkPipelineBindPoint pipelineBindPoint
3980 VkPipelineLayout pipelineLayout
3981 u32 set
3982}
3983
3984@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003985class VkDeviceGeneratedCommandsFeaturesNVX {
3986 VkStructureType sType
3987 const void* pNext
3988 VkBool32 computeBindingPointSupport
3989}
3990
Jesse Hallad250842017-03-10 18:35:38 -08003991@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003992class VkDeviceGeneratedCommandsLimitsNVX {
3993 VkStructureType sType
3994 const void* pNext
3995 u32 maxIndirectCommandsLayoutTokenCount
3996 u32 maxObjectEntryCounts
3997 u32 minSequenceCountBufferOffsetAlignment
3998 u32 minSequenceIndexBufferOffsetAlignment
3999 u32 minCommandsTokenBufferOffsetAlignment
4000}
4001
Jesse Hallad250842017-03-10 18:35:38 -08004002@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004003class VkIndirectCommandsTokenNVX {
4004 VkIndirectCommandsTokenTypeNVX tokenType
4005 VkBuffer buffer
4006 VkDeviceSize offset
4007}
4008
Jesse Hallad250842017-03-10 18:35:38 -08004009@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004010class VkIndirectCommandsLayoutTokenNVX {
4011 VkIndirectCommandsTokenTypeNVX tokenType
4012 u32 bindingUnit
4013 u32 dynamicCount
4014 u32 divisor
4015}
4016
Jesse Hallad250842017-03-10 18:35:38 -08004017@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004018class VkIndirectCommandsLayoutCreateInfoNVX {
4019 VkStructureType sType
4020 const void* pNext
4021 VkPipelineBindPoint pipelineBindPoint
4022 VkIndirectCommandsLayoutUsageFlagsNVX flags
4023 u32 tokenCount
4024 const VkIndirectCommandsLayoutTokenNVX* pTokens
4025}
4026
Jesse Hallad250842017-03-10 18:35:38 -08004027@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004028class VkCmdProcessCommandsInfoNVX {
4029 VkStructureType sType
4030 const void* pNext
4031 VkObjectTableNVX objectTable
4032 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4033 u32 indirectCommandsTokenCount
4034 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4035 u32 maxSequencesCount
4036 VkCommandBuffer targetCommandBuffer
4037 VkBuffer sequencesCountBuffer
4038 VkDeviceSize sequencesCountOffset
4039 VkBuffer sequencesIndexBuffer
4040 VkDeviceSize sequencesIndexOffset
4041}
4042
Jesse Hallad250842017-03-10 18:35:38 -08004043@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004044class VkCmdReserveSpaceForCommandsInfoNVX {
4045 VkStructureType sType
4046 const void* pNext
4047 VkObjectTableNVX objectTable
4048 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4049 u32 maxSequencesCount
4050}
4051
Jesse Hallad250842017-03-10 18:35:38 -08004052@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004053class VkObjectTableCreateInfoNVX {
4054 VkStructureType sType
4055 const void* pNext
4056 u32 objectCount
4057 const VkObjectEntryTypeNVX* pObjectEntryTypes
4058 const u32* pObjectEntryCounts
4059 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4060 u32 maxUniformBuffersPerDescriptor
4061 u32 maxStorageBuffersPerDescriptor
4062 u32 maxStorageImagesPerDescriptor
4063 u32 maxSampledImagesPerDescriptor
4064 u32 maxPipelineLayouts
4065}
4066
Jesse Hallad250842017-03-10 18:35:38 -08004067@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004068class VkObjectTableEntryNVX {
4069 VkObjectEntryTypeNVX type
4070 VkObjectEntryUsageFlagsNVX flags
4071}
4072
Jesse Hallad250842017-03-10 18:35:38 -08004073@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004074class VkObjectTablePipelineEntryNVX {
4075 VkObjectEntryTypeNVX type
4076 VkObjectEntryUsageFlagsNVX flags
4077 VkPipeline pipeline
4078}
4079
Jesse Hallad250842017-03-10 18:35:38 -08004080@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004081class VkObjectTableDescriptorSetEntryNVX {
4082 VkObjectEntryTypeNVX type
4083 VkObjectEntryUsageFlagsNVX flags
4084 VkPipelineLayout pipelineLayout
4085 VkDescriptorSet descriptorSet
4086}
4087
Jesse Hallad250842017-03-10 18:35:38 -08004088@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004089class VkObjectTableVertexBufferEntryNVX {
4090 VkObjectEntryTypeNVX type
4091 VkObjectEntryUsageFlagsNVX flags
4092 VkBuffer buffer
4093}
4094
Jesse Hallad250842017-03-10 18:35:38 -08004095@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004096class VkObjectTableIndexBufferEntryNVX {
4097 VkObjectEntryTypeNVX type
4098 VkObjectEntryUsageFlagsNVX flags
4099 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004100 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004101}
4102
Jesse Hallad250842017-03-10 18:35:38 -08004103@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004104class VkObjectTablePushConstantEntryNVX {
4105 VkObjectEntryTypeNVX type
4106 VkObjectEntryUsageFlagsNVX flags
4107 VkPipelineLayout pipelineLayout
4108 VkShaderStageFlags stageFlags
4109}
4110
Jesse Hallad250842017-03-10 18:35:38 -08004111@extension("VK_NV_clip_space_w_scaling") // 88
4112class VkViewportWScalingNV {
4113 f32 xcoeff
4114 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004115}
4116
Jesse Hallad250842017-03-10 18:35:38 -08004117@extension("VK_NV_clip_space_w_scaling") // 88
4118class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004119 VkStructureType sType
4120 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004121 VkBool32 viewportWScalingEnable
4122 u32 viewportCount
4123 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004124}
4125
Jesse Hallad250842017-03-10 18:35:38 -08004126@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004127class VkSurfaceCapabilities2EXT {
4128 VkStructureType sType
4129 void* pNext
4130 u32 minImageCount
4131 u32 maxImageCount
4132 VkExtent2D currentExtent
4133 VkExtent2D minImageExtent
4134 VkExtent2D maxImageExtent
4135 u32 maxImageArrayLayers
4136 VkSurfaceTransformFlagsKHR supportedTransforms
4137 VkSurfaceTransformFlagBitsKHR currentTransform
4138 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4139 VkImageUsageFlags supportedUsageFlags
4140 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4141}
4142
Jesse Hallad250842017-03-10 18:35:38 -08004143@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004144class VkDisplayPowerInfoEXT {
4145 VkStructureType sType
4146 const void* pNext
4147 VkDisplayPowerStateEXT powerState
4148}
4149
Jesse Hallad250842017-03-10 18:35:38 -08004150@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004151class VkDeviceEventInfoEXT {
4152 VkStructureType sType
4153 const void* pNext
4154 VkDeviceEventTypeEXT deviceEvent
4155}
4156
Jesse Hallad250842017-03-10 18:35:38 -08004157@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004158class VkDisplayEventInfoEXT {
4159 VkStructureType sType
4160 const void* pNext
4161 VkDisplayEventTypeEXT displayEvent
4162}
4163
Jesse Hallad250842017-03-10 18:35:38 -08004164@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004165class VkSwapchainCounterCreateInfoEXT {
4166 VkStructureType sType
4167 const void* pNext
4168 VkSurfaceCounterFlagsEXT surfaceCounters
4169}
4170
Jesse Hallad250842017-03-10 18:35:38 -08004171@extension("VK_GOOGLE_display_timing") // 93
4172class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004173 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08004174}
4175
4176@extension("VK_GOOGLE_display_timing") // 93
4177class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004178 u32 presentID
4179 u64 desiredPresentTime
4180 u64 actualPresentTime
4181 u64 earliestPresentTime
4182 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08004183}
4184
4185@extension("VK_GOOGLE_display_timing") // 93
4186class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004187 u32 presentID
4188 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08004189}
4190
4191@extension("VK_GOOGLE_display_timing") // 93
4192class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004193 VkStructureType sType
4194 const void* pNext
4195 u32 swapchainCount
4196 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08004197}
4198
4199@extension("VK_NVX_multiview_per_view_attributes") // 98
4200class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4201 VkStructureType sType
4202 void* pNext
4203 VkBool32 perViewPositionAllComponents
4204}
4205
4206@extension("VK_NV_viewport_swizzle") // 99
4207class VkViewportSwizzleNV {
4208 VkViewportCoordinateSwizzleNV x
4209 VkViewportCoordinateSwizzleNV y
4210 VkViewportCoordinateSwizzleNV z
4211 VkViewportCoordinateSwizzleNV w
4212}
4213
4214@extension("VK_NV_viewport_swizzle") // 99
4215class VkPipelineViewportSwizzleStateCreateInfoNV {
4216 VkStructureType sType
4217 const void* pNext
4218 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4219 u32 viewportCount
4220 const VkViewportSwizzleNV* pViewportSwizzles
4221}
4222
4223@extension("VK_EXT_discard_rectangles") // 100
4224class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4225 VkStructureType sType
4226 const void* pNext
4227 u32 maxDiscardRectangles
4228}
4229
4230@extension("VK_EXT_discard_rectangles") // 100
4231class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004232 VkStructureType sType
4233 const void* pNext
4234 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4235 VkDiscardRectangleModeEXT discardRectangleMode
4236 u32 discardRectangleCount
4237 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08004238}
4239
4240@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004241class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004242 f32 x
4243 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004244}
4245
Jesse Hallad250842017-03-10 18:35:38 -08004246@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004247class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004248 VkStructureType sType
4249 const void* pNext
4250 VkXYColorEXT displayPrimaryRed
4251 VkXYColorEXT displayPrimaryGreen
4252 VkXYColorEXT displayPrimaryBlue
4253 VkXYColorEXT whitePoint
4254 f32 maxLuminance
4255 f32 minLuminance
4256 f32 maxContentLightLevel
4257 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004258}
4259
Chris Forbese2d3ee12017-03-16 16:10:15 +13004260@extension("VK_KHR_shared_presentable_image") // 111
4261class VkSharedPresentSurfaceCapabilitiesKHR {
4262 VkStructureType sType
4263 const void* pNext
4264 VkImageUsageFlags sharedPresentSupportedUsageFlags
4265}
4266
4267@extension("VK_KHR_get_surface_capabilities2") // 119
4268class VkPhysicalDeviceSurfaceInfo2KHR {
4269 VkStructureType sType
4270 const void* pNext
4271 VkSurfaceKHR surface
4272}
4273
4274@extension("VK_KHR_get_surface_capabilities2") // 119
4275class VkSurfaceCapabilities2KHR {
4276 VkStructureType sType
4277 void* pNext
4278 VkSurfaceCapabilitiesKHR surfaceCapabilities
4279}
4280
4281@extension("VK_KHR_get_surface_capabilities2") // 119
4282class VkSurfaceFormat2KHR {
4283 VkStructureType sType
4284 void* pNext
4285 VkSurfaceFormatKHR surfaceFormat
4286}
4287
Jesse Hallad250842017-03-10 18:35:38 -08004288@extension("VK_MVK_ios_surface") // 123
4289class VkIOSSurfaceCreateInfoMVK {
4290 VkStructureType sType
4291 const void* pNext
4292 VkIOSSurfaceCreateFlagsMVK flags
4293 const void* pView
4294}
4295
4296@extension("VK_MVK_macos_surface") // 124
4297class VkMacOSSurfaceCreateInfoMVK {
4298 VkStructureType sType
4299 const void* pNext
4300 VkMacOSSurfaceCreateFlagsMVK flags
4301 const void* pView
4302}
4303
Jesse Halld27f6aa2015-08-15 17:58:48 -07004304////////////////
4305// Commands //
4306////////////////
4307
4308// Function pointers. TODO: add support for function pointers.
4309
4310@external type void* PFN_vkVoidFunction
4311@pfn cmd void vkVoidFunction() {
4312}
4313
Jesse Hall3fbc8562015-11-29 22:10:52 -08004314@external type void* PFN_vkAllocationFunction
4315@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004316 void* pUserData,
4317 platform.size_t size,
4318 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004319 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004320 return ?
4321}
4322
Jesse Hall3fbc8562015-11-29 22:10:52 -08004323@external type void* PFN_vkReallocationFunction
4324@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004325 void* pUserData,
4326 void* pOriginal,
4327 platform.size_t size,
4328 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004329 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004330 return ?
4331}
4332
4333@external type void* PFN_vkFreeFunction
4334@pfn cmd void vkFreeFunction(
4335 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004336 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004337}
4338
Jesse Hall3fbc8562015-11-29 22:10:52 -08004339@external type void* PFN_vkInternalAllocationNotification
4340@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004341 void* pUserData,
4342 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004343 VkInternalAllocationType allocationType,
4344 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004345}
4346
4347@external type void* PFN_vkInternalFreeNotification
4348@pfn cmd void vkInternalFreeNotification(
4349 void* pUserData,
4350 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004351 VkInternalAllocationType allocationType,
4352 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004353}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004354
4355// Global functions
4356
4357@threadSafety("system")
4358cmd VkResult vkCreateInstance(
4359 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004360 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004361 VkInstance* pInstance) {
4362 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4363
4364 instance := ?
4365 pInstance[0] = instance
4366 State.Instances[instance] = new!InstanceObject()
4367
Jesse Hall3dd678a2016-01-08 21:52:01 -08004368 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4369 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004370
4371 return ?
4372}
4373
4374@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004375cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004376 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004377 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004378 instanceObject := GetInstance(instance)
4379
4380 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004381}
4382
4383@threadSafety("system")
4384cmd VkResult vkEnumeratePhysicalDevices(
4385 VkInstance instance,
4386 u32* pPhysicalDeviceCount,
4387 VkPhysicalDevice* pPhysicalDevices) {
4388 instanceObject := GetInstance(instance)
4389
4390 physicalDeviceCount := as!u32(?)
4391 pPhysicalDeviceCount[0] = physicalDeviceCount
4392 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4393
4394 for i in (0 .. physicalDeviceCount) {
4395 physicalDevice := ?
4396 physicalDevices[i] = physicalDevice
4397 if !(physicalDevice in State.PhysicalDevices) {
4398 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4399 }
4400 }
4401
4402 return ?
4403}
4404
4405cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4406 VkDevice device,
4407 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004408 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004409 device := GetDevice(device)
4410 }
4411
4412 return ?
4413}
4414
4415cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4416 VkInstance instance,
4417 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004418 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004419 instanceObject := GetInstance(instance)
4420 }
4421
4422 return ?
4423}
4424
Jesse Hall606a54e2015-11-19 22:17:28 -08004425cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004426 VkPhysicalDevice physicalDevice,
4427 VkPhysicalDeviceProperties* pProperties) {
4428 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4429
4430 properties := ?
4431 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004432}
4433
Jesse Hall606a54e2015-11-19 22:17:28 -08004434cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004435 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004436 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004437 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004438 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004439 // TODO: Figure out how to express fetch-count-or-properties
4440 // This version fails 'apic validate' with 'fence not allowed in
4441 // *semantic.Branch'. Other attempts have failed with the same or other
4442 // errors.
4443 // if pQueueFamilyProperties != null {
4444 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4445 // for i in (0 .. pCount[0]) {
4446 // queueProperties := as!VkQueueFamilyProperties(?)
4447 // queuesProperties[i] = queueProperties
4448 // }
4449 // } else {
4450 // count := ?
4451 // pCount[0] = count
4452 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004453}
4454
Jesse Hall606a54e2015-11-19 22:17:28 -08004455cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004456 VkPhysicalDevice physicalDevice,
4457 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4458 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4459
4460 memoryProperties := ?
4461 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004462}
4463
Jesse Hall606a54e2015-11-19 22:17:28 -08004464cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004465 VkPhysicalDevice physicalDevice,
4466 VkPhysicalDeviceFeatures* pFeatures) {
4467 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4468
4469 features := ?
4470 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004471}
4472
Jesse Hall606a54e2015-11-19 22:17:28 -08004473cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004474 VkPhysicalDevice physicalDevice,
4475 VkFormat format,
4476 VkFormatProperties* pFormatProperties) {
4477 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4478
4479 formatProperties := ?
4480 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004481}
4482
Jesse Halla9e57032015-11-30 01:03:10 -08004483cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004484 VkPhysicalDevice physicalDevice,
4485 VkFormat format,
4486 VkImageType type,
4487 VkImageTiling tiling,
4488 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004489 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004490 VkImageFormatProperties* pImageFormatProperties) {
4491 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4492
4493 imageFormatProperties := ?
4494 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004495
4496 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004497}
4498
Jesse Halld27f6aa2015-08-15 17:58:48 -07004499
4500// Device functions
4501
4502@threadSafety("system")
4503cmd VkResult vkCreateDevice(
4504 VkPhysicalDevice physicalDevice,
4505 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004506 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004507 VkDevice* pDevice) {
4508 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4509 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4510
4511 device := ?
4512 pDevice[0] = device
4513 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4514
4515 return ?
4516}
4517
4518@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004519cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004520 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004521 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004522 deviceObject := GetDevice(device)
4523
4524 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004525}
4526
4527
4528// Extension discovery functions
4529
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004530cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004531 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004532 VkLayerProperties* pProperties) {
4533 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004534 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004535
4536 properties := pProperties[0:count]
4537 for i in (0 .. count) {
4538 property := ?
4539 properties[i] = property
4540 }
4541
4542 return ?
4543}
4544
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004545cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004546 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004547 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004548 VkExtensionProperties* pProperties) {
4549 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004550 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004551
4552 properties := pProperties[0:count]
4553 for i in (0 .. count) {
4554 property := ?
4555 properties[i] = property
4556 }
4557
4558 return ?
4559}
4560
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004561cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004562 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004563 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004564 VkLayerProperties* pProperties) {
4565 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4566 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004567 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004568
4569 properties := pProperties[0:count]
4570 for i in (0 .. count) {
4571 property := ?
4572 properties[i] = property
4573 }
4574
4575 return ?
4576}
4577
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004578cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004579 VkPhysicalDevice physicalDevice,
4580 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004581 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004582 VkExtensionProperties* pProperties) {
4583 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4584
4585 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004586 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004587
4588 properties := pProperties[0:count]
4589 for i in (0 .. count) {
4590 property := ?
4591 properties[i] = property
4592 }
4593
4594 return ?
4595}
4596
4597
4598// Queue functions
4599
4600@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004601cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004602 VkDevice device,
4603 u32 queueFamilyIndex,
4604 u32 queueIndex,
4605 VkQueue* pQueue) {
4606 deviceObject := GetDevice(device)
4607
4608 queue := ?
4609 pQueue[0] = queue
4610
4611 if !(queue in State.Queues) {
4612 State.Queues[queue] = new!QueueObject(device: device)
4613 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004614}
4615
4616@threadSafety("app")
4617cmd VkResult vkQueueSubmit(
4618 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004619 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004620 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004621 VkFence fence) {
4622 queueObject := GetQueue(queue)
4623
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004624 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004625 fenceObject := GetFence(fence)
4626 assert(fenceObject.device == queueObject.device)
4627 }
4628
Jesse Hall3fbc8562015-11-29 22:10:52 -08004629 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4630 // for i in (0 .. commandBufferCount) {
4631 // commandBuffer := commandBuffers[i]
4632 // commandBufferObject := GetCommandBuffer(commandBuffer)
4633 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004634 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004635 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4636 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004637 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004638
4639 return ?
4640}
4641
4642@threadSafety("system")
4643cmd VkResult vkQueueWaitIdle(
4644 VkQueue queue) {
4645 queueObject := GetQueue(queue)
4646
4647 return ?
4648}
4649
4650@threadSafety("system")
4651cmd VkResult vkDeviceWaitIdle(
4652 VkDevice device) {
4653 deviceObject := GetDevice(device)
4654
4655 return ?
4656}
4657
4658
4659// Memory functions
4660
4661@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004662cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004663 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004664 const VkMemoryAllocateInfo* pAllocateInfo,
4665 const VkAllocationCallbacks* pAllocator,
4666 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004667 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004668 deviceObject := GetDevice(device)
4669
Jesse Hall3fbc8562015-11-29 22:10:52 -08004670 memory := ?
4671 pMemory[0] = memory
4672 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004673 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004674 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004675
4676 return ?
4677}
4678
4679@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004680cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004681 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004682 VkDeviceMemory memory,
4683 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004684 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004685 memoryObject := GetDeviceMemory(memory)
4686 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004687
4688 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004689 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004690 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004691 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4692 "vkFreeMemory: commandBuffers still bound")
4693 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004694}
4695
4696@threadSafety("app")
4697cmd VkResult vkMapMemory(
4698 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004699 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004700 VkDeviceSize offset,
4701 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004702 VkMemoryMapFlags flags,
4703 void** ppData) {
4704 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004705 memoryObject := GetDeviceMemory(memory)
4706 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004707
4708 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004709 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004710
4711 return ?
4712}
4713
4714@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004715cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004716 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004717 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004718 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004719 memoryObject := GetDeviceMemory(memory)
4720 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004721}
4722
4723cmd VkResult vkFlushMappedMemoryRanges(
4724 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004725 u32 memoryRangeCount
4726 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004727 deviceObject := GetDevice(device)
4728
Jesse Hall3fbc8562015-11-29 22:10:52 -08004729 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4730 for i in (0 .. memoryRangeCount) {
4731 memoryRange := memoryRanges[i]
4732 memoryObject := GetDeviceMemory(memoryRange.memory)
4733 assert(memoryObject.device == device)
4734 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004735 }
4736
4737 return ?
4738}
4739
4740cmd VkResult vkInvalidateMappedMemoryRanges(
4741 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004742 u32 memoryRangeCount,
4743 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004744 deviceObject := GetDevice(device)
4745
Jesse Hall3fbc8562015-11-29 22:10:52 -08004746 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4747 for i in (0 .. memoryRangeCount) {
4748 memoryRange := memoryRanges[i]
4749 memoryObject := GetDeviceMemory(memoryRange.memory)
4750 assert(memoryObject.device == device)
4751 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004752 }
4753
4754 return ?
4755}
4756
4757
4758// Memory management API functions
4759
Jesse Hall606a54e2015-11-19 22:17:28 -08004760cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004761 VkDevice device,
4762 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004763 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004764 deviceObject := GetDevice(device)
4765
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004766 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004767 memoryObject := GetDeviceMemory(memory)
4768 assert(memoryObject.device == device)
4769 }
4770
4771 committedMemoryInBytes := ?
4772 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004773}
4774
Jesse Hall606a54e2015-11-19 22:17:28 -08004775cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004776 VkDevice device,
4777 VkBuffer buffer,
4778 VkMemoryRequirements* pMemoryRequirements) {
4779 deviceObject := GetDevice(device)
4780 bufferObject := GetBuffer(buffer)
4781 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004782}
4783
4784cmd VkResult vkBindBufferMemory(
4785 VkDevice device,
4786 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004787 VkDeviceMemory memory,
4788 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004789 deviceObject := GetDevice(device)
4790 bufferObject := GetBuffer(buffer)
4791 assert(bufferObject.device == device)
4792
4793 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004794 if bufferObject.memory != NULL_HANDLE {
4795 memoryObject := GetDeviceMemory(bufferObject.memory)
4796 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004797 }
4798
4799 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004800 if memory != NULL_HANDLE {
4801 memoryObject := GetDeviceMemory(memory)
4802 assert(memoryObject.device == device)
4803 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004804 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004805 bufferObject.memory = memory
4806 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004807
4808 return ?
4809}
4810
Jesse Hall606a54e2015-11-19 22:17:28 -08004811cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004812 VkDevice device,
4813 VkImage image,
4814 VkMemoryRequirements* pMemoryRequirements) {
4815 deviceObject := GetDevice(device)
4816 imageObject := GetImage(image)
4817 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004818}
4819
4820cmd VkResult vkBindImageMemory(
4821 VkDevice device,
4822 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004823 VkDeviceMemory memory,
4824 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004825 deviceObject := GetDevice(device)
4826 imageObject := GetImage(image)
4827 assert(imageObject.device == device)
4828
4829 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004830 if imageObject.memory != NULL_HANDLE {
4831 memoryObject := GetDeviceMemory(imageObject.memory)
4832 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004833 }
4834
4835 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004836 if memory != NULL_HANDLE {
4837 memoryObject := GetDeviceMemory(memory)
4838 assert(memoryObject.device == device)
4839 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004840 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004841 imageObject.memory = memory
4842 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004843
4844 return ?
4845}
4846
Jesse Hall606a54e2015-11-19 22:17:28 -08004847cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004848 VkDevice device,
4849 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004850 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004851 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4852 deviceObject := GetDevice(device)
4853 imageObject := GetImage(image)
4854 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004855}
4856
Jesse Hall606a54e2015-11-19 22:17:28 -08004857cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004858 VkPhysicalDevice physicalDevice,
4859 VkFormat format,
4860 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004861 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004862 VkImageUsageFlags usage,
4863 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004864 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004865 VkSparseImageFormatProperties* pProperties) {
4866 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004867}
4868
Jesse Halla6429252015-11-29 18:59:42 -08004869cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004870 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004871 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004872 const VkBindSparseInfo* pBindInfo,
4873 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004874 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004875
4876 return ?
4877}
4878
4879
4880// Fence functions
4881
4882@threadSafety("system")
4883cmd VkResult vkCreateFence(
4884 VkDevice device,
4885 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004886 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004887 VkFence* pFence) {
4888 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4889 deviceObject := GetDevice(device)
4890
4891 fence := ?
4892 pFence[0] = fence
4893 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004894 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004895
4896 return ?
4897}
4898
4899@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004900cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004901 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004902 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004903 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004904 deviceObject := GetDevice(device)
4905 fenceObject := GetFence(fence)
4906 assert(fenceObject.device == device)
4907
4908 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004909}
4910
4911@threadSafety("system")
4912cmd VkResult vkResetFences(
4913 VkDevice device,
4914 u32 fenceCount,
4915 const VkFence* pFences) {
4916 deviceObject := GetDevice(device)
4917
4918 fences := pFences[0:fenceCount]
4919 for i in (0 .. fenceCount) {
4920 fence := fences[i]
4921 fenceObject := GetFence(fence)
4922 assert(fenceObject.device == device)
4923 fenceObject.signaled = false
4924 }
4925
4926 return ?
4927}
4928
4929@threadSafety("system")
4930cmd VkResult vkGetFenceStatus(
4931 VkDevice device,
4932 VkFence fence) {
4933 deviceObject := GetDevice(device)
4934 fenceObject := GetFence(fence)
4935 assert(fenceObject.device == device)
4936
4937 return ?
4938}
4939
4940@threadSafety("system")
4941cmd VkResult vkWaitForFences(
4942 VkDevice device,
4943 u32 fenceCount,
4944 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004945 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004946 u64 timeout) { /// timeout in nanoseconds
4947 deviceObject := GetDevice(device)
4948
4949 fences := pFences[0:fenceCount]
4950 for i in (0 .. fenceCount) {
4951 fence := fences[i]
4952 fenceObject := GetFence(fence)
4953 assert(fenceObject.device == device)
4954 }
4955
4956 return ?
4957}
4958
4959
4960// Queue semaphore functions
4961
4962@threadSafety("system")
4963cmd VkResult vkCreateSemaphore(
4964 VkDevice device,
4965 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004966 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004967 VkSemaphore* pSemaphore) {
4968 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4969 deviceObject := GetDevice(device)
4970
4971 semaphore := ?
4972 pSemaphore[0] = semaphore
4973 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4974
4975 return ?
4976}
4977
4978@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004979cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004980 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004981 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004982 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004983 deviceObject := GetDevice(device)
4984 semaphoreObject := GetSemaphore(semaphore)
4985 assert(semaphoreObject.device == device)
4986
4987 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004988}
4989
Jesse Halld27f6aa2015-08-15 17:58:48 -07004990
4991// Event functions
4992
4993@threadSafety("system")
4994cmd VkResult vkCreateEvent(
4995 VkDevice device,
4996 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004997 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004998 VkEvent* pEvent) {
4999 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
5000 deviceObject := GetDevice(device)
5001
5002 event := ?
5003 pEvent[0] = event
5004 State.Events[event] = new!EventObject(device: device)
5005
5006 return ?
5007}
5008
5009@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005010cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005011 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005012 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005013 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005014 deviceObject := GetDevice(device)
5015 eventObject := GetEvent(event)
5016 assert(eventObject.device == device)
5017
5018 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005019}
5020
5021@threadSafety("system")
5022cmd VkResult vkGetEventStatus(
5023 VkDevice device,
5024 VkEvent event) {
5025 deviceObject := GetDevice(device)
5026 eventObject := GetEvent(event)
5027 assert(eventObject.device == device)
5028
5029 return ?
5030}
5031
5032@threadSafety("system")
5033cmd VkResult vkSetEvent(
5034 VkDevice device,
5035 VkEvent event) {
5036 deviceObject := GetDevice(device)
5037 eventObject := GetEvent(event)
5038 assert(eventObject.device == device)
5039
5040 return ?
5041}
5042
5043@threadSafety("system")
5044cmd VkResult vkResetEvent(
5045 VkDevice device,
5046 VkEvent event) {
5047 deviceObject := GetDevice(device)
5048 eventObject := GetEvent(event)
5049 assert(eventObject.device == device)
5050
5051 return ?
5052}
5053
5054
5055// Query functions
5056
5057@threadSafety("system")
5058cmd VkResult vkCreateQueryPool(
5059 VkDevice device,
5060 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005061 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005062 VkQueryPool* pQueryPool) {
5063 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5064 deviceObject := GetDevice(device)
5065
5066 queryPool := ?
5067 pQueryPool[0] = queryPool
5068 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5069
5070 return ?
5071}
5072
5073@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005074cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005075 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005076 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005077 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005078 deviceObject := GetDevice(device)
5079 queryPoolObject := GetQueryPool(queryPool)
5080 assert(queryPoolObject.device == device)
5081
5082 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005083}
5084
5085@threadSafety("system")
5086cmd VkResult vkGetQueryPoolResults(
5087 VkDevice device,
5088 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005089 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005090 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005091 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005092 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005093 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005094 VkQueryResultFlags flags) {
5095 deviceObject := GetDevice(device)
5096 queryPoolObject := GetQueryPool(queryPool)
5097 assert(queryPoolObject.device == device)
5098
Jesse Halld27f6aa2015-08-15 17:58:48 -07005099 data := pData[0:dataSize]
5100
5101 return ?
5102}
5103
5104// Buffer functions
5105
5106@threadSafety("system")
5107cmd VkResult vkCreateBuffer(
5108 VkDevice device,
5109 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005110 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005111 VkBuffer* pBuffer) {
5112 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5113 deviceObject := GetDevice(device)
5114
5115 buffer := ?
5116 pBuffer[0] = buffer
5117 State.Buffers[buffer] = new!BufferObject(device: device)
5118
5119 return ?
5120}
5121
5122@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005123cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005124 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005125 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005126 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005127 deviceObject := GetDevice(device)
5128 bufferObject := GetBuffer(buffer)
5129 assert(bufferObject.device == device)
5130
Jesse Hall3fbc8562015-11-29 22:10:52 -08005131 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005132 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005133}
5134
5135
5136// Buffer view functions
5137
5138@threadSafety("system")
5139cmd VkResult vkCreateBufferView(
5140 VkDevice device,
5141 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005142 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005143 VkBufferView* pView) {
5144 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5145 deviceObject := GetDevice(device)
5146
5147 bufferObject := GetBuffer(pCreateInfo.buffer)
5148 assert(bufferObject.device == device)
5149
5150 view := ?
5151 pView[0] = view
5152 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5153
5154 return ?
5155}
5156
5157@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005158cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005159 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005160 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005161 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005162 deviceObject := GetDevice(device)
5163 bufferViewObject := GetBufferView(bufferView)
5164 assert(bufferViewObject.device == device)
5165
5166 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005167}
5168
5169
5170// Image functions
5171
5172@threadSafety("system")
5173cmd VkResult vkCreateImage(
5174 VkDevice device,
5175 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005176 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005177 VkImage* pImage) {
5178 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5179 deviceObject := GetDevice(device)
5180
5181 image := ?
5182 pImage[0] = image
5183 State.Images[image] = new!ImageObject(device: device)
5184
5185 return ?
5186}
5187
5188@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005189cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005190 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005191 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005192 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005193 deviceObject := GetDevice(device)
5194 imageObject := GetImage(image)
5195 assert(imageObject.device == device)
5196
Jesse Hall3fbc8562015-11-29 22:10:52 -08005197 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005198 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005199}
5200
Jesse Hall606a54e2015-11-19 22:17:28 -08005201cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005202 VkDevice device,
5203 VkImage image,
5204 const VkImageSubresource* pSubresource,
5205 VkSubresourceLayout* pLayout) {
5206 deviceObject := GetDevice(device)
5207 imageObject := GetImage(image)
5208 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005209}
5210
5211
5212// Image view functions
5213
5214@threadSafety("system")
5215cmd VkResult vkCreateImageView(
5216 VkDevice device,
5217 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005218 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005219 VkImageView* pView) {
5220 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5221 deviceObject := GetDevice(device)
5222
5223 imageObject := GetImage(pCreateInfo.image)
5224 assert(imageObject.device == device)
5225
5226 view := ?
5227 pView[0] = view
5228 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5229
5230 return ?
5231}
5232
5233@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005234cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005235 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005236 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005237 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005238 deviceObject := GetDevice(device)
5239 imageViewObject := GetImageView(imageView)
5240 assert(imageViewObject.device == device)
5241
5242 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005243}
5244
5245
5246// Shader functions
5247
5248cmd VkResult vkCreateShaderModule(
5249 VkDevice device,
5250 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005251 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005252 VkShaderModule* pShaderModule) {
5253 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5254 deviceObject := GetDevice(device)
5255
5256 shaderModule := ?
5257 pShaderModule[0] = shaderModule
5258 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5259
5260 return ?
5261}
5262
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005263cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005264 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005265 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005266 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005267 deviceObject := GetDevice(device)
5268 shaderModuleObject := GetShaderModule(shaderModule)
5269 assert(shaderModuleObject.device == device)
5270
5271 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005272}
5273
Jesse Halld27f6aa2015-08-15 17:58:48 -07005274
5275// Pipeline functions
5276
5277cmd VkResult vkCreatePipelineCache(
5278 VkDevice device,
5279 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005280 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005281 VkPipelineCache* pPipelineCache) {
5282 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5283 deviceObject := GetDevice(device)
5284
5285 pipelineCache := ?
5286 pPipelineCache[0] = pipelineCache
5287 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5288
5289 return ?
5290}
5291
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005292cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005293 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005294 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005295 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005296 deviceObject := GetDevice(device)
5297 pipelineCacheObject := GetPipelineCache(pipelineCache)
5298 assert(pipelineCacheObject.device == device)
5299
5300 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005301}
5302
Jesse Halld27f6aa2015-08-15 17:58:48 -07005303cmd VkResult vkGetPipelineCacheData(
5304 VkDevice device,
5305 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005306 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005307 void* pData) {
5308 deviceObject := GetDevice(device)
5309 pipelineCacheObject := GetPipelineCache(pipelineCache)
5310 assert(pipelineCacheObject.device == device)
5311
5312 return ?
5313}
5314
5315cmd VkResult vkMergePipelineCaches(
5316 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005317 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005318 u32 srcCacheCount,
5319 const VkPipelineCache* pSrcCaches) {
5320 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005321 dstCacheObject := GetPipelineCache(dstCache)
5322 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005323
5324 srcCaches := pSrcCaches[0:srcCacheCount]
5325 for i in (0 .. srcCacheCount) {
5326 srcCache := srcCaches[i]
5327 srcCacheObject := GetPipelineCache(srcCache)
5328 assert(srcCacheObject.device == device)
5329 }
5330
5331 return ?
5332}
5333
5334cmd VkResult vkCreateGraphicsPipelines(
5335 VkDevice device,
5336 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005337 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005338 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005339 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005340 VkPipeline* pPipelines) {
5341 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005342 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005343 pipelineCacheObject := GetPipelineCache(pipelineCache)
5344 assert(pipelineCacheObject.device == device)
5345 }
5346
Jesse Hall03b6fe12015-11-24 12:44:21 -08005347 createInfos := pCreateInfos[0:createInfoCount]
5348 pipelines := pPipelines[0:createInfoCount]
5349 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005350 pipeline := ?
5351 pipelines[i] = pipeline
5352 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5353 }
5354
5355 return ?
5356}
5357
5358cmd VkResult vkCreateComputePipelines(
5359 VkDevice device,
5360 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005361 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005362 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005363 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005364 VkPipeline* pPipelines) {
5365 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005366 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005367 pipelineCacheObject := GetPipelineCache(pipelineCache)
5368 assert(pipelineCacheObject.device == device)
5369 }
5370
Jesse Hall03b6fe12015-11-24 12:44:21 -08005371 createInfos := pCreateInfos[0:createInfoCount]
5372 pipelines := pPipelines[0:createInfoCount]
5373 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005374 pipeline := ?
5375 pipelines[i] = pipeline
5376 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5377 }
5378
5379 return ?
5380}
5381
5382@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005383cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005384 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005385 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005386 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005387 deviceObject := GetDevice(device)
5388 pipelineObjects := GetPipeline(pipeline)
5389 assert(pipelineObjects.device == device)
5390
5391 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005392}
5393
5394
5395// Pipeline layout functions
5396
5397@threadSafety("system")
5398cmd VkResult vkCreatePipelineLayout(
5399 VkDevice device,
5400 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005401 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005402 VkPipelineLayout* pPipelineLayout) {
5403 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5404 deviceObject := GetDevice(device)
5405
5406 pipelineLayout := ?
5407 pPipelineLayout[0] = pipelineLayout
5408 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5409
5410 return ?
5411}
5412
5413@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005414cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005415 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005416 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005417 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005418 deviceObject := GetDevice(device)
5419 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5420 assert(pipelineLayoutObjects.device == device)
5421
5422 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005423}
5424
5425
5426// Sampler functions
5427
5428@threadSafety("system")
5429cmd VkResult vkCreateSampler(
5430 VkDevice device,
5431 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005432 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005433 VkSampler* pSampler) {
5434 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5435 deviceObject := GetDevice(device)
5436
5437 sampler := ?
5438 pSampler[0] = sampler
5439 State.Samplers[sampler] = new!SamplerObject(device: device)
5440
5441 return ?
5442}
5443
5444@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005445cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005446 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005447 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005448 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005449 deviceObject := GetDevice(device)
5450 samplerObject := GetSampler(sampler)
5451 assert(samplerObject.device == device)
5452
5453 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005454}
5455
5456
5457// Descriptor set functions
5458
5459@threadSafety("system")
5460cmd VkResult vkCreateDescriptorSetLayout(
5461 VkDevice device,
5462 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005463 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005464 VkDescriptorSetLayout* pSetLayout) {
5465 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5466 deviceObject := GetDevice(device)
5467
5468 setLayout := ?
5469 pSetLayout[0] = setLayout
5470 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5471
5472 return ?
5473}
5474
5475@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005476cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005477 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005478 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005479 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005480 deviceObject := GetDevice(device)
5481 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5482 assert(descriptorSetLayoutObject.device == device)
5483
5484 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005485}
5486
5487@threadSafety("system")
5488cmd VkResult vkCreateDescriptorPool(
5489 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005490 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005491 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005492 VkDescriptorPool* pDescriptorPool) {
5493 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5494 deviceObject := GetDevice(device)
5495
5496 descriptorPool := ?
5497 pDescriptorPool[0] = descriptorPool
5498 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5499
5500 return ?
5501}
5502
5503@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005504cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005505 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005506 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005507 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005508 deviceObject := GetDevice(device)
5509 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5510 assert(descriptorPoolObject.device == device)
5511
5512 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005513}
5514
5515@threadSafety("app")
5516cmd VkResult vkResetDescriptorPool(
5517 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005518 VkDescriptorPool descriptorPool,
5519 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005520 deviceObject := GetDevice(device)
5521 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5522 assert(descriptorPoolObject.device == device)
5523
5524 return ?
5525}
5526
5527@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005528cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005529 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005530 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005531 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005532 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005533 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005534 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005535
Jesse Hall03b6fe12015-11-24 12:44:21 -08005536 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5537 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005538 setLayout := setLayouts[i]
5539 setLayoutObject := GetDescriptorSetLayout(setLayout)
5540 assert(setLayoutObject.device == device)
5541 }
5542
Jesse Hall03b6fe12015-11-24 12:44:21 -08005543 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5544 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005545 descriptorSet := ?
5546 descriptorSets[i] = descriptorSet
5547 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5548 }
5549
5550 return ?
5551}
5552
Jesse Hallf09c6b12015-08-15 19:54:28 -07005553cmd VkResult vkFreeDescriptorSets(
5554 VkDevice device,
5555 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005556 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005557 const VkDescriptorSet* pDescriptorSets) {
5558 deviceObject := GetDevice(device)
5559 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5560
Jesse Hall03b6fe12015-11-24 12:44:21 -08005561 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5562 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005563 descriptorSet := descriptorSets[i]
5564 descriptorSetObject := GetDescriptorSet(descriptorSet)
5565 assert(descriptorSetObject.device == device)
5566 State.DescriptorSets[descriptorSet] = null
5567 }
5568
5569 return ?
5570}
5571
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005572cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005573 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005574 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005575 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005576 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005577 const VkCopyDescriptorSet* pDescriptorCopies) {
5578 deviceObject := GetDevice(device)
5579
Jesse Hallb00daad2015-11-29 19:46:20 -08005580 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5581 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005582 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005583 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005584 assert(descriptorWriteObject.device == device)
5585 }
5586
Jesse Hallb00daad2015-11-29 19:46:20 -08005587 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5588 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005589 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005590 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005591 assert(descriptorCopyObject.device == device)
5592 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005593}
5594
5595
5596// Framebuffer functions
5597
5598@threadSafety("system")
5599cmd VkResult vkCreateFramebuffer(
5600 VkDevice device,
5601 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005602 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005603 VkFramebuffer* pFramebuffer) {
5604 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5605 deviceObject := GetDevice(device)
5606
5607 framebuffer := ?
5608 pFramebuffer[0] = framebuffer
5609 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5610
5611 return ?
5612}
5613
5614@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005615cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005616 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005617 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005618 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005619 deviceObject := GetDevice(device)
5620 framebufferObject := GetFramebuffer(framebuffer)
5621 assert(framebufferObject.device == device)
5622
5623 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005624}
5625
5626
5627// Renderpass functions
5628
5629@threadSafety("system")
5630cmd VkResult vkCreateRenderPass(
5631 VkDevice device,
5632 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005633 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005634 VkRenderPass* pRenderPass) {
5635 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5636 deviceObject := GetDevice(device)
5637
5638 renderpass := ?
5639 pRenderPass[0] = renderpass
5640 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5641
5642 return ?
5643}
5644
5645@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005646cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005647 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005648 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005649 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005650 deviceObject := GetDevice(device)
5651 renderPassObject := GetRenderPass(renderPass)
5652 assert(renderPassObject.device == device)
5653
5654 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005655}
5656
Jesse Hall606a54e2015-11-19 22:17:28 -08005657cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005658 VkDevice device,
5659 VkRenderPass renderPass,
5660 VkExtent2D* pGranularity) {
5661 deviceObject := GetDevice(device)
5662 renderPassObject := GetRenderPass(renderPass)
5663
5664 granularity := ?
5665 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005666}
5667
5668// Command pool functions
5669
5670cmd VkResult vkCreateCommandPool(
5671 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005672 const VkCommandPoolCreateInfo* pCreateInfo,
5673 const VkAllocationCallbacks* pAllocator,
5674 VkCommandPool* pCommandPool) {
5675 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005676 deviceObject := GetDevice(device)
5677
Jesse Hall3fbc8562015-11-29 22:10:52 -08005678 commandPool := ?
5679 pCommandPool[0] = commandPool
5680 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005681
5682 return ?
5683}
5684
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005685cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005686 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005687 VkCommandPool commandPool,
5688 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005689 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005690 commandPoolObject := GetCommandPool(commandPool)
5691 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005692
Jesse Hall3fbc8562015-11-29 22:10:52 -08005693 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005694}
5695
5696cmd VkResult vkResetCommandPool(
5697 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005698 VkCommandPool commandPool,
5699 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005700 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005701 commandPoolObject := GetCommandPool(commandPool)
5702 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005703
5704 return ?
5705}
5706
5707// Command buffer functions
5708
Jesse Hall3fbc8562015-11-29 22:10:52 -08005709macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5710 memoryObject := GetDeviceMemory(memory)
5711 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005712
Jesse Hall3fbc8562015-11-29 22:10:52 -08005713 commandBufferObject := GetCommandBuffer(commandBuffer)
5714 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005715}
5716
Jesse Hall3fbc8562015-11-29 22:10:52 -08005717macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5718 memoryObject := GetDeviceMemory(memory)
5719 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005720
Jesse Hall3fbc8562015-11-29 22:10:52 -08005721 commandBufferObject := GetCommandBuffer(commandBuffer)
5722 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005723}
5724
5725@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005726cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005727 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005728 const VkCommandBufferAllocateInfo* pAllocateInfo,
5729 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005730 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005731
Jesse Hall3dd678a2016-01-08 21:52:01 -08005732 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005733 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005734 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005735 commandBuffer := ?
5736 commandBuffers[i] = commandBuffer
5737 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005738 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005739
5740 return ?
5741}
5742
5743@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005744cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005745 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005746 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005747 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005748 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005749 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005750
Jesse Hall3fbc8562015-11-29 22:10:52 -08005751 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005752 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005753 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5754 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005755 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005756 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005757 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005758}
5759
5760@threadSafety("app")
5761cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005762 VkCommandBuffer commandBuffer,
5763 const VkCommandBufferBeginInfo* pBeginInfo) {
5764 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5765 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005766
5767 // TODO: iterate over boundObjects and clear memory bindings
5768
5769 return ?
5770}
5771
5772@threadSafety("app")
5773cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005774 VkCommandBuffer commandBuffer) {
5775 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005776
5777 return ?
5778}
5779
5780@threadSafety("app")
5781cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005782 VkCommandBuffer commandBuffer,
5783 VkCommandBufferResetFlags flags) {
5784 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005785
5786 // TODO: iterate over boundObjects and clear memory bindings
5787
5788 return ?
5789}
5790
5791
5792// Command buffer building functions
5793
5794@threadSafety("app")
5795cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005796 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005797 VkPipelineBindPoint pipelineBindPoint,
5798 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005799 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005800 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005801 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005802
Jesse Halld8bade02015-11-24 10:24:18 -08005803 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005804 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5805 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5806 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005807 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005808}
5809
5810@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005811cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005812 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005813 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005814 u32 viewportCount,
5815 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005816 commandBufferObject := GetCommandBuffer(commandBuffer)
5817 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005818}
5819
5820@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005821cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005822 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005823 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005824 u32 scissorCount,
5825 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005826 commandBufferObject := GetCommandBuffer(commandBuffer)
5827 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005828}
5829
5830@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005831cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005832 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005833 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005834 commandBufferObject := GetCommandBuffer(commandBuffer)
5835 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005836}
5837
5838@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005839cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005840 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005841 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005842 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005843 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005844 commandBufferObject := GetCommandBuffer(commandBuffer)
5845 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005846}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005847
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005848@threadSafety("app")
5849cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005850 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005851 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5852 // an annotation as a quick hack to pass this to the template without
5853 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005854 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005855 commandBufferObject := GetCommandBuffer(commandBuffer)
5856 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005857}
5858
5859@threadSafety("app")
5860cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005861 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005862 f32 minDepthBounds,
5863 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005864 commandBufferObject := GetCommandBuffer(commandBuffer)
5865 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005866}
5867
5868@threadSafety("app")
5869cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005870 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005871 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005872 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005873 commandBufferObject := GetCommandBuffer(commandBuffer)
5874 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005875}
5876
5877@threadSafety("app")
5878cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005879 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005880 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005881 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005882 commandBufferObject := GetCommandBuffer(commandBuffer)
5883 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005884}
5885
5886@threadSafety("app")
5887cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005888 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005889 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005890 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005891 commandBufferObject := GetCommandBuffer(commandBuffer)
5892 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005893}
5894
5895@threadSafety("app")
5896cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005897 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005898 VkPipelineBindPoint pipelineBindPoint,
5899 VkPipelineLayout layout,
5900 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005901 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005902 const VkDescriptorSet* pDescriptorSets,
5903 u32 dynamicOffsetCount,
5904 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005905 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005906
Jesse Hall03b6fe12015-11-24 12:44:21 -08005907 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5908 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005909 descriptorSet := descriptorSets[i]
5910 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005911 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005912 }
5913
5914 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5915 for i in (0 .. dynamicOffsetCount) {
5916 dynamicOffset := dynamicOffsets[i]
5917 }
5918
Jesse Halld8bade02015-11-24 10:24:18 -08005919 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005920 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5921 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5922 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005923 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005924}
5925
5926@threadSafety("app")
5927cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005928 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005929 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005930 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005931 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005932 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005933 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005934 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005935
Jesse Hall3fbc8562015-11-29 22:10:52 -08005936 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005937
Jesse Hall3fbc8562015-11-29 22:10:52 -08005938 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005939}
5940
5941@threadSafety("app")
5942cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005943 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005944 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005945 u32 bindingCount,
5946 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005947 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005948 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005949
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005950 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005951 buffers := pBuffers[0:bindingCount]
5952 offsets := pOffsets[0:bindingCount]
5953 for i in (0 .. bindingCount) {
5954 buffer := buffers[i]
5955 offset := offsets[i]
5956 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005957 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005958
Jesse Hall3fbc8562015-11-29 22:10:52 -08005959 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005960 }
5961
Jesse Hall3fbc8562015-11-29 22:10:52 -08005962 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005963}
5964
5965@threadSafety("app")
5966cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005967 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005968 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005969 u32 instanceCount,
5970 u32 firstVertex,
5971 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005972 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005973
Jesse Hall3fbc8562015-11-29 22:10:52 -08005974 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005975}
5976
5977@threadSafety("app")
5978cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005979 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005980 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005981 u32 instanceCount,
5982 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005983 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005984 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005985 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005986
Jesse Hall3fbc8562015-11-29 22:10:52 -08005987 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005988}
5989
5990@threadSafety("app")
5991cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005992 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005993 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005994 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005995 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005996 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005997 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005998 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005999 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006000
Jesse Hall3fbc8562015-11-29 22:10:52 -08006001 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006002
Jesse Hall3fbc8562015-11-29 22:10:52 -08006003 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006004}
6005
6006@threadSafety("app")
6007cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006008 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006009 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006010 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006011 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006012 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006013 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006014 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006015 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006016
Jesse Hall3fbc8562015-11-29 22:10:52 -08006017 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006018
Jesse Hall3fbc8562015-11-29 22:10:52 -08006019 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006020}
6021
6022@threadSafety("app")
6023cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006024 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08006025 u32 groupCountX,
6026 u32 groupCountY,
6027 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006028 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006029
Jesse Hall3fbc8562015-11-29 22:10:52 -08006030 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006031}
6032
6033@threadSafety("app")
6034cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006035 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006036 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006037 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006038 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006039 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006040 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006041
Jesse Hall3fbc8562015-11-29 22:10:52 -08006042 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006043
Jesse Hall3fbc8562015-11-29 22:10:52 -08006044 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045}
6046
6047@threadSafety("app")
6048cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006049 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006050 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006051 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006052 u32 regionCount,
6053 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006054 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006055 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006056 dstBufferObject := GetBuffer(dstBuffer)
6057 assert(commandBufferObject.device == srcBufferObject.device)
6058 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006059
6060 regions := pRegions[0:regionCount]
6061 for i in (0 .. regionCount) {
6062 region := regions[i]
6063 }
6064
Jesse Hall3fbc8562015-11-29 22:10:52 -08006065 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6066 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006067
Jesse Hall65ab5522015-11-30 00:07:16 -08006068 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006069}
6070
6071@threadSafety("app")
6072cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006073 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006074 VkImage srcImage,
6075 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006076 VkImage dstImage,
6077 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006078 u32 regionCount,
6079 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006080 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006081 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006082 dstImageObject := GetImage(dstImage)
6083 assert(commandBufferObject.device == srcImageObject.device)
6084 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006085
6086 regions := pRegions[0:regionCount]
6087 for i in (0 .. regionCount) {
6088 region := regions[i]
6089 }
6090
Jesse Hall3fbc8562015-11-29 22:10:52 -08006091 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6092 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006093
Jesse Hall65ab5522015-11-30 00:07:16 -08006094 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006095}
6096
6097@threadSafety("app")
6098cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006099 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006100 VkImage srcImage,
6101 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006102 VkImage dstImage,
6103 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006104 u32 regionCount,
6105 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006106 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006107 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006108 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006109 dstImageObject := GetImage(dstImage)
6110 assert(commandBufferObject.device == srcImageObject.device)
6111 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006112
6113 regions := pRegions[0:regionCount]
6114 for i in (0 .. regionCount) {
6115 region := regions[i]
6116 }
6117
Jesse Hall3fbc8562015-11-29 22:10:52 -08006118 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6119 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006120
Jesse Hall3fbc8562015-11-29 22:10:52 -08006121 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006122}
6123
6124@threadSafety("app")
6125cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006126 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006127 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006128 VkImage dstImage,
6129 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006130 u32 regionCount,
6131 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006132 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006133 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006134 dstImageObject := GetImage(dstImage)
6135 assert(commandBufferObject.device == srcBufferObject.device)
6136 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006137
6138 regions := pRegions[0:regionCount]
6139 for i in (0 .. regionCount) {
6140 region := regions[i]
6141 }
6142
Jesse Hall3fbc8562015-11-29 22:10:52 -08006143 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6144 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006145
Jesse Hall65ab5522015-11-30 00:07:16 -08006146 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006147}
6148
6149@threadSafety("app")
6150cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006151 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006152 VkImage srcImage,
6153 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006154 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006155 u32 regionCount,
6156 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006157 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006158 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006159 dstBufferObject := GetBuffer(dstBuffer)
6160 assert(commandBufferObject.device == srcImageObject.device)
6161 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006162
6163 regions := pRegions[0:regionCount]
6164 for i in (0 .. regionCount) {
6165 region := regions[i]
6166 }
6167
Jesse Hall3fbc8562015-11-29 22:10:52 -08006168 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6169 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006170
Jesse Hall65ab5522015-11-30 00:07:16 -08006171 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006172}
6173
6174@threadSafety("app")
6175cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006176 VkCommandBuffer commandBuffer,
6177 VkBuffer dstBuffer,
6178 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006179 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006180 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006181 commandBufferObject := GetCommandBuffer(commandBuffer)
6182 dstBufferObject := GetBuffer(dstBuffer)
6183 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006184
6185 data := pData[0:dataSize]
6186
Jesse Hall3fbc8562015-11-29 22:10:52 -08006187 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006188
Jesse Hall65ab5522015-11-30 00:07:16 -08006189 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006190}
6191
6192@threadSafety("app")
6193cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006194 VkCommandBuffer commandBuffer,
6195 VkBuffer dstBuffer,
6196 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006197 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006198 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006199 commandBufferObject := GetCommandBuffer(commandBuffer)
6200 dstBufferObject := GetBuffer(dstBuffer)
6201 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006202
Jesse Hall65ab5522015-11-30 00:07:16 -08006203 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006204}
6205
6206@threadSafety("app")
6207cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006208 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006209 VkImage image,
6210 VkImageLayout imageLayout,
6211 const VkClearColorValue* pColor,
6212 u32 rangeCount,
6213 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006214 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006215 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006216 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006217
6218 ranges := pRanges[0:rangeCount]
6219 for i in (0 .. rangeCount) {
6220 range := ranges[i]
6221 }
6222
Jesse Hall3fbc8562015-11-29 22:10:52 -08006223 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006224
Jesse Hall3fbc8562015-11-29 22:10:52 -08006225 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006226}
6227
6228@threadSafety("app")
6229cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006230 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006231 VkImage image,
6232 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006233 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006234 u32 rangeCount,
6235 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006236 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006237 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006238 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006239
6240 ranges := pRanges[0:rangeCount]
6241 for i in (0 .. rangeCount) {
6242 range := ranges[i]
6243 }
6244
Jesse Hall3fbc8562015-11-29 22:10:52 -08006245 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006246
Jesse Hall3fbc8562015-11-29 22:10:52 -08006247 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006248}
6249
6250@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006251cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006252 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006253 u32 attachmentCount,
6254 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006255 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006256 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006257 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006258
6259 rects := pRects[0:rectCount]
6260 for i in (0 .. rectCount) {
6261 rect := rects[i]
6262 }
6263
Jesse Hall3fbc8562015-11-29 22:10:52 -08006264 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006265}
6266
6267@threadSafety("app")
6268cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006269 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006270 VkImage srcImage,
6271 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006272 VkImage dstImage,
6273 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006274 u32 regionCount,
6275 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006276 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006277 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006278 dstImageObject := GetImage(dstImage)
6279 assert(commandBufferObject.device == srcImageObject.device)
6280 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006281
6282 regions := pRegions[0:regionCount]
6283 for i in (0 .. regionCount) {
6284 region := regions[i]
6285 }
6286
Jesse Hall3fbc8562015-11-29 22:10:52 -08006287 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6288 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006289
Jesse Hall3fbc8562015-11-29 22:10:52 -08006290 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006291}
6292
6293@threadSafety("app")
6294cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006295 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006296 VkEvent event,
6297 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006298 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006299 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006300 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006301}
6302
6303@threadSafety("app")
6304cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006305 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006306 VkEvent event,
6307 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006308 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006309 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006310 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006311}
6312
6313@threadSafety("app")
6314cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006315 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006316 u32 eventCount,
6317 const VkEvent* pEvents,
6318 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006319 VkPipelineStageFlags dstStageMask,
6320 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006321 const VkMemoryBarrier* pMemoryBarriers,
6322 u32 bufferMemoryBarrierCount,
6323 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6324 u32 imageMemoryBarrierCount,
6325 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006326 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006327
6328 events := pEvents[0:eventCount]
6329 for i in (0 .. eventCount) {
6330 event := events[i]
6331 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006332 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006333 }
6334
Jesse Hall3dd678a2016-01-08 21:52:01 -08006335 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006336 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006337 memoryBarrier := memoryBarriers[i]
6338 }
6339 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6340 for i in (0 .. bufferMemoryBarrierCount) {
6341 bufferMemoryBarrier := bufferMemoryBarriers[i]
6342 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6343 assert(bufferObject.device == commandBufferObject.device)
6344 }
6345 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6346 for i in (0 .. imageMemoryBarrierCount) {
6347 imageMemoryBarrier := imageMemoryBarriers[i]
6348 imageObject := GetImage(imageMemoryBarrier.image)
6349 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006350 }
6351}
6352
6353@threadSafety("app")
6354cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006355 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006356 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006357 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006358 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006359 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006360 const VkMemoryBarrier* pMemoryBarriers,
6361 u32 bufferMemoryBarrierCount,
6362 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6363 u32 imageMemoryBarrierCount,
6364 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006365 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006366
Jesse Hall3dd678a2016-01-08 21:52:01 -08006367 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006368 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006369 memoryBarrier := memoryBarriers[i]
6370 }
6371 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6372 for i in (0 .. bufferMemoryBarrierCount) {
6373 bufferMemoryBarrier := bufferMemoryBarriers[i]
6374 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6375 assert(bufferObject.device == commandBufferObject.device)
6376 }
6377 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6378 for i in (0 .. imageMemoryBarrierCount) {
6379 imageMemoryBarrier := imageMemoryBarriers[i]
6380 imageObject := GetImage(imageMemoryBarrier.image)
6381 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006382 }
6383}
6384
6385@threadSafety("app")
6386cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006387 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006388 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006389 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006390 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006391 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006392 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006393 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006394}
6395
6396@threadSafety("app")
6397cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006398 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006399 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006400 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006401 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006402 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006403 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006404}
6405
6406@threadSafety("app")
6407cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006408 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006409 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006410 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006411 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006412 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006413 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006414 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006415}
6416
6417@threadSafety("app")
6418cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006419 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006420 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006421 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006422 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006423 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006424 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006425 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006426}
6427
6428@threadSafety("app")
6429cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006430 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006431 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006432 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006433 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006434 VkBuffer dstBuffer,
6435 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006436 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006437 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006438 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006439 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006440 dstBufferObject := GetBuffer(dstBuffer)
6441 assert(commandBufferObject.device == queryPoolObject.device)
6442 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006443}
6444
6445cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006446 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006447 VkPipelineLayout layout,
6448 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006449 u32 offset,
6450 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006451 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006452 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006453 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006454 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006455}
6456
6457@threadSafety("app")
6458cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006459 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006460 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006461 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006462 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006463 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6464 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006465 assert(commandBufferObject.device == renderPassObject.device)
6466 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006467
Jesse Hall3fbc8562015-11-29 22:10:52 -08006468 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006469}
6470
6471cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006472 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006473 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006474 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006475}
6476
6477@threadSafety("app")
6478cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006479 VkCommandBuffer commandBuffer) {
6480 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006481
Jesse Hall3fbc8562015-11-29 22:10:52 -08006482 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006483}
6484
6485cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006486 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006487 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006488 const VkCommandBuffer* pCommandBuffers) {
6489 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006490
Jesse Hall3dd678a2016-01-08 21:52:01 -08006491 commandBuffers := pCommandBuffers[0:commandBufferCount]
6492 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006493 secondaryCommandBuffer := commandBuffers[i]
6494 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6495 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006496 }
6497}
6498
Jesse Hallad250842017-03-10 18:35:38 -08006499@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006500cmd void vkDestroySurfaceKHR(
6501 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006502 VkSurfaceKHR surface,
6503 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006504 instanceObject := GetInstance(instance)
6505 surfaceObject := GetSurface(surface)
6506 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006507
Jesse Hall1356b0d2015-11-23 17:24:58 -08006508 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006509}
6510
Jesse Hallad250842017-03-10 18:35:38 -08006511@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006512cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006513 VkPhysicalDevice physicalDevice,
6514 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006515 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006516 VkBool32* pSupported) {
6517 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006518
6519 return ?
6520}
6521
Jesse Hallad250842017-03-10 18:35:38 -08006522@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006523cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6524 VkPhysicalDevice physicalDevice,
6525 VkSurfaceKHR surface,
6526 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6527 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6528
6529 surfaceCapabilities := ?
6530 pSurfaceCapabilities[0] = surfaceCapabilities
6531
6532 return ?
6533}
6534
Jesse Hallad250842017-03-10 18:35:38 -08006535@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006536cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6537 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006538 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006539 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006540 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006541 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006542
6543 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006544 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006545 surfaceFormats := pSurfaceFormats[0:count]
6546
6547 for i in (0 .. count) {
6548 surfaceFormat := ?
6549 surfaceFormats[i] = surfaceFormat
6550 }
6551
6552 return ?
6553}
6554
Jesse Hallad250842017-03-10 18:35:38 -08006555@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006556cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6557 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006558 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006559 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006560 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006561 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006562
6563 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006564 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006565 presentModes := pPresentModes[0:count]
6566
6567 for i in (0 .. count) {
6568 presentMode := ?
6569 presentModes[i] = presentMode
6570 }
6571
6572 return ?
6573}
6574
Jesse Hallad250842017-03-10 18:35:38 -08006575@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006576cmd VkResult vkCreateSwapchainKHR(
6577 VkDevice device,
6578 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006579 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006580 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006581 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006582 deviceObject := GetDevice(device)
6583
6584 swapchain := ?
6585 pSwapchain[0] = swapchain
6586 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6587
6588 return ?
6589}
6590
Jesse Hallad250842017-03-10 18:35:38 -08006591@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006592cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006593 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006594 VkSwapchainKHR swapchain,
6595 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006596 deviceObject := GetDevice(device)
6597 swapchainObject := GetSwapchain(swapchain)
6598 assert(swapchainObject.device == device)
6599
6600 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006601}
6602
Jesse Hallad250842017-03-10 18:35:38 -08006603@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006604cmd VkResult vkGetSwapchainImagesKHR(
6605 VkDevice device,
6606 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006607 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006608 VkImage* pSwapchainImages) {
6609 deviceObject := GetDevice(device)
6610
6611 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006612 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006613 swapchainImages := pSwapchainImages[0:count]
6614
6615 for i in (0 .. count) {
6616 swapchainImage := ?
6617 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006618 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006619 }
6620
6621 return ?
6622}
6623
Jesse Hallad250842017-03-10 18:35:38 -08006624@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006625cmd VkResult vkAcquireNextImageKHR(
6626 VkDevice device,
6627 VkSwapchainKHR swapchain,
6628 u64 timeout,
6629 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006630 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006631 u32* pImageIndex) {
6632 deviceObject := GetDevice(device)
6633 swapchainObject := GetSwapchain(swapchain)
6634
6635 imageIndex := ?
6636 pImageIndex[0] = imageIndex
6637
6638 return ?
6639}
6640
Jesse Hallad250842017-03-10 18:35:38 -08006641@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006642cmd VkResult vkQueuePresentKHR(
6643 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006644 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006645 queueObject := GetQueue(queue)
6646
6647 presentInfo := ?
6648 pPresentInfo[0] = presentInfo
6649
6650 return ?
6651}
6652
Jesse Hallad250842017-03-10 18:35:38 -08006653@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006654cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6655 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006656 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006657 VkDisplayPropertiesKHR* pProperties) {
6658 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6659 return ?
6660}
6661
Jesse Hallad250842017-03-10 18:35:38 -08006662@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006663cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6664 VkPhysicalDevice physicalDevice,
6665 u32* pPropertyCount,
6666 VkDisplayPlanePropertiesKHR* pProperties) {
6667 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6668 return ?
6669}
6670
Jesse Hallad250842017-03-10 18:35:38 -08006671@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006672cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6673 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006674 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006675 u32* pDisplayCount,
6676 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006677 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6678 return ?
6679}
6680
Jesse Hallad250842017-03-10 18:35:38 -08006681@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006682cmd VkResult vkGetDisplayModePropertiesKHR(
6683 VkPhysicalDevice physicalDevice,
6684 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006685 u32* pPropertyCount,
6686 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006687 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6688 return ?
6689}
6690
Jesse Hallad250842017-03-10 18:35:38 -08006691@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006692cmd VkResult vkCreateDisplayModeKHR(
6693 VkPhysicalDevice physicalDevice,
6694 VkDisplayKHR display,
6695 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006696 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006697 VkDisplayModeKHR* pMode) {
6698 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6699 return ?
6700}
6701
Jesse Hallad250842017-03-10 18:35:38 -08006702@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006703cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006704 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006705 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006706 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006707 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006708 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6709 return ?
6710}
6711
Jesse Hallad250842017-03-10 18:35:38 -08006712@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006713cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6714 VkInstance instance,
6715 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006716 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006717 VkSurfaceKHR* pSurface) {
6718 return ?
6719}
6720
Jesse Hallad250842017-03-10 18:35:38 -08006721@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006722cmd VkResult vkCreateSharedSwapchainsKHR(
6723 VkDevice device,
6724 u32 swapchainCount,
6725 const VkSwapchainCreateInfoKHR* pCreateInfos,
6726 const VkAllocationCallbacks* pAllocator,
6727 VkSwapchainKHR* pSwapchains) {
6728 return ?
6729}
6730
Jesse Hallad250842017-03-10 18:35:38 -08006731@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006732cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006733 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006734 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006735 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006736 VkSurfaceKHR* pSurface) {
6737 instanceObject := GetInstance(instance)
6738 return ?
6739}
6740
Jesse Hallad250842017-03-10 18:35:38 -08006741@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006742cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6743 VkPhysicalDevice physicalDevice,
6744 u32 queueFamilyIndex,
6745 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006746 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006747 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6748 return ?
6749}
6750
Jesse Hallad250842017-03-10 18:35:38 -08006751@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006752cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006753 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006754 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006755 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006756 VkSurfaceKHR* pSurface) {
6757 instanceObject := GetInstance(instance)
6758 return ?
6759}
6760
Jesse Hallad250842017-03-10 18:35:38 -08006761@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006762cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6763 VkPhysicalDevice physicalDevice,
6764 u32 queueFamilyIndex,
6765 platform.xcb_connection_t* connection,
6766 platform.xcb_visualid_t visual_id) {
6767 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6768 return ?
6769}
6770
Jesse Hallad250842017-03-10 18:35:38 -08006771@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006772cmd VkResult vkCreateWaylandSurfaceKHR(
6773 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006774 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006775 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006776 VkSurfaceKHR* pSurface) {
6777 instanceObject := GetInstance(instance)
6778 return ?
6779}
6780
Jesse Hallad250842017-03-10 18:35:38 -08006781@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006782cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6783 VkPhysicalDevice physicalDevice,
6784 u32 queueFamilyIndex,
6785 platform.wl_display* display) {
6786 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6787 return ?
6788}
6789
Jesse Hallad250842017-03-10 18:35:38 -08006790@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006791cmd VkResult vkCreateMirSurfaceKHR(
6792 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006793 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006794 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006795 VkSurfaceKHR* pSurface) {
6796 instanceObject := GetInstance(instance)
6797 return ?
6798}
6799
Jesse Hallad250842017-03-10 18:35:38 -08006800@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006801cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6802 VkPhysicalDevice physicalDevice,
6803 u32 queueFamilyIndex,
6804 platform.MirConnection* connection) {
6805 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6806 return ?
6807}
6808
Jesse Hallad250842017-03-10 18:35:38 -08006809@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006810cmd VkResult vkCreateAndroidSurfaceKHR(
6811 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006812 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006813 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006814 VkSurfaceKHR* pSurface) {
6815 instanceObject := GetInstance(instance)
6816 return ?
6817}
6818
Jesse Hallad250842017-03-10 18:35:38 -08006819@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006820cmd VkResult vkCreateWin32SurfaceKHR(
6821 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006822 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006823 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006824 VkSurfaceKHR* pSurface) {
6825 instanceObject := GetInstance(instance)
6826 return ?
6827}
6828
Jesse Hallad250842017-03-10 18:35:38 -08006829@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006830cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6831 VkPhysicalDevice physicalDevice,
6832 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006833 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006834 return ?
6835}
6836
Jesse Hallad250842017-03-10 18:35:38 -08006837@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006838@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08006839cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6840 VkDevice device,
6841 VkFormat format,
6842 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006843 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08006844 return ?
6845}
6846
Jesse Hallad250842017-03-10 18:35:38 -08006847@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006848@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13006849cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
6850 VkDevice device,
6851 VkFormat format,
6852 VkImageUsageFlags imageUsage,
6853 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006854 u64* grallocConsumerUsage,
6855 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13006856 return ?
6857}
6858
Jesse Hallad250842017-03-10 18:35:38 -08006859@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006860cmd VkResult vkAcquireImageANDROID(
6861 VkDevice device,
6862 VkImage image,
6863 int nativeFenceFd,
6864 VkSemaphore semaphore,
6865 VkFence fence) {
6866 return ?
6867}
6868
Jesse Hallad250842017-03-10 18:35:38 -08006869@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006870cmd VkResult vkQueueSignalReleaseImageANDROID(
6871 VkQueue queue,
6872 u32 waitSemaphoreCount,
6873 const VkSemaphore* pWaitSemaphores,
6874 VkImage image,
6875 int* pNativeFenceFd) {
6876 return ?
6877}
6878
Jesse Hallad250842017-03-10 18:35:38 -08006879@extension("VK_EXT_debug_report") // 12
6880@external type void* PFN_vkDebugReportCallbackEXT
6881@extension("VK_EXT_debug_report") // 12
6882@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6883 VkDebugReportFlagsEXT flags,
6884 VkDebugReportObjectTypeEXT objectType,
6885 u64 object,
6886 platform.size_t location,
6887 s32 messageCode,
6888 const char* pLayerPrefix,
6889 const char* pMessage,
6890 void* pUserData) {
6891 return ?
6892}
6893
6894@extension("VK_EXT_debug_report") // 12
6895cmd VkResult vkCreateDebugReportCallbackEXT(
6896 VkInstance instance,
6897 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6898 const VkAllocationCallbacks* pAllocator,
6899 VkDebugReportCallbackEXT* pCallback) {
6900 return ?
6901}
6902
6903@extension("VK_EXT_debug_report") // 12
6904cmd void vkDestroyDebugReportCallbackEXT(
6905 VkInstance instance,
6906 VkDebugReportCallbackEXT callback,
6907 const VkAllocationCallbacks* pAllocator) {
6908}
6909
6910@extension("VK_EXT_debug_report") // 12
6911cmd void vkDebugReportMessageEXT(
6912 VkInstance instance,
6913 VkDebugReportFlagsEXT flags,
6914 VkDebugReportObjectTypeEXT objectType,
6915 u64 object,
6916 platform.size_t location,
6917 s32 messageCode,
6918 const char* pLayerPrefix,
6919 const char* pMessage) {
6920}
6921
6922@extension("VK_EXT_debug_marker") // 23
6923cmd VkResult vkDebugMarkerSetObjectTagEXT(
6924 VkDevice device,
6925 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6926 return ?
6927}
6928
6929@extension("VK_EXT_debug_marker") // 23
6930cmd VkResult vkDebugMarkerSetObjectNameEXT(
6931 VkDevice device,
6932 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6933 return ?
6934}
6935
6936@extension("VK_EXT_debug_marker") // 23
6937cmd void vkCmdDebugMarkerBeginEXT(
6938 VkCommandBuffer commandBuffer,
6939 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6940}
6941
6942@extension("VK_EXT_debug_marker") // 23
6943cmd void vkCmdDebugMarkerEndEXT(
6944 VkCommandBuffer commandBuffer) {
6945}
6946
6947@extension("VK_EXT_debug_marker") // 23
6948cmd void vkCmdDebugMarkerInsertEXT(
6949 VkCommandBuffer commandBuffer,
6950 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6951}
6952
6953@extension("VK_AMD_draw_indirect_count") // 34
6954cmd void vkCmdDrawIndirectCountAMD(
6955 VkCommandBuffer commandBuffer,
6956 VkBuffer buffer,
6957 VkDeviceSize offset,
6958 VkBuffer countBuffer,
6959 VkDeviceSize countBufferOffset,
6960 u32 maxDrawCount,
6961 u32 stride) {
6962}
6963
6964@extension("VK_AMD_draw_indirect_count") // 34
6965cmd void vkCmdDrawIndexedIndirectCountAMD(
6966 VkCommandBuffer commandBuffer,
6967 VkBuffer buffer,
6968 VkDeviceSize offset,
6969 VkBuffer countBuffer,
6970 VkDeviceSize countBufferOffset,
6971 u32 maxDrawCount,
6972 u32 stride) {
6973}
6974
6975@extension("VK_NV_external_memory_capabilities") // 56
6976cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6977 VkPhysicalDevice physicalDevice,
6978 VkFormat format,
6979 VkImageType type,
6980 VkImageTiling tiling,
6981 VkImageUsageFlags usage,
6982 VkImageCreateFlags flags,
6983 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6984 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6985 return ?
6986}
6987
6988@extension("VK_NV_external_memory_win32") // 58
6989cmd VkResult vkGetMemoryWin32HandleNV(
6990 VkDevice device,
6991 VkDeviceMemory memory,
6992 VkExternalMemoryHandleTypeFlagsNV handleType,
6993 platform.HANDLE* pHandle) {
6994 return ?
6995}
6996
6997@extension("VK_KHR_get_physical_device_properties2") // 60
6998cmd void vkGetPhysicalDeviceFeatures2KHR(
6999 VkPhysicalDevice physicalDevice,
7000 VkPhysicalDeviceFeatures2KHR* pFeatures) {
7001}
7002
7003@extension("VK_KHR_get_physical_device_properties2") // 60
7004cmd void vkGetPhysicalDeviceProperties2KHR(
7005 VkPhysicalDevice physicalDevice,
7006 VkPhysicalDeviceProperties2KHR* pProperties) {
7007}
7008
7009@extension("VK_KHR_get_physical_device_properties2") // 60
7010cmd void vkGetPhysicalDeviceFormatProperties2KHR(
7011 VkPhysicalDevice physicalDevice,
7012 VkFormat format,
7013 VkFormatProperties2KHR* pFormatProperties) {
7014}
7015
7016@extension("VK_KHR_get_physical_device_properties2") // 60
7017cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
7018 VkPhysicalDevice physicalDevice,
7019 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
7020 VkImageFormatProperties2KHR* pImageFormatProperties) {
7021 return ?
7022}
7023
7024@extension("VK_KHR_get_physical_device_properties2") // 60
7025cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
7026 VkPhysicalDevice physicalDevice,
7027 u32* pQueueFamilyPropertyCount,
7028 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
7029}
7030
7031@extension("VK_KHR_get_physical_device_properties2") // 60
7032cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
7033 VkPhysicalDevice physicalDevice,
7034 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
7035}
7036
7037@extension("VK_KHR_get_physical_device_properties2") // 60
7038cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
7039 VkPhysicalDevice physicalDevice,
7040 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7041 u32* pPropertyCount,
7042 VkSparseImageFormatProperties2KHR* pProperties) {
7043}
7044
7045@extension("VK_KHX_device_group") // 61
7046cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7047 VkDevice device,
7048 u32 heapIndex,
7049 u32 localDeviceIndex,
7050 u32 remoteDeviceIndex,
7051 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7052}
7053
7054@extension("VK_KHX_device_group") // 61
7055cmd VkResult vkBindBufferMemory2KHX(
7056 VkDevice device,
7057 u32 bindInfoCount,
7058 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7059 return ?
7060}
7061
7062@extension("VK_KHX_device_group") // 61
7063cmd VkResult vkBindImageMemory2KHX(
7064 VkDevice device,
7065 u32 bindInfoCount,
7066 const VkBindImageMemoryInfoKHX* pBindInfos) {
7067 return ?
7068}
7069
7070@extension("VK_KHX_device_group") // 61
7071cmd void vkCmdSetDeviceMaskKHX(
7072 VkCommandBuffer commandBuffer,
7073 u32 deviceMask) {
7074}
7075
7076@extension("VK_KHX_device_group") // 61
7077cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7078 VkDevice device,
7079 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7080 return ?
7081}
7082
7083@extension("VK_KHX_device_group") // 61
7084cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7085 VkDevice device,
7086 VkSurfaceKHR surface,
7087 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7088 return ?
7089}
7090
7091@extension("VK_KHX_device_group") // 61
7092cmd VkResult vkAcquireNextImage2KHX(
7093 VkDevice device,
7094 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7095 u32* pImageIndex) {
7096 return ?
7097}
7098
7099@extension("VK_KHX_device_group") // 61
7100cmd void vkCmdDispatchBaseKHX(
7101 VkCommandBuffer commandBuffer,
7102 u32 baseGroupX,
7103 u32 baseGroupY,
7104 u32 baseGroupZ,
7105 u32 groupCountX,
7106 u32 groupCountY,
7107 u32 groupCountZ) {
7108}
7109
7110@extension("VK_KHX_device_group") // 61
7111cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7112 VkPhysicalDevice physicalDevice,
7113 VkSurfaceKHR surface,
7114 u32* pRectCount,
7115 VkRect2D* pRects) {
7116 return ?
7117}
7118
7119@extension("VK_NN_vi_surface") // 63
7120cmd VkResult vkCreateViSurfaceNN(
7121 VkInstance instance,
7122 const VkViSurfaceCreateInfoNN* pCreateInfo,
7123 const VkAllocationCallbacks* pAllocator,
7124 VkSurfaceKHR* pSurface) {
7125 return ?
7126}
7127
7128@extension("VK_KHR_maintenance1") // 70
7129cmd void vkTrimCommandPoolKHR(
7130 VkDevice device,
7131 VkCommandPool commandPool,
7132 VkCommandPoolTrimFlagsKHR flags) {
7133}
7134
7135@extension("VK_KHX_device_group_creation") // 71
7136cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7137 VkInstance instance,
7138 u32* pPhysicalDeviceGroupCount,
7139 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7140 return ?
7141}
7142
7143@extension("VK_KHX_external_memory_capabilities") // 72
7144cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7145 VkPhysicalDevice physicalDevice,
7146 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7147 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7148}
7149
Jesse Hallad250842017-03-10 18:35:38 -08007150@extension("VK_KHX_external_memory_win32") // 74
7151cmd VkResult vkGetMemoryWin32HandleKHX(
7152 VkDevice device,
7153 VkDeviceMemory memory,
7154 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7155 platform.HANDLE* pHandle) {
7156 return ?
7157}
7158
7159@extension("VK_KHX_external_memory_win32") // 74
7160cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7161 VkDevice device,
7162 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7163 platform.HANDLE handle,
7164 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7165 return ?
7166}
7167
7168@extension("VK_KHX_external_memory_fd") // 75
7169cmd VkResult vkGetMemoryFdKHX(
7170 VkDevice device,
7171 VkDeviceMemory memory,
7172 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7173 s32* pFd) {
7174 return ?
7175}
7176
7177@extension("VK_KHX_external_memory_fd") // 75
7178cmd VkResult vkGetMemoryFdPropertiesKHX(
7179 VkDevice device,
7180 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7181 s32 fd,
7182 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7183 return ?
7184}
7185
7186@extension("VK_KHX_external_semaphore_capabilities") // 77
7187cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7188 VkPhysicalDevice physicalDevice,
7189 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7190 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7191}
7192
7193@extension("VK_KHX_external_semaphore_win32") // 79
7194cmd VkResult vkImportSemaphoreWin32HandleKHX(
7195 VkDevice device,
7196 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7197 return ?
7198}
7199
7200@extension("VK_KHX_external_semaphore_win32") // 79
7201cmd VkResult vkGetSemaphoreWin32HandleKHX(
7202 VkDevice device,
7203 VkSemaphore semaphore,
7204 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7205 platform.HANDLE* pHandle) {
7206 return ?
7207}
7208
7209@extension("VK_KHX_external_semaphore_fd") // 80
7210cmd VkResult vkImportSemaphoreFdKHX(
7211 VkDevice device,
7212 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7213 return ?
7214}
7215
7216@extension("VK_KHX_external_semaphore_fd") // 80
7217cmd VkResult vkGetSemaphoreFdKHX(
7218 VkDevice device,
7219 VkSemaphore semaphore,
7220 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7221 s32* pFd) {
7222 return ?
7223}
7224
7225@extension("VK_KHR_push_descriptor") // 81
7226cmd void vkCmdPushDescriptorSetKHR(
7227 VkCommandBuffer commandBuffer,
7228 VkPipelineBindPoint pipelineBindPoint,
7229 VkPipelineLayout layout,
7230 u32 set,
7231 u32 descriptorWriteCount,
7232 const VkWriteDescriptorSet* pDescriptorWrites) {
7233}
7234
7235@extension("VK_KHR_descriptor_update_template") // 86
7236cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7237 VkDevice device,
7238 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7239 const VkAllocationCallbacks* pAllocator,
7240 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7241 return ?
7242}
7243
7244@extension("VK_KHR_descriptor_update_template") // 86
7245cmd void vkDestroyDescriptorUpdateTemplateKHR(
7246 VkDevice device,
7247 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7248 const VkAllocationCallbacks* pAllocator) {
7249}
7250
7251@extension("VK_KHR_descriptor_update_template") // 86
7252cmd void vkUpdateDescriptorSetWithTemplateKHR(
7253 VkDevice device,
7254 VkDescriptorSet descriptorSet,
7255 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7256 const void* pData) {
7257}
7258
7259@extension("VK_KHR_descriptor_update_template") // 86
7260cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7261 VkCommandBuffer commandBuffer,
7262 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7263 VkPipelineLayout layout,
7264 u32 set,
7265 const void* pData) {
7266}
7267
7268@extension("VK_NVX_device_generated_commands") // 87
7269cmd void vkCmdProcessCommandsNVX(
7270 VkCommandBuffer commandBuffer,
7271 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7272}
7273
7274@extension("VK_NVX_device_generated_commands") // 87
7275cmd void vkCmdReserveSpaceForCommandsNVX(
7276 VkCommandBuffer commandBuffer,
7277 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7278}
7279
7280@extension("VK_NVX_device_generated_commands") // 87
7281cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7282 VkDevice device,
7283 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7284 const VkAllocationCallbacks* pAllocator,
7285 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7286 return ?
7287}
7288
7289@extension("VK_NVX_device_generated_commands") // 87
7290cmd void vkDestroyIndirectCommandsLayoutNVX(
7291 VkDevice device,
7292 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7293 const VkAllocationCallbacks* pAllocator) {
7294}
7295
7296@extension("VK_NVX_device_generated_commands") // 87
7297cmd VkResult vkCreateObjectTableNVX(
7298 VkDevice device,
7299 const VkObjectTableCreateInfoNVX* pCreateInfo,
7300 const VkAllocationCallbacks* pAllocator,
7301 VkObjectTableNVX* pObjectTable) {
7302 return ?
7303}
7304
7305@extension("VK_NVX_device_generated_commands") // 87
7306cmd void vkDestroyObjectTableNVX(
7307 VkDevice device,
7308 VkObjectTableNVX objectTable,
7309 const VkAllocationCallbacks* pAllocator) {
7310}
7311
7312@extension("VK_NVX_device_generated_commands") // 87
7313cmd VkResult vkRegisterObjectsNVX(
7314 VkDevice device,
7315 VkObjectTableNVX objectTable,
7316 u32 objectCount,
7317 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7318 const u32* pObjectIndices) {
7319 return ?
7320}
7321
7322@extension("VK_NVX_device_generated_commands") // 87
7323cmd VkResult vkUnregisterObjectsNVX(
7324 VkDevice device,
7325 VkObjectTableNVX objectTable,
7326 u32 objectCount,
7327 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7328 const u32* pObjectIndices) {
7329 return ?
7330}
7331
7332@extension("VK_NVX_device_generated_commands") // 87
7333cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7334 VkPhysicalDevice physicalDevice,
7335 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7336 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7337}
7338
7339@extension("VK_NV_clip_space_w_scaling") // 88
7340cmd void vkCmdSetViewportWScalingNV(
7341 VkCommandBuffer commandBuffer,
7342 u32 firstViewport,
7343 u32 viewportCount,
7344 const VkViewportWScalingNV* pViewportWScalings) {
7345}
7346
7347@extension("VK_EXT_direct_mode_display") // 89
7348cmd VkResult vkReleaseDisplayEXT(
7349 VkPhysicalDevice physicalDevice,
7350 VkDisplayKHR display) {
7351 return ?
7352}
7353
7354@extension("VK_EXT_acquire_xlib_display") // 90
7355cmd VkResult vkAcquireXlibDisplayEXT(
7356 VkPhysicalDevice physicalDevice,
7357 platform.Display* dpy,
7358 VkDisplayKHR display) {
7359 return ?
7360}
7361
7362@extension("VK_EXT_acquire_xlib_display") // 90
7363cmd VkResult vkGetRandROutputDisplayEXT(
7364 VkPhysicalDevice physicalDevice,
7365 platform.Display* dpy,
7366 platform.RROutput rrOutput,
7367 VkDisplayKHR* pDisplay) {
7368 return ?
7369}
7370
7371@extension("VK_EXT_display_surface_counter") // 91
7372cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7373 VkPhysicalDevice physicalDevice,
7374 VkSurfaceKHR surface,
7375 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7376 return ?
7377}
7378
7379@extension("VK_EXT_display_control") // 92
7380cmd VkResult vkDisplayPowerControlEXT(
7381 VkDevice device,
7382 VkDisplayKHR display,
7383 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7384 return ?
7385}
7386
7387@extension("VK_EXT_display_control") // 92
7388cmd VkResult vkRegisterDeviceEventEXT(
7389 VkDevice device,
7390 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7391 const VkAllocationCallbacks* pAllocator,
7392 VkFence* pFence) {
7393 return ?
7394}
7395
7396@extension("VK_EXT_display_control") // 92
7397cmd VkResult vkRegisterDisplayEventEXT(
7398 VkDevice device,
7399 VkDisplayKHR display,
7400 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7401 const VkAllocationCallbacks* pAllocator,
7402 VkFence* pFence) {
7403 return ?
7404}
7405
7406@extension("VK_EXT_display_control") // 92
7407cmd VkResult vkGetSwapchainCounterEXT(
7408 VkDevice device,
7409 VkSwapchainKHR swapchain,
7410 VkSurfaceCounterFlagBitsEXT counter,
7411 u64* pCounterValue) {
7412 return ?
7413}
7414
7415@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007416cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007417 VkDevice device,
7418 VkSwapchainKHR swapchain,
7419 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007420 deviceObject := GetDevice(device)
7421 swapchainObject := GetSwapchain(swapchain)
7422
7423 displayTimingProperties := ?
7424 pDisplayTimingProperties[0] = displayTimingProperties
7425
7426 return ?
7427}
7428
Jesse Hallad250842017-03-10 18:35:38 -08007429@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007430cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007431 VkDevice device,
7432 VkSwapchainKHR swapchain,
7433 u32* pPresentationTimingCount,
7434 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007435 return ?
7436}
7437
Jesse Hallad250842017-03-10 18:35:38 -08007438@extension("VK_EXT_discard_rectangles") // 100
7439cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007440 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007441 u32 firstDiscardRectangle,
7442 u32 discardRectangleCount,
7443 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007444}
7445
Jesse Hallad250842017-03-10 18:35:38 -08007446@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007447cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007448 VkDevice device,
7449 u32 swapchainCount,
7450 const VkSwapchainKHR* pSwapchains,
7451 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08007452}
7453
Jesse Hallad250842017-03-10 18:35:38 -08007454@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007455cmd VkResult vkGetSwapchainStatusKHR(
7456 VkDevice device,
7457 VkSwapchainKHR swapchain) {
7458 return ?
7459}
7460
Chris Forbese2d3ee12017-03-16 16:10:15 +13007461@extension("VK_KHR_get_surface_capabilities2") // 119
7462cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
7463 VkPhysicalDevice physicalDevice,
7464 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
7465 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
7466 return ?
7467}
7468
7469@extension("VK_KHR_get_surface_capabilities2") // 119
7470cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
7471 VkPhysicalDevice physicalDevice,
7472 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
7473 u32* pSurfaceFormatCount,
7474 VkSurfaceFormat2KHR* pSurfaceFormats) {
7475 return ?
7476}
7477
Jesse Hallad250842017-03-10 18:35:38 -08007478@extension("VK_MVK_ios_surface") // 123
7479cmd VkResult vkCreateIOSSurfaceMVK(
7480 VkInstance instance,
7481 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7482 const VkAllocationCallbacks* pAllocator,
7483 VkSurfaceKHR* pSurface) {
7484 return ?
7485}
7486
7487@extension("VK_MVK_macos_surface") // 124
7488cmd VkResult vkCreateMacOSSurfaceMVK(
7489 VkInstance instance,
7490 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7491 const VkAllocationCallbacks* pAllocator,
7492 VkSurfaceKHR* pSurface) {
7493 return ?
7494}
7495
Jesse Halld27f6aa2015-08-15 17:58:48 -07007496////////////////
7497// Validation //
7498////////////////
7499
7500extern void validate(string layerName, bool condition, string message)
7501
7502
7503/////////////////////////////
7504// Internal State Tracking //
7505/////////////////////////////
7506
7507StateObject State
7508
7509@internal class StateObject {
7510 // Dispatchable objects.
7511 map!(VkInstance, ref!InstanceObject) Instances
7512 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7513 map!(VkDevice, ref!DeviceObject) Devices
7514 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007515 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007516
7517 // Non-dispatchable objects.
7518 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7519 map!(VkBuffer, ref!BufferObject) Buffers
7520 map!(VkBufferView, ref!BufferViewObject) BufferViews
7521 map!(VkImage, ref!ImageObject) Images
7522 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007523 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007524 map!(VkPipeline, ref!PipelineObject) Pipelines
7525 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7526 map!(VkSampler, ref!SamplerObject) Samplers
7527 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7528 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7529 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007530 map!(VkFence, ref!FenceObject) Fences
7531 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7532 map!(VkEvent, ref!EventObject) Events
7533 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7534 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7535 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7536 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007537 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007538 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007539 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007540}
7541
7542@internal class InstanceObject {
7543}
7544
7545@internal class PhysicalDeviceObject {
7546 VkInstance instance
7547}
7548
7549@internal class DeviceObject {
7550 VkPhysicalDevice physicalDevice
7551}
7552
7553@internal class QueueObject {
7554 VkDevice device
7555 VkQueueFlags flags
7556}
7557
Jesse Hall3fbc8562015-11-29 22:10:52 -08007558@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007559 VkDevice device
7560 map!(u64, VkDeviceMemory) boundObjects
7561 VkQueueFlags queueFlags
7562}
7563
7564@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007565 VkDevice device
7566 VkDeviceSize allocationSize
7567 map!(u64, VkDeviceSize) boundObjects
7568 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007569}
7570
7571@internal class BufferObject {
7572 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007573 VkDeviceMemory memory
7574 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007575}
7576
7577@internal class BufferViewObject {
7578 VkDevice device
7579 VkBuffer buffer
7580}
7581
7582@internal class ImageObject {
7583 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007584 VkDeviceMemory memory
7585 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007586}
7587
7588@internal class ImageViewObject {
7589 VkDevice device
7590 VkImage image
7591}
7592
Jesse Halld27f6aa2015-08-15 17:58:48 -07007593@internal class ShaderObject {
7594 VkDevice device
7595}
7596
7597@internal class ShaderModuleObject {
7598 VkDevice device
7599}
7600
7601@internal class PipelineObject {
7602 VkDevice device
7603}
7604
7605@internal class PipelineLayoutObject {
7606 VkDevice device
7607}
7608
7609@internal class SamplerObject {
7610 VkDevice device
7611}
7612
7613@internal class DescriptorSetObject {
7614 VkDevice device
7615}
7616
7617@internal class DescriptorSetLayoutObject {
7618 VkDevice device
7619}
7620
7621@internal class DescriptorPoolObject {
7622 VkDevice device
7623}
7624
Jesse Halld27f6aa2015-08-15 17:58:48 -07007625@internal class FenceObject {
7626 VkDevice device
7627 bool signaled
7628}
7629
7630@internal class SemaphoreObject {
7631 VkDevice device
7632}
7633
7634@internal class EventObject {
7635 VkDevice device
7636}
7637
7638@internal class QueryPoolObject {
7639 VkDevice device
7640}
7641
7642@internal class FramebufferObject {
7643 VkDevice device
7644}
7645
7646@internal class RenderPassObject {
7647 VkDevice device
7648}
7649
7650@internal class PipelineCacheObject {
7651 VkDevice device
7652}
7653
Jesse Hall3fbc8562015-11-29 22:10:52 -08007654@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007655 VkDevice device
7656}
7657
Jesse Hall1356b0d2015-11-23 17:24:58 -08007658@internal class SurfaceObject {
7659 VkInstance instance
7660}
7661
Michael Lentine88594d72015-11-12 12:49:45 -08007662@internal class SwapchainObject {
7663 VkDevice device
7664}
7665
Jesse Halld27f6aa2015-08-15 17:58:48 -07007666macro ref!InstanceObject GetInstance(VkInstance instance) {
7667 assert(instance in State.Instances)
7668 return State.Instances[instance]
7669}
7670
7671macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7672 assert(physicalDevice in State.PhysicalDevices)
7673 return State.PhysicalDevices[physicalDevice]
7674}
7675
7676macro ref!DeviceObject GetDevice(VkDevice device) {
7677 assert(device in State.Devices)
7678 return State.Devices[device]
7679}
7680
7681macro ref!QueueObject GetQueue(VkQueue queue) {
7682 assert(queue in State.Queues)
7683 return State.Queues[queue]
7684}
7685
Jesse Hall3fbc8562015-11-29 22:10:52 -08007686macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7687 assert(commandBuffer in State.CommandBuffers)
7688 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007689}
7690
Jesse Hall3fbc8562015-11-29 22:10:52 -08007691macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7692 assert(memory in State.DeviceMemories)
7693 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007694}
7695
7696macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7697 assert(buffer in State.Buffers)
7698 return State.Buffers[buffer]
7699}
7700
7701macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7702 assert(bufferView in State.BufferViews)
7703 return State.BufferViews[bufferView]
7704}
7705
7706macro ref!ImageObject GetImage(VkImage image) {
7707 assert(image in State.Images)
7708 return State.Images[image]
7709}
7710
7711macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7712 assert(imageView in State.ImageViews)
7713 return State.ImageViews[imageView]
7714}
7715
Jesse Halld27f6aa2015-08-15 17:58:48 -07007716macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7717 assert(shaderModule in State.ShaderModules)
7718 return State.ShaderModules[shaderModule]
7719}
7720
7721macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7722 assert(pipeline in State.Pipelines)
7723 return State.Pipelines[pipeline]
7724}
7725
7726macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7727 assert(pipelineLayout in State.PipelineLayouts)
7728 return State.PipelineLayouts[pipelineLayout]
7729}
7730
7731macro ref!SamplerObject GetSampler(VkSampler sampler) {
7732 assert(sampler in State.Samplers)
7733 return State.Samplers[sampler]
7734}
7735
7736macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7737 assert(descriptorSet in State.DescriptorSets)
7738 return State.DescriptorSets[descriptorSet]
7739}
7740
7741macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7742 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7743 return State.DescriptorSetLayouts[descriptorSetLayout]
7744}
7745
7746macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7747 assert(descriptorPool in State.DescriptorPools)
7748 return State.DescriptorPools[descriptorPool]
7749}
7750
Jesse Halld27f6aa2015-08-15 17:58:48 -07007751macro ref!FenceObject GetFence(VkFence fence) {
7752 assert(fence in State.Fences)
7753 return State.Fences[fence]
7754}
7755
7756macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7757 assert(semaphore in State.Semaphores)
7758 return State.Semaphores[semaphore]
7759}
7760
7761macro ref!EventObject GetEvent(VkEvent event) {
7762 assert(event in State.Events)
7763 return State.Events[event]
7764}
7765
7766macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7767 assert(queryPool in State.QueryPools)
7768 return State.QueryPools[queryPool]
7769}
7770
7771macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7772 assert(framebuffer in State.Framebuffers)
7773 return State.Framebuffers[framebuffer]
7774}
7775
7776macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7777 assert(renderPass in State.RenderPasses)
7778 return State.RenderPasses[renderPass]
7779}
7780
7781macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7782 assert(pipelineCache in State.PipelineCaches)
7783 return State.PipelineCaches[pipelineCache]
7784}
7785
Jesse Hall3fbc8562015-11-29 22:10:52 -08007786macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7787 assert(commandPool in State.CommandPools)
7788 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007789}
Michael Lentine88594d72015-11-12 12:49:45 -08007790
Jesse Hall1356b0d2015-11-23 17:24:58 -08007791macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7792 assert(surface in State.Surfaces)
7793 return State.Surfaces[surface]
7794}
7795
Michael Lentine88594d72015-11-12 12:49:45 -08007796macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7797 assert(swapchain in State.Swapchains)
7798 return State.Swapchains[swapchain]
7799}
Jesse Halld8bade02015-11-24 10:24:18 -08007800
7801macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7802 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7803}