blob: a19fcf1c5679a77b06a7e540d2a8af023786d4c2 [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 Hallf5ad48b2017-03-20 13:09:19 -070031define VERSION_PATCH 46
Jesse Halld27f6aa2015-08-15 17:58:48 -070032
33// API limits
Jesse Hall65ab5522015-11-30 00:07:16 -080034define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
35define VK_UUID_SIZE 16
36define VK_MAX_EXTENSION_NAME_SIZE 256
37define VK_MAX_DESCRIPTION_SIZE 256
38define VK_MAX_MEMORY_TYPES 32
39define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types.
Jesse Hallad250842017-03-10 18:35:38 -080040define VK_MAX_DEVICE_GROUP_SIZE_KHX 32
41define VK_LUID_SIZE_KHX 8
42define VK_QUEUE_FAMILY_EXTERNAL_KHX -2
Jesse Halld27f6aa2015-08-15 17:58:48 -070043
44// API keywords
45define VK_TRUE 1
46define VK_FALSE 0
Jesse Hall5ae3abb2015-10-08 14:00:22 -070047
48// API keyword, but needs special handling by some templates
49define NULL_HANDLE 0
Jesse Halld27f6aa2015-08-15 17:58:48 -070050
Jesse Halleb02c472017-02-24 15:13:45 -080051// 1
Jesse Hall33faaad2016-01-24 21:00:49 -080052@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080053@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080054
Jesse Halleb02c472017-02-24 15:13:45 -080055// 2
Jesse Hall26763382016-05-20 07:13:52 -070056@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080057@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080058
Jesse Halleb02c472017-02-24 15:13:45 -080059// 3
Jesse Hall543a7ff2016-01-08 16:38:30 -080060@extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080061@extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
Jesse Hall1356b0d2015-11-23 17:24:58 -080062
Jesse Halleb02c472017-02-24 15:13:45 -080063// 4
Jesse Hall543a7ff2016-01-08 16:38:30 -080064@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
Jesse Hall0e74f002015-11-30 11:37:59 -080065@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080066
Jesse Halleb02c472017-02-24 15:13:45 -080067// 5
Jesse Hall543a7ff2016-01-08 16:38:30 -080068@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080069@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080070
Jesse Halleb02c472017-02-24 15:13:45 -080071// 6
Jesse Hall543a7ff2016-01-08 16:38:30 -080072@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080073@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080074
Jesse Halleb02c472017-02-24 15:13:45 -080075// 7
Jesse Hallfdc8ab32017-03-10 21:01:57 -080076@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080077@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080078
Jesse Halleb02c472017-02-24 15:13:45 -080079// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080080@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080081@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080082
Jesse Halleb02c472017-02-24 15:13:45 -080083// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080084@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080085@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080086
Jesse Halleb02c472017-02-24 15:13:45 -080087// 10
Jesse Hall543a7ff2016-01-08 16:38:30 -080088@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080089@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080090
Jesse Halleb02c472017-02-24 15:13:45 -080091// 11
Chris Forbes1d4e5542017-02-15 19:38:50 +130092@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7
Chia-I Wub262ddc2016-03-22 07:38:20 +080093@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer"
94
Jesse Halleb02c472017-02-24 15:13:45 -080095// 12
Jesse Hallf5ad48b2017-03-20 13:09:19 -070096@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 6
Jesse Hall715b86a2016-01-16 16:34:29 -080097@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
98
Jesse Halleb02c472017-02-24 15:13:45 -080099// 13
Jesse Hall26763382016-05-20 07:13:52 -0700100@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
101@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
102
Jesse Halleb02c472017-02-24 15:13:45 -0800103// 15
Jesse Hall26763382016-05-20 07:13:52 -0700104@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
105@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
106
Jesse Halleb02c472017-02-24 15:13:45 -0800107// 16
Jesse Hall26763382016-05-20 07:13:52 -0700108@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
109@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
110
Jesse Halleb02c472017-02-24 15:13:45 -0800111// 19
Jesse Hall26763382016-05-20 07:13:52 -0700112@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
113@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
114
Jesse Halleb02c472017-02-24 15:13:45 -0800115// 21
Jesse Hall56d386a2016-07-26 15:20:40 -0700116@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
117@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
118
Jesse Halleb02c472017-02-24 15:13:45 -0800119// 22
Jesse Hall56d386a2016-07-26 15:20:40 -0700120@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
121@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
122
Jesse Halleb02c472017-02-24 15:13:45 -0800123// 23
Jesse Hall8f49fcb2017-03-06 16:02:58 -0800124@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
Jesse Hall26763382016-05-20 07:13:52 -0700125@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker"
126
Jesse Halleb02c472017-02-24 15:13:45 -0800127// 26
Jesse Hall56d386a2016-07-26 15:20:40 -0700128@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1
129@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
130
Jesse Halleb02c472017-02-24 15:13:45 -0800131// 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700132@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
133@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
134
Jesse Halleb02c472017-02-24 15:13:45 -0800135// 28
Chris Forbes289cb792016-12-30 15:03:55 +1300136@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
137@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
138
Jesse Halleb02c472017-02-24 15:13:45 -0800139// 34
140@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
141@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
142
143// 36
144@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
145@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
146
147// 37
148@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
149@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
150
151// 38
152@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
153@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
154
Jesse Hallad250842017-03-10 18:35:38 -0800155// 54
156@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1
157@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview"
158
Jesse Halleb02c472017-02-24 15:13:45 -0800159// 56
Chris Forbes289cb792016-12-30 15:03:55 +1300160@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
161@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
162
Jesse Halleb02c472017-02-24 15:13:45 -0800163// 57
Chris Forbes289cb792016-12-30 15:03:55 +1300164@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
165@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
166
Jesse Halleb02c472017-02-24 15:13:45 -0800167// 58
Chris Forbes289cb792016-12-30 15:03:55 +1300168@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
169@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
170
Jesse Halleb02c472017-02-24 15:13:45 -0800171// 59
Chris Forbes289cb792016-12-30 15:03:55 +1300172@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
173@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
174
Jesse Hall889cd9a2017-02-25 22:12:23 -0800175// 60
176@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
177@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
178
Jesse Hallad250842017-03-10 18:35:38 -0800179// 61
180@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1
181@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group"
182
Jesse Halleb02c472017-02-24 15:13:45 -0800183// 62
Chris Forbes289cb792016-12-30 15:03:55 +1300184@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
185@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
186
Jesse Hall77ad05b2017-03-10 22:02:20 -0800187// 63
188@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1
189@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
190
191// 64
192@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
193@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
194
195// 65
196@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
197@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
198
199// 66
200@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
201@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
202
203// 70
204@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
205@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
206
Jesse Hallad250842017-03-10 18:35:38 -0800207// 71
208@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1
209@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation"
210
211// 72
212@extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
213@extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities"
214
215// 73
216@extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1
217@extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory"
218
219// 74
220@extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
221@extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32"
222
223// 75
224@extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
225@extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd"
226
227// 76
228@extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1
229@extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex"
230
231// 77
232@extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
233@extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities"
234
235// 78
236@extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
237@extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore"
238
239// 79
240@extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
241@extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32"
242
243// 80
244@extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
245@extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd"
246
247// 81
248@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1
249@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
250
Jesse Hall889cd9a2017-02-25 22:12:23 -0800251// 85
252@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700253@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800254
Jesse Hallad250842017-03-10 18:35:38 -0800255// 86
256@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
257@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
258
Jesse Halleb02c472017-02-24 15:13:45 -0800259// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300260@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
261@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
262
Jesse Hallad250842017-03-10 18:35:38 -0800263// 88
264@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
265@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
266
Jesse Hall77ad05b2017-03-10 22:02:20 -0800267// 89
268@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
269@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
270
271// 90
272@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
273@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
274
275// 91
276@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
277@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
278
279// 92
280@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
281@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
282
Jesse Hall889cd9a2017-02-25 22:12:23 -0800283// 93
284@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
Jesse Hallfdc8ab32017-03-10 21:01:57 -0800285@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800286
Jesse Hallad250842017-03-10 18:35:38 -0800287// 95
288@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
289@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
290
291// 96
292@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
293@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
294
295// 97
296@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
297@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
298
299// 98
300@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
301@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
302
303// 99
304@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
305@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
306
307// 100
308@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
309@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
310
Jesse Hall77ad05b2017-03-10 22:02:20 -0800311// 105
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700312@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 2
313@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
Jesse Hall77ad05b2017-03-10 22:02:20 -0800314
Jesse Hall889cd9a2017-02-25 22:12:23 -0800315// 106
316@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
317@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
318
319// 112
Chris Forbes1d5f68c2017-01-31 10:17:01 +1300320@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
321@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
Chris Forbes2e12cb82017-01-18 11:45:17 +1300322
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
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001198 //@extension("VK_EXT_swapchain_colorspace") // 105
1199 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
1200 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
1201 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
1202 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
1203 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
1204 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
1205 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
1206 VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
1207 VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
1208 VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001209 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1210 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001211 VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
Michael Lentine88594d72015-11-12 12:49:45 -08001212}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001213
Jesse Hallad250842017-03-10 18:35:38 -08001214@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001215enum VkDebugReportObjectTypeEXT {
1216 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1217 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1218 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1219 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1220 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1221 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1222 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1223 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1224 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1225 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1226 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1227 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1228 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1229 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1230 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1231 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1232 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1233 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1234 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1235 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1236 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1237 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1238 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1239 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1240 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1241 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1242 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1243 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1244 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001245 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1246 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1247 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1248 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001249
1250 //extension("VK_KHR_descriptor_update_template") // 86
1251 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001252}
1253
Jesse Hallad250842017-03-10 18:35:38 -08001254@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001255enum VkDebugReportErrorEXT {
1256 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1257 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1258}
1259
Jesse Hallad250842017-03-10 18:35:38 -08001260@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001261enum VkRasterizationOrderAMD {
1262 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1263 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1264}
1265
Jesse Hallad250842017-03-10 18:35:38 -08001266@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001267enum VkValidationCheckEXT {
1268 VK_VALIDATION_CHECK_ALL_EXT = 0,
1269}
1270
Jesse Hallad250842017-03-10 18:35:38 -08001271@extension("VK_KHR_descriptor_update_template") // 86
1272enum VkDescriptorUpdateTemplateTypeKHR {
1273 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1274 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1275}
1276
1277@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001278enum VkIndirectCommandsTokenTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001279 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1280 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1281 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1282 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1283 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1284 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1285 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1286 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001287}
1288
Jesse Hallad250842017-03-10 18:35:38 -08001289@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001290enum VkObjectEntryTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001291 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1292 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1293 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1294 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1295 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001296}
Jesse Hall715b86a2016-01-16 16:34:29 -08001297
Jesse Hallad250842017-03-10 18:35:38 -08001298@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001299enum VkDisplayPowerStateEXT {
1300 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1301 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1302 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1303}
1304
Jesse Hallad250842017-03-10 18:35:38 -08001305@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001306enum VkDeviceEventTypeEXT {
1307 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1308}
1309
Jesse Hallad250842017-03-10 18:35:38 -08001310@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001311enum VkDisplayEventTypeEXT {
1312 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1313}
1314
Jesse Hallad250842017-03-10 18:35:38 -08001315@extension("VK_NV_viewport_swizzle") // 99
1316enum VkViewportCoordinateSwizzleNV {
1317 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1318 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1319 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1320 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1321 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1322 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1323 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1324 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1325}
1326
1327@extension("VK_EXT_discard_rectangles") // 100
1328enum VkDiscardRectangleModeEXT {
1329 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1330 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1331}
1332
Jesse Halld27f6aa2015-08-15 17:58:48 -07001333/////////////////
1334// Bitfields //
1335/////////////////
1336
Jesse Halld27f6aa2015-08-15 17:58:48 -07001337/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001338type VkFlags VkQueueFlags
1339bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001340 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1341 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001342 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001343 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001344}
1345
1346/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001347type VkFlags VkMemoryPropertyFlags
1348bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001349 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1350 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1351 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1352 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1353 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001354}
1355
1356/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001357type VkFlags VkMemoryHeapFlags
1358bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001359 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001360
1361 //@extension("VK_KHX_device_group_creation") // 71
1362 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001363}
1364
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001365/// Access flags
1366type VkFlags VkAccessFlags
1367bitfield VkAccessFlagBits {
1368 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1369 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1370 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1371 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1372 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1373 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1374 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1375 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1376 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1377 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1378 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1379 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1380 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1381 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1382 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1383 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1384 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001385
Jesse Hallad250842017-03-10 18:35:38 -08001386 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001387 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001388 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001389}
1390
1391/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001392type VkFlags VkBufferUsageFlags
1393bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001394 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1395 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001396 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1397 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1398 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1399 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1400 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1401 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1402 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1403}
1404
1405/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001406type VkFlags VkBufferCreateFlags
1407bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001408 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001409 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1410 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1411}
1412
1413/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001414type VkFlags VkShaderStageFlags
1415bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001416 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001417 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1418 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001419 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1420 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1421 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001422 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001423
1424 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1425}
1426
Jesse Hallfbf97b02015-11-20 14:17:03 -08001427/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001428type VkFlags VkDescriptorPoolCreateFlags
1429bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001430 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1431}
1432
1433/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001434type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001435//bitfield VkDescriptorPoolResetFlagBits {
1436//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001437
Jesse Halld27f6aa2015-08-15 17:58:48 -07001438/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001439type VkFlags VkImageUsageFlags
1440bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001441 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1442 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001443 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1444 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1445 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001446 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001447 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1448 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1449}
1450
1451/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001452type VkFlags VkImageCreateFlags
1453bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001454 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001455 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1456 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 -07001457 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1458 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 -08001459
Jesse Hallad250842017-03-10 18:35:38 -08001460 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001461 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001462
1463 //@extension("VK_KHX_device_group") // 61
1464 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001465}
1466
Jesse Hallb00daad2015-11-29 19:46:20 -08001467/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001468type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001469//bitfield VkImageViewCreateFlagBits {
1470//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001471
1472/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001473type VkFlags VkPipelineCreateFlags
1474bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001475 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1476 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1477 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001478
1479 //@extension("VK_KHX_device_group") // 61
1480 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1481 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001482}
1483
Jesse Hall65ab5522015-11-30 00:07:16 -08001484/// Color component flags
1485type VkFlags VkColorComponentFlags
1486bitfield VkColorComponentFlagBits {
1487 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1488 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1489 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1490 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001491}
1492
1493/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001494type VkFlags VkFenceCreateFlags
1495bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001496 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1497}
1498
1499/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001500type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001501//bitfield VkSemaphoreCreateFlagBits {
1502//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001503
1504/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001505type VkFlags VkFormatFeatureFlags
1506bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001507 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1508 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1509 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1510 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1511 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1512 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1513 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1514 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1515 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1516 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001517 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1518 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 -08001519 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001520
Jesse Hallad250842017-03-10 18:35:38 -08001521 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001522 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001523
Jesse Hallad250842017-03-10 18:35:38 -08001524 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001525 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1526 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001527}
1528
1529/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001530type VkFlags VkQueryControlFlags
1531bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001532 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001533}
1534
1535/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001536type VkFlags VkQueryResultFlags
1537bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001538 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1539 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1540 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1541 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1542}
1543
1544/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001545type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001546//bitfield VkShaderModuleCreateFlagBits {
1547//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001548
Jesse Halld27f6aa2015-08-15 17:58:48 -07001549/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001550type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001551//bitfield VkEventCreateFlagBits {
1552//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001553
Jesse Halla15a4bf2015-11-19 22:48:02 -08001554/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001555type VkFlags VkCommandBufferUsageFlags
1556bitfield VkCommandBufferUsageFlagBits {
1557 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1558 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1559 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001560}
1561
1562/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001563type VkFlags VkQueryPipelineStatisticFlags
1564bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001565 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1566 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1567 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1568 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1569 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1570 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1571 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1572 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1573 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1574 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1575 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001576}
1577
1578/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001579type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001580//bitfield VkMemoryMapFlagBits {
1581//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001582
1583/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001584type VkFlags VkImageAspectFlags
1585bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001586 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1587 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1588 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1589 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1590}
1591
1592/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001593type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001594bitfield VkSparseMemoryBindFlagBits {
1595 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1596}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001597
1598/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001599type VkFlags VkSparseImageFormatFlags
1600bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001601 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1602 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.
1603 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001604}
1605
1606/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001607type VkFlags VkPipelineStageFlags
1608bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001609 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1610 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1611 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1612 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001613 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1614 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001615 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1616 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1617 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1618 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1619 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1620 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1621 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001622 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1623 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001624
Jesse Hall543a7ff2016-01-08 16:38:30 -08001625 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1626 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001627
Jesse Hallad250842017-03-10 18:35:38 -08001628 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001629 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001630}
1631
1632/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001633type VkFlags VkAttachmentDescriptionFlags
1634bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001635 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 -07001636}
1637
1638/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001639type VkFlags VkSubpassDescriptionFlags
1640bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001641 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1642 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1643 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001644}
1645
1646/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001647type VkFlags VkCommandPoolCreateFlags
1648bitfield VkCommandPoolCreateFlagBits {
1649 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1650 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001651}
1652
1653/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001654type VkFlags VkCommandPoolResetFlags
1655bitfield VkCommandPoolResetFlagBits {
1656 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001657}
1658
Jesse Hall3fbc8562015-11-29 22:10:52 -08001659type VkFlags VkCommandBufferResetFlags
1660bitfield VkCommandBufferResetFlagBits {
1661 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001662}
1663
Jesse Halld8bade02015-11-24 10:24:18 -08001664type VkFlags VkSampleCountFlags
1665bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001666 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1667 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1668 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1669 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1670 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1671 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1672 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1673}
1674
Jesse Halld8bade02015-11-24 10:24:18 -08001675type VkFlags VkStencilFaceFlags
1676bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001677 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1678 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001679 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001680}
1681
Jesse Halla6429252015-11-29 18:59:42 -08001682/// Instance creation flags
1683type VkFlags VkInstanceCreateFlags
1684//bitfield VkInstanceCreateFlagBits {
1685//}
1686
1687/// Device creation flags
1688type VkFlags VkDeviceCreateFlags
1689//bitfield VkDeviceCreateFlagBits {
1690//}
1691
1692/// Device queue creation flags
1693type VkFlags VkDeviceQueueCreateFlags
1694//bitfield VkDeviceQueueCreateFlagBits {
1695//}
1696
1697/// Query pool creation flags
1698type VkFlags VkQueryPoolCreateFlags
1699//bitfield VkQueryPoolCreateFlagBits {
1700//}
1701
1702/// Buffer view creation flags
1703type VkFlags VkBufferViewCreateFlags
1704//bitfield VkBufferViewCreateFlagBits {
1705//}
1706
1707/// Pipeline cache creation flags
1708type VkFlags VkPipelineCacheCreateFlags
1709//bitfield VkPipelineCacheCreateFlagBits {
1710//}
1711
1712/// Pipeline shader stage creation flags
1713type VkFlags VkPipelineShaderStageCreateFlags
1714//bitfield VkPipelineShaderStageCreateFlagBits {
1715//}
1716
1717/// Descriptor set layout creation flags
1718type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001719bitfield VkDescriptorSetLayoutCreateFlagBits {
1720 //@extension("VK_KHR_push_descriptor") // 81
1721 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1722}
Jesse Halla6429252015-11-29 18:59:42 -08001723
1724/// Pipeline vertex input state creation flags
1725type VkFlags VkPipelineVertexInputStateCreateFlags
1726//bitfield VkPipelineVertexInputStateCreateFlagBits {
1727//}
1728
1729/// Pipeline input assembly state creation flags
1730type VkFlags VkPipelineInputAssemblyStateCreateFlags
1731//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1732//}
1733
1734/// Tessellation state creation flags
1735type VkFlags VkPipelineTessellationStateCreateFlags
1736//bitfield VkPipelineTessellationStateCreateFlagBits {
1737//}
1738
1739/// Viewport state creation flags
1740type VkFlags VkPipelineViewportStateCreateFlags
1741//bitfield VkPipelineViewportStateCreateFlagBits {
1742//}
1743
Jesse Hall3fbc8562015-11-29 22:10:52 -08001744/// Rasterization state creation flags
1745type VkFlags VkPipelineRasterizationStateCreateFlags
1746//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001747//}
1748
1749/// Multisample state creation flags
1750type VkFlags VkPipelineMultisampleStateCreateFlags
1751//bitfield VkPipelineMultisampleStateCreateFlagBits {
1752//}
1753
1754/// Color blend state creation flags
1755type VkFlags VkPipelineColorBlendStateCreateFlags
1756//bitfield VkPipelineColorBlendStateCreateFlagBits {
1757//}
1758
1759/// Depth/stencil state creation flags
1760type VkFlags VkPipelineDepthStencilStateCreateFlags
1761//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1762//}
1763
1764/// Dynamic state creation flags
1765type VkFlags VkPipelineDynamicStateCreateFlags
1766//bitfield VkPipelineDynamicStateCreateFlagBits {
1767//}
1768
1769/// Pipeline layout creation flags
1770type VkFlags VkPipelineLayoutCreateFlags
1771//bitfield VkPipelineLayoutCreateFlagBits {
1772//}
1773
1774/// Sampler creation flags
1775type VkFlags VkSamplerCreateFlags
1776//bitfield VkSamplerCreateFlagBits {
1777//}
1778
1779/// Render pass creation flags
1780type VkFlags VkRenderPassCreateFlags
1781//bitfield VkRenderPassCreateFlagBits {
1782//}
1783
1784/// Framebuffer creation flags
1785type VkFlags VkFramebufferCreateFlags
1786//bitfield VkFramebufferCreateFlagBits {
1787//}
1788
Jesse Halldc6d36c2015-11-29 19:12:15 -08001789/// Dependency flags
1790type VkFlags VkDependencyFlags
1791bitfield VkDependencyFlagBits {
1792 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001793
1794 //@extension("VK_KHX_multiview") // 54
1795 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1796
1797 //@extension("VK_KHX_device_group") // 61
1798 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001799}
1800
Jesse Hallc7467b72015-11-29 21:05:26 -08001801/// Cull mode flags
1802type VkFlags VkCullModeFlags
1803bitfield VkCullModeFlagBits {
1804 VK_CULL_MODE_NONE = 0x00000000,
1805 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1806 VK_CULL_MODE_BACK_BIT = 0x00000002,
1807 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1808}
1809
Jesse Hallad250842017-03-10 18:35:38 -08001810@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001811type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001812@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001813bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001814 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001815 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1816 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1817 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1818 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1819 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1820 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1821 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1822 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001823}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001824
Jesse Hallad250842017-03-10 18:35:38 -08001825@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001826type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001827@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001828bitfield VkCompositeAlphaFlagBitsKHR {
1829 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1830 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1831 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1832 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1833}
1834
Jesse Hallad250842017-03-10 18:35:38 -08001835@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001836type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001837@extension("VK_KHR_swapchain") // 2
1838bitfield VkSwapchainCreateFlagBitsKHR {
1839 //@extension("VK_KHX_device_group") // 61
1840 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1841}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001842
Jesse Hallad250842017-03-10 18:35:38 -08001843@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001844type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001845@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001846bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001847 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1848 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1849 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1850 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001851}
1852
Jesse Hallad250842017-03-10 18:35:38 -08001853@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001854type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001855//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001856//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1857//}
1858
Jesse Hallad250842017-03-10 18:35:38 -08001859@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001860type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001861//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001862//bitfield VkDisplayModeCreateFlagBitsKHR {
1863//}
1864
Jesse Hallad250842017-03-10 18:35:38 -08001865@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001866type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001867//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001868//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1869//}
1870
Jesse Hallad250842017-03-10 18:35:38 -08001871@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001872type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001873//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001874//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1875//}
1876
Jesse Hallad250842017-03-10 18:35:38 -08001877@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001878type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001879//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001880//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1881//}
1882
Jesse Hallad250842017-03-10 18:35:38 -08001883@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001884type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001885//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001886//bitfield VkMirSurfaceCreateFlagBitsKHR {
1887//}
1888
Jesse Hallad250842017-03-10 18:35:38 -08001889@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001890type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001891//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001892//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1893//}
1894
Jesse Hallad250842017-03-10 18:35:38 -08001895@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001896type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001897//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001898//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1899//}
1900
Jesse Hallad250842017-03-10 18:35:38 -08001901@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001902type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08001903@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001904bitfield VkSwapchainImageUsageFlagBitsANDROID {
1905 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
1906}
1907
Jesse Hallad250842017-03-10 18:35:38 -08001908@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001909type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08001910@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001911bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001912 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1913 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1914 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001915 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1916 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1917}
1918
Jesse Hallad250842017-03-10 18:35:38 -08001919@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001920type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001921@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001922bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001923 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1924 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1925 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1926 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13001927}
1928
Jesse Hallad250842017-03-10 18:35:38 -08001929@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001930type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001931@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001932bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001933 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1934 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1935 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13001936}
1937
Jesse Hallad250842017-03-10 18:35:38 -08001938@extension("VK_KHX_device_group") // 61
1939type VkFlags VkPeerMemoryFeatureFlagsKHX
1940@extension("VK_KHX_device_group") // 61
1941bitfield VkPeerMemoryFeatureFlagBitsKHX {
1942 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1943 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1944 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1945 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1946}
1947
1948@extension("VK_KHX_device_group") // 61
1949type VkFlags VkMemoryAllocateFlagsKHX
1950@extension("VK_KHX_device_group") // 61
1951bitfield VkMemoryAllocateFlagBitsKHX {
1952 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1953}
1954
1955@extension("VK_KHX_device_group") // 61
1956type VkFlags VkDeviceGroupPresentModeFlagsKHX
1957@extension("VK_KHX_device_group") // 61
1958bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1959 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1960 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1961 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1962 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1963}
1964
1965@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001966type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08001967//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001968//bitfield VkViSurfaceCreateFlagBitsNN {
1969//}
1970
Jesse Hallad250842017-03-10 18:35:38 -08001971@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001972type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001973//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001974//bitfield VkCommandPoolTrimFlagBitsKHR {
1975//}
1976
Jesse Hallad250842017-03-10 18:35:38 -08001977@extension("VK_KHX_external_memory_capabilities") // 72
1978type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1979@extension("VK_KHX_external_memory_capabilities") // 72
1980bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1981 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1982 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1983 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1984 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1985 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1986 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1987 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1988}
1989
1990@extension("VK_KHX_external_memory_capabilities") // 72
1991type VkFlags VkExternalMemoryFeatureFlagsKHX
1992@extension("VK_KHX_external_memory_capabilities") // 72
1993bitfield VkExternalMemoryFeatureFlagBitsKHX {
1994 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1995 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1996 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1997}
1998
1999@extension("VK_KHX_external_semaphore_capabilities") // 77
2000type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
2001@extension("VK_KHX_external_semaphore_capabilities") // 77
2002bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
2003 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
2004 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
2005 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
2006 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
2007 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
2008}
2009
2010@extension("VK_KHX_external_semaphore_capabilities") // 77
2011type VkFlags VkExternalSemaphoreFeatureFlagsKHX
2012@extension("VK_KHX_external_semaphore_capabilities") // 77
2013bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
2014 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
2015 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
2016}
2017
2018@extension("VK_KHR_descriptor_update_template") // 86
2019type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2020//@extension("VK_KHR_descriptor_update_template") // 86
2021//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2022//}
2023
2024@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002025type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002026@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002027bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002028 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2029 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2030 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2031 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002032}
2033
Jesse Hallad250842017-03-10 18:35:38 -08002034@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002035type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002036@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002037bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002038 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2039 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002040}
2041
Jesse Hallad250842017-03-10 18:35:38 -08002042@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002043type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002044@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002045bitfield VkSurfaceCounterFlagBitsEXT {
2046 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2047}
2048
Jesse Hallad250842017-03-10 18:35:38 -08002049@extension("VK_NV_viewport_swizzle") // 99
2050type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2051//@extension("VK_NV_viewport_swizzle") // 99
2052//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2053//}
2054
2055@extension("VK_EXT_discard_rectangles") // 100
2056type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2057//@extension("VK_EXT_discard_rectangles") // 100
2058//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2059//}
2060
2061@extension("VK_MVK_ios_surface") // 123
2062type VkFlags VkIOSSurfaceCreateFlagsMVK
2063//@extension("VK_MVK_ios_surface") // 123
2064//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2065//}
2066
2067@extension("VK_MVK_macos_surface") // 124
2068type VkFlags VkMacOSSurfaceCreateFlagsMVK
2069//@extension("VK_MVK_macos_surface") // 124
2070//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2071//}
2072
Jesse Halld27f6aa2015-08-15 17:58:48 -07002073//////////////////
2074// Structures //
2075//////////////////
2076
2077class VkOffset2D {
2078 s32 x
2079 s32 y
2080}
2081
2082class VkOffset3D {
2083 s32 x
2084 s32 y
2085 s32 z
2086}
2087
2088class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002089 u32 width
2090 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002091}
2092
2093class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002094 u32 width
2095 u32 height
2096 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002097}
2098
2099class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002100 f32 x
2101 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002102 f32 width
2103 f32 height
2104 f32 minDepth
2105 f32 maxDepth
2106}
2107
2108class VkRect2D {
2109 VkOffset2D offset
2110 VkExtent2D extent
2111}
2112
Jesse Halla15a4bf2015-11-19 22:48:02 -08002113class VkClearRect {
2114 VkRect2D rect
2115 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002116 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002117}
2118
Jesse Hall65ab5522015-11-30 00:07:16 -08002119class VkComponentMapping {
2120 VkComponentSwizzle r
2121 VkComponentSwizzle g
2122 VkComponentSwizzle b
2123 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002124}
2125
2126class VkPhysicalDeviceProperties {
2127 u32 apiVersion
2128 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002129 u32 vendorID
2130 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002131 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002132 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2133 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002134 VkPhysicalDeviceLimits limits
2135 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002136}
2137
2138class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002139 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002140 u32 specVersion /// version of the extension specification implemented
2141}
2142
2143class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002144 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002145 u32 specVersion /// version of the layer specification implemented
2146 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002147 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002148}
2149
Jesse Halla366a512015-11-19 22:30:07 -08002150class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002151 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2152 const void* pNext /// Next structure in chain
2153 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002154 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002155 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002156 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002157 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002158 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002159 const VkSemaphore* pSignalSemaphores
2160}
2161
Jesse Halld27f6aa2015-08-15 17:58:48 -07002162class VkApplicationInfo {
2163 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2164 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002165 const char* pApplicationName
2166 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002167 const char* pEngineName
2168 u32 engineVersion
2169 u32 apiVersion
2170}
2171
Jesse Hall3fbc8562015-11-29 22:10:52 -08002172class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002173 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002174 PFN_vkAllocationFunction pfnAllocation
2175 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002176 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002177 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002178 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002179}
2180
2181class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002182 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2183 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002184 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002185 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002186 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002187 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002188}
2189
2190class VkDeviceCreateInfo {
2191 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2192 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002193 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002194 u32 queueCreateInfoCount
2195 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002196 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002197 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002198 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002199 const char* const* ppEnabledExtensionNames
2200 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002201}
2202
2203class VkInstanceCreateInfo {
2204 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2205 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002206 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002207 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002208 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002209 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002210 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002211 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2212}
2213
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002214class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002215 VkQueueFlags queueFlags /// Queue flags
2216 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002217 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002218 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002219}
2220
2221class VkPhysicalDeviceMemoryProperties {
2222 u32 memoryTypeCount
2223 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2224 u32 memoryHeapCount
2225 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2226}
2227
Jesse Hall3fbc8562015-11-29 22:10:52 -08002228class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002229 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002230 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002231 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002232 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2233}
2234
2235class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002236 VkDeviceSize size /// Specified in bytes
2237 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002238 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2239}
2240
2241class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002242 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002243 VkExtent3D imageGranularity
2244 VkSparseImageFormatFlags flags
2245}
2246
2247class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002248 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002249 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002250 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2251 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2252 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002253}
2254
2255class VkMemoryType {
2256 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2257 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2258}
2259
2260class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002261 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002262 VkMemoryHeapFlags flags /// Flags for the heap
2263}
2264
2265class VkMappedMemoryRange {
2266 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2267 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002268 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002269 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2270 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002271}
2272
2273class VkFormatProperties {
2274 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2275 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002276 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002277}
2278
2279class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002280 VkExtent3D maxExtent /// max image dimensions for this resource type
2281 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002282 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002283 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2284 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2285}
2286
Jesse Halla15a4bf2015-11-19 22:48:02 -08002287class VkDescriptorImageInfo {
2288 VkSampler sampler
2289 VkImageView imageView
2290 VkImageLayout imageLayout
2291}
2292
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002293class VkDescriptorBufferInfo {
2294 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2295 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2296 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002297}
2298
Jesse Halld27f6aa2015-08-15 17:58:48 -07002299class VkWriteDescriptorSet {
2300 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2301 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002302 VkDescriptorSet dstSet /// Destination descriptor set
2303 u32 dstBinding /// Binding within the destination descriptor set to write
2304 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002305 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002306 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 -08002307 const VkDescriptorImageInfo* pImageInfo
2308 const VkDescriptorBufferInfo* pBufferInfo
2309 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002310}
2311
2312class VkCopyDescriptorSet {
2313 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2314 const void* pNext /// Pointer to next structure
2315 VkDescriptorSet srcSet /// Source descriptor set
2316 u32 srcBinding /// Binding within the source descriptor set to copy from
2317 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002318 VkDescriptorSet dstSet /// Destination descriptor set
2319 u32 dstBinding /// Binding within the destination descriptor set to copy to
2320 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002321 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002322}
2323
2324class VkBufferCreateInfo {
2325 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2326 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002327 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002328 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002329 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002330 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002331 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002332 const u32* pQueueFamilyIndices
2333}
2334
2335class VkBufferViewCreateInfo {
2336 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2337 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002338 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002339 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002340 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002341 VkDeviceSize offset /// Specified in bytes
2342 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002343}
2344
2345class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002346 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002347 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002348 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002349}
2350
2351class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002352 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002353 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002354 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002355 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002356 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002357}
2358
2359class VkMemoryBarrier {
2360 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2361 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002362 VkAccessFlags srcAccessMask
2363 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002364}
2365
2366class VkBufferMemoryBarrier {
2367 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2368 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002369 VkAccessFlags srcAccessMask
2370 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002371 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002372 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002373 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002374 VkDeviceSize offset /// Offset within the buffer to sync
2375 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002376}
2377
2378class VkImageMemoryBarrier {
2379 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2380 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002381 VkAccessFlags srcAccessMask
2382 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002383 VkImageLayout oldLayout /// Current layout of the image
2384 VkImageLayout newLayout /// New layout to transition the image to
2385 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002386 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002387 VkImage image /// Image to sync
2388 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2389}
2390
2391class VkImageCreateInfo {
2392 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2393 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002394 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002395 VkImageType imageType
2396 VkFormat format
2397 VkExtent3D extent
2398 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002399 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002400 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002401 VkImageTiling tiling
2402 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002403 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002404 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002405 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002406 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002407}
2408
2409class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002410 VkDeviceSize offset /// Specified in bytes
2411 VkDeviceSize size /// Specified in bytes
2412 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002413 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002414 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002415}
2416
2417class VkImageViewCreateInfo {
2418 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2419 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002420 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002421 VkImage image
2422 VkImageViewType viewType
2423 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002424 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002425 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002426}
2427
2428class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002429 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002430 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002431 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002432}
2433
Jesse Halla6429252015-11-29 18:59:42 -08002434class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002435 VkDeviceSize resourceOffset /// Specified in bytes
2436 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002437 VkDeviceMemory memory
2438 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002439 VkSparseMemoryBindFlags flags
2440}
2441
Jesse Halla6429252015-11-29 18:59:42 -08002442class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002443 VkImageSubresource subresource
2444 VkOffset3D offset
2445 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002446 VkDeviceMemory memory
2447 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002448 VkSparseMemoryBindFlags flags
2449}
2450
Jesse Halla6429252015-11-29 18:59:42 -08002451class VkSparseBufferMemoryBindInfo {
2452 VkBuffer buffer
2453 u32 bindCount
2454 const VkSparseMemoryBind* pBinds
2455}
2456
2457class VkSparseImageOpaqueMemoryBindInfo {
2458 VkImage image
2459 u32 bindCount
2460 const VkSparseMemoryBind* pBinds
2461}
2462
2463class VkSparseImageMemoryBindInfo {
2464 VkImage image
2465 u32 bindCount
2466 const VkSparseMemoryBind* pBinds
2467}
2468
2469class VkBindSparseInfo {
2470 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2471 const void* pNext
2472 u32 waitSemaphoreCount
2473 const VkSemaphore* pWaitSemaphores
2474 u32 numBufferBinds
2475 const VkSparseBufferMemoryBindInfo* pBufferBinds
2476 u32 numImageOpaqueBinds
2477 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2478 u32 numImageBinds
2479 const VkSparseImageMemoryBindInfo* pImageBinds
2480 u32 signalSemaphoreCount
2481 const VkSemaphore* pSignalSemaphores
2482}
2483
Jesse Hall65ab5522015-11-30 00:07:16 -08002484class VkImageSubresourceLayers {
2485 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002486 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002487 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002488 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002489}
2490
Jesse Halld27f6aa2015-08-15 17:58:48 -07002491class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002492 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002493 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002494 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002495 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002496 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2497}
2498
2499class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002500 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002501 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002502 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002503 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002504}
2505
2506class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002507 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002508 u32 bufferRowLength /// Specified in texels
2509 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002510 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002511 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2512 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2513}
2514
2515class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002516 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002517 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002518 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002519 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002520 VkExtent3D extent
2521}
2522
2523class VkShaderModuleCreateInfo {
2524 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2525 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002526 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002527 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002528 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002529}
2530
Jesse Halld27f6aa2015-08-15 17:58:48 -07002531class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002532 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002533 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002534 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002535 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2536 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2537}
2538
2539class VkDescriptorSetLayoutCreateInfo {
2540 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2541 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002542 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002543 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002544 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002545}
2546
Jesse Hall65ab5522015-11-30 00:07:16 -08002547class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002548 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002549 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002550}
2551
2552class VkDescriptorPoolCreateInfo {
2553 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2554 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002555 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002556 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002557 u32 poolSizeCount
2558 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002559}
2560
Jesse Hall3fbc8562015-11-29 22:10:52 -08002561class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002562 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002563 const void* pNext /// Pointer to next structure
2564 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002565 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002566 const VkDescriptorSetLayout* pSetLayouts
2567}
2568
Jesse Halld27f6aa2015-08-15 17:58:48 -07002569class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002570 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002571 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002572 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002573}
2574
2575class VkSpecializationInfo {
2576 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002577 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002578 platform.size_t dataSize /// Size in bytes of pData
2579 const void* pData /// Pointer to SpecConstant data
2580}
2581
2582class VkPipelineShaderStageCreateInfo {
2583 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2584 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002585 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002586 VkShaderStageFlagBits stage
2587 VkShaderModule module
2588 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002589 const VkSpecializationInfo* pSpecializationInfo
2590}
2591
2592class VkComputePipelineCreateInfo {
2593 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2594 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002595 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002596 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002597 VkPipelineLayout layout /// Interface layout of the pipeline
2598 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
2599 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
2600}
2601
2602class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002603 u32 binding /// Vertex buffer binding id
2604 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002605 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002606}
2607
2608class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002609 u32 location /// location of the shader vertex attrib
2610 u32 binding /// Vertex buffer binding id
2611 VkFormat format /// format of source data
2612 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002613}
2614
2615class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002616 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2617 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002618 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002619 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002620 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002621 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002622 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2623}
2624
2625class VkPipelineInputAssemblyStateCreateInfo {
2626 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2627 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002628 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002629 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002630 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002631}
2632
2633class VkPipelineTessellationStateCreateInfo {
2634 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2635 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002636 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002637 u32 patchControlPoints
2638}
2639
2640class VkPipelineViewportStateCreateInfo {
2641 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2642 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002643 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002644 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002645 const VkViewport* pViewports
2646 u32 scissorCount
2647 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002648}
2649
Jesse Hall3fbc8562015-11-29 22:10:52 -08002650class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002651 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002652 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002653 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002654 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002655 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002656 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002657 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002658 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002659 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002660 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002661 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002662 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002663 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002664}
2665
2666class VkPipelineMultisampleStateCreateInfo {
2667 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2668 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002669 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002670 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002671 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002672 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002673 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002674 VkBool32 alphaToCoverageEnable
2675 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002676}
2677
2678class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002679 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002680 VkBlendFactor srcColorBlendFactor
2681 VkBlendFactor dstColorBlendFactor
2682 VkBlendOp colorBlendOp
2683 VkBlendFactor srcAlphaBlendFactor
2684 VkBlendFactor dstAlphaBlendFactor
2685 VkBlendOp alphaBlendOp
2686 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002687}
2688
2689class VkPipelineColorBlendStateCreateInfo {
2690 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2691 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002692 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002693 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002694 VkLogicOp logicOp
2695 u32 attachmentCount /// # of pAttachments
2696 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002697 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002698}
2699
2700class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002701 VkStencilOp failOp
2702 VkStencilOp passOp
2703 VkStencilOp depthFailOp
2704 VkCompareOp compareOp
2705 u32 compareMask
2706 u32 writeMask
2707 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002708}
2709
2710class VkPipelineDepthStencilStateCreateInfo {
2711 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2712 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002713 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002714 VkBool32 depthTestEnable
2715 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002716 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002717 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2718 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002719 VkStencilOpState front
2720 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002721 f32 minDepthBounds
2722 f32 maxDepthBounds
2723}
2724
2725class VkPipelineDynamicStateCreateInfo {
2726 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2727 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002728 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002729 u32 dynamicStateCount
2730 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002731}
2732
2733class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002734 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2735 const void* pNext /// Pointer to next structure
2736 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002737 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002738 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002739 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2740 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2741 const VkPipelineTessellationStateCreateInfo* pTessellationState
2742 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002743 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002744 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2745 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2746 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002747 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002748 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002749 VkRenderPass renderPass
2750 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002751 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
2752 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 -07002753}
2754
2755class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002756 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2757 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002758 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002759 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2760 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002761}
2762
2763class VkPushConstantRange {
2764 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002765 u32 offset /// Start of the range, in bytes
2766 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002767}
2768
2769class VkPipelineLayoutCreateInfo {
2770 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2771 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002772 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002773 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002774 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2775 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2776 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2777}
2778
2779class VkSamplerCreateInfo {
2780 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2781 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002782 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002783 VkFilter magFilter /// Filter mode for magnification
2784 VkFilter minFilter /// Filter mode for minifiation
2785 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2786 VkSamplerAddressMode addressModeU
2787 VkSamplerAddressMode addressModeV
2788 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002789 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002790 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002791 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002792 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002793 VkCompareOp compareOp
2794 f32 minLod
2795 f32 maxLod
2796 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002797 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002798}
2799
Jesse Hall3fbc8562015-11-29 22:10:52 -08002800class VkCommandPoolCreateInfo {
2801 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002802 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002803 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002804 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002805}
2806
Jesse Hall3fbc8562015-11-29 22:10:52 -08002807class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002808 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002809 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002810 VkCommandPool commandPool
2811 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002812 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002813}
2814
Jesse Hall3dd678a2016-01-08 21:52:01 -08002815class VkCommandBufferInheritanceInfo {
2816 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002817 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002818 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002819 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002820 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002821 VkBool32 occlusionQueryEnable
2822 VkQueryControlFlags queryFlags
2823 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002824}
2825
Jesse Hall3dd678a2016-01-08 21:52:01 -08002826class VkCommandBufferBeginInfo {
2827 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2828 const void* pNext /// Pointer to next structure
2829 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2830 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2831}
2832
Jesse Halld27f6aa2015-08-15 17:58:48 -07002833class VkRenderPassBeginInfo {
2834 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2835 const void* pNext /// Pointer to next structure
2836 VkRenderPass renderPass
2837 VkFramebuffer framebuffer
2838 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002839 u32 clearValueCount
2840 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002841}
2842
2843@union
2844/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2845class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002846 f32[4] float32
2847 s32[4] int32
2848 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002849}
2850
2851class VkClearDepthStencilValue {
2852 f32 depth
2853 u32 stencil
2854}
2855
2856@union
2857/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2858class VkClearValue {
2859 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002860 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002861}
2862
Jesse Hallae38f732015-11-19 21:32:50 -08002863class VkClearAttachment {
2864 VkImageAspectFlags aspectMask
2865 u32 colorAttachment
2866 VkClearValue clearValue
2867}
2868
Jesse Halld27f6aa2015-08-15 17:58:48 -07002869class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002870 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002871 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002872 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002873 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2874 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2875 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2876 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2877 VkImageLayout initialLayout
2878 VkImageLayout finalLayout
2879}
2880
2881class VkAttachmentReference {
2882 u32 attachment
2883 VkImageLayout layout
2884}
2885
2886class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002887 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002888 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002889 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002890 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002891 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002892 const VkAttachmentReference* pColorAttachments
2893 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002894 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002895 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002896 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002897}
2898
2899class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002900 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002901 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002902 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002903 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002904 VkAccessFlags srcAccessMask
2905 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002906 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002907}
2908
2909class VkRenderPassCreateInfo {
2910 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2911 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002912 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002913 u32 attachmentCount
2914 const VkAttachmentDescription* pAttachments
2915 u32 subpassCount
2916 const VkSubpassDescription* pSubpasses
2917 u32 dependencyCount
2918 const VkSubpassDependency* pDependencies
2919}
2920
2921class VkEventCreateInfo {
2922 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2923 const void* pNext /// Pointer to next structure
2924 VkEventCreateFlags flags /// Event creation flags
2925}
2926
2927class VkFenceCreateInfo {
2928 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2929 const void* pNext /// Pointer to next structure
2930 VkFenceCreateFlags flags /// Fence creation flags
2931}
2932
2933class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002934 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2935 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2936 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2937 VkBool32 independentBlend /// blending operations are controlled per-attachment
2938 VkBool32 geometryShader /// geometry stage
2939 VkBool32 tessellationShader /// tessellation control and evaluation stage
2940 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002941 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002942 VkBool32 logicOp /// logic operations
2943 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002944 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002945 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002946 VkBool32 depthBiasClamp /// depth bias clamping
2947 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2948 VkBool32 depthBounds /// depth bounds test
2949 VkBool32 wideLines /// lines with width greater than 1
2950 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002951 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2952 VkBool32 multiViewport
2953 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002954 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2955 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2956 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002957 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002958 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002959 VkBool32 vertexPipelineStoresAndAtomics
2960 VkBool32 fragmentStoresAndAtomics
2961 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002962 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2963 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2964 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002965 VkBool32 shaderStorageImageReadWithoutFormat
2966 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002967 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2968 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2969 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2970 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2971 VkBool32 shaderClipDistance /// clip distance in shaders
2972 VkBool32 shaderCullDistance /// cull distance in shaders
2973 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2974 VkBool32 shaderInt64 /// 64-bit integers in shaders
2975 VkBool32 shaderInt16 /// 16-bit integers in shaders
2976 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002977 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002978 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2979 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2980 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2981 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2982 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2983 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2984 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2985 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2986 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002987 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002988 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002989}
2990
2991class VkPhysicalDeviceLimits {
2992 /// resource maximum sizes
2993 u32 maxImageDimension1D /// max 1D image dimension
2994 u32 maxImageDimension2D /// max 2D image dimension
2995 u32 maxImageDimension3D /// max 3D image dimension
2996 u32 maxImageDimensionCube /// max cubemap image dimension
2997 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002998 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002999 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
3000 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003001 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
3002 /// memory limits
3003 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003004 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003005 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3006 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003007 /// descriptor set limits
3008 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003009 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3010 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3011 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3012 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3013 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003014 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003015 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003016 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3017 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003018 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003019 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003020 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003021 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3022 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003023 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003024 /// vertex stage limits
3025 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003026 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003027 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3028 u32 maxVertexInputBindingStride /// max vertex input binding stride
3029 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3030 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003031 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003032 u32 maxTessellationPatchSize /// max patch size (vertices)
3033 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3034 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3035 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3036 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3037 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3038 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003039 /// geometry stage limits
3040 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3041 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3042 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3043 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3044 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3045 /// fragment stage limits
3046 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003047 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003048 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003049 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3050 /// compute stage limits
3051 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3052 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3053 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3054 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3055
3056 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3057 u32 subTexelPrecisionBits /// num bits of subtexel precision
3058 u32 mipmapPrecisionBits /// num bits of mipmap precision
3059
3060 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003061 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003062
3063 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3064 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3065
3066 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003067 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3068 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3069 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3070
Jesse Halldc6d36c2015-11-29 19:12:15 -08003071 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3072 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3073 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3074 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003075
Jesse Hallfbf97b02015-11-20 14:17:03 -08003076 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003077 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003078 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003079 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3080 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3081 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3082 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3083
3084 u32 maxFramebufferWidth /// max width for a framebuffer
3085 u32 maxFramebufferHeight /// max height for a framebuffer
3086 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003087 VkSampleCountFlags framebufferColorSampleCounts
3088 VkSampleCountFlags framebufferDepthSampleCounts
3089 VkSampleCountFlags framebufferStencilSampleCounts
3090 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003091 u32 maxColorAttachments /// max num of framebuffer color attachments
3092
Jesse Hall091ed9e2015-11-30 00:55:29 -08003093 VkSampleCountFlags sampledImageColorSampleCounts
3094 VkSampleCountFlags sampledImageIntegerSampleCounts
3095 VkSampleCountFlags sampledImageDepthSampleCounts
3096 VkSampleCountFlags sampledImageStencilSampleCounts
3097 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003098 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003099 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003100
Jesse Halla9bb62b2015-11-21 19:31:56 -08003101 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003102
3103 u32 maxClipDistances /// max number of clip distances
3104 u32 maxCullDistances /// max number of cull distances
3105 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3106
Jesse Hallfbf97b02015-11-20 14:17:03 -08003107 u32 discreteQueuePriorities
3108
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003109 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3110 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003111 f32 pointSizeGranularity /// granularity of supported point sizes
3112 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003113 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003114 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003115
Jesse Hall65ab5522015-11-30 00:07:16 -08003116 VkDeviceSize optimalBufferCopyOffsetAlignment
3117 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003118 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003119}
3120
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003121class VkPhysicalDeviceSparseProperties {
3122 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 -08003123 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 -07003124 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3125 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 -07003126 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
3127}
3128
Jesse Halld27f6aa2015-08-15 17:58:48 -07003129class VkSemaphoreCreateInfo {
3130 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3131 const void* pNext /// Pointer to next structure
3132 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3133}
3134
3135class VkQueryPoolCreateInfo {
3136 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3137 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003138 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003139 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003140 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003141 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3142}
3143
3144class VkFramebufferCreateInfo {
3145 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3146 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003147 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003148 VkRenderPass renderPass
3149 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003150 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003151 u32 width
3152 u32 height
3153 u32 layers
3154}
3155
Jesse Hall3fbc8562015-11-29 22:10:52 -08003156class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003157 u32 vertexCount
3158 u32 instanceCount
3159 u32 firstVertex
3160 u32 firstInstance
3161}
3162
Jesse Hall3fbc8562015-11-29 22:10:52 -08003163class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003164 u32 indexCount
3165 u32 instanceCount
3166 u32 firstIndex
3167 s32 vertexOffset
3168 u32 firstInstance
3169}
3170
Jesse Hall3fbc8562015-11-29 22:10:52 -08003171class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003172 u32 x
3173 u32 y
3174 u32 z
3175}
3176
Jesse Hallad250842017-03-10 18:35:38 -08003177@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003178class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003179 u32 minImageCount
3180 u32 maxImageCount
3181 VkExtent2D currentExtent
3182 VkExtent2D minImageExtent
3183 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003184 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003185 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003186 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003187 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003188 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003189}
3190
Jesse Hallad250842017-03-10 18:35:38 -08003191@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003192class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003193 VkFormat format
3194 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003195}
3196
Jesse Hallad250842017-03-10 18:35:38 -08003197@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003198class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003199 VkStructureType sType
3200 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003201 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003202 VkSurfaceKHR surface
3203 u32 minImageCount
3204 VkFormat imageFormat
3205 VkColorSpaceKHR imageColorSpace
3206 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003207 u32 imageArrayLayers
3208 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003209 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003210 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003211 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003212 VkSurfaceTransformFlagBitsKHR preTransform
3213 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003214 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003215 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003216 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003217}
3218
Jesse Hallad250842017-03-10 18:35:38 -08003219@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003220class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003221 VkStructureType sType
3222 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003223 u32 waitSemaphoreCount
3224 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003225 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003226 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003227 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003228 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003229}
3230
Jesse Hallad250842017-03-10 18:35:38 -08003231@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003232class VkDisplayPropertiesKHR {
3233 VkDisplayKHR display
3234 const char* displayName
3235 VkExtent2D physicalDimensions
3236 VkExtent2D physicalResolution
3237 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003238 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003239 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003240}
3241
Jesse Hallad250842017-03-10 18:35:38 -08003242@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003243class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003244 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003245 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003246}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003247
Jesse Hallad250842017-03-10 18:35:38 -08003248@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003249class VkDisplayModePropertiesKHR {
3250 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003251 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003252}
3253
Jesse Hallad250842017-03-10 18:35:38 -08003254@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003255class VkDisplayModeCreateInfoKHR {
3256 VkStructureType sType
3257 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003258 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003259 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003260}
3261
Jesse Hallad250842017-03-10 18:35:38 -08003262@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003263class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003264 VkDisplayKHR currentDisplay
3265 u32 currentStackIndex
3266}
3267
Jesse Hallad250842017-03-10 18:35:38 -08003268@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003269class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003270 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3271 VkOffset2D minSrcPosition
3272 VkOffset2D maxSrcPosition
3273 VkExtent2D minSrcExtent
3274 VkExtent2D maxSrcExtent
3275 VkOffset2D minDstPosition
3276 VkOffset2D maxDstPosition
3277 VkExtent2D minDstExtent
3278 VkExtent2D maxDstExtent
3279}
3280
Jesse Hallad250842017-03-10 18:35:38 -08003281@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003282class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003283 VkStructureType sType
3284 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003285 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003286 VkDisplayModeKHR displayMode
3287 u32 planeIndex
3288 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003289 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003290 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003291 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3292 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003293}
3294
Jesse Hallad250842017-03-10 18:35:38 -08003295@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003296class VkDisplayPresentInfoKHR {
3297 VkStructureType sType
3298 const void* pNext
3299 VkRect2D srcRect
3300 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003301 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003302}
3303
Jesse Hallad250842017-03-10 18:35:38 -08003304@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003305class VkXlibSurfaceCreateInfoKHR {
3306 VkStructureType sType
3307 const void* pNext
3308 VkXlibSurfaceCreateFlagsKHR flags
3309 platform.Display* dpy
3310 platform.Window window
3311}
3312
Jesse Hallad250842017-03-10 18:35:38 -08003313@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003314class VkXcbSurfaceCreateInfoKHR {
3315 VkStructureType sType
3316 const void* pNext
3317 VkXcbSurfaceCreateFlagsKHR flags
3318 platform.xcb_connection_t* connection
3319 platform.xcb_window_t window
3320}
3321
Jesse Hallad250842017-03-10 18:35:38 -08003322@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003323class VkWaylandSurfaceCreateInfoKHR {
3324 VkStructureType sType
3325 const void* pNext
3326 VkWaylandSurfaceCreateFlagsKHR flags
3327 platform.wl_display* display
3328 platform.wl_surface* surface
3329}
3330
Jesse Hallad250842017-03-10 18:35:38 -08003331@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003332class VkMirSurfaceCreateInfoKHR {
3333 VkStructureType sType
3334 const void* pNext
3335 VkMirSurfaceCreateFlagsKHR flags
3336 platform.MirConnection* connection
3337 platform.MirSurface* mirSurface
3338}
3339
Jesse Hallad250842017-03-10 18:35:38 -08003340@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003341class VkAndroidSurfaceCreateInfoKHR {
3342 VkStructureType sType
3343 const void* pNext
3344 VkAndroidSurfaceCreateFlagsKHR flags
3345 platform.ANativeWindow* window
3346}
3347
Jesse Hallad250842017-03-10 18:35:38 -08003348@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003349class VkWin32SurfaceCreateInfoKHR {
3350 VkStructureType sType
3351 const void* pNext
3352 VkWin32SurfaceCreateFlagsKHR flags
3353 platform.HINSTANCE hinstance
3354 platform.HWND hwnd
3355}
3356
Jesse Hallad250842017-03-10 18:35:38 -08003357@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003358@internal class Gralloc1Usage {
3359 u64 consumer
3360 u64 producer
3361}
3362
Jesse Hallad250842017-03-10 18:35:38 -08003363@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003364class VkNativeBufferANDROID {
3365 VkStructureType sType
3366 const void* pNext
3367 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003368 s32 stride
3369 s32 format
3370 s32 usage
3371 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003372}
3373
Jesse Hallad250842017-03-10 18:35:38 -08003374@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003375class VkSwapchainImageCreateInfoANDROID {
3376 VkStructureType sType
3377 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003378 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003379}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003380
Jesse Hallad250842017-03-10 18:35:38 -08003381@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003382class VkPhysicalDevicePresentationPropertiesANDROID {
3383 VkStructureType sType
3384 void* pNext
3385 VkBool32 sharedImage
3386}
3387
Jesse Hallad250842017-03-10 18:35:38 -08003388@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003389class VkDebugReportCallbackCreateInfoEXT {
3390 VkStructureType sType
3391 const void* pNext
3392 VkDebugReportFlagsEXT flags
3393 PFN_vkDebugReportCallbackEXT pfnCallback
3394 void* pUserData
3395}
3396
Jesse Hallad250842017-03-10 18:35:38 -08003397@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003398class VkPipelineRasterizationStateRasterizationOrderAMD {
3399 VkStructureType sType
3400 const void* pNext
3401 VkRasterizationOrderAMD rasterizationOrder
3402}
3403
Jesse Hallad250842017-03-10 18:35:38 -08003404@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003405class VkDebugMarkerObjectNameInfoEXT {
3406 VkStructureType sType
3407 const void* pNext
3408 VkDebugReportObjectTypeEXT objectType
3409 u64 object
3410 const char* pObjectName
3411}
3412
Jesse Hallad250842017-03-10 18:35:38 -08003413@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003414class VkDebugMarkerObjectTagInfoEXT {
3415 VkStructureType sType
3416 const void* pNext
3417 VkDebugReportObjectTypeEXT objectType
3418 u64 object
3419 u64 tagName
3420 platform.size_t tagSize
3421 const void* pTag
3422}
3423
Jesse Hallad250842017-03-10 18:35:38 -08003424@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003425class VkDebugMarkerMarkerInfoEXT {
3426 VkStructureType sType
3427 const void* pNext
3428 const char* pMarkerName
3429 f32[4] color
3430}
3431
Jesse Hallad250842017-03-10 18:35:38 -08003432@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003433class VkDedicatedAllocationImageCreateInfoNV {
3434 VkStructureType sType
3435 const void* pNext
3436 VkBool32 dedicatedAllocation
3437}
3438
Jesse Hallad250842017-03-10 18:35:38 -08003439@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003440class VkDedicatedAllocationBufferCreateInfoNV {
3441 VkStructureType sType
3442 const void* pNext
3443 VkBool32 dedicatedAllocation
3444}
3445
Jesse Hallad250842017-03-10 18:35:38 -08003446@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003447class VkDedicatedAllocationMemoryAllocateInfoNV {
3448 VkStructureType sType
3449 const void* pNext
3450 VkImage image
3451 VkBuffer buffer
3452}
3453
Jesse Hallad250842017-03-10 18:35:38 -08003454@extension("VK_KHX_multiview") // 54
3455class VkRenderPassMultiviewCreateInfoKHX {
3456 VkStructureType sType
3457 const void* pNext
3458 u32 subpassCount
3459 const u32* pViewMasks
3460 u32 dependencyCount
3461 const s32* pViewOffsets
3462 u32 correlationMaskCount
3463 const u32* pCorrelationMasks
3464}
3465
3466@extension("VK_KHX_multiview") // 54
3467class VkPhysicalDeviceMultiviewFeaturesKHX {
3468 VkStructureType sType
3469 void* pNext
3470 VkBool32 multiview
3471 VkBool32 multiviewGeometryShader
3472 VkBool32 multiviewTessellationShader
3473}
3474
3475@extension("VK_KHX_multiview") // 54
3476class VkPhysicalDeviceMultiviewPropertiesKHX {
3477 VkStructureType sType
3478 void* pNext
3479 u32 maxMultiviewViewCount
3480 u32 maxMultiviewInstanceIndex
3481}
3482
3483@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003484class VkExternalImageFormatPropertiesNV {
3485 VkImageFormatProperties imageFormatProperties
3486 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3487 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3488 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3489}
3490
Jesse Hallad250842017-03-10 18:35:38 -08003491@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003492class VkExternalMemoryImageCreateInfoNV {
3493 VkStructureType sType
3494 const void* pNext
3495 VkExternalMemoryHandleTypeFlagsNV handleTypes
3496}
3497
Jesse Hallad250842017-03-10 18:35:38 -08003498@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003499class VkExportMemoryAllocateInfoNV {
3500 VkStructureType sType
3501 const void* pNext
3502 VkExternalMemoryHandleTypeFlagsNV handleTypes
3503}
3504
Jesse Hallad250842017-03-10 18:35:38 -08003505@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003506class VkImportMemoryWin32HandleInfoNV {
3507 VkStructureType sType
3508 const void* pNext
3509 VkExternalMemoryHandleTypeFlagsNV handleType
3510 platform.HANDLE handle
3511}
3512
Jesse Hallad250842017-03-10 18:35:38 -08003513@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003514class VkExportMemoryWin32HandleInfoNV {
3515 VkStructureType sType
3516 const void* pNext
3517 const platform.SECURITY_ATTRIBUTES* pAttributes
3518 platform.DWORD dwAccess
3519}
3520
Jesse Hallad250842017-03-10 18:35:38 -08003521@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003522class VkWin32KeyedMutexAcquireReleaseInfoNV {
3523 VkStructureType sType
3524 const void* pNext
3525 u32 acquireCount
3526 const VkDeviceMemory* pAcquireSyncs
3527 const u64* pAcquireKeys
3528 const u32* pAcquireTimeoutMilliseconds
3529 u32 releaseCount
3530 const VkDeviceMemory* pReleaseSyncs
3531 const u64* pReleaseKeys
3532}
3533
Jesse Hallad250842017-03-10 18:35:38 -08003534@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003535class VkPhysicalDeviceFeatures2KHR {
3536 VkStructureType sType
3537 void* pNext
3538 VkPhysicalDeviceFeatures features
3539}
3540
Jesse Hallad250842017-03-10 18:35:38 -08003541@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003542class VkPhysicalDeviceProperties2KHR {
3543 VkStructureType sType
3544 void* pNext
3545 VkPhysicalDeviceProperties properties
3546}
3547
Jesse Hallad250842017-03-10 18:35:38 -08003548@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003549class VkFormatProperties2KHR {
3550 VkStructureType sType
3551 void* pNext
3552 VkFormatProperties formatProperties
3553}
3554
Jesse Hallad250842017-03-10 18:35:38 -08003555@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003556class VkImageFormatProperties2KHR {
3557 VkStructureType sType
3558 void* pNext
3559 VkImageFormatProperties imageFormatProperties
3560}
3561
Jesse Hallad250842017-03-10 18:35:38 -08003562@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003563class VkPhysicalDeviceImageFormatInfo2KHR {
3564 VkStructureType sType
3565 const void* pNext
3566 VkFormat format
3567 VkImageType type
3568 VkImageTiling tiling
3569 VkImageUsageFlags usage
3570 VkImageCreateFlags flags
3571}
3572
Jesse Hallad250842017-03-10 18:35:38 -08003573@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003574class VkQueueFamilyProperties2KHR {
3575 VkStructureType sType
3576 void* pNext
3577 VkQueueFamilyProperties queueFamilyProperties
3578}
3579
Jesse Hallad250842017-03-10 18:35:38 -08003580@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003581class VkPhysicalDeviceMemoryProperties2KHR {
3582 VkStructureType sType
3583 void* pNext
3584 VkPhysicalDeviceMemoryProperties memoryProperties
3585}
3586
Jesse Hallad250842017-03-10 18:35:38 -08003587@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003588class VkSparseImageFormatProperties2KHR {
3589 VkStructureType sType
3590 void* pNext
3591 VkSparseImageFormatProperties properties
3592}
3593
Jesse Hallad250842017-03-10 18:35:38 -08003594@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003595class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3596 VkStructureType sType
3597 const void* pNext
3598 VkFormat format
3599 VkImageType type
3600 VkSampleCountFlagBits samples
3601 VkImageUsageFlags usage
3602 VkImageTiling tiling
3603}
3604
Jesse Hallad250842017-03-10 18:35:38 -08003605@extension("VK_KHX_device_group") // 61
3606class VkMemoryAllocateFlagsInfoKHX {
3607 VkStructureType sType
3608 const void* pNext
3609 VkMemoryAllocateFlagsKHX flags
3610 u32 deviceMask
3611}
3612
3613@extension("VK_KHX_device_group") // 61
3614class VkBindBufferMemoryInfoKHX {
3615 VkStructureType sType
3616 const void* pNext
3617 VkBuffer buffer
3618 VkDeviceMemory memory
3619 VkDeviceSize memoryOffset
3620 u32 deviceIndexCount
3621 const u32* pDeviceIndices
3622}
3623
3624@extension("VK_KHX_device_group") // 61
3625class VkBindImageMemoryInfoKHX {
3626 VkStructureType sType
3627 const void* pNext
3628 VkImage image
3629 VkDeviceMemory memory
3630 VkDeviceSize memoryOffset
3631 u32 deviceIndexCount
3632 const u32* pDeviceIndices
3633 u32 SFRRectCount
3634 const VkRect2D* pSFRRects
3635}
3636
3637@extension("VK_KHX_device_group") // 61
3638class VkDeviceGroupRenderPassBeginInfoKHX {
3639 VkStructureType sType
3640 const void* pNext
3641 u32 deviceMask
3642 u32 deviceRenderAreaCount
3643 const VkRect2D* pDeviceRenderAreas
3644}
3645
3646@extension("VK_KHX_device_group") // 61
3647class VkDeviceGroupCommandBufferBeginInfoKHX {
3648 VkStructureType sType
3649 const void* pNext
3650 u32 deviceMask
3651}
3652
3653@extension("VK_KHX_device_group") // 61
3654class VkDeviceGroupSubmitInfoKHX {
3655 VkStructureType sType
3656 const void* pNext
3657 u32 waitSemaphoreCount
3658 const u32* pWaitSemaphoreDeviceIndices
3659 u32 commandBufferCount
3660 const u32* pCommandBufferDeviceMasks
3661 u32 signalSemaphoreCount
3662 const u32* pSignalSemaphoreDeviceIndices
3663}
3664
3665@extension("VK_KHX_device_group") // 61
3666class VkDeviceGroupBindSparseInfoKHX {
3667 VkStructureType sType
3668 const void* pNext
3669 u32 resourceDeviceIndex
3670 u32 memoryDeviceIndex
3671}
3672
3673@extension("VK_KHX_device_group") // 61
3674class VkDeviceGroupPresentCapabilitiesKHX {
3675 VkStructureType sType
3676 const void* pNext
3677 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3678 VkDeviceGroupPresentModeFlagsKHX modes
3679}
3680
3681@extension("VK_KHX_device_group") // 61
3682class VkImageSwapchainCreateInfoKHX {
3683 VkStructureType sType
3684 const void* pNext
3685 VkSwapchainKHR swapchain
3686}
3687
3688@extension("VK_KHX_device_group") // 61
3689class VkBindImageMemorySwapchainInfoKHX {
3690 VkStructureType sType
3691 const void* pNext
3692 VkSwapchainKHR swapchain
3693 u32 imageIndex
3694}
3695
3696@extension("VK_KHX_device_group") // 61
3697class VkAcquireNextImageInfoKHX {
3698 VkStructureType sType
3699 const void* pNext
3700 VkSwapchainKHR swapchain
3701 u64 timeout
3702 VkSemaphore semaphore
3703 VkFence fence
3704 u32 deviceMask
3705}
3706
3707@extension("VK_KHX_device_group") // 61
3708class VkDeviceGroupPresentInfoKHX {
3709 VkStructureType sType
3710 const void* pNext
3711 u32 swapchainCount
3712 const u32* pDeviceMasks
3713 VkDeviceGroupPresentModeFlagBitsKHX mode
3714}
3715
3716@extension("VK_KHX_device_group") // 61
3717class VkDeviceGroupSwapchainCreateInfoKHX {
3718 VkStructureType sType
3719 const void* pNext
3720 VkDeviceGroupPresentModeFlagsKHX modes
3721}
3722
3723@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13003724class VkValidationFlagsEXT {
3725 VkStructureType sType
3726 const void* pNext
3727 u32 disabledValidationCheckCount
3728 VkValidationCheckEXT* pDisabledValidationChecks
3729}
3730
Jesse Hallad250842017-03-10 18:35:38 -08003731@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08003732class VkViSurfaceCreateInfoNN {
3733 VkStructureType sType
3734 const void* pNext
3735 VkViSurfaceCreateFlagsNN flags
3736 void* window
3737}
3738
Jesse Hallad250842017-03-10 18:35:38 -08003739@extension("VK_KHX_device_group_creation") // 71
3740class VkPhysicalDeviceGroupPropertiesKHX {
3741 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07003742 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08003743 u32 physicalDeviceCount
3744 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3745 VkBool32 subsetAllocation
3746}
3747
3748@extension("VK_KHX_device_group_creation") // 71
3749class VkDeviceGroupDeviceCreateInfoKHX {
3750 VkStructureType sType
3751 const void* pNext
3752 u32 physicalDeviceCount
3753 const VkPhysicalDevice* pPhysicalDevices
3754}
3755
3756@extension("VK_KHX_external_memory_capabilities") // 72
3757class VkExternalMemoryPropertiesKHX {
3758 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3759 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3760 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3761}
3762
3763@extension("VK_KHX_external_memory_capabilities") // 72
3764class VkPhysicalDeviceExternalImageFormatInfoKHX {
3765 VkStructureType sType
3766 const void* pNext
3767 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3768}
3769
3770@extension("VK_KHX_external_memory_capabilities") // 72
3771class VkExternalImageFormatPropertiesKHX {
3772 VkStructureType sType
3773 void* pNext
3774 VkExternalMemoryPropertiesKHX externalMemoryProperties
3775}
3776
3777@extension("VK_KHX_external_memory_capabilities") // 72
3778class VkPhysicalDeviceExternalBufferInfoKHX {
3779 VkStructureType sType
3780 const void* pNext
3781 VkBufferCreateFlags flags
3782 VkBufferUsageFlags usage
3783 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3784}
3785
3786@extension("VK_KHX_external_memory_capabilities") // 72
3787class VkExternalBufferPropertiesKHX {
3788 VkStructureType sType
3789 void* pNext
3790 VkExternalMemoryPropertiesKHX externalMemoryProperties
3791}
3792
3793@extension("VK_KHX_external_memory_capabilities") // 72
3794class VkPhysicalDeviceIDPropertiesKHX {
3795 VkStructureType sType
3796 void* pNext
3797 u8[VK_UUID_SIZE] deviceUUID
3798 u8[VK_UUID_SIZE] driverUUID
3799 u8[VK_LUID_SIZE_KHX] deviceLUID
3800 VkBool32 deviceLUIDValid
3801}
3802
Jesse Hallad250842017-03-10 18:35:38 -08003803@extension("VK_KHX_external_memory") // 73
3804class VkExternalMemoryImageCreateInfoKHX {
3805 VkStructureType sType
3806 const void* pNext
3807 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3808}
3809
3810@extension("VK_KHX_external_memory") // 73
3811class VkExternalMemoryBufferCreateInfoKHX {
3812 VkStructureType sType
3813 const void* pNext
3814 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3815}
3816
3817@extension("VK_KHX_external_memory") // 73
3818class VkExportMemoryAllocateInfoKHX {
3819 VkStructureType sType
3820 const void* pNext
3821 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3822}
3823
3824@extension("VK_KHX_external_memory_win32") // 74
3825class VkImportMemoryWin32HandleInfoKHX {
3826 VkStructureType sType
3827 const void* pNext
3828 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3829 platform.HANDLE handle
3830}
3831
3832@extension("VK_KHX_external_memory_win32") // 74
3833class VkExportMemoryWin32HandleInfoKHX {
3834 VkStructureType sType
3835 const void* pNext
3836 const platform.SECURITY_ATTRIBUTES* pAttributes
3837 platform.DWORD dwAccess
3838 platform.LPCWSTR name
3839}
3840
3841@extension("VK_KHX_external_memory_win32") // 74
3842class VkMemoryWin32HandlePropertiesKHX {
3843 VkStructureType sType
3844 void* pNext
3845 u32 memoryTypeBits
3846}
3847
3848@extension("VK_KHX_external_memory_fd") // 75
3849class VkImportMemoryFdInfoKHX {
3850 VkStructureType sType
3851 const void* pNext
3852 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3853 int fd
3854}
3855
3856@extension("VK_KHX_external_memory_fd") // 75
3857class VkMemoryFdPropertiesKHX {
3858 VkStructureType sType
3859 void* pNext
3860 u32 memoryTypeBits
3861}
3862
3863@extension("VK_KHX_win32_keyed_mutex") // 76
3864class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3865 VkStructureType sType
3866 const void* pNext
3867 u32 acquireCount
3868 const VkDeviceMemory* pAcquireSyncs
3869 const u64* pAcquireKeys
3870 const u32* pAcquireTimeouts
3871 u32 releaseCount
3872 const VkDeviceMemory* pReleaseSyncs
3873 const u64* pReleaseKeys
3874}
3875
3876@extension("VK_KHX_external_semaphore_capabilities") // 77
3877class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3878 VkStructureType sType
3879 const void* pNext
3880 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3881}
3882
3883@extension("VK_KHX_external_semaphore_capabilities") // 77
3884class VkExternalSemaphorePropertiesKHX {
3885 VkStructureType sType
3886 void* pNext
3887 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3888 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3889 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3890}
3891
3892@extension("VK_KHX_external_semaphore") // 78
3893class VkExportSemaphoreCreateInfoKHX {
3894 VkStructureType sType
3895 const void* pNext
3896 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3897}
3898
3899@extension("VK_KHX_external_semaphore_win32") // 79
3900class VkImportSemaphoreWin32HandleInfoKHX {
3901 VkStructureType sType
3902 const void* pNext
3903 VkSemaphore semaphore
3904 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3905 platform.HANDLE handle
3906}
3907
3908@extension("VK_KHX_external_semaphore_win32") // 79
3909class VkExportSemaphoreWin32HandleInfoKHX {
3910 VkStructureType sType
3911 const void* pNext
3912 const platform.SECURITY_ATTRIBUTES* pAttributes
3913 platform.DWORD dwAccess
3914 platform.LPCWSTR name
3915}
3916
3917@extension("VK_KHX_external_semaphore_win32") // 79
3918class VkD3D12FenceSubmitInfoKHX {
3919 VkStructureType sType
3920 const void* pNext
3921 u32 waitSemaphoreValuesCount
3922 const u64* pWaitSemaphoreValues
3923 u32 signalSemaphoreValuesCount
3924 const u64* pSignalSemaphoreValues
3925}
3926
3927@extension("VK_KHX_external_semaphore_fd") // 80
3928class VkImportSemaphoreFdInfoKHX {
3929 VkStructureType sType
3930 const void* pNext
3931 VkSemaphore semaphore
3932 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3933 s32 fd
3934}
3935
3936@extension("VK_KHR_push_descriptor") // 81
3937class VkPhysicalDevicePushDescriptorPropertiesKHR {
3938 VkStructureType sType
3939 void* pNext
3940 u32 maxPushDescriptors
3941}
3942
3943@extension("VK_KHR_incremental_present") // 85
3944class VkRectLayerKHR {
3945 VkOffset2D offset
3946 VkExtent2D extent
3947 u32 layer
3948}
3949
3950@extension("VK_KHR_incremental_present") // 85
3951class VkPresentRegionKHR {
3952 u32 rectangleCount
3953 const VkRectLayerKHR* pRectangles
3954}
3955
3956@extension("VK_KHR_incremental_present") // 85
3957class VkPresentRegionsKHR {
3958 VkStructureType sType
3959 const void* pNext
3960 u32 swapchainCount
3961 const VkPresentRegionKHR* pRegions
3962}
3963
3964@extension("VK_KHR_descriptor_update_template") // 86
3965class VkDescriptorUpdateTemplateEntryKHR {
3966 u32 dstBinding
3967 u32 dstArrayElement
3968 u32 descriptorCount
3969 VkDescriptorType descriptorType
3970 platform.size_t offset
3971 platform.size_t stride
3972}
3973
3974@extension("VK_KHR_descriptor_update_template") // 86
3975class VkDescriptorUpdateTemplateCreateInfoKHR {
3976 VkStructureType sType
3977 void* pNext
3978 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3979 u32 descriptorUpdateEntryCount
3980 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3981 VkDescriptorUpdateTemplateTypeKHR templateType
3982 VkDescriptorSetLayout descriptorSetLayout
3983 VkPipelineBindPoint pipelineBindPoint
3984 VkPipelineLayout pipelineLayout
3985 u32 set
3986}
3987
3988@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003989class VkDeviceGeneratedCommandsFeaturesNVX {
3990 VkStructureType sType
3991 const void* pNext
3992 VkBool32 computeBindingPointSupport
3993}
3994
Jesse Hallad250842017-03-10 18:35:38 -08003995@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003996class VkDeviceGeneratedCommandsLimitsNVX {
3997 VkStructureType sType
3998 const void* pNext
3999 u32 maxIndirectCommandsLayoutTokenCount
4000 u32 maxObjectEntryCounts
4001 u32 minSequenceCountBufferOffsetAlignment
4002 u32 minSequenceIndexBufferOffsetAlignment
4003 u32 minCommandsTokenBufferOffsetAlignment
4004}
4005
Jesse Hallad250842017-03-10 18:35:38 -08004006@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004007class VkIndirectCommandsTokenNVX {
4008 VkIndirectCommandsTokenTypeNVX tokenType
4009 VkBuffer buffer
4010 VkDeviceSize offset
4011}
4012
Jesse Hallad250842017-03-10 18:35:38 -08004013@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004014class VkIndirectCommandsLayoutTokenNVX {
4015 VkIndirectCommandsTokenTypeNVX tokenType
4016 u32 bindingUnit
4017 u32 dynamicCount
4018 u32 divisor
4019}
4020
Jesse Hallad250842017-03-10 18:35:38 -08004021@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004022class VkIndirectCommandsLayoutCreateInfoNVX {
4023 VkStructureType sType
4024 const void* pNext
4025 VkPipelineBindPoint pipelineBindPoint
4026 VkIndirectCommandsLayoutUsageFlagsNVX flags
4027 u32 tokenCount
4028 const VkIndirectCommandsLayoutTokenNVX* pTokens
4029}
4030
Jesse Hallad250842017-03-10 18:35:38 -08004031@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004032class VkCmdProcessCommandsInfoNVX {
4033 VkStructureType sType
4034 const void* pNext
4035 VkObjectTableNVX objectTable
4036 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4037 u32 indirectCommandsTokenCount
4038 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4039 u32 maxSequencesCount
4040 VkCommandBuffer targetCommandBuffer
4041 VkBuffer sequencesCountBuffer
4042 VkDeviceSize sequencesCountOffset
4043 VkBuffer sequencesIndexBuffer
4044 VkDeviceSize sequencesIndexOffset
4045}
4046
Jesse Hallad250842017-03-10 18:35:38 -08004047@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004048class VkCmdReserveSpaceForCommandsInfoNVX {
4049 VkStructureType sType
4050 const void* pNext
4051 VkObjectTableNVX objectTable
4052 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4053 u32 maxSequencesCount
4054}
4055
Jesse Hallad250842017-03-10 18:35:38 -08004056@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004057class VkObjectTableCreateInfoNVX {
4058 VkStructureType sType
4059 const void* pNext
4060 u32 objectCount
4061 const VkObjectEntryTypeNVX* pObjectEntryTypes
4062 const u32* pObjectEntryCounts
4063 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4064 u32 maxUniformBuffersPerDescriptor
4065 u32 maxStorageBuffersPerDescriptor
4066 u32 maxStorageImagesPerDescriptor
4067 u32 maxSampledImagesPerDescriptor
4068 u32 maxPipelineLayouts
4069}
4070
Jesse Hallad250842017-03-10 18:35:38 -08004071@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004072class VkObjectTableEntryNVX {
4073 VkObjectEntryTypeNVX type
4074 VkObjectEntryUsageFlagsNVX flags
4075}
4076
Jesse Hallad250842017-03-10 18:35:38 -08004077@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004078class VkObjectTablePipelineEntryNVX {
4079 VkObjectEntryTypeNVX type
4080 VkObjectEntryUsageFlagsNVX flags
4081 VkPipeline pipeline
4082}
4083
Jesse Hallad250842017-03-10 18:35:38 -08004084@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004085class VkObjectTableDescriptorSetEntryNVX {
4086 VkObjectEntryTypeNVX type
4087 VkObjectEntryUsageFlagsNVX flags
4088 VkPipelineLayout pipelineLayout
4089 VkDescriptorSet descriptorSet
4090}
4091
Jesse Hallad250842017-03-10 18:35:38 -08004092@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004093class VkObjectTableVertexBufferEntryNVX {
4094 VkObjectEntryTypeNVX type
4095 VkObjectEntryUsageFlagsNVX flags
4096 VkBuffer buffer
4097}
4098
Jesse Hallad250842017-03-10 18:35:38 -08004099@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004100class VkObjectTableIndexBufferEntryNVX {
4101 VkObjectEntryTypeNVX type
4102 VkObjectEntryUsageFlagsNVX flags
4103 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004104 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004105}
4106
Jesse Hallad250842017-03-10 18:35:38 -08004107@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004108class VkObjectTablePushConstantEntryNVX {
4109 VkObjectEntryTypeNVX type
4110 VkObjectEntryUsageFlagsNVX flags
4111 VkPipelineLayout pipelineLayout
4112 VkShaderStageFlags stageFlags
4113}
4114
Jesse Hallad250842017-03-10 18:35:38 -08004115@extension("VK_NV_clip_space_w_scaling") // 88
4116class VkViewportWScalingNV {
4117 f32 xcoeff
4118 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004119}
4120
Jesse Hallad250842017-03-10 18:35:38 -08004121@extension("VK_NV_clip_space_w_scaling") // 88
4122class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004123 VkStructureType sType
4124 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004125 VkBool32 viewportWScalingEnable
4126 u32 viewportCount
4127 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004128}
4129
Jesse Hallad250842017-03-10 18:35:38 -08004130@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004131class VkSurfaceCapabilities2EXT {
4132 VkStructureType sType
4133 void* pNext
4134 u32 minImageCount
4135 u32 maxImageCount
4136 VkExtent2D currentExtent
4137 VkExtent2D minImageExtent
4138 VkExtent2D maxImageExtent
4139 u32 maxImageArrayLayers
4140 VkSurfaceTransformFlagsKHR supportedTransforms
4141 VkSurfaceTransformFlagBitsKHR currentTransform
4142 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4143 VkImageUsageFlags supportedUsageFlags
4144 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4145}
4146
Jesse Hallad250842017-03-10 18:35:38 -08004147@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004148class VkDisplayPowerInfoEXT {
4149 VkStructureType sType
4150 const void* pNext
4151 VkDisplayPowerStateEXT powerState
4152}
4153
Jesse Hallad250842017-03-10 18:35:38 -08004154@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004155class VkDeviceEventInfoEXT {
4156 VkStructureType sType
4157 const void* pNext
4158 VkDeviceEventTypeEXT deviceEvent
4159}
4160
Jesse Hallad250842017-03-10 18:35:38 -08004161@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004162class VkDisplayEventInfoEXT {
4163 VkStructureType sType
4164 const void* pNext
4165 VkDisplayEventTypeEXT displayEvent
4166}
4167
Jesse Hallad250842017-03-10 18:35:38 -08004168@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004169class VkSwapchainCounterCreateInfoEXT {
4170 VkStructureType sType
4171 const void* pNext
4172 VkSurfaceCounterFlagsEXT surfaceCounters
4173}
4174
Jesse Hallad250842017-03-10 18:35:38 -08004175@extension("VK_GOOGLE_display_timing") // 93
4176class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004177 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08004178}
4179
4180@extension("VK_GOOGLE_display_timing") // 93
4181class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004182 u32 presentID
4183 u64 desiredPresentTime
4184 u64 actualPresentTime
4185 u64 earliestPresentTime
4186 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08004187}
4188
4189@extension("VK_GOOGLE_display_timing") // 93
4190class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004191 u32 presentID
4192 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08004193}
4194
4195@extension("VK_GOOGLE_display_timing") // 93
4196class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004197 VkStructureType sType
4198 const void* pNext
4199 u32 swapchainCount
4200 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08004201}
4202
4203@extension("VK_NVX_multiview_per_view_attributes") // 98
4204class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4205 VkStructureType sType
4206 void* pNext
4207 VkBool32 perViewPositionAllComponents
4208}
4209
4210@extension("VK_NV_viewport_swizzle") // 99
4211class VkViewportSwizzleNV {
4212 VkViewportCoordinateSwizzleNV x
4213 VkViewportCoordinateSwizzleNV y
4214 VkViewportCoordinateSwizzleNV z
4215 VkViewportCoordinateSwizzleNV w
4216}
4217
4218@extension("VK_NV_viewport_swizzle") // 99
4219class VkPipelineViewportSwizzleStateCreateInfoNV {
4220 VkStructureType sType
4221 const void* pNext
4222 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4223 u32 viewportCount
4224 const VkViewportSwizzleNV* pViewportSwizzles
4225}
4226
4227@extension("VK_EXT_discard_rectangles") // 100
4228class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4229 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07004230 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004231 u32 maxDiscardRectangles
4232}
4233
4234@extension("VK_EXT_discard_rectangles") // 100
4235class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004236 VkStructureType sType
4237 const void* pNext
4238 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4239 VkDiscardRectangleModeEXT discardRectangleMode
4240 u32 discardRectangleCount
4241 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08004242}
4243
4244@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004245class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004246 f32 x
4247 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004248}
4249
Jesse Hallad250842017-03-10 18:35:38 -08004250@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004251class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004252 VkStructureType sType
4253 const void* pNext
4254 VkXYColorEXT displayPrimaryRed
4255 VkXYColorEXT displayPrimaryGreen
4256 VkXYColorEXT displayPrimaryBlue
4257 VkXYColorEXT whitePoint
4258 f32 maxLuminance
4259 f32 minLuminance
4260 f32 maxContentLightLevel
4261 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004262}
4263
Chris Forbese2d3ee12017-03-16 16:10:15 +13004264@extension("VK_KHR_shared_presentable_image") // 111
4265class VkSharedPresentSurfaceCapabilitiesKHR {
4266 VkStructureType sType
4267 const void* pNext
4268 VkImageUsageFlags sharedPresentSupportedUsageFlags
4269}
4270
4271@extension("VK_KHR_get_surface_capabilities2") // 119
4272class VkPhysicalDeviceSurfaceInfo2KHR {
4273 VkStructureType sType
4274 const void* pNext
4275 VkSurfaceKHR surface
4276}
4277
4278@extension("VK_KHR_get_surface_capabilities2") // 119
4279class VkSurfaceCapabilities2KHR {
4280 VkStructureType sType
4281 void* pNext
4282 VkSurfaceCapabilitiesKHR surfaceCapabilities
4283}
4284
4285@extension("VK_KHR_get_surface_capabilities2") // 119
4286class VkSurfaceFormat2KHR {
4287 VkStructureType sType
4288 void* pNext
4289 VkSurfaceFormatKHR surfaceFormat
4290}
4291
Jesse Hallad250842017-03-10 18:35:38 -08004292@extension("VK_MVK_ios_surface") // 123
4293class VkIOSSurfaceCreateInfoMVK {
4294 VkStructureType sType
4295 const void* pNext
4296 VkIOSSurfaceCreateFlagsMVK flags
4297 const void* pView
4298}
4299
4300@extension("VK_MVK_macos_surface") // 124
4301class VkMacOSSurfaceCreateInfoMVK {
4302 VkStructureType sType
4303 const void* pNext
4304 VkMacOSSurfaceCreateFlagsMVK flags
4305 const void* pView
4306}
4307
Jesse Halld27f6aa2015-08-15 17:58:48 -07004308////////////////
4309// Commands //
4310////////////////
4311
4312// Function pointers. TODO: add support for function pointers.
4313
4314@external type void* PFN_vkVoidFunction
4315@pfn cmd void vkVoidFunction() {
4316}
4317
Jesse Hall3fbc8562015-11-29 22:10:52 -08004318@external type void* PFN_vkAllocationFunction
4319@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004320 void* pUserData,
4321 platform.size_t size,
4322 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004323 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004324 return ?
4325}
4326
Jesse Hall3fbc8562015-11-29 22:10:52 -08004327@external type void* PFN_vkReallocationFunction
4328@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004329 void* pUserData,
4330 void* pOriginal,
4331 platform.size_t size,
4332 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004333 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004334 return ?
4335}
4336
4337@external type void* PFN_vkFreeFunction
4338@pfn cmd void vkFreeFunction(
4339 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004340 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004341}
4342
Jesse Hall3fbc8562015-11-29 22:10:52 -08004343@external type void* PFN_vkInternalAllocationNotification
4344@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004345 void* pUserData,
4346 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004347 VkInternalAllocationType allocationType,
4348 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004349}
4350
4351@external type void* PFN_vkInternalFreeNotification
4352@pfn cmd void vkInternalFreeNotification(
4353 void* pUserData,
4354 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004355 VkInternalAllocationType allocationType,
4356 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004357}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004358
4359// Global functions
4360
4361@threadSafety("system")
4362cmd VkResult vkCreateInstance(
4363 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004364 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004365 VkInstance* pInstance) {
4366 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4367
4368 instance := ?
4369 pInstance[0] = instance
4370 State.Instances[instance] = new!InstanceObject()
4371
Jesse Hall3dd678a2016-01-08 21:52:01 -08004372 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4373 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004374
4375 return ?
4376}
4377
4378@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004379cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004380 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004381 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004382 instanceObject := GetInstance(instance)
4383
4384 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004385}
4386
4387@threadSafety("system")
4388cmd VkResult vkEnumeratePhysicalDevices(
4389 VkInstance instance,
4390 u32* pPhysicalDeviceCount,
4391 VkPhysicalDevice* pPhysicalDevices) {
4392 instanceObject := GetInstance(instance)
4393
4394 physicalDeviceCount := as!u32(?)
4395 pPhysicalDeviceCount[0] = physicalDeviceCount
4396 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4397
4398 for i in (0 .. physicalDeviceCount) {
4399 physicalDevice := ?
4400 physicalDevices[i] = physicalDevice
4401 if !(physicalDevice in State.PhysicalDevices) {
4402 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4403 }
4404 }
4405
4406 return ?
4407}
4408
4409cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4410 VkDevice device,
4411 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004412 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004413 device := GetDevice(device)
4414 }
4415
4416 return ?
4417}
4418
4419cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4420 VkInstance instance,
4421 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004422 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004423 instanceObject := GetInstance(instance)
4424 }
4425
4426 return ?
4427}
4428
Jesse Hall606a54e2015-11-19 22:17:28 -08004429cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004430 VkPhysicalDevice physicalDevice,
4431 VkPhysicalDeviceProperties* pProperties) {
4432 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4433
4434 properties := ?
4435 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004436}
4437
Jesse Hall606a54e2015-11-19 22:17:28 -08004438cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004439 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004440 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004441 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004442 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004443 // TODO: Figure out how to express fetch-count-or-properties
4444 // This version fails 'apic validate' with 'fence not allowed in
4445 // *semantic.Branch'. Other attempts have failed with the same or other
4446 // errors.
4447 // if pQueueFamilyProperties != null {
4448 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4449 // for i in (0 .. pCount[0]) {
4450 // queueProperties := as!VkQueueFamilyProperties(?)
4451 // queuesProperties[i] = queueProperties
4452 // }
4453 // } else {
4454 // count := ?
4455 // pCount[0] = count
4456 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004457}
4458
Jesse Hall606a54e2015-11-19 22:17:28 -08004459cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004460 VkPhysicalDevice physicalDevice,
4461 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4462 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4463
4464 memoryProperties := ?
4465 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004466}
4467
Jesse Hall606a54e2015-11-19 22:17:28 -08004468cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004469 VkPhysicalDevice physicalDevice,
4470 VkPhysicalDeviceFeatures* pFeatures) {
4471 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4472
4473 features := ?
4474 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004475}
4476
Jesse Hall606a54e2015-11-19 22:17:28 -08004477cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004478 VkPhysicalDevice physicalDevice,
4479 VkFormat format,
4480 VkFormatProperties* pFormatProperties) {
4481 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4482
4483 formatProperties := ?
4484 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004485}
4486
Jesse Halla9e57032015-11-30 01:03:10 -08004487cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004488 VkPhysicalDevice physicalDevice,
4489 VkFormat format,
4490 VkImageType type,
4491 VkImageTiling tiling,
4492 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004493 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004494 VkImageFormatProperties* pImageFormatProperties) {
4495 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4496
4497 imageFormatProperties := ?
4498 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004499
4500 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004501}
4502
Jesse Halld27f6aa2015-08-15 17:58:48 -07004503
4504// Device functions
4505
4506@threadSafety("system")
4507cmd VkResult vkCreateDevice(
4508 VkPhysicalDevice physicalDevice,
4509 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004510 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004511 VkDevice* pDevice) {
4512 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4513 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4514
4515 device := ?
4516 pDevice[0] = device
4517 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4518
4519 return ?
4520}
4521
4522@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004523cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004524 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004525 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004526 deviceObject := GetDevice(device)
4527
4528 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004529}
4530
4531
4532// Extension discovery functions
4533
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004534cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004535 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004536 VkLayerProperties* pProperties) {
4537 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004538 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004539
4540 properties := pProperties[0:count]
4541 for i in (0 .. count) {
4542 property := ?
4543 properties[i] = property
4544 }
4545
4546 return ?
4547}
4548
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004549cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004550 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004551 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004552 VkExtensionProperties* pProperties) {
4553 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004554 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004555
4556 properties := pProperties[0:count]
4557 for i in (0 .. count) {
4558 property := ?
4559 properties[i] = property
4560 }
4561
4562 return ?
4563}
4564
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004565cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004566 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004567 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004568 VkLayerProperties* pProperties) {
4569 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4570 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004571 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004572
4573 properties := pProperties[0:count]
4574 for i in (0 .. count) {
4575 property := ?
4576 properties[i] = property
4577 }
4578
4579 return ?
4580}
4581
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004582cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004583 VkPhysicalDevice physicalDevice,
4584 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004585 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004586 VkExtensionProperties* pProperties) {
4587 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4588
4589 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004590 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004591
4592 properties := pProperties[0:count]
4593 for i in (0 .. count) {
4594 property := ?
4595 properties[i] = property
4596 }
4597
4598 return ?
4599}
4600
4601
4602// Queue functions
4603
4604@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004605cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004606 VkDevice device,
4607 u32 queueFamilyIndex,
4608 u32 queueIndex,
4609 VkQueue* pQueue) {
4610 deviceObject := GetDevice(device)
4611
4612 queue := ?
4613 pQueue[0] = queue
4614
4615 if !(queue in State.Queues) {
4616 State.Queues[queue] = new!QueueObject(device: device)
4617 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004618}
4619
4620@threadSafety("app")
4621cmd VkResult vkQueueSubmit(
4622 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004623 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004624 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004625 VkFence fence) {
4626 queueObject := GetQueue(queue)
4627
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004628 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004629 fenceObject := GetFence(fence)
4630 assert(fenceObject.device == queueObject.device)
4631 }
4632
Jesse Hall3fbc8562015-11-29 22:10:52 -08004633 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4634 // for i in (0 .. commandBufferCount) {
4635 // commandBuffer := commandBuffers[i]
4636 // commandBufferObject := GetCommandBuffer(commandBuffer)
4637 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004638 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004639 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4640 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004641 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004642
4643 return ?
4644}
4645
4646@threadSafety("system")
4647cmd VkResult vkQueueWaitIdle(
4648 VkQueue queue) {
4649 queueObject := GetQueue(queue)
4650
4651 return ?
4652}
4653
4654@threadSafety("system")
4655cmd VkResult vkDeviceWaitIdle(
4656 VkDevice device) {
4657 deviceObject := GetDevice(device)
4658
4659 return ?
4660}
4661
4662
4663// Memory functions
4664
4665@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004666cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004667 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004668 const VkMemoryAllocateInfo* pAllocateInfo,
4669 const VkAllocationCallbacks* pAllocator,
4670 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004671 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004672 deviceObject := GetDevice(device)
4673
Jesse Hall3fbc8562015-11-29 22:10:52 -08004674 memory := ?
4675 pMemory[0] = memory
4676 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004677 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004678 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004679
4680 return ?
4681}
4682
4683@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004684cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004685 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004686 VkDeviceMemory memory,
4687 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004688 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004689 memoryObject := GetDeviceMemory(memory)
4690 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004691
4692 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004693 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004694 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004695 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4696 "vkFreeMemory: commandBuffers still bound")
4697 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004698}
4699
4700@threadSafety("app")
4701cmd VkResult vkMapMemory(
4702 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004703 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004704 VkDeviceSize offset,
4705 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004706 VkMemoryMapFlags flags,
4707 void** ppData) {
4708 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004709 memoryObject := GetDeviceMemory(memory)
4710 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004711
4712 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004713 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004714
4715 return ?
4716}
4717
4718@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004719cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004720 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004721 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004722 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004723 memoryObject := GetDeviceMemory(memory)
4724 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004725}
4726
4727cmd VkResult vkFlushMappedMemoryRanges(
4728 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004729 u32 memoryRangeCount
4730 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004731 deviceObject := GetDevice(device)
4732
Jesse Hall3fbc8562015-11-29 22:10:52 -08004733 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4734 for i in (0 .. memoryRangeCount) {
4735 memoryRange := memoryRanges[i]
4736 memoryObject := GetDeviceMemory(memoryRange.memory)
4737 assert(memoryObject.device == device)
4738 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004739 }
4740
4741 return ?
4742}
4743
4744cmd VkResult vkInvalidateMappedMemoryRanges(
4745 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004746 u32 memoryRangeCount,
4747 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004748 deviceObject := GetDevice(device)
4749
Jesse Hall3fbc8562015-11-29 22:10:52 -08004750 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4751 for i in (0 .. memoryRangeCount) {
4752 memoryRange := memoryRanges[i]
4753 memoryObject := GetDeviceMemory(memoryRange.memory)
4754 assert(memoryObject.device == device)
4755 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004756 }
4757
4758 return ?
4759}
4760
4761
4762// Memory management API functions
4763
Jesse Hall606a54e2015-11-19 22:17:28 -08004764cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004765 VkDevice device,
4766 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004767 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004768 deviceObject := GetDevice(device)
4769
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004770 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004771 memoryObject := GetDeviceMemory(memory)
4772 assert(memoryObject.device == device)
4773 }
4774
4775 committedMemoryInBytes := ?
4776 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004777}
4778
Jesse Hall606a54e2015-11-19 22:17:28 -08004779cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004780 VkDevice device,
4781 VkBuffer buffer,
4782 VkMemoryRequirements* pMemoryRequirements) {
4783 deviceObject := GetDevice(device)
4784 bufferObject := GetBuffer(buffer)
4785 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004786}
4787
4788cmd VkResult vkBindBufferMemory(
4789 VkDevice device,
4790 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004791 VkDeviceMemory memory,
4792 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004793 deviceObject := GetDevice(device)
4794 bufferObject := GetBuffer(buffer)
4795 assert(bufferObject.device == device)
4796
4797 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004798 if bufferObject.memory != NULL_HANDLE {
4799 memoryObject := GetDeviceMemory(bufferObject.memory)
4800 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004801 }
4802
4803 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004804 if memory != NULL_HANDLE {
4805 memoryObject := GetDeviceMemory(memory)
4806 assert(memoryObject.device == device)
4807 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004808 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004809 bufferObject.memory = memory
4810 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004811
4812 return ?
4813}
4814
Jesse Hall606a54e2015-11-19 22:17:28 -08004815cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004816 VkDevice device,
4817 VkImage image,
4818 VkMemoryRequirements* pMemoryRequirements) {
4819 deviceObject := GetDevice(device)
4820 imageObject := GetImage(image)
4821 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004822}
4823
4824cmd VkResult vkBindImageMemory(
4825 VkDevice device,
4826 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004827 VkDeviceMemory memory,
4828 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004829 deviceObject := GetDevice(device)
4830 imageObject := GetImage(image)
4831 assert(imageObject.device == device)
4832
4833 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004834 if imageObject.memory != NULL_HANDLE {
4835 memoryObject := GetDeviceMemory(imageObject.memory)
4836 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004837 }
4838
4839 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004840 if memory != NULL_HANDLE {
4841 memoryObject := GetDeviceMemory(memory)
4842 assert(memoryObject.device == device)
4843 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004844 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004845 imageObject.memory = memory
4846 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004847
4848 return ?
4849}
4850
Jesse Hall606a54e2015-11-19 22:17:28 -08004851cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004852 VkDevice device,
4853 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004854 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004855 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4856 deviceObject := GetDevice(device)
4857 imageObject := GetImage(image)
4858 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004859}
4860
Jesse Hall606a54e2015-11-19 22:17:28 -08004861cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004862 VkPhysicalDevice physicalDevice,
4863 VkFormat format,
4864 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004865 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004866 VkImageUsageFlags usage,
4867 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004868 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004869 VkSparseImageFormatProperties* pProperties) {
4870 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004871}
4872
Jesse Halla6429252015-11-29 18:59:42 -08004873cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004874 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004875 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004876 const VkBindSparseInfo* pBindInfo,
4877 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004878 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004879
4880 return ?
4881}
4882
4883
4884// Fence functions
4885
4886@threadSafety("system")
4887cmd VkResult vkCreateFence(
4888 VkDevice device,
4889 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004890 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004891 VkFence* pFence) {
4892 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4893 deviceObject := GetDevice(device)
4894
4895 fence := ?
4896 pFence[0] = fence
4897 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004898 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004899
4900 return ?
4901}
4902
4903@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004904cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004905 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004906 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004907 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004908 deviceObject := GetDevice(device)
4909 fenceObject := GetFence(fence)
4910 assert(fenceObject.device == device)
4911
4912 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004913}
4914
4915@threadSafety("system")
4916cmd VkResult vkResetFences(
4917 VkDevice device,
4918 u32 fenceCount,
4919 const VkFence* pFences) {
4920 deviceObject := GetDevice(device)
4921
4922 fences := pFences[0:fenceCount]
4923 for i in (0 .. fenceCount) {
4924 fence := fences[i]
4925 fenceObject := GetFence(fence)
4926 assert(fenceObject.device == device)
4927 fenceObject.signaled = false
4928 }
4929
4930 return ?
4931}
4932
4933@threadSafety("system")
4934cmd VkResult vkGetFenceStatus(
4935 VkDevice device,
4936 VkFence fence) {
4937 deviceObject := GetDevice(device)
4938 fenceObject := GetFence(fence)
4939 assert(fenceObject.device == device)
4940
4941 return ?
4942}
4943
4944@threadSafety("system")
4945cmd VkResult vkWaitForFences(
4946 VkDevice device,
4947 u32 fenceCount,
4948 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004949 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004950 u64 timeout) { /// timeout in nanoseconds
4951 deviceObject := GetDevice(device)
4952
4953 fences := pFences[0:fenceCount]
4954 for i in (0 .. fenceCount) {
4955 fence := fences[i]
4956 fenceObject := GetFence(fence)
4957 assert(fenceObject.device == device)
4958 }
4959
4960 return ?
4961}
4962
4963
4964// Queue semaphore functions
4965
4966@threadSafety("system")
4967cmd VkResult vkCreateSemaphore(
4968 VkDevice device,
4969 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004970 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004971 VkSemaphore* pSemaphore) {
4972 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4973 deviceObject := GetDevice(device)
4974
4975 semaphore := ?
4976 pSemaphore[0] = semaphore
4977 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4978
4979 return ?
4980}
4981
4982@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004983cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004984 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004985 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004986 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004987 deviceObject := GetDevice(device)
4988 semaphoreObject := GetSemaphore(semaphore)
4989 assert(semaphoreObject.device == device)
4990
4991 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004992}
4993
Jesse Halld27f6aa2015-08-15 17:58:48 -07004994
4995// Event functions
4996
4997@threadSafety("system")
4998cmd VkResult vkCreateEvent(
4999 VkDevice device,
5000 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005001 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005002 VkEvent* pEvent) {
5003 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
5004 deviceObject := GetDevice(device)
5005
5006 event := ?
5007 pEvent[0] = event
5008 State.Events[event] = new!EventObject(device: device)
5009
5010 return ?
5011}
5012
5013@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005014cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005015 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005016 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005017 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005018 deviceObject := GetDevice(device)
5019 eventObject := GetEvent(event)
5020 assert(eventObject.device == device)
5021
5022 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005023}
5024
5025@threadSafety("system")
5026cmd VkResult vkGetEventStatus(
5027 VkDevice device,
5028 VkEvent event) {
5029 deviceObject := GetDevice(device)
5030 eventObject := GetEvent(event)
5031 assert(eventObject.device == device)
5032
5033 return ?
5034}
5035
5036@threadSafety("system")
5037cmd VkResult vkSetEvent(
5038 VkDevice device,
5039 VkEvent event) {
5040 deviceObject := GetDevice(device)
5041 eventObject := GetEvent(event)
5042 assert(eventObject.device == device)
5043
5044 return ?
5045}
5046
5047@threadSafety("system")
5048cmd VkResult vkResetEvent(
5049 VkDevice device,
5050 VkEvent event) {
5051 deviceObject := GetDevice(device)
5052 eventObject := GetEvent(event)
5053 assert(eventObject.device == device)
5054
5055 return ?
5056}
5057
5058
5059// Query functions
5060
5061@threadSafety("system")
5062cmd VkResult vkCreateQueryPool(
5063 VkDevice device,
5064 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005065 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005066 VkQueryPool* pQueryPool) {
5067 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5068 deviceObject := GetDevice(device)
5069
5070 queryPool := ?
5071 pQueryPool[0] = queryPool
5072 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5073
5074 return ?
5075}
5076
5077@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005078cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005079 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005080 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005081 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005082 deviceObject := GetDevice(device)
5083 queryPoolObject := GetQueryPool(queryPool)
5084 assert(queryPoolObject.device == device)
5085
5086 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005087}
5088
5089@threadSafety("system")
5090cmd VkResult vkGetQueryPoolResults(
5091 VkDevice device,
5092 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005093 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005094 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005095 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005096 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005097 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005098 VkQueryResultFlags flags) {
5099 deviceObject := GetDevice(device)
5100 queryPoolObject := GetQueryPool(queryPool)
5101 assert(queryPoolObject.device == device)
5102
Jesse Halld27f6aa2015-08-15 17:58:48 -07005103 data := pData[0:dataSize]
5104
5105 return ?
5106}
5107
5108// Buffer functions
5109
5110@threadSafety("system")
5111cmd VkResult vkCreateBuffer(
5112 VkDevice device,
5113 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005114 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005115 VkBuffer* pBuffer) {
5116 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5117 deviceObject := GetDevice(device)
5118
5119 buffer := ?
5120 pBuffer[0] = buffer
5121 State.Buffers[buffer] = new!BufferObject(device: device)
5122
5123 return ?
5124}
5125
5126@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005127cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005128 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005129 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005130 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005131 deviceObject := GetDevice(device)
5132 bufferObject := GetBuffer(buffer)
5133 assert(bufferObject.device == device)
5134
Jesse Hall3fbc8562015-11-29 22:10:52 -08005135 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005136 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005137}
5138
5139
5140// Buffer view functions
5141
5142@threadSafety("system")
5143cmd VkResult vkCreateBufferView(
5144 VkDevice device,
5145 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005146 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005147 VkBufferView* pView) {
5148 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5149 deviceObject := GetDevice(device)
5150
5151 bufferObject := GetBuffer(pCreateInfo.buffer)
5152 assert(bufferObject.device == device)
5153
5154 view := ?
5155 pView[0] = view
5156 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5157
5158 return ?
5159}
5160
5161@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005162cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005163 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005164 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005165 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005166 deviceObject := GetDevice(device)
5167 bufferViewObject := GetBufferView(bufferView)
5168 assert(bufferViewObject.device == device)
5169
5170 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005171}
5172
5173
5174// Image functions
5175
5176@threadSafety("system")
5177cmd VkResult vkCreateImage(
5178 VkDevice device,
5179 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005180 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005181 VkImage* pImage) {
5182 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5183 deviceObject := GetDevice(device)
5184
5185 image := ?
5186 pImage[0] = image
5187 State.Images[image] = new!ImageObject(device: device)
5188
5189 return ?
5190}
5191
5192@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005193cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005194 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005195 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005196 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005197 deviceObject := GetDevice(device)
5198 imageObject := GetImage(image)
5199 assert(imageObject.device == device)
5200
Jesse Hall3fbc8562015-11-29 22:10:52 -08005201 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005202 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005203}
5204
Jesse Hall606a54e2015-11-19 22:17:28 -08005205cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005206 VkDevice device,
5207 VkImage image,
5208 const VkImageSubresource* pSubresource,
5209 VkSubresourceLayout* pLayout) {
5210 deviceObject := GetDevice(device)
5211 imageObject := GetImage(image)
5212 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005213}
5214
5215
5216// Image view functions
5217
5218@threadSafety("system")
5219cmd VkResult vkCreateImageView(
5220 VkDevice device,
5221 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005222 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005223 VkImageView* pView) {
5224 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5225 deviceObject := GetDevice(device)
5226
5227 imageObject := GetImage(pCreateInfo.image)
5228 assert(imageObject.device == device)
5229
5230 view := ?
5231 pView[0] = view
5232 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5233
5234 return ?
5235}
5236
5237@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005238cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005239 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005240 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005241 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005242 deviceObject := GetDevice(device)
5243 imageViewObject := GetImageView(imageView)
5244 assert(imageViewObject.device == device)
5245
5246 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005247}
5248
5249
5250// Shader functions
5251
5252cmd VkResult vkCreateShaderModule(
5253 VkDevice device,
5254 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005255 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005256 VkShaderModule* pShaderModule) {
5257 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5258 deviceObject := GetDevice(device)
5259
5260 shaderModule := ?
5261 pShaderModule[0] = shaderModule
5262 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5263
5264 return ?
5265}
5266
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005267cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005268 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005269 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005270 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005271 deviceObject := GetDevice(device)
5272 shaderModuleObject := GetShaderModule(shaderModule)
5273 assert(shaderModuleObject.device == device)
5274
5275 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005276}
5277
Jesse Halld27f6aa2015-08-15 17:58:48 -07005278
5279// Pipeline functions
5280
5281cmd VkResult vkCreatePipelineCache(
5282 VkDevice device,
5283 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005284 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005285 VkPipelineCache* pPipelineCache) {
5286 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5287 deviceObject := GetDevice(device)
5288
5289 pipelineCache := ?
5290 pPipelineCache[0] = pipelineCache
5291 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5292
5293 return ?
5294}
5295
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005296cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005297 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005298 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005299 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005300 deviceObject := GetDevice(device)
5301 pipelineCacheObject := GetPipelineCache(pipelineCache)
5302 assert(pipelineCacheObject.device == device)
5303
5304 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005305}
5306
Jesse Halld27f6aa2015-08-15 17:58:48 -07005307cmd VkResult vkGetPipelineCacheData(
5308 VkDevice device,
5309 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005310 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005311 void* pData) {
5312 deviceObject := GetDevice(device)
5313 pipelineCacheObject := GetPipelineCache(pipelineCache)
5314 assert(pipelineCacheObject.device == device)
5315
5316 return ?
5317}
5318
5319cmd VkResult vkMergePipelineCaches(
5320 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005321 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005322 u32 srcCacheCount,
5323 const VkPipelineCache* pSrcCaches) {
5324 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005325 dstCacheObject := GetPipelineCache(dstCache)
5326 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005327
5328 srcCaches := pSrcCaches[0:srcCacheCount]
5329 for i in (0 .. srcCacheCount) {
5330 srcCache := srcCaches[i]
5331 srcCacheObject := GetPipelineCache(srcCache)
5332 assert(srcCacheObject.device == device)
5333 }
5334
5335 return ?
5336}
5337
5338cmd VkResult vkCreateGraphicsPipelines(
5339 VkDevice device,
5340 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005341 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005342 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005343 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005344 VkPipeline* pPipelines) {
5345 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005346 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005347 pipelineCacheObject := GetPipelineCache(pipelineCache)
5348 assert(pipelineCacheObject.device == device)
5349 }
5350
Jesse Hall03b6fe12015-11-24 12:44:21 -08005351 createInfos := pCreateInfos[0:createInfoCount]
5352 pipelines := pPipelines[0:createInfoCount]
5353 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005354 pipeline := ?
5355 pipelines[i] = pipeline
5356 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5357 }
5358
5359 return ?
5360}
5361
5362cmd VkResult vkCreateComputePipelines(
5363 VkDevice device,
5364 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005365 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005366 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005367 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005368 VkPipeline* pPipelines) {
5369 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005370 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005371 pipelineCacheObject := GetPipelineCache(pipelineCache)
5372 assert(pipelineCacheObject.device == device)
5373 }
5374
Jesse Hall03b6fe12015-11-24 12:44:21 -08005375 createInfos := pCreateInfos[0:createInfoCount]
5376 pipelines := pPipelines[0:createInfoCount]
5377 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005378 pipeline := ?
5379 pipelines[i] = pipeline
5380 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5381 }
5382
5383 return ?
5384}
5385
5386@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005387cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005388 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005389 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005390 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005391 deviceObject := GetDevice(device)
5392 pipelineObjects := GetPipeline(pipeline)
5393 assert(pipelineObjects.device == device)
5394
5395 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005396}
5397
5398
5399// Pipeline layout functions
5400
5401@threadSafety("system")
5402cmd VkResult vkCreatePipelineLayout(
5403 VkDevice device,
5404 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005405 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005406 VkPipelineLayout* pPipelineLayout) {
5407 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5408 deviceObject := GetDevice(device)
5409
5410 pipelineLayout := ?
5411 pPipelineLayout[0] = pipelineLayout
5412 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5413
5414 return ?
5415}
5416
5417@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005418cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005419 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005420 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005421 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005422 deviceObject := GetDevice(device)
5423 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5424 assert(pipelineLayoutObjects.device == device)
5425
5426 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005427}
5428
5429
5430// Sampler functions
5431
5432@threadSafety("system")
5433cmd VkResult vkCreateSampler(
5434 VkDevice device,
5435 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005436 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005437 VkSampler* pSampler) {
5438 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5439 deviceObject := GetDevice(device)
5440
5441 sampler := ?
5442 pSampler[0] = sampler
5443 State.Samplers[sampler] = new!SamplerObject(device: device)
5444
5445 return ?
5446}
5447
5448@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005449cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005450 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005451 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005452 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005453 deviceObject := GetDevice(device)
5454 samplerObject := GetSampler(sampler)
5455 assert(samplerObject.device == device)
5456
5457 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005458}
5459
5460
5461// Descriptor set functions
5462
5463@threadSafety("system")
5464cmd VkResult vkCreateDescriptorSetLayout(
5465 VkDevice device,
5466 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005467 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005468 VkDescriptorSetLayout* pSetLayout) {
5469 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5470 deviceObject := GetDevice(device)
5471
5472 setLayout := ?
5473 pSetLayout[0] = setLayout
5474 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5475
5476 return ?
5477}
5478
5479@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005480cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005481 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005482 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005483 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005484 deviceObject := GetDevice(device)
5485 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5486 assert(descriptorSetLayoutObject.device == device)
5487
5488 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005489}
5490
5491@threadSafety("system")
5492cmd VkResult vkCreateDescriptorPool(
5493 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005494 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005495 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005496 VkDescriptorPool* pDescriptorPool) {
5497 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5498 deviceObject := GetDevice(device)
5499
5500 descriptorPool := ?
5501 pDescriptorPool[0] = descriptorPool
5502 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5503
5504 return ?
5505}
5506
5507@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005508cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005509 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005510 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005511 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005512 deviceObject := GetDevice(device)
5513 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5514 assert(descriptorPoolObject.device == device)
5515
5516 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005517}
5518
5519@threadSafety("app")
5520cmd VkResult vkResetDescriptorPool(
5521 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005522 VkDescriptorPool descriptorPool,
5523 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005524 deviceObject := GetDevice(device)
5525 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5526 assert(descriptorPoolObject.device == device)
5527
5528 return ?
5529}
5530
5531@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005532cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005533 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005534 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005535 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005536 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005537 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005538 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005539
Jesse Hall03b6fe12015-11-24 12:44:21 -08005540 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5541 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005542 setLayout := setLayouts[i]
5543 setLayoutObject := GetDescriptorSetLayout(setLayout)
5544 assert(setLayoutObject.device == device)
5545 }
5546
Jesse Hall03b6fe12015-11-24 12:44:21 -08005547 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5548 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005549 descriptorSet := ?
5550 descriptorSets[i] = descriptorSet
5551 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5552 }
5553
5554 return ?
5555}
5556
Jesse Hallf09c6b12015-08-15 19:54:28 -07005557cmd VkResult vkFreeDescriptorSets(
5558 VkDevice device,
5559 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005560 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005561 const VkDescriptorSet* pDescriptorSets) {
5562 deviceObject := GetDevice(device)
5563 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5564
Jesse Hall03b6fe12015-11-24 12:44:21 -08005565 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5566 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005567 descriptorSet := descriptorSets[i]
5568 descriptorSetObject := GetDescriptorSet(descriptorSet)
5569 assert(descriptorSetObject.device == device)
5570 State.DescriptorSets[descriptorSet] = null
5571 }
5572
5573 return ?
5574}
5575
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005576cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005577 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005578 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005579 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005580 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005581 const VkCopyDescriptorSet* pDescriptorCopies) {
5582 deviceObject := GetDevice(device)
5583
Jesse Hallb00daad2015-11-29 19:46:20 -08005584 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5585 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005586 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005587 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005588 assert(descriptorWriteObject.device == device)
5589 }
5590
Jesse Hallb00daad2015-11-29 19:46:20 -08005591 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5592 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005593 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005594 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005595 assert(descriptorCopyObject.device == device)
5596 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005597}
5598
5599
5600// Framebuffer functions
5601
5602@threadSafety("system")
5603cmd VkResult vkCreateFramebuffer(
5604 VkDevice device,
5605 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005606 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005607 VkFramebuffer* pFramebuffer) {
5608 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5609 deviceObject := GetDevice(device)
5610
5611 framebuffer := ?
5612 pFramebuffer[0] = framebuffer
5613 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5614
5615 return ?
5616}
5617
5618@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005619cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005620 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005621 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005622 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005623 deviceObject := GetDevice(device)
5624 framebufferObject := GetFramebuffer(framebuffer)
5625 assert(framebufferObject.device == device)
5626
5627 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005628}
5629
5630
5631// Renderpass functions
5632
5633@threadSafety("system")
5634cmd VkResult vkCreateRenderPass(
5635 VkDevice device,
5636 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005637 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005638 VkRenderPass* pRenderPass) {
5639 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5640 deviceObject := GetDevice(device)
5641
5642 renderpass := ?
5643 pRenderPass[0] = renderpass
5644 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5645
5646 return ?
5647}
5648
5649@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005650cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005651 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005652 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005653 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005654 deviceObject := GetDevice(device)
5655 renderPassObject := GetRenderPass(renderPass)
5656 assert(renderPassObject.device == device)
5657
5658 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005659}
5660
Jesse Hall606a54e2015-11-19 22:17:28 -08005661cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005662 VkDevice device,
5663 VkRenderPass renderPass,
5664 VkExtent2D* pGranularity) {
5665 deviceObject := GetDevice(device)
5666 renderPassObject := GetRenderPass(renderPass)
5667
5668 granularity := ?
5669 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005670}
5671
5672// Command pool functions
5673
5674cmd VkResult vkCreateCommandPool(
5675 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005676 const VkCommandPoolCreateInfo* pCreateInfo,
5677 const VkAllocationCallbacks* pAllocator,
5678 VkCommandPool* pCommandPool) {
5679 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005680 deviceObject := GetDevice(device)
5681
Jesse Hall3fbc8562015-11-29 22:10:52 -08005682 commandPool := ?
5683 pCommandPool[0] = commandPool
5684 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005685
5686 return ?
5687}
5688
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005689cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005690 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005691 VkCommandPool commandPool,
5692 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005693 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005694 commandPoolObject := GetCommandPool(commandPool)
5695 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005696
Jesse Hall3fbc8562015-11-29 22:10:52 -08005697 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005698}
5699
5700cmd VkResult vkResetCommandPool(
5701 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005702 VkCommandPool commandPool,
5703 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005704 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005705 commandPoolObject := GetCommandPool(commandPool)
5706 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005707
5708 return ?
5709}
5710
5711// Command buffer functions
5712
Jesse Hall3fbc8562015-11-29 22:10:52 -08005713macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5714 memoryObject := GetDeviceMemory(memory)
5715 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005716
Jesse Hall3fbc8562015-11-29 22:10:52 -08005717 commandBufferObject := GetCommandBuffer(commandBuffer)
5718 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005719}
5720
Jesse Hall3fbc8562015-11-29 22:10:52 -08005721macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5722 memoryObject := GetDeviceMemory(memory)
5723 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005724
Jesse Hall3fbc8562015-11-29 22:10:52 -08005725 commandBufferObject := GetCommandBuffer(commandBuffer)
5726 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005727}
5728
5729@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005730cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005731 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005732 const VkCommandBufferAllocateInfo* pAllocateInfo,
5733 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005734 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005735
Jesse Hall3dd678a2016-01-08 21:52:01 -08005736 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005737 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005738 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005739 commandBuffer := ?
5740 commandBuffers[i] = commandBuffer
5741 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005742 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005743
5744 return ?
5745}
5746
5747@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005748cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005749 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005750 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005751 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005752 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005753 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005754
Jesse Hall3fbc8562015-11-29 22:10:52 -08005755 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005756 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005757 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5758 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005759 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005760 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005761 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005762}
5763
5764@threadSafety("app")
5765cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005766 VkCommandBuffer commandBuffer,
5767 const VkCommandBufferBeginInfo* pBeginInfo) {
5768 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5769 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005770
5771 // TODO: iterate over boundObjects and clear memory bindings
5772
5773 return ?
5774}
5775
5776@threadSafety("app")
5777cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005778 VkCommandBuffer commandBuffer) {
5779 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005780
5781 return ?
5782}
5783
5784@threadSafety("app")
5785cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005786 VkCommandBuffer commandBuffer,
5787 VkCommandBufferResetFlags flags) {
5788 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005789
5790 // TODO: iterate over boundObjects and clear memory bindings
5791
5792 return ?
5793}
5794
5795
5796// Command buffer building functions
5797
5798@threadSafety("app")
5799cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005800 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005801 VkPipelineBindPoint pipelineBindPoint,
5802 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005803 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005804 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005805 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005806
Jesse Halld8bade02015-11-24 10:24:18 -08005807 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005808 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5809 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5810 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005811 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005812}
5813
5814@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005815cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005816 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005817 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005818 u32 viewportCount,
5819 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005820 commandBufferObject := GetCommandBuffer(commandBuffer)
5821 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005822}
5823
5824@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005825cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005826 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005827 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005828 u32 scissorCount,
5829 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005830 commandBufferObject := GetCommandBuffer(commandBuffer)
5831 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005832}
5833
5834@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005835cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005836 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005837 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005838 commandBufferObject := GetCommandBuffer(commandBuffer)
5839 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005840}
5841
5842@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005843cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005844 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005845 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005846 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005847 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005848 commandBufferObject := GetCommandBuffer(commandBuffer)
5849 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005850}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005851
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005852@threadSafety("app")
5853cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005854 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005855 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5856 // an annotation as a quick hack to pass this to the template without
5857 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005858 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005859 commandBufferObject := GetCommandBuffer(commandBuffer)
5860 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005861}
5862
5863@threadSafety("app")
5864cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005865 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005866 f32 minDepthBounds,
5867 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005868 commandBufferObject := GetCommandBuffer(commandBuffer)
5869 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005870}
5871
5872@threadSafety("app")
5873cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005874 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005875 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005876 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005877 commandBufferObject := GetCommandBuffer(commandBuffer)
5878 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005879}
5880
5881@threadSafety("app")
5882cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005883 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005884 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005885 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005886 commandBufferObject := GetCommandBuffer(commandBuffer)
5887 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005888}
5889
5890@threadSafety("app")
5891cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005892 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005893 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005894 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005895 commandBufferObject := GetCommandBuffer(commandBuffer)
5896 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005897}
5898
5899@threadSafety("app")
5900cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005901 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005902 VkPipelineBindPoint pipelineBindPoint,
5903 VkPipelineLayout layout,
5904 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005905 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005906 const VkDescriptorSet* pDescriptorSets,
5907 u32 dynamicOffsetCount,
5908 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005909 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005910
Jesse Hall03b6fe12015-11-24 12:44:21 -08005911 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5912 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005913 descriptorSet := descriptorSets[i]
5914 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005915 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005916 }
5917
5918 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5919 for i in (0 .. dynamicOffsetCount) {
5920 dynamicOffset := dynamicOffsets[i]
5921 }
5922
Jesse Halld8bade02015-11-24 10:24:18 -08005923 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005924 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5925 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5926 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005927 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005928}
5929
5930@threadSafety("app")
5931cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005932 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005933 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005934 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005935 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005936 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005937 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005938 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005939
Jesse Hall3fbc8562015-11-29 22:10:52 -08005940 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005941
Jesse Hall3fbc8562015-11-29 22:10:52 -08005942 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005943}
5944
5945@threadSafety("app")
5946cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005947 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005948 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005949 u32 bindingCount,
5950 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005951 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005952 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005953
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005954 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005955 buffers := pBuffers[0:bindingCount]
5956 offsets := pOffsets[0:bindingCount]
5957 for i in (0 .. bindingCount) {
5958 buffer := buffers[i]
5959 offset := offsets[i]
5960 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005961 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005962
Jesse Hall3fbc8562015-11-29 22:10:52 -08005963 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005964 }
5965
Jesse Hall3fbc8562015-11-29 22:10:52 -08005966 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005967}
5968
5969@threadSafety("app")
5970cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005971 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005972 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005973 u32 instanceCount,
5974 u32 firstVertex,
5975 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005976 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005977
Jesse Hall3fbc8562015-11-29 22:10:52 -08005978 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005979}
5980
5981@threadSafety("app")
5982cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005983 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005984 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005985 u32 instanceCount,
5986 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005987 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005988 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005989 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005990
Jesse Hall3fbc8562015-11-29 22:10:52 -08005991 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005992}
5993
5994@threadSafety("app")
5995cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005996 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005997 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005998 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005999 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006000 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006001 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006002 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006003 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006004
Jesse Hall3fbc8562015-11-29 22:10:52 -08006005 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006006
Jesse Hall3fbc8562015-11-29 22:10:52 -08006007 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006008}
6009
6010@threadSafety("app")
6011cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006012 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006013 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006014 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006015 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006016 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006017 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006018 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006019 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006020
Jesse Hall3fbc8562015-11-29 22:10:52 -08006021 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006022
Jesse Hall3fbc8562015-11-29 22:10:52 -08006023 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006024}
6025
6026@threadSafety("app")
6027cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006028 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08006029 u32 groupCountX,
6030 u32 groupCountY,
6031 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006032 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006033
Jesse Hall3fbc8562015-11-29 22:10:52 -08006034 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006035}
6036
6037@threadSafety("app")
6038cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006039 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006040 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006041 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006042 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006043 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006044 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045
Jesse Hall3fbc8562015-11-29 22:10:52 -08006046 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006047
Jesse Hall3fbc8562015-11-29 22:10:52 -08006048 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006049}
6050
6051@threadSafety("app")
6052cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006053 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006054 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006055 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006056 u32 regionCount,
6057 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006058 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006059 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006060 dstBufferObject := GetBuffer(dstBuffer)
6061 assert(commandBufferObject.device == srcBufferObject.device)
6062 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006063
6064 regions := pRegions[0:regionCount]
6065 for i in (0 .. regionCount) {
6066 region := regions[i]
6067 }
6068
Jesse Hall3fbc8562015-11-29 22:10:52 -08006069 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6070 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006071
Jesse Hall65ab5522015-11-30 00:07:16 -08006072 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006073}
6074
6075@threadSafety("app")
6076cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006077 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006078 VkImage srcImage,
6079 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006080 VkImage dstImage,
6081 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006082 u32 regionCount,
6083 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006084 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006085 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006086 dstImageObject := GetImage(dstImage)
6087 assert(commandBufferObject.device == srcImageObject.device)
6088 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006089
6090 regions := pRegions[0:regionCount]
6091 for i in (0 .. regionCount) {
6092 region := regions[i]
6093 }
6094
Jesse Hall3fbc8562015-11-29 22:10:52 -08006095 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6096 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006097
Jesse Hall65ab5522015-11-30 00:07:16 -08006098 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006099}
6100
6101@threadSafety("app")
6102cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006103 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006104 VkImage srcImage,
6105 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006106 VkImage dstImage,
6107 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006108 u32 regionCount,
6109 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006110 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006111 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006112 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006113 dstImageObject := GetImage(dstImage)
6114 assert(commandBufferObject.device == srcImageObject.device)
6115 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006116
6117 regions := pRegions[0:regionCount]
6118 for i in (0 .. regionCount) {
6119 region := regions[i]
6120 }
6121
Jesse Hall3fbc8562015-11-29 22:10:52 -08006122 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6123 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006124
Jesse Hall3fbc8562015-11-29 22:10:52 -08006125 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006126}
6127
6128@threadSafety("app")
6129cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006130 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006131 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006132 VkImage dstImage,
6133 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006134 u32 regionCount,
6135 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006136 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006137 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006138 dstImageObject := GetImage(dstImage)
6139 assert(commandBufferObject.device == srcBufferObject.device)
6140 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006141
6142 regions := pRegions[0:regionCount]
6143 for i in (0 .. regionCount) {
6144 region := regions[i]
6145 }
6146
Jesse Hall3fbc8562015-11-29 22:10:52 -08006147 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6148 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006149
Jesse Hall65ab5522015-11-30 00:07:16 -08006150 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006151}
6152
6153@threadSafety("app")
6154cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006155 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006156 VkImage srcImage,
6157 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006158 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006159 u32 regionCount,
6160 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006161 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006162 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006163 dstBufferObject := GetBuffer(dstBuffer)
6164 assert(commandBufferObject.device == srcImageObject.device)
6165 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006166
6167 regions := pRegions[0:regionCount]
6168 for i in (0 .. regionCount) {
6169 region := regions[i]
6170 }
6171
Jesse Hall3fbc8562015-11-29 22:10:52 -08006172 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6173 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006174
Jesse Hall65ab5522015-11-30 00:07:16 -08006175 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006176}
6177
6178@threadSafety("app")
6179cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006180 VkCommandBuffer commandBuffer,
6181 VkBuffer dstBuffer,
6182 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006183 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006184 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006185 commandBufferObject := GetCommandBuffer(commandBuffer)
6186 dstBufferObject := GetBuffer(dstBuffer)
6187 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006188
6189 data := pData[0:dataSize]
6190
Jesse Hall3fbc8562015-11-29 22:10:52 -08006191 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006192
Jesse Hall65ab5522015-11-30 00:07:16 -08006193 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006194}
6195
6196@threadSafety("app")
6197cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006198 VkCommandBuffer commandBuffer,
6199 VkBuffer dstBuffer,
6200 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006201 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006202 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006203 commandBufferObject := GetCommandBuffer(commandBuffer)
6204 dstBufferObject := GetBuffer(dstBuffer)
6205 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006206
Jesse Hall65ab5522015-11-30 00:07:16 -08006207 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006208}
6209
6210@threadSafety("app")
6211cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006212 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006213 VkImage image,
6214 VkImageLayout imageLayout,
6215 const VkClearColorValue* pColor,
6216 u32 rangeCount,
6217 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006218 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006219 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006220 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006221
6222 ranges := pRanges[0:rangeCount]
6223 for i in (0 .. rangeCount) {
6224 range := ranges[i]
6225 }
6226
Jesse Hall3fbc8562015-11-29 22:10:52 -08006227 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006228
Jesse Hall3fbc8562015-11-29 22:10:52 -08006229 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006230}
6231
6232@threadSafety("app")
6233cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006234 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006235 VkImage image,
6236 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006237 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006238 u32 rangeCount,
6239 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006240 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006241 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006242 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006243
6244 ranges := pRanges[0:rangeCount]
6245 for i in (0 .. rangeCount) {
6246 range := ranges[i]
6247 }
6248
Jesse Hall3fbc8562015-11-29 22:10:52 -08006249 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006250
Jesse Hall3fbc8562015-11-29 22:10:52 -08006251 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006252}
6253
6254@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006255cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006256 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006257 u32 attachmentCount,
6258 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006259 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006260 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006261 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006262
6263 rects := pRects[0:rectCount]
6264 for i in (0 .. rectCount) {
6265 rect := rects[i]
6266 }
6267
Jesse Hall3fbc8562015-11-29 22:10:52 -08006268 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006269}
6270
6271@threadSafety("app")
6272cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006273 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006274 VkImage srcImage,
6275 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006276 VkImage dstImage,
6277 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006278 u32 regionCount,
6279 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006280 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006281 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006282 dstImageObject := GetImage(dstImage)
6283 assert(commandBufferObject.device == srcImageObject.device)
6284 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006285
6286 regions := pRegions[0:regionCount]
6287 for i in (0 .. regionCount) {
6288 region := regions[i]
6289 }
6290
Jesse Hall3fbc8562015-11-29 22:10:52 -08006291 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6292 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006293
Jesse Hall3fbc8562015-11-29 22:10:52 -08006294 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006295}
6296
6297@threadSafety("app")
6298cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006299 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006300 VkEvent event,
6301 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006302 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006303 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006304 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006305}
6306
6307@threadSafety("app")
6308cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006309 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006310 VkEvent event,
6311 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006312 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006313 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006314 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006315}
6316
6317@threadSafety("app")
6318cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006319 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006320 u32 eventCount,
6321 const VkEvent* pEvents,
6322 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006323 VkPipelineStageFlags dstStageMask,
6324 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006325 const VkMemoryBarrier* pMemoryBarriers,
6326 u32 bufferMemoryBarrierCount,
6327 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6328 u32 imageMemoryBarrierCount,
6329 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006330 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006331
6332 events := pEvents[0:eventCount]
6333 for i in (0 .. eventCount) {
6334 event := events[i]
6335 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006336 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006337 }
6338
Jesse Hall3dd678a2016-01-08 21:52:01 -08006339 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006340 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006341 memoryBarrier := memoryBarriers[i]
6342 }
6343 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6344 for i in (0 .. bufferMemoryBarrierCount) {
6345 bufferMemoryBarrier := bufferMemoryBarriers[i]
6346 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6347 assert(bufferObject.device == commandBufferObject.device)
6348 }
6349 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6350 for i in (0 .. imageMemoryBarrierCount) {
6351 imageMemoryBarrier := imageMemoryBarriers[i]
6352 imageObject := GetImage(imageMemoryBarrier.image)
6353 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006354 }
6355}
6356
6357@threadSafety("app")
6358cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006359 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006360 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006361 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006362 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006363 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006364 const VkMemoryBarrier* pMemoryBarriers,
6365 u32 bufferMemoryBarrierCount,
6366 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6367 u32 imageMemoryBarrierCount,
6368 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006369 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006370
Jesse Hall3dd678a2016-01-08 21:52:01 -08006371 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006372 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006373 memoryBarrier := memoryBarriers[i]
6374 }
6375 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6376 for i in (0 .. bufferMemoryBarrierCount) {
6377 bufferMemoryBarrier := bufferMemoryBarriers[i]
6378 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6379 assert(bufferObject.device == commandBufferObject.device)
6380 }
6381 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6382 for i in (0 .. imageMemoryBarrierCount) {
6383 imageMemoryBarrier := imageMemoryBarriers[i]
6384 imageObject := GetImage(imageMemoryBarrier.image)
6385 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006386 }
6387}
6388
6389@threadSafety("app")
6390cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006391 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006392 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006393 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006394 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006395 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006396 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006397 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006398}
6399
6400@threadSafety("app")
6401cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006402 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006403 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006404 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006405 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006406 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006407 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006408}
6409
6410@threadSafety("app")
6411cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006412 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006413 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006414 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006415 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006416 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006417 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006418 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006419}
6420
6421@threadSafety("app")
6422cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006423 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006424 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006425 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006426 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006427 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006428 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006429 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006430}
6431
6432@threadSafety("app")
6433cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006434 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006435 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006436 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006437 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006438 VkBuffer dstBuffer,
6439 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006440 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006441 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006442 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006443 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006444 dstBufferObject := GetBuffer(dstBuffer)
6445 assert(commandBufferObject.device == queryPoolObject.device)
6446 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006447}
6448
6449cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006450 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006451 VkPipelineLayout layout,
6452 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006453 u32 offset,
6454 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006455 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006456 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006457 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006458 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006459}
6460
6461@threadSafety("app")
6462cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006463 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006464 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006465 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006466 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006467 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6468 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006469 assert(commandBufferObject.device == renderPassObject.device)
6470 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006471
Jesse Hall3fbc8562015-11-29 22:10:52 -08006472 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006473}
6474
6475cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006476 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006477 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006478 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006479}
6480
6481@threadSafety("app")
6482cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006483 VkCommandBuffer commandBuffer) {
6484 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006485
Jesse Hall3fbc8562015-11-29 22:10:52 -08006486 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006487}
6488
6489cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006490 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006491 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006492 const VkCommandBuffer* pCommandBuffers) {
6493 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006494
Jesse Hall3dd678a2016-01-08 21:52:01 -08006495 commandBuffers := pCommandBuffers[0:commandBufferCount]
6496 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006497 secondaryCommandBuffer := commandBuffers[i]
6498 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6499 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006500 }
6501}
6502
Jesse Hallad250842017-03-10 18:35:38 -08006503@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006504cmd void vkDestroySurfaceKHR(
6505 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006506 VkSurfaceKHR surface,
6507 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006508 instanceObject := GetInstance(instance)
6509 surfaceObject := GetSurface(surface)
6510 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006511
Jesse Hall1356b0d2015-11-23 17:24:58 -08006512 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006513}
6514
Jesse Hallad250842017-03-10 18:35:38 -08006515@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006516cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006517 VkPhysicalDevice physicalDevice,
6518 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006519 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006520 VkBool32* pSupported) {
6521 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006522
6523 return ?
6524}
6525
Jesse Hallad250842017-03-10 18:35:38 -08006526@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006527cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6528 VkPhysicalDevice physicalDevice,
6529 VkSurfaceKHR surface,
6530 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6531 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6532
6533 surfaceCapabilities := ?
6534 pSurfaceCapabilities[0] = surfaceCapabilities
6535
6536 return ?
6537}
6538
Jesse Hallad250842017-03-10 18:35:38 -08006539@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006540cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6541 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006542 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006543 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006544 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006545 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006546
6547 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006548 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006549 surfaceFormats := pSurfaceFormats[0:count]
6550
6551 for i in (0 .. count) {
6552 surfaceFormat := ?
6553 surfaceFormats[i] = surfaceFormat
6554 }
6555
6556 return ?
6557}
6558
Jesse Hallad250842017-03-10 18:35:38 -08006559@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006560cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6561 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006562 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006563 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006564 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006565 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006566
6567 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006568 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006569 presentModes := pPresentModes[0:count]
6570
6571 for i in (0 .. count) {
6572 presentMode := ?
6573 presentModes[i] = presentMode
6574 }
6575
6576 return ?
6577}
6578
Jesse Hallad250842017-03-10 18:35:38 -08006579@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006580cmd VkResult vkCreateSwapchainKHR(
6581 VkDevice device,
6582 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006583 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006584 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006585 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006586 deviceObject := GetDevice(device)
6587
6588 swapchain := ?
6589 pSwapchain[0] = swapchain
6590 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6591
6592 return ?
6593}
6594
Jesse Hallad250842017-03-10 18:35:38 -08006595@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006596cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006597 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006598 VkSwapchainKHR swapchain,
6599 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006600 deviceObject := GetDevice(device)
6601 swapchainObject := GetSwapchain(swapchain)
6602 assert(swapchainObject.device == device)
6603
6604 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006605}
6606
Jesse Hallad250842017-03-10 18:35:38 -08006607@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006608cmd VkResult vkGetSwapchainImagesKHR(
6609 VkDevice device,
6610 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006611 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006612 VkImage* pSwapchainImages) {
6613 deviceObject := GetDevice(device)
6614
6615 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006616 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006617 swapchainImages := pSwapchainImages[0:count]
6618
6619 for i in (0 .. count) {
6620 swapchainImage := ?
6621 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006622 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006623 }
6624
6625 return ?
6626}
6627
Jesse Hallad250842017-03-10 18:35:38 -08006628@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006629cmd VkResult vkAcquireNextImageKHR(
6630 VkDevice device,
6631 VkSwapchainKHR swapchain,
6632 u64 timeout,
6633 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006634 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006635 u32* pImageIndex) {
6636 deviceObject := GetDevice(device)
6637 swapchainObject := GetSwapchain(swapchain)
6638
6639 imageIndex := ?
6640 pImageIndex[0] = imageIndex
6641
6642 return ?
6643}
6644
Jesse Hallad250842017-03-10 18:35:38 -08006645@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006646cmd VkResult vkQueuePresentKHR(
6647 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006648 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006649 queueObject := GetQueue(queue)
6650
6651 presentInfo := ?
6652 pPresentInfo[0] = presentInfo
6653
6654 return ?
6655}
6656
Jesse Hallad250842017-03-10 18:35:38 -08006657@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006658cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6659 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006660 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006661 VkDisplayPropertiesKHR* pProperties) {
6662 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6663 return ?
6664}
6665
Jesse Hallad250842017-03-10 18:35:38 -08006666@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006667cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6668 VkPhysicalDevice physicalDevice,
6669 u32* pPropertyCount,
6670 VkDisplayPlanePropertiesKHR* pProperties) {
6671 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6672 return ?
6673}
6674
Jesse Hallad250842017-03-10 18:35:38 -08006675@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006676cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6677 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006678 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006679 u32* pDisplayCount,
6680 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006681 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6682 return ?
6683}
6684
Jesse Hallad250842017-03-10 18:35:38 -08006685@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006686cmd VkResult vkGetDisplayModePropertiesKHR(
6687 VkPhysicalDevice physicalDevice,
6688 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006689 u32* pPropertyCount,
6690 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006691 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6692 return ?
6693}
6694
Jesse Hallad250842017-03-10 18:35:38 -08006695@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006696cmd VkResult vkCreateDisplayModeKHR(
6697 VkPhysicalDevice physicalDevice,
6698 VkDisplayKHR display,
6699 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006700 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006701 VkDisplayModeKHR* pMode) {
6702 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6703 return ?
6704}
6705
Jesse Hallad250842017-03-10 18:35:38 -08006706@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006707cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006708 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006709 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006710 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006711 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006712 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6713 return ?
6714}
6715
Jesse Hallad250842017-03-10 18:35:38 -08006716@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006717cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6718 VkInstance instance,
6719 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006720 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006721 VkSurfaceKHR* pSurface) {
6722 return ?
6723}
6724
Jesse Hallad250842017-03-10 18:35:38 -08006725@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006726cmd VkResult vkCreateSharedSwapchainsKHR(
6727 VkDevice device,
6728 u32 swapchainCount,
6729 const VkSwapchainCreateInfoKHR* pCreateInfos,
6730 const VkAllocationCallbacks* pAllocator,
6731 VkSwapchainKHR* pSwapchains) {
6732 return ?
6733}
6734
Jesse Hallad250842017-03-10 18:35:38 -08006735@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006736cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006737 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006738 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006739 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006740 VkSurfaceKHR* pSurface) {
6741 instanceObject := GetInstance(instance)
6742 return ?
6743}
6744
Jesse Hallad250842017-03-10 18:35:38 -08006745@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006746cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6747 VkPhysicalDevice physicalDevice,
6748 u32 queueFamilyIndex,
6749 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006750 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006751 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6752 return ?
6753}
6754
Jesse Hallad250842017-03-10 18:35:38 -08006755@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006756cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006757 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006758 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006759 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006760 VkSurfaceKHR* pSurface) {
6761 instanceObject := GetInstance(instance)
6762 return ?
6763}
6764
Jesse Hallad250842017-03-10 18:35:38 -08006765@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006766cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6767 VkPhysicalDevice physicalDevice,
6768 u32 queueFamilyIndex,
6769 platform.xcb_connection_t* connection,
6770 platform.xcb_visualid_t visual_id) {
6771 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6772 return ?
6773}
6774
Jesse Hallad250842017-03-10 18:35:38 -08006775@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006776cmd VkResult vkCreateWaylandSurfaceKHR(
6777 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006778 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006779 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006780 VkSurfaceKHR* pSurface) {
6781 instanceObject := GetInstance(instance)
6782 return ?
6783}
6784
Jesse Hallad250842017-03-10 18:35:38 -08006785@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006786cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6787 VkPhysicalDevice physicalDevice,
6788 u32 queueFamilyIndex,
6789 platform.wl_display* display) {
6790 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6791 return ?
6792}
6793
Jesse Hallad250842017-03-10 18:35:38 -08006794@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006795cmd VkResult vkCreateMirSurfaceKHR(
6796 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006797 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006798 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006799 VkSurfaceKHR* pSurface) {
6800 instanceObject := GetInstance(instance)
6801 return ?
6802}
6803
Jesse Hallad250842017-03-10 18:35:38 -08006804@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006805cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6806 VkPhysicalDevice physicalDevice,
6807 u32 queueFamilyIndex,
6808 platform.MirConnection* connection) {
6809 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6810 return ?
6811}
6812
Jesse Hallad250842017-03-10 18:35:38 -08006813@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006814cmd VkResult vkCreateAndroidSurfaceKHR(
6815 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006816 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006817 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006818 VkSurfaceKHR* pSurface) {
6819 instanceObject := GetInstance(instance)
6820 return ?
6821}
6822
Jesse Hallad250842017-03-10 18:35:38 -08006823@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006824cmd VkResult vkCreateWin32SurfaceKHR(
6825 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006826 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006827 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006828 VkSurfaceKHR* pSurface) {
6829 instanceObject := GetInstance(instance)
6830 return ?
6831}
6832
Jesse Hallad250842017-03-10 18:35:38 -08006833@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006834cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6835 VkPhysicalDevice physicalDevice,
6836 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006837 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006838 return ?
6839}
6840
Jesse Hallad250842017-03-10 18:35:38 -08006841@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006842@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08006843cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6844 VkDevice device,
6845 VkFormat format,
6846 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006847 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08006848 return ?
6849}
6850
Jesse Hallad250842017-03-10 18:35:38 -08006851@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006852@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13006853cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
6854 VkDevice device,
6855 VkFormat format,
6856 VkImageUsageFlags imageUsage,
6857 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006858 u64* grallocConsumerUsage,
6859 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13006860 return ?
6861}
6862
Jesse Hallad250842017-03-10 18:35:38 -08006863@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006864cmd VkResult vkAcquireImageANDROID(
6865 VkDevice device,
6866 VkImage image,
6867 int nativeFenceFd,
6868 VkSemaphore semaphore,
6869 VkFence fence) {
6870 return ?
6871}
6872
Jesse Hallad250842017-03-10 18:35:38 -08006873@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006874cmd VkResult vkQueueSignalReleaseImageANDROID(
6875 VkQueue queue,
6876 u32 waitSemaphoreCount,
6877 const VkSemaphore* pWaitSemaphores,
6878 VkImage image,
6879 int* pNativeFenceFd) {
6880 return ?
6881}
6882
Jesse Hallad250842017-03-10 18:35:38 -08006883@extension("VK_EXT_debug_report") // 12
6884@external type void* PFN_vkDebugReportCallbackEXT
6885@extension("VK_EXT_debug_report") // 12
6886@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6887 VkDebugReportFlagsEXT flags,
6888 VkDebugReportObjectTypeEXT objectType,
6889 u64 object,
6890 platform.size_t location,
6891 s32 messageCode,
6892 const char* pLayerPrefix,
6893 const char* pMessage,
6894 void* pUserData) {
6895 return ?
6896}
6897
6898@extension("VK_EXT_debug_report") // 12
6899cmd VkResult vkCreateDebugReportCallbackEXT(
6900 VkInstance instance,
6901 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6902 const VkAllocationCallbacks* pAllocator,
6903 VkDebugReportCallbackEXT* pCallback) {
6904 return ?
6905}
6906
6907@extension("VK_EXT_debug_report") // 12
6908cmd void vkDestroyDebugReportCallbackEXT(
6909 VkInstance instance,
6910 VkDebugReportCallbackEXT callback,
6911 const VkAllocationCallbacks* pAllocator) {
6912}
6913
6914@extension("VK_EXT_debug_report") // 12
6915cmd void vkDebugReportMessageEXT(
6916 VkInstance instance,
6917 VkDebugReportFlagsEXT flags,
6918 VkDebugReportObjectTypeEXT objectType,
6919 u64 object,
6920 platform.size_t location,
6921 s32 messageCode,
6922 const char* pLayerPrefix,
6923 const char* pMessage) {
6924}
6925
6926@extension("VK_EXT_debug_marker") // 23
6927cmd VkResult vkDebugMarkerSetObjectTagEXT(
6928 VkDevice device,
6929 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6930 return ?
6931}
6932
6933@extension("VK_EXT_debug_marker") // 23
6934cmd VkResult vkDebugMarkerSetObjectNameEXT(
6935 VkDevice device,
6936 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6937 return ?
6938}
6939
6940@extension("VK_EXT_debug_marker") // 23
6941cmd void vkCmdDebugMarkerBeginEXT(
6942 VkCommandBuffer commandBuffer,
6943 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6944}
6945
6946@extension("VK_EXT_debug_marker") // 23
6947cmd void vkCmdDebugMarkerEndEXT(
6948 VkCommandBuffer commandBuffer) {
6949}
6950
6951@extension("VK_EXT_debug_marker") // 23
6952cmd void vkCmdDebugMarkerInsertEXT(
6953 VkCommandBuffer commandBuffer,
6954 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6955}
6956
6957@extension("VK_AMD_draw_indirect_count") // 34
6958cmd void vkCmdDrawIndirectCountAMD(
6959 VkCommandBuffer commandBuffer,
6960 VkBuffer buffer,
6961 VkDeviceSize offset,
6962 VkBuffer countBuffer,
6963 VkDeviceSize countBufferOffset,
6964 u32 maxDrawCount,
6965 u32 stride) {
6966}
6967
6968@extension("VK_AMD_draw_indirect_count") // 34
6969cmd void vkCmdDrawIndexedIndirectCountAMD(
6970 VkCommandBuffer commandBuffer,
6971 VkBuffer buffer,
6972 VkDeviceSize offset,
6973 VkBuffer countBuffer,
6974 VkDeviceSize countBufferOffset,
6975 u32 maxDrawCount,
6976 u32 stride) {
6977}
6978
6979@extension("VK_NV_external_memory_capabilities") // 56
6980cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6981 VkPhysicalDevice physicalDevice,
6982 VkFormat format,
6983 VkImageType type,
6984 VkImageTiling tiling,
6985 VkImageUsageFlags usage,
6986 VkImageCreateFlags flags,
6987 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6988 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6989 return ?
6990}
6991
6992@extension("VK_NV_external_memory_win32") // 58
6993cmd VkResult vkGetMemoryWin32HandleNV(
6994 VkDevice device,
6995 VkDeviceMemory memory,
6996 VkExternalMemoryHandleTypeFlagsNV handleType,
6997 platform.HANDLE* pHandle) {
6998 return ?
6999}
7000
7001@extension("VK_KHR_get_physical_device_properties2") // 60
7002cmd void vkGetPhysicalDeviceFeatures2KHR(
7003 VkPhysicalDevice physicalDevice,
7004 VkPhysicalDeviceFeatures2KHR* pFeatures) {
7005}
7006
7007@extension("VK_KHR_get_physical_device_properties2") // 60
7008cmd void vkGetPhysicalDeviceProperties2KHR(
7009 VkPhysicalDevice physicalDevice,
7010 VkPhysicalDeviceProperties2KHR* pProperties) {
7011}
7012
7013@extension("VK_KHR_get_physical_device_properties2") // 60
7014cmd void vkGetPhysicalDeviceFormatProperties2KHR(
7015 VkPhysicalDevice physicalDevice,
7016 VkFormat format,
7017 VkFormatProperties2KHR* pFormatProperties) {
7018}
7019
7020@extension("VK_KHR_get_physical_device_properties2") // 60
7021cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
7022 VkPhysicalDevice physicalDevice,
7023 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
7024 VkImageFormatProperties2KHR* pImageFormatProperties) {
7025 return ?
7026}
7027
7028@extension("VK_KHR_get_physical_device_properties2") // 60
7029cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
7030 VkPhysicalDevice physicalDevice,
7031 u32* pQueueFamilyPropertyCount,
7032 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
7033}
7034
7035@extension("VK_KHR_get_physical_device_properties2") // 60
7036cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
7037 VkPhysicalDevice physicalDevice,
7038 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
7039}
7040
7041@extension("VK_KHR_get_physical_device_properties2") // 60
7042cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
7043 VkPhysicalDevice physicalDevice,
7044 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7045 u32* pPropertyCount,
7046 VkSparseImageFormatProperties2KHR* pProperties) {
7047}
7048
7049@extension("VK_KHX_device_group") // 61
7050cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7051 VkDevice device,
7052 u32 heapIndex,
7053 u32 localDeviceIndex,
7054 u32 remoteDeviceIndex,
7055 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7056}
7057
7058@extension("VK_KHX_device_group") // 61
7059cmd VkResult vkBindBufferMemory2KHX(
7060 VkDevice device,
7061 u32 bindInfoCount,
7062 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7063 return ?
7064}
7065
7066@extension("VK_KHX_device_group") // 61
7067cmd VkResult vkBindImageMemory2KHX(
7068 VkDevice device,
7069 u32 bindInfoCount,
7070 const VkBindImageMemoryInfoKHX* pBindInfos) {
7071 return ?
7072}
7073
7074@extension("VK_KHX_device_group") // 61
7075cmd void vkCmdSetDeviceMaskKHX(
7076 VkCommandBuffer commandBuffer,
7077 u32 deviceMask) {
7078}
7079
7080@extension("VK_KHX_device_group") // 61
7081cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7082 VkDevice device,
7083 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7084 return ?
7085}
7086
7087@extension("VK_KHX_device_group") // 61
7088cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7089 VkDevice device,
7090 VkSurfaceKHR surface,
7091 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7092 return ?
7093}
7094
7095@extension("VK_KHX_device_group") // 61
7096cmd VkResult vkAcquireNextImage2KHX(
7097 VkDevice device,
7098 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7099 u32* pImageIndex) {
7100 return ?
7101}
7102
7103@extension("VK_KHX_device_group") // 61
7104cmd void vkCmdDispatchBaseKHX(
7105 VkCommandBuffer commandBuffer,
7106 u32 baseGroupX,
7107 u32 baseGroupY,
7108 u32 baseGroupZ,
7109 u32 groupCountX,
7110 u32 groupCountY,
7111 u32 groupCountZ) {
7112}
7113
7114@extension("VK_KHX_device_group") // 61
7115cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7116 VkPhysicalDevice physicalDevice,
7117 VkSurfaceKHR surface,
7118 u32* pRectCount,
7119 VkRect2D* pRects) {
7120 return ?
7121}
7122
7123@extension("VK_NN_vi_surface") // 63
7124cmd VkResult vkCreateViSurfaceNN(
7125 VkInstance instance,
7126 const VkViSurfaceCreateInfoNN* pCreateInfo,
7127 const VkAllocationCallbacks* pAllocator,
7128 VkSurfaceKHR* pSurface) {
7129 return ?
7130}
7131
7132@extension("VK_KHR_maintenance1") // 70
7133cmd void vkTrimCommandPoolKHR(
7134 VkDevice device,
7135 VkCommandPool commandPool,
7136 VkCommandPoolTrimFlagsKHR flags) {
7137}
7138
7139@extension("VK_KHX_device_group_creation") // 71
7140cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7141 VkInstance instance,
7142 u32* pPhysicalDeviceGroupCount,
7143 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7144 return ?
7145}
7146
7147@extension("VK_KHX_external_memory_capabilities") // 72
7148cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7149 VkPhysicalDevice physicalDevice,
7150 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7151 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7152}
7153
Jesse Hallad250842017-03-10 18:35:38 -08007154@extension("VK_KHX_external_memory_win32") // 74
7155cmd VkResult vkGetMemoryWin32HandleKHX(
7156 VkDevice device,
7157 VkDeviceMemory memory,
7158 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7159 platform.HANDLE* pHandle) {
7160 return ?
7161}
7162
7163@extension("VK_KHX_external_memory_win32") // 74
7164cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7165 VkDevice device,
7166 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7167 platform.HANDLE handle,
7168 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7169 return ?
7170}
7171
7172@extension("VK_KHX_external_memory_fd") // 75
7173cmd VkResult vkGetMemoryFdKHX(
7174 VkDevice device,
7175 VkDeviceMemory memory,
7176 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7177 s32* pFd) {
7178 return ?
7179}
7180
7181@extension("VK_KHX_external_memory_fd") // 75
7182cmd VkResult vkGetMemoryFdPropertiesKHX(
7183 VkDevice device,
7184 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7185 s32 fd,
7186 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7187 return ?
7188}
7189
7190@extension("VK_KHX_external_semaphore_capabilities") // 77
7191cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7192 VkPhysicalDevice physicalDevice,
7193 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7194 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7195}
7196
7197@extension("VK_KHX_external_semaphore_win32") // 79
7198cmd VkResult vkImportSemaphoreWin32HandleKHX(
7199 VkDevice device,
7200 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7201 return ?
7202}
7203
7204@extension("VK_KHX_external_semaphore_win32") // 79
7205cmd VkResult vkGetSemaphoreWin32HandleKHX(
7206 VkDevice device,
7207 VkSemaphore semaphore,
7208 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7209 platform.HANDLE* pHandle) {
7210 return ?
7211}
7212
7213@extension("VK_KHX_external_semaphore_fd") // 80
7214cmd VkResult vkImportSemaphoreFdKHX(
7215 VkDevice device,
7216 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7217 return ?
7218}
7219
7220@extension("VK_KHX_external_semaphore_fd") // 80
7221cmd VkResult vkGetSemaphoreFdKHX(
7222 VkDevice device,
7223 VkSemaphore semaphore,
7224 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7225 s32* pFd) {
7226 return ?
7227}
7228
7229@extension("VK_KHR_push_descriptor") // 81
7230cmd void vkCmdPushDescriptorSetKHR(
7231 VkCommandBuffer commandBuffer,
7232 VkPipelineBindPoint pipelineBindPoint,
7233 VkPipelineLayout layout,
7234 u32 set,
7235 u32 descriptorWriteCount,
7236 const VkWriteDescriptorSet* pDescriptorWrites) {
7237}
7238
7239@extension("VK_KHR_descriptor_update_template") // 86
7240cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7241 VkDevice device,
7242 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7243 const VkAllocationCallbacks* pAllocator,
7244 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7245 return ?
7246}
7247
7248@extension("VK_KHR_descriptor_update_template") // 86
7249cmd void vkDestroyDescriptorUpdateTemplateKHR(
7250 VkDevice device,
7251 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7252 const VkAllocationCallbacks* pAllocator) {
7253}
7254
7255@extension("VK_KHR_descriptor_update_template") // 86
7256cmd void vkUpdateDescriptorSetWithTemplateKHR(
7257 VkDevice device,
7258 VkDescriptorSet descriptorSet,
7259 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7260 const void* pData) {
7261}
7262
7263@extension("VK_KHR_descriptor_update_template") // 86
7264cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7265 VkCommandBuffer commandBuffer,
7266 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7267 VkPipelineLayout layout,
7268 u32 set,
7269 const void* pData) {
7270}
7271
7272@extension("VK_NVX_device_generated_commands") // 87
7273cmd void vkCmdProcessCommandsNVX(
7274 VkCommandBuffer commandBuffer,
7275 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7276}
7277
7278@extension("VK_NVX_device_generated_commands") // 87
7279cmd void vkCmdReserveSpaceForCommandsNVX(
7280 VkCommandBuffer commandBuffer,
7281 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7282}
7283
7284@extension("VK_NVX_device_generated_commands") // 87
7285cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7286 VkDevice device,
7287 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7288 const VkAllocationCallbacks* pAllocator,
7289 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7290 return ?
7291}
7292
7293@extension("VK_NVX_device_generated_commands") // 87
7294cmd void vkDestroyIndirectCommandsLayoutNVX(
7295 VkDevice device,
7296 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7297 const VkAllocationCallbacks* pAllocator) {
7298}
7299
7300@extension("VK_NVX_device_generated_commands") // 87
7301cmd VkResult vkCreateObjectTableNVX(
7302 VkDevice device,
7303 const VkObjectTableCreateInfoNVX* pCreateInfo,
7304 const VkAllocationCallbacks* pAllocator,
7305 VkObjectTableNVX* pObjectTable) {
7306 return ?
7307}
7308
7309@extension("VK_NVX_device_generated_commands") // 87
7310cmd void vkDestroyObjectTableNVX(
7311 VkDevice device,
7312 VkObjectTableNVX objectTable,
7313 const VkAllocationCallbacks* pAllocator) {
7314}
7315
7316@extension("VK_NVX_device_generated_commands") // 87
7317cmd VkResult vkRegisterObjectsNVX(
7318 VkDevice device,
7319 VkObjectTableNVX objectTable,
7320 u32 objectCount,
7321 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7322 const u32* pObjectIndices) {
7323 return ?
7324}
7325
7326@extension("VK_NVX_device_generated_commands") // 87
7327cmd VkResult vkUnregisterObjectsNVX(
7328 VkDevice device,
7329 VkObjectTableNVX objectTable,
7330 u32 objectCount,
7331 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7332 const u32* pObjectIndices) {
7333 return ?
7334}
7335
7336@extension("VK_NVX_device_generated_commands") // 87
7337cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7338 VkPhysicalDevice physicalDevice,
7339 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7340 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7341}
7342
7343@extension("VK_NV_clip_space_w_scaling") // 88
7344cmd void vkCmdSetViewportWScalingNV(
7345 VkCommandBuffer commandBuffer,
7346 u32 firstViewport,
7347 u32 viewportCount,
7348 const VkViewportWScalingNV* pViewportWScalings) {
7349}
7350
7351@extension("VK_EXT_direct_mode_display") // 89
7352cmd VkResult vkReleaseDisplayEXT(
7353 VkPhysicalDevice physicalDevice,
7354 VkDisplayKHR display) {
7355 return ?
7356}
7357
7358@extension("VK_EXT_acquire_xlib_display") // 90
7359cmd VkResult vkAcquireXlibDisplayEXT(
7360 VkPhysicalDevice physicalDevice,
7361 platform.Display* dpy,
7362 VkDisplayKHR display) {
7363 return ?
7364}
7365
7366@extension("VK_EXT_acquire_xlib_display") // 90
7367cmd VkResult vkGetRandROutputDisplayEXT(
7368 VkPhysicalDevice physicalDevice,
7369 platform.Display* dpy,
7370 platform.RROutput rrOutput,
7371 VkDisplayKHR* pDisplay) {
7372 return ?
7373}
7374
7375@extension("VK_EXT_display_surface_counter") // 91
7376cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7377 VkPhysicalDevice physicalDevice,
7378 VkSurfaceKHR surface,
7379 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7380 return ?
7381}
7382
7383@extension("VK_EXT_display_control") // 92
7384cmd VkResult vkDisplayPowerControlEXT(
7385 VkDevice device,
7386 VkDisplayKHR display,
7387 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7388 return ?
7389}
7390
7391@extension("VK_EXT_display_control") // 92
7392cmd VkResult vkRegisterDeviceEventEXT(
7393 VkDevice device,
7394 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7395 const VkAllocationCallbacks* pAllocator,
7396 VkFence* pFence) {
7397 return ?
7398}
7399
7400@extension("VK_EXT_display_control") // 92
7401cmd VkResult vkRegisterDisplayEventEXT(
7402 VkDevice device,
7403 VkDisplayKHR display,
7404 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7405 const VkAllocationCallbacks* pAllocator,
7406 VkFence* pFence) {
7407 return ?
7408}
7409
7410@extension("VK_EXT_display_control") // 92
7411cmd VkResult vkGetSwapchainCounterEXT(
7412 VkDevice device,
7413 VkSwapchainKHR swapchain,
7414 VkSurfaceCounterFlagBitsEXT counter,
7415 u64* pCounterValue) {
7416 return ?
7417}
7418
7419@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007420cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007421 VkDevice device,
7422 VkSwapchainKHR swapchain,
7423 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007424 deviceObject := GetDevice(device)
7425 swapchainObject := GetSwapchain(swapchain)
7426
7427 displayTimingProperties := ?
7428 pDisplayTimingProperties[0] = displayTimingProperties
7429
7430 return ?
7431}
7432
Jesse Hallad250842017-03-10 18:35:38 -08007433@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007434cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007435 VkDevice device,
7436 VkSwapchainKHR swapchain,
7437 u32* pPresentationTimingCount,
7438 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007439 return ?
7440}
7441
Jesse Hallad250842017-03-10 18:35:38 -08007442@extension("VK_EXT_discard_rectangles") // 100
7443cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007444 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007445 u32 firstDiscardRectangle,
7446 u32 discardRectangleCount,
7447 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007448}
7449
Jesse Hallad250842017-03-10 18:35:38 -08007450@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007451cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007452 VkDevice device,
7453 u32 swapchainCount,
7454 const VkSwapchainKHR* pSwapchains,
7455 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08007456}
7457
Jesse Hallad250842017-03-10 18:35:38 -08007458@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007459cmd VkResult vkGetSwapchainStatusKHR(
7460 VkDevice device,
7461 VkSwapchainKHR swapchain) {
7462 return ?
7463}
7464
Chris Forbese2d3ee12017-03-16 16:10:15 +13007465@extension("VK_KHR_get_surface_capabilities2") // 119
7466cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
7467 VkPhysicalDevice physicalDevice,
7468 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
7469 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
7470 return ?
7471}
7472
7473@extension("VK_KHR_get_surface_capabilities2") // 119
7474cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
7475 VkPhysicalDevice physicalDevice,
7476 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
7477 u32* pSurfaceFormatCount,
7478 VkSurfaceFormat2KHR* pSurfaceFormats) {
7479 return ?
7480}
7481
Jesse Hallad250842017-03-10 18:35:38 -08007482@extension("VK_MVK_ios_surface") // 123
7483cmd VkResult vkCreateIOSSurfaceMVK(
7484 VkInstance instance,
7485 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7486 const VkAllocationCallbacks* pAllocator,
7487 VkSurfaceKHR* pSurface) {
7488 return ?
7489}
7490
7491@extension("VK_MVK_macos_surface") // 124
7492cmd VkResult vkCreateMacOSSurfaceMVK(
7493 VkInstance instance,
7494 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7495 const VkAllocationCallbacks* pAllocator,
7496 VkSurfaceKHR* pSurface) {
7497 return ?
7498}
7499
Jesse Halld27f6aa2015-08-15 17:58:48 -07007500////////////////
7501// Validation //
7502////////////////
7503
7504extern void validate(string layerName, bool condition, string message)
7505
7506
7507/////////////////////////////
7508// Internal State Tracking //
7509/////////////////////////////
7510
7511StateObject State
7512
7513@internal class StateObject {
7514 // Dispatchable objects.
7515 map!(VkInstance, ref!InstanceObject) Instances
7516 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7517 map!(VkDevice, ref!DeviceObject) Devices
7518 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007519 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007520
7521 // Non-dispatchable objects.
7522 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7523 map!(VkBuffer, ref!BufferObject) Buffers
7524 map!(VkBufferView, ref!BufferViewObject) BufferViews
7525 map!(VkImage, ref!ImageObject) Images
7526 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007527 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007528 map!(VkPipeline, ref!PipelineObject) Pipelines
7529 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7530 map!(VkSampler, ref!SamplerObject) Samplers
7531 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7532 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7533 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007534 map!(VkFence, ref!FenceObject) Fences
7535 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7536 map!(VkEvent, ref!EventObject) Events
7537 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7538 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7539 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7540 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007541 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007542 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007543 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007544}
7545
7546@internal class InstanceObject {
7547}
7548
7549@internal class PhysicalDeviceObject {
7550 VkInstance instance
7551}
7552
7553@internal class DeviceObject {
7554 VkPhysicalDevice physicalDevice
7555}
7556
7557@internal class QueueObject {
7558 VkDevice device
7559 VkQueueFlags flags
7560}
7561
Jesse Hall3fbc8562015-11-29 22:10:52 -08007562@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007563 VkDevice device
7564 map!(u64, VkDeviceMemory) boundObjects
7565 VkQueueFlags queueFlags
7566}
7567
7568@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007569 VkDevice device
7570 VkDeviceSize allocationSize
7571 map!(u64, VkDeviceSize) boundObjects
7572 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007573}
7574
7575@internal class BufferObject {
7576 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007577 VkDeviceMemory memory
7578 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007579}
7580
7581@internal class BufferViewObject {
7582 VkDevice device
7583 VkBuffer buffer
7584}
7585
7586@internal class ImageObject {
7587 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007588 VkDeviceMemory memory
7589 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007590}
7591
7592@internal class ImageViewObject {
7593 VkDevice device
7594 VkImage image
7595}
7596
Jesse Halld27f6aa2015-08-15 17:58:48 -07007597@internal class ShaderObject {
7598 VkDevice device
7599}
7600
7601@internal class ShaderModuleObject {
7602 VkDevice device
7603}
7604
7605@internal class PipelineObject {
7606 VkDevice device
7607}
7608
7609@internal class PipelineLayoutObject {
7610 VkDevice device
7611}
7612
7613@internal class SamplerObject {
7614 VkDevice device
7615}
7616
7617@internal class DescriptorSetObject {
7618 VkDevice device
7619}
7620
7621@internal class DescriptorSetLayoutObject {
7622 VkDevice device
7623}
7624
7625@internal class DescriptorPoolObject {
7626 VkDevice device
7627}
7628
Jesse Halld27f6aa2015-08-15 17:58:48 -07007629@internal class FenceObject {
7630 VkDevice device
7631 bool signaled
7632}
7633
7634@internal class SemaphoreObject {
7635 VkDevice device
7636}
7637
7638@internal class EventObject {
7639 VkDevice device
7640}
7641
7642@internal class QueryPoolObject {
7643 VkDevice device
7644}
7645
7646@internal class FramebufferObject {
7647 VkDevice device
7648}
7649
7650@internal class RenderPassObject {
7651 VkDevice device
7652}
7653
7654@internal class PipelineCacheObject {
7655 VkDevice device
7656}
7657
Jesse Hall3fbc8562015-11-29 22:10:52 -08007658@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007659 VkDevice device
7660}
7661
Jesse Hall1356b0d2015-11-23 17:24:58 -08007662@internal class SurfaceObject {
7663 VkInstance instance
7664}
7665
Michael Lentine88594d72015-11-12 12:49:45 -08007666@internal class SwapchainObject {
7667 VkDevice device
7668}
7669
Jesse Halld27f6aa2015-08-15 17:58:48 -07007670macro ref!InstanceObject GetInstance(VkInstance instance) {
7671 assert(instance in State.Instances)
7672 return State.Instances[instance]
7673}
7674
7675macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7676 assert(physicalDevice in State.PhysicalDevices)
7677 return State.PhysicalDevices[physicalDevice]
7678}
7679
7680macro ref!DeviceObject GetDevice(VkDevice device) {
7681 assert(device in State.Devices)
7682 return State.Devices[device]
7683}
7684
7685macro ref!QueueObject GetQueue(VkQueue queue) {
7686 assert(queue in State.Queues)
7687 return State.Queues[queue]
7688}
7689
Jesse Hall3fbc8562015-11-29 22:10:52 -08007690macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7691 assert(commandBuffer in State.CommandBuffers)
7692 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007693}
7694
Jesse Hall3fbc8562015-11-29 22:10:52 -08007695macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7696 assert(memory in State.DeviceMemories)
7697 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007698}
7699
7700macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7701 assert(buffer in State.Buffers)
7702 return State.Buffers[buffer]
7703}
7704
7705macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7706 assert(bufferView in State.BufferViews)
7707 return State.BufferViews[bufferView]
7708}
7709
7710macro ref!ImageObject GetImage(VkImage image) {
7711 assert(image in State.Images)
7712 return State.Images[image]
7713}
7714
7715macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7716 assert(imageView in State.ImageViews)
7717 return State.ImageViews[imageView]
7718}
7719
Jesse Halld27f6aa2015-08-15 17:58:48 -07007720macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7721 assert(shaderModule in State.ShaderModules)
7722 return State.ShaderModules[shaderModule]
7723}
7724
7725macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7726 assert(pipeline in State.Pipelines)
7727 return State.Pipelines[pipeline]
7728}
7729
7730macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7731 assert(pipelineLayout in State.PipelineLayouts)
7732 return State.PipelineLayouts[pipelineLayout]
7733}
7734
7735macro ref!SamplerObject GetSampler(VkSampler sampler) {
7736 assert(sampler in State.Samplers)
7737 return State.Samplers[sampler]
7738}
7739
7740macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7741 assert(descriptorSet in State.DescriptorSets)
7742 return State.DescriptorSets[descriptorSet]
7743}
7744
7745macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7746 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7747 return State.DescriptorSetLayouts[descriptorSetLayout]
7748}
7749
7750macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7751 assert(descriptorPool in State.DescriptorPools)
7752 return State.DescriptorPools[descriptorPool]
7753}
7754
Jesse Halld27f6aa2015-08-15 17:58:48 -07007755macro ref!FenceObject GetFence(VkFence fence) {
7756 assert(fence in State.Fences)
7757 return State.Fences[fence]
7758}
7759
7760macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7761 assert(semaphore in State.Semaphores)
7762 return State.Semaphores[semaphore]
7763}
7764
7765macro ref!EventObject GetEvent(VkEvent event) {
7766 assert(event in State.Events)
7767 return State.Events[event]
7768}
7769
7770macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7771 assert(queryPool in State.QueryPools)
7772 return State.QueryPools[queryPool]
7773}
7774
7775macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7776 assert(framebuffer in State.Framebuffers)
7777 return State.Framebuffers[framebuffer]
7778}
7779
7780macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7781 assert(renderPass in State.RenderPasses)
7782 return State.RenderPasses[renderPass]
7783}
7784
7785macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7786 assert(pipelineCache in State.PipelineCaches)
7787 return State.PipelineCaches[pipelineCache]
7788}
7789
Jesse Hall3fbc8562015-11-29 22:10:52 -08007790macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7791 assert(commandPool in State.CommandPools)
7792 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007793}
Michael Lentine88594d72015-11-12 12:49:45 -08007794
Jesse Hall1356b0d2015-11-23 17:24:58 -08007795macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7796 assert(surface in State.Surfaces)
7797 return State.Surfaces[surface]
7798}
7799
Michael Lentine88594d72015-11-12 12:49:45 -08007800macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7801 assert(swapchain in State.Swapchains)
7802 return State.Swapchains[swapchain]
7803}
Jesse Halld8bade02015-11-24 10:24:18 -08007804
7805macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7806 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7807}