blob: b4708b0245b51ec9aefda36f96986633102858dd [file] [log] [blame]
Jesse Halld27f6aa2015-08-15 17:58:48 -07001// Copyright (c) 2015 The Khronos Group Inc.
2//
3// Permission is hereby granted, free of charge, to any person obtaining a
4// copy of this software and/or associated documentation files (the
5// "Materials"), to deal in the Materials without restriction, including
6// without limitation the rights to use, copy, modify, merge, publish,
7// distribute, sublicense, and/or sell copies of the Materials, and to
8// permit persons to whom the Materials are furnished to do so, subject to
9// the following conditions:
10//
11// The above copyright notice and this permission notice shall be included
12// in all copies or substantial portions of the Materials.
13//
14// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
21
22import platform "platform.api"
23
24///////////////
25// Constants //
26///////////////
27
28// API version (major.minor.patch)
Jesse Hall3dd678a2016-01-08 21:52:01 -080029define VERSION_MAJOR 1
30define VERSION_MINOR 0
Jesse Hallfdc8ab32017-03-10 21:01:57 -080031define VERSION_PATCH 43
Jesse Halld27f6aa2015-08-15 17:58:48 -070032
33// API limits
Jesse Hall65ab5522015-11-30 00:07:16 -080034define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
35define VK_UUID_SIZE 16
36define VK_MAX_EXTENSION_NAME_SIZE 256
37define VK_MAX_DESCRIPTION_SIZE 256
38define VK_MAX_MEMORY_TYPES 32
39define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types.
Jesse Hallad250842017-03-10 18:35:38 -080040define VK_MAX_DEVICE_GROUP_SIZE_KHX 32
41define VK_LUID_SIZE_KHX 8
42define VK_QUEUE_FAMILY_EXTERNAL_KHX -2
Jesse Halld27f6aa2015-08-15 17:58:48 -070043
44// API keywords
45define VK_TRUE 1
46define VK_FALSE 0
Jesse Hall5ae3abb2015-10-08 14:00:22 -070047
48// API keyword, but needs special handling by some templates
49define NULL_HANDLE 0
Jesse Halld27f6aa2015-08-15 17:58:48 -070050
Jesse Halleb02c472017-02-24 15:13:45 -080051// 1
Jesse Hall33faaad2016-01-24 21:00:49 -080052@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080053@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080054
Jesse Halleb02c472017-02-24 15:13:45 -080055// 2
Jesse Hall26763382016-05-20 07:13:52 -070056@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080057@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080058
Jesse Halleb02c472017-02-24 15:13:45 -080059// 3
Jesse Hall543a7ff2016-01-08 16:38:30 -080060@extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080061@extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
Jesse Hall1356b0d2015-11-23 17:24:58 -080062
Jesse Halleb02c472017-02-24 15:13:45 -080063// 4
Jesse Hall543a7ff2016-01-08 16:38:30 -080064@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
Jesse Hall0e74f002015-11-30 11:37:59 -080065@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080066
Jesse Halleb02c472017-02-24 15:13:45 -080067// 5
Jesse Hall543a7ff2016-01-08 16:38:30 -080068@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080069@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080070
Jesse Halleb02c472017-02-24 15:13:45 -080071// 6
Jesse Hall543a7ff2016-01-08 16:38:30 -080072@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080073@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080074
Jesse Halleb02c472017-02-24 15:13:45 -080075// 7
Jesse Hallfdc8ab32017-03-10 21:01:57 -080076@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080077@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080078
Jesse Halleb02c472017-02-24 15:13:45 -080079// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080080@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080081@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080082
Jesse Halleb02c472017-02-24 15:13:45 -080083// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080084@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080085@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080086
Jesse Halleb02c472017-02-24 15:13:45 -080087// 10
Jesse Hall543a7ff2016-01-08 16:38:30 -080088@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080089@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080090
Jesse Halleb02c472017-02-24 15:13:45 -080091// 11
Chris Forbes1d4e5542017-02-15 19:38:50 +130092@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7
Chia-I Wub262ddc2016-03-22 07:38:20 +080093@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer"
94
Jesse Halleb02c472017-02-24 15:13:45 -080095// 12
Jesse Hall8f49fcb2017-03-06 16:02:58 -080096@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 5
Jesse Hall715b86a2016-01-16 16:34:29 -080097@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
98
Jesse Halleb02c472017-02-24 15:13:45 -080099// 13
Jesse Hall26763382016-05-20 07:13:52 -0700100@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
101@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
102
Jesse Halleb02c472017-02-24 15:13:45 -0800103// 15
Jesse Hall26763382016-05-20 07:13:52 -0700104@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
105@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
106
Jesse Halleb02c472017-02-24 15:13:45 -0800107// 16
Jesse Hall26763382016-05-20 07:13:52 -0700108@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
109@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
110
Jesse Halleb02c472017-02-24 15:13:45 -0800111// 19
Jesse Hall26763382016-05-20 07:13:52 -0700112@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
113@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
114
Jesse Halleb02c472017-02-24 15:13:45 -0800115// 21
Jesse Hall56d386a2016-07-26 15:20:40 -0700116@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
117@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
118
Jesse Halleb02c472017-02-24 15:13:45 -0800119// 22
Jesse Hall56d386a2016-07-26 15:20:40 -0700120@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
121@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
122
Jesse Halleb02c472017-02-24 15:13:45 -0800123// 23
Jesse Hall8f49fcb2017-03-06 16:02:58 -0800124@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
Jesse Hall26763382016-05-20 07:13:52 -0700125@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker"
126
Jesse Halleb02c472017-02-24 15:13:45 -0800127// 26
Jesse Hall56d386a2016-07-26 15:20:40 -0700128@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1
129@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
130
Jesse Halleb02c472017-02-24 15:13:45 -0800131// 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700132@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
133@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
134
Jesse Halleb02c472017-02-24 15:13:45 -0800135// 28
Chris Forbes289cb792016-12-30 15:03:55 +1300136@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
137@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
138
Jesse Halleb02c472017-02-24 15:13:45 -0800139// 34
140@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
141@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
142
143// 36
144@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
145@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
146
147// 37
148@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
149@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
150
151// 38
152@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
153@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
154
Jesse Hallad250842017-03-10 18:35:38 -0800155// 54
156@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1
157@extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview"
158
Jesse Halleb02c472017-02-24 15:13:45 -0800159// 56
Chris Forbes289cb792016-12-30 15:03:55 +1300160@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
161@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
162
Jesse Halleb02c472017-02-24 15:13:45 -0800163// 57
Chris Forbes289cb792016-12-30 15:03:55 +1300164@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
165@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
166
Jesse Halleb02c472017-02-24 15:13:45 -0800167// 58
Chris Forbes289cb792016-12-30 15:03:55 +1300168@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
169@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
170
Jesse Halleb02c472017-02-24 15:13:45 -0800171// 59
Chris Forbes289cb792016-12-30 15:03:55 +1300172@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
173@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
174
Jesse Hall889cd9a2017-02-25 22:12:23 -0800175// 60
176@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
177@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
178
Jesse Hallad250842017-03-10 18:35:38 -0800179// 61
180@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1
181@extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group"
182
Jesse Halleb02c472017-02-24 15:13:45 -0800183// 62
Chris Forbes289cb792016-12-30 15:03:55 +1300184@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
185@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
186
Jesse Hall77ad05b2017-03-10 22:02:20 -0800187// 63
188@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1
189@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
190
191// 64
192@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
193@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
194
195// 65
196@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
197@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
198
199// 66
200@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
201@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
202
203// 70
204@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
205@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
206
Jesse Hallad250842017-03-10 18:35:38 -0800207// 71
208@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1
209@extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation"
210
211// 72
212@extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
213@extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities"
214
215// 73
216@extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1
217@extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory"
218
219// 74
220@extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
221@extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32"
222
223// 75
224@extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
225@extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd"
226
227// 76
228@extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1
229@extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex"
230
231// 77
232@extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
233@extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities"
234
235// 78
236@extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
237@extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore"
238
239// 79
240@extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
241@extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32"
242
243// 80
244@extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
245@extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd"
246
247// 81
248@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1
249@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
250
Jesse Hall889cd9a2017-02-25 22:12:23 -0800251// 85
252@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
253@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME "VK_KHR_incremental_present"
254
Jesse Hallad250842017-03-10 18:35:38 -0800255// 86
256@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
257@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
258
Jesse Halleb02c472017-02-24 15:13:45 -0800259// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300260@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
261@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
262
Jesse Hallad250842017-03-10 18:35:38 -0800263// 88
264@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
265@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
266
Jesse Hall77ad05b2017-03-10 22:02:20 -0800267// 89
268@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
269@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
270
271// 90
272@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
273@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
274
275// 91
276@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
277@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
278
279// 92
280@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
281@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
282
Jesse Hall889cd9a2017-02-25 22:12:23 -0800283// 93
284@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
Jesse Hallfdc8ab32017-03-10 21:01:57 -0800285@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800286
Jesse Hallad250842017-03-10 18:35:38 -0800287// 95
288@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
289@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
290
291// 96
292@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
293@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
294
295// 97
296@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
297@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
298
299// 98
300@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
301@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
302
303// 99
304@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
305@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
306
307// 100
308@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
309@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
310
Jesse Hall77ad05b2017-03-10 22:02:20 -0800311// 105
312@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 1
313@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_COUNTER_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
314
Jesse Hall889cd9a2017-02-25 22:12:23 -0800315// 106
316@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
317@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
318
319// 112
Chris Forbes1d5f68c2017-01-31 10:17:01 +1300320@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
321@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
Chris Forbes2e12cb82017-01-18 11:45:17 +1300322
Jesse Hallad250842017-03-10 18:35:38 -0800323// 123
324@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
325@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
326
327// 124
328@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
329@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
330
Jesse Halld27f6aa2015-08-15 17:58:48 -0700331/////////////
332// Types //
333/////////////
334
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700335type u32 VkBool32
336type u32 VkFlags
337type u64 VkDeviceSize
338type u32 VkSampleMask
339
Jesse Halld27f6aa2015-08-15 17:58:48 -0700340/// Dispatchable handle types.
341@dispatchHandle type u64 VkInstance
342@dispatchHandle type u64 VkPhysicalDevice
343@dispatchHandle type u64 VkDevice
344@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800345@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700346
347/// Non dispatchable handle types.
348@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800349@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700350@nonDispatchHandle type u64 VkBuffer
351@nonDispatchHandle type u64 VkBufferView
352@nonDispatchHandle type u64 VkImage
353@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700354@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700355@nonDispatchHandle type u64 VkPipeline
356@nonDispatchHandle type u64 VkPipelineLayout
357@nonDispatchHandle type u64 VkSampler
358@nonDispatchHandle type u64 VkDescriptorSet
359@nonDispatchHandle type u64 VkDescriptorSetLayout
360@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700361@nonDispatchHandle type u64 VkFence
362@nonDispatchHandle type u64 VkSemaphore
363@nonDispatchHandle type u64 VkEvent
364@nonDispatchHandle type u64 VkQueryPool
365@nonDispatchHandle type u64 VkFramebuffer
366@nonDispatchHandle type u64 VkRenderPass
367@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800368
Jesse Hallad250842017-03-10 18:35:38 -0800369// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800370@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800371
Jesse Hallad250842017-03-10 18:35:38 -0800372// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800373@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800374
Jesse Hallad250842017-03-10 18:35:38 -0800375// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800376@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
377@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700378
Jesse Hallad250842017-03-10 18:35:38 -0800379// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800380@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
381
Jesse Hallad250842017-03-10 18:35:38 -0800382// 86
383@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
384
385// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300386@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
387@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
388
Jesse Halld27f6aa2015-08-15 17:58:48 -0700389
390/////////////
391// Enums //
392/////////////
393
394enum VkImageLayout {
395 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
396 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
397 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
398 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
399 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
400 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 -0800401 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
402 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 -0700403 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800404
Jesse Hallad250842017-03-10 18:35:38 -0800405 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800406 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Chris Forbesaf3a1112017-01-31 15:37:03 +1300407
408 //@extension("VK_KHR_shared_presentable_image")
409 VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700410}
411
412enum VkAttachmentLoadOp {
413 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
414 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
415 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
416}
417
418enum VkAttachmentStoreOp {
419 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
420 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
421}
422
423enum VkImageType {
424 VK_IMAGE_TYPE_1D = 0x00000000,
425 VK_IMAGE_TYPE_2D = 0x00000001,
426 VK_IMAGE_TYPE_3D = 0x00000002,
427}
428
429enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800430 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
431 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700432}
433
434enum VkImageViewType {
435 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
436 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
437 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
438 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
439 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
440 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
441 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
442}
443
Jesse Hall3fbc8562015-11-29 22:10:52 -0800444enum VkCommandBufferLevel {
445 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
446 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700447}
448
Jesse Hall65ab5522015-11-30 00:07:16 -0800449enum VkComponentSwizzle {
450 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
451 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
452 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
453 VK_COMPONENT_SWIZZLE_R = 0x00000003,
454 VK_COMPONENT_SWIZZLE_G = 0x00000004,
455 VK_COMPONENT_SWIZZLE_B = 0x00000005,
456 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700457}
458
459enum VkDescriptorType {
460 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
461 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
462 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
463 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
464 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
465 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
466 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
467 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
468 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
469 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
470 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
471}
472
Jesse Halld27f6aa2015-08-15 17:58:48 -0700473enum VkQueryType {
474 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
475 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800476 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700477}
478
Jesse Halld27f6aa2015-08-15 17:58:48 -0700479enum VkBorderColor {
480 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
481 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
482 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
483 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
484 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
485 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
486}
487
488enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800489 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
490 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700491}
492
493enum VkPrimitiveTopology {
494 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
495 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
496 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
497 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
498 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
499 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800500 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
501 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
502 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
503 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800504 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700505}
506
507enum VkSharingMode {
508 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
509 VK_SHARING_MODE_CONCURRENT = 0x00000001,
510}
511
512enum VkIndexType {
513 VK_INDEX_TYPE_UINT16 = 0x00000000,
514 VK_INDEX_TYPE_UINT32 = 0x00000001,
515}
516
Jesse Hall23ff73f2015-11-29 14:36:39 -0800517enum VkFilter {
518 VK_FILTER_NEAREST = 0x00000000,
519 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700520
Jesse Hallad250842017-03-10 18:35:38 -0800521 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700522 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700523}
524
Jesse Hall23ff73f2015-11-29 14:36:39 -0800525enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800526 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
527 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700528}
529
Jesse Hall23ff73f2015-11-29 14:36:39 -0800530enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800531 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
532 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
533 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
534 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
535 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700536}
537
538enum VkCompareOp {
539 VK_COMPARE_OP_NEVER = 0x00000000,
540 VK_COMPARE_OP_LESS = 0x00000001,
541 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800542 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700543 VK_COMPARE_OP_GREATER = 0x00000004,
544 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800545 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700546 VK_COMPARE_OP_ALWAYS = 0x00000007,
547}
548
Jesse Hall65ab5522015-11-30 00:07:16 -0800549enum VkPolygonMode {
550 VK_POLYGON_MODE_FILL = 0x00000000,
551 VK_POLYGON_MODE_LINE = 0x00000001,
552 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700553}
554
555enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800556 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
557 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700558}
559
Jesse Hall65ab5522015-11-30 00:07:16 -0800560enum VkBlendFactor {
561 VK_BLEND_FACTOR_ZERO = 0x00000000,
562 VK_BLEND_FACTOR_ONE = 0x00000001,
563 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
564 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
565 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
566 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
567 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
568 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
569 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
570 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
571 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
572 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
573 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
574 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
575 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
576 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
577 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
578 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
579 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700580}
581
582enum VkBlendOp {
583 VK_BLEND_OP_ADD = 0x00000000,
584 VK_BLEND_OP_SUBTRACT = 0x00000001,
585 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
586 VK_BLEND_OP_MIN = 0x00000003,
587 VK_BLEND_OP_MAX = 0x00000004,
588}
589
590enum VkStencilOp {
591 VK_STENCIL_OP_KEEP = 0x00000000,
592 VK_STENCIL_OP_ZERO = 0x00000001,
593 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800594 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
595 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700596 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800597 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
598 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700599}
600
601enum VkLogicOp {
602 VK_LOGIC_OP_CLEAR = 0x00000000,
603 VK_LOGIC_OP_AND = 0x00000001,
604 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
605 VK_LOGIC_OP_COPY = 0x00000003,
606 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800607 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700608 VK_LOGIC_OP_XOR = 0x00000006,
609 VK_LOGIC_OP_OR = 0x00000007,
610 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800611 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700612 VK_LOGIC_OP_INVERT = 0x0000000a,
613 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
614 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
615 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
616 VK_LOGIC_OP_NAND = 0x0000000e,
617 VK_LOGIC_OP_SET = 0x0000000f,
618}
619
Jesse Hall3fbc8562015-11-29 22:10:52 -0800620enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800621 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800622 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
623 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
624 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
625 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800626}
627
Jesse Hall3fbc8562015-11-29 22:10:52 -0800628enum VkInternalAllocationType {
629 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700630}
631
632enum VkPhysicalDeviceType {
633 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
634 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
635 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
636 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
637 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
638}
639
Jesse Hall65ab5522015-11-30 00:07:16 -0800640enum VkVertexInputRate {
641 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
642 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700643}
644
645/// Vulkan format definitions
646enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800647 VK_FORMAT_UNDEFINED = 0,
648 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
649 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
650 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
651 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
652 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
653 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
654 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
655 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
656 VK_FORMAT_R8_UNORM = 9,
657 VK_FORMAT_R8_SNORM = 10,
658 VK_FORMAT_R8_USCALED = 11,
659 VK_FORMAT_R8_SSCALED = 12,
660 VK_FORMAT_R8_UINT = 13,
661 VK_FORMAT_R8_SINT = 14,
662 VK_FORMAT_R8_SRGB = 15,
663 VK_FORMAT_R8G8_UNORM = 16,
664 VK_FORMAT_R8G8_SNORM = 17,
665 VK_FORMAT_R8G8_USCALED = 18,
666 VK_FORMAT_R8G8_SSCALED = 19,
667 VK_FORMAT_R8G8_UINT = 20,
668 VK_FORMAT_R8G8_SINT = 21,
669 VK_FORMAT_R8G8_SRGB = 22,
670 VK_FORMAT_R8G8B8_UNORM = 23,
671 VK_FORMAT_R8G8B8_SNORM = 24,
672 VK_FORMAT_R8G8B8_USCALED = 25,
673 VK_FORMAT_R8G8B8_SSCALED = 26,
674 VK_FORMAT_R8G8B8_UINT = 27,
675 VK_FORMAT_R8G8B8_SINT = 28,
676 VK_FORMAT_R8G8B8_SRGB = 29,
677 VK_FORMAT_B8G8R8_UNORM = 30,
678 VK_FORMAT_B8G8R8_SNORM = 31,
679 VK_FORMAT_B8G8R8_USCALED = 32,
680 VK_FORMAT_B8G8R8_SSCALED = 33,
681 VK_FORMAT_B8G8R8_UINT = 34,
682 VK_FORMAT_B8G8R8_SINT = 35,
683 VK_FORMAT_B8G8R8_SRGB = 36,
684 VK_FORMAT_R8G8B8A8_UNORM = 37,
685 VK_FORMAT_R8G8B8A8_SNORM = 38,
686 VK_FORMAT_R8G8B8A8_USCALED = 39,
687 VK_FORMAT_R8G8B8A8_SSCALED = 40,
688 VK_FORMAT_R8G8B8A8_UINT = 41,
689 VK_FORMAT_R8G8B8A8_SINT = 42,
690 VK_FORMAT_R8G8B8A8_SRGB = 43,
691 VK_FORMAT_B8G8R8A8_UNORM = 44,
692 VK_FORMAT_B8G8R8A8_SNORM = 45,
693 VK_FORMAT_B8G8R8A8_USCALED = 46,
694 VK_FORMAT_B8G8R8A8_SSCALED = 47,
695 VK_FORMAT_B8G8R8A8_UINT = 48,
696 VK_FORMAT_B8G8R8A8_SINT = 49,
697 VK_FORMAT_B8G8R8A8_SRGB = 50,
698 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
699 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
700 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
701 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
702 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
703 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
704 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
705 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
706 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
707 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
708 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
709 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
710 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
711 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
712 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
713 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
714 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
715 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
716 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
717 VK_FORMAT_R16_UNORM = 70,
718 VK_FORMAT_R16_SNORM = 71,
719 VK_FORMAT_R16_USCALED = 72,
720 VK_FORMAT_R16_SSCALED = 73,
721 VK_FORMAT_R16_UINT = 74,
722 VK_FORMAT_R16_SINT = 75,
723 VK_FORMAT_R16_SFLOAT = 76,
724 VK_FORMAT_R16G16_UNORM = 77,
725 VK_FORMAT_R16G16_SNORM = 78,
726 VK_FORMAT_R16G16_USCALED = 79,
727 VK_FORMAT_R16G16_SSCALED = 80,
728 VK_FORMAT_R16G16_UINT = 81,
729 VK_FORMAT_R16G16_SINT = 82,
730 VK_FORMAT_R16G16_SFLOAT = 83,
731 VK_FORMAT_R16G16B16_UNORM = 84,
732 VK_FORMAT_R16G16B16_SNORM = 85,
733 VK_FORMAT_R16G16B16_USCALED = 86,
734 VK_FORMAT_R16G16B16_SSCALED = 87,
735 VK_FORMAT_R16G16B16_UINT = 88,
736 VK_FORMAT_R16G16B16_SINT = 89,
737 VK_FORMAT_R16G16B16_SFLOAT = 90,
738 VK_FORMAT_R16G16B16A16_UNORM = 91,
739 VK_FORMAT_R16G16B16A16_SNORM = 92,
740 VK_FORMAT_R16G16B16A16_USCALED = 93,
741 VK_FORMAT_R16G16B16A16_SSCALED = 94,
742 VK_FORMAT_R16G16B16A16_UINT = 95,
743 VK_FORMAT_R16G16B16A16_SINT = 96,
744 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
745 VK_FORMAT_R32_UINT = 98,
746 VK_FORMAT_R32_SINT = 99,
747 VK_FORMAT_R32_SFLOAT = 100,
748 VK_FORMAT_R32G32_UINT = 101,
749 VK_FORMAT_R32G32_SINT = 102,
750 VK_FORMAT_R32G32_SFLOAT = 103,
751 VK_FORMAT_R32G32B32_UINT = 104,
752 VK_FORMAT_R32G32B32_SINT = 105,
753 VK_FORMAT_R32G32B32_SFLOAT = 106,
754 VK_FORMAT_R32G32B32A32_UINT = 107,
755 VK_FORMAT_R32G32B32A32_SINT = 108,
756 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
757 VK_FORMAT_R64_UINT = 110,
758 VK_FORMAT_R64_SINT = 111,
759 VK_FORMAT_R64_SFLOAT = 112,
760 VK_FORMAT_R64G64_UINT = 113,
761 VK_FORMAT_R64G64_SINT = 114,
762 VK_FORMAT_R64G64_SFLOAT = 115,
763 VK_FORMAT_R64G64B64_UINT = 116,
764 VK_FORMAT_R64G64B64_SINT = 117,
765 VK_FORMAT_R64G64B64_SFLOAT = 118,
766 VK_FORMAT_R64G64B64A64_UINT = 119,
767 VK_FORMAT_R64G64B64A64_SINT = 120,
768 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
769 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
770 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
771 VK_FORMAT_D16_UNORM = 124,
772 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
773 VK_FORMAT_D32_SFLOAT = 126,
774 VK_FORMAT_S8_UINT = 127,
775 VK_FORMAT_D16_UNORM_S8_UINT = 128,
776 VK_FORMAT_D24_UNORM_S8_UINT = 129,
777 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
778 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
779 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
780 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
781 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
782 VK_FORMAT_BC2_UNORM_BLOCK = 135,
783 VK_FORMAT_BC2_SRGB_BLOCK = 136,
784 VK_FORMAT_BC3_UNORM_BLOCK = 137,
785 VK_FORMAT_BC3_SRGB_BLOCK = 138,
786 VK_FORMAT_BC4_UNORM_BLOCK = 139,
787 VK_FORMAT_BC4_SNORM_BLOCK = 140,
788 VK_FORMAT_BC5_UNORM_BLOCK = 141,
789 VK_FORMAT_BC5_SNORM_BLOCK = 142,
790 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
791 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
792 VK_FORMAT_BC7_UNORM_BLOCK = 145,
793 VK_FORMAT_BC7_SRGB_BLOCK = 146,
794 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
795 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
796 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
797 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
798 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
799 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
800 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
801 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
802 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
803 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
804 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
805 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
806 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
807 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
808 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
809 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
810 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
811 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
812 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
813 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
814 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
815 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
816 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
817 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
818 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
819 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
820 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
821 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
822 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
823 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
824 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
825 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
826 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
827 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
828 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
829 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
830 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
831 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Chris Forbes289cb792016-12-30 15:03:55 +1300832
Jesse Hallad250842017-03-10 18:35:38 -0800833 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -0800834 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
835 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
836 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
837 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
838 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
839 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
840 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
841 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700842}
843
Jesse Halld27f6aa2015-08-15 17:58:48 -0700844/// Structure type enumerant
845enum VkStructureType {
846 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -0800847 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
848 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
849 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
850 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800851 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -0800852 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
853 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
854 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
855 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700856 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -0800857 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
858 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
859 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
860 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
861 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
862 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800863 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
864 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
865 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
866 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
867 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
868 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
869 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
870 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
871 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
872 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
873 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
874 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
875 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
876 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
877 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
878 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
879 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800880 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800881 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
882 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
883 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
884 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
885 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800886 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -0800887 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
888 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
889 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
890 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
891 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
892 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
893 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
894 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800895
Jesse Hallad250842017-03-10 18:35:38 -0800896 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800897 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
898 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800899
Jesse Hallad250842017-03-10 18:35:38 -0800900 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -0800901 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
902 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800903
Jesse Hallad250842017-03-10 18:35:38 -0800904 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -0800905 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800906
Jesse Hallad250842017-03-10 18:35:38 -0800907 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800908 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
909
Jesse Hallad250842017-03-10 18:35:38 -0800910 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800911 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
912
Jesse Hallad250842017-03-10 18:35:38 -0800913 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800914 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
915
Jesse Hallad250842017-03-10 18:35:38 -0800916 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800917 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
918
Jesse Hallad250842017-03-10 18:35:38 -0800919 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800920 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
921
Jesse Hallad250842017-03-10 18:35:38 -0800922 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800923 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -0800924
Jesse Hallad250842017-03-10 18:35:38 -0800925 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +0800926 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
Chris Forbes8e4438b2016-12-07 16:26:49 +1300927 VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001,
Chris Forbes1d4e5542017-02-15 19:38:50 +1300928 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002,
Chia-I Wub262ddc2016-03-22 07:38:20 +0800929
Jesse Hallad250842017-03-10 18:35:38 -0800930 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -0700931 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
932
Jesse Hallad250842017-03-10 18:35:38 -0800933 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -0700934 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
935
Jesse Hallad250842017-03-10 18:35:38 -0800936 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -0700937 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -0700938 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -0700939 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall56d386a2016-07-26 15:20:40 -0700940
Jesse Hallad250842017-03-10 18:35:38 -0800941 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700942 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall56d386a2016-07-26 15:20:40 -0700943 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall56d386a2016-07-26 15:20:40 -0700944 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Chris Forbes289cb792016-12-30 15:03:55 +1300945
Jesse Hallad250842017-03-10 18:35:38 -0800946 //@extension("VK_KHX_multiview") // 54
947 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
948 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
949 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
950
951 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -0800952 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
953 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
Chris Forbes289cb792016-12-30 15:03:55 +1300954
Jesse Hallad250842017-03-10 18:35:38 -0800955 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -0800956 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
957 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
Chris Forbes289cb792016-12-30 15:03:55 +1300958
Jesse Hallad250842017-03-10 18:35:38 -0800959 //@extension("VK_NV_win32_keyed_mutex") // 59
Chris Forbes289cb792016-12-30 15:03:55 +1300960 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
961
Jesse Hallad250842017-03-10 18:35:38 -0800962 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall889cd9a2017-02-25 22:12:23 -0800963 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
964 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
965 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
966 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
967 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
968 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
969 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
970 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
Chris Forbes1194ede2016-12-30 16:29:25 +1300971 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
972
Jesse Hallad250842017-03-10 18:35:38 -0800973 //@extension("VK_KHX_device_group") // 61
974 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
975 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
976 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
977 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
978 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
979 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
980 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
981 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
982 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
983 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
984 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
985 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
986 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
987
988 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -0800989 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
Chris Forbes289cb792016-12-30 15:03:55 +1300990
Jesse Hallad250842017-03-10 18:35:38 -0800991 //@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -0800992 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
993
Jesse Hallad250842017-03-10 18:35:38 -0800994 //@extension("VK_KHX_device_group_creation") // 71
995 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
996 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
997
998 //@extension("VK_KHX_external_memory_capabilities") // 72
999 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000,
1000 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001,
1001 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002,
1002 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003,
1003 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004,
1004 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005,
1005 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006,
1006 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007,
1007
1008 //@extension("VK_KHX_external_memory") // 73
1009 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
1010 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
1011 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
1012
1013 //@extension("VK_KHX_external_memory_win32") // 74
1014 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
1015 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
1016 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
1017
1018 //@extension("VK_KHX_external_memory_fd") // 75
1019 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
1020 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
1021
1022 //@extension("VK_KHX_win32_keyed_mutex") // 76
1023 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
1024
1025 //@extension("VK_KHX_external_semaphore_capabilities") // 77
1026 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
1027 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
1028
1029 //@extension("VK_KHX_external_semaphore") // 78
1030 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
1031
1032 //@extension("VK_KHX_external_semaphore_win32") // 79
1033 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
1034 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
1035 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
1036
1037 //@extension("VK_KHX_external_semaphore_fd") // 80
1038 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
1039
1040 //@extension("VK_KHR_push_descriptor") // 81
1041 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1042
1043 //@extension("VK_KHR_incremental_present") // 85
Jesse Hall889cd9a2017-02-25 22:12:23 -08001044 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
Chris Forbes289cb792016-12-30 15:03:55 +13001045
Jesse Hallad250842017-03-10 18:35:38 -08001046 //@extension("VK_KHR_descriptor_update_template") // 86
1047 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1048
1049 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001050 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1051 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1052 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1053 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1054 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1055 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001056
Jesse Hallad250842017-03-10 18:35:38 -08001057 //@extension("VK_NV_clip_space_w_scaling") // 88
1058 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1059
1060 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08001061 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1062
Jesse Hallad250842017-03-10 18:35:38 -08001063 //@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001064 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1065 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1066 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1067 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Hallad250842017-03-10 18:35:38 -08001068
1069 //@extension("VK_GOOGLE_display_timing") // 93
1070 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1071
1072 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1073 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1074
1075 //@extension("VK_NV_viewport_swizzle") // 99
1076 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1077
1078 //@extension("VK_EXT_discard_rectangles") // 100
1079 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1080 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1081
Jesse Hallfdc8ab32017-03-10 21:01:57 -08001082 //@extension("VK_EXT_hdr_metadata") // 106
1083 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1084
Jesse Hallad250842017-03-10 18:35:38 -08001085 //@extension("VK_MVK_ios_surface") // 123
1086 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1087
1088 //@extension("VK_MVK_macos_surface") // 124
1089 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001090}
1091
Jesse Hall65ab5522015-11-30 00:07:16 -08001092enum VkSubpassContents {
1093 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1094 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001095}
1096
Jesse Hall543a7ff2016-01-08 16:38:30 -08001097enum VkPipelineCacheHeaderVersion {
1098 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1099}
1100
Jesse Hallbd888842015-11-30 21:44:14 -08001101@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001102/// Error and return codes
1103enum VkResult {
1104 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001105 VK_SUCCESS = 0,
1106 VK_NOT_READY = 1,
1107 VK_TIMEOUT = 2,
1108 VK_EVENT_SET = 3,
1109 VK_EVENT_RESET = 4,
1110 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001111
Jesse Hallad250842017-03-10 18:35:38 -08001112 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001113 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001114
Jesse Halld27f6aa2015-08-15 17:58:48 -07001115 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001116 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1117 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1118 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1119 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1120 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1121 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1122 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1123 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1124 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1125 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1126 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001127 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001128
Jesse Hallad250842017-03-10 18:35:38 -08001129 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001130 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001131 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001132
Jesse Hallad250842017-03-10 18:35:38 -08001133 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001134 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001135
Jesse Hallad250842017-03-10 18:35:38 -08001136 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001137 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001138
Jesse Hallad250842017-03-10 18:35:38 -08001139 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001140 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001141
Jesse Hallad250842017-03-10 18:35:38 -08001142 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001143 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001144
Jesse Hallad250842017-03-10 18:35:38 -08001145 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001146 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001147
1148 //@extension("VK_KHX_external_memory") // 73
1149 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001150}
1151
1152enum VkDynamicState {
1153 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1154 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1155 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1156 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1157 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1158 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1159 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1160 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1161 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001162
1163 //@extension("VK_NV_clip_space_w_scaling") // 88
1164 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1165
1166 //@extension("VK_EXT_discard_rectangles") // 100
1167 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001168}
1169
Jesse Hallad250842017-03-10 18:35:38 -08001170@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001171enum VkPresentModeKHR {
1172 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1173 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1174 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001175 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001176
Chris Forbes1d5f68c2017-01-31 10:17:01 +13001177 //@extension("VK_KHR_shared_presentable_image")
Jesse Hall77ad05b2017-03-10 22:02:20 -08001178 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1179 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001180}
1181
Jesse Hallad250842017-03-10 18:35:38 -08001182@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001183enum VkColorSpaceKHR {
1184 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001185
1186 //@extension("VK_EXT_swapchain_colorspace")
Jesse Hall889cd9a2017-02-25 22:12:23 -08001187 VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001188 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002,
1189 VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003,
1190 VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004,
1191 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005,
1192 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006,
1193 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007,
1194 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008,
1195 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009,
1196 VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010,
1197 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1198 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Michael Lentine88594d72015-11-12 12:49:45 -08001199}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001200
Jesse Hallad250842017-03-10 18:35:38 -08001201@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001202enum VkDebugReportObjectTypeEXT {
1203 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1204 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1205 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1206 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1207 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1208 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1209 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1210 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1211 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1212 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1213 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1214 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1215 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1216 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1217 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1218 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1219 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1220 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1221 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1222 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1223 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1224 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1225 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1226 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1227 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1228 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1229 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1230 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1231 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001232 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1233 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1234 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1235 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hall715b86a2016-01-16 16:34:29 -08001236}
1237
Jesse Hallad250842017-03-10 18:35:38 -08001238@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001239enum VkDebugReportErrorEXT {
1240 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1241 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1242}
1243
Jesse Hallad250842017-03-10 18:35:38 -08001244@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001245enum VkRasterizationOrderAMD {
1246 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1247 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1248}
1249
Jesse Hallad250842017-03-10 18:35:38 -08001250@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001251enum VkValidationCheckEXT {
1252 VK_VALIDATION_CHECK_ALL_EXT = 0,
1253}
1254
Jesse Hallad250842017-03-10 18:35:38 -08001255@extension("VK_KHR_descriptor_update_template") // 86
1256enum VkDescriptorUpdateTemplateTypeKHR {
1257 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1258 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1259}
1260
1261@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001262enum VkIndirectCommandsTokenTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001263 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1264 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1265 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1266 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1267 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1268 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1269 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1270 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001271}
1272
Jesse Hallad250842017-03-10 18:35:38 -08001273@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001274enum VkObjectEntryTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001275 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1276 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1277 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1278 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1279 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001280}
Jesse Hall715b86a2016-01-16 16:34:29 -08001281
Jesse Hallad250842017-03-10 18:35:38 -08001282@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001283enum VkDisplayPowerStateEXT {
1284 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1285 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1286 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1287}
1288
Jesse Hallad250842017-03-10 18:35:38 -08001289@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001290enum VkDeviceEventTypeEXT {
1291 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1292}
1293
Jesse Hallad250842017-03-10 18:35:38 -08001294@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001295enum VkDisplayEventTypeEXT {
1296 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1297}
1298
Jesse Hallad250842017-03-10 18:35:38 -08001299@extension("VK_NV_viewport_swizzle") // 99
1300enum VkViewportCoordinateSwizzleNV {
1301 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1302 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1303 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1304 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1305 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1306 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1307 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1308 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1309}
1310
1311@extension("VK_EXT_discard_rectangles") // 100
1312enum VkDiscardRectangleModeEXT {
1313 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1314 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1315}
1316
Jesse Halld27f6aa2015-08-15 17:58:48 -07001317/////////////////
1318// Bitfields //
1319/////////////////
1320
Jesse Halld27f6aa2015-08-15 17:58:48 -07001321/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001322type VkFlags VkQueueFlags
1323bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001324 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1325 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001326 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001327 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001328}
1329
1330/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001331type VkFlags VkMemoryPropertyFlags
1332bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001333 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1334 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1335 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1336 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1337 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001338}
1339
1340/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001341type VkFlags VkMemoryHeapFlags
1342bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001343 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001344
1345 //@extension("VK_KHX_device_group_creation") // 71
1346 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001347}
1348
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001349/// Access flags
1350type VkFlags VkAccessFlags
1351bitfield VkAccessFlagBits {
1352 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1353 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1354 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1355 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1356 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1357 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1358 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1359 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1360 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1361 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1362 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1363 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1364 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1365 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1366 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1367 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1368 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001369
Jesse Hallad250842017-03-10 18:35:38 -08001370 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001371 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001372 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001373}
1374
1375/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001376type VkFlags VkBufferUsageFlags
1377bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001378 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1379 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001380 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1381 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1382 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1383 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1384 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1385 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1386 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1387}
1388
1389/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001390type VkFlags VkBufferCreateFlags
1391bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001392 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001393 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1394 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1395}
1396
1397/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001398type VkFlags VkShaderStageFlags
1399bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001400 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001401 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1402 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001403 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1404 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1405 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001406 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001407
1408 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1409}
1410
Jesse Hallfbf97b02015-11-20 14:17:03 -08001411/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001412type VkFlags VkDescriptorPoolCreateFlags
1413bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001414 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1415}
1416
1417/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001418type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001419//bitfield VkDescriptorPoolResetFlagBits {
1420//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001421
Jesse Halld27f6aa2015-08-15 17:58:48 -07001422/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001423type VkFlags VkImageUsageFlags
1424bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001425 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1426 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001427 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1428 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1429 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001430 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001431 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1432 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1433}
1434
1435/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001436type VkFlags VkImageCreateFlags
1437bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001438 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001439 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1440 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 -07001441 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1442 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 -08001443
Jesse Hallad250842017-03-10 18:35:38 -08001444 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001445 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001446
1447 //@extension("VK_KHX_device_group") // 61
1448 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001449}
1450
Jesse Hallb00daad2015-11-29 19:46:20 -08001451/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001452type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001453//bitfield VkImageViewCreateFlagBits {
1454//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001455
1456/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001457type VkFlags VkPipelineCreateFlags
1458bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001459 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1460 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1461 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001462
1463 //@extension("VK_KHX_device_group") // 61
1464 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1465 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001466}
1467
Jesse Hall65ab5522015-11-30 00:07:16 -08001468/// Color component flags
1469type VkFlags VkColorComponentFlags
1470bitfield VkColorComponentFlagBits {
1471 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1472 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1473 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1474 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001475}
1476
1477/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001478type VkFlags VkFenceCreateFlags
1479bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001480 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1481}
1482
1483/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001484type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001485//bitfield VkSemaphoreCreateFlagBits {
1486//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001487
1488/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001489type VkFlags VkFormatFeatureFlags
1490bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001491 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1492 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1493 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1494 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1495 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1496 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1497 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1498 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1499 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1500 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001501 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1502 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 -08001503 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001504
Jesse Hallad250842017-03-10 18:35:38 -08001505 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001506 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001507
Jesse Hallad250842017-03-10 18:35:38 -08001508 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001509 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1510 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001511}
1512
1513/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001514type VkFlags VkQueryControlFlags
1515bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001516 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001517}
1518
1519/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001520type VkFlags VkQueryResultFlags
1521bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001522 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1523 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1524 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1525 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1526}
1527
1528/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001529type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001530//bitfield VkShaderModuleCreateFlagBits {
1531//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001532
Jesse Halld27f6aa2015-08-15 17:58:48 -07001533/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001534type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001535//bitfield VkEventCreateFlagBits {
1536//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001537
Jesse Halla15a4bf2015-11-19 22:48:02 -08001538/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001539type VkFlags VkCommandBufferUsageFlags
1540bitfield VkCommandBufferUsageFlagBits {
1541 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1542 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1543 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001544}
1545
1546/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001547type VkFlags VkQueryPipelineStatisticFlags
1548bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001549 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1550 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1551 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1552 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1553 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1554 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1555 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1556 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1557 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1558 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1559 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001560}
1561
1562/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001563type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001564//bitfield VkMemoryMapFlagBits {
1565//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001566
1567/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001568type VkFlags VkImageAspectFlags
1569bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001570 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1571 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1572 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1573 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1574}
1575
1576/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001577type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001578bitfield VkSparseMemoryBindFlagBits {
1579 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1580}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001581
1582/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001583type VkFlags VkSparseImageFormatFlags
1584bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001585 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1586 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.
1587 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001588}
1589
1590/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001591type VkFlags VkPipelineStageFlags
1592bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001593 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1594 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1595 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1596 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001597 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1598 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001599 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1600 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1601 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1602 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1603 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1604 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1605 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001606 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1607 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001608
Jesse Hall543a7ff2016-01-08 16:38:30 -08001609 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1610 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001611
Jesse Hallad250842017-03-10 18:35:38 -08001612 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001613 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001614}
1615
1616/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001617type VkFlags VkAttachmentDescriptionFlags
1618bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001619 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 -07001620}
1621
1622/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001623type VkFlags VkSubpassDescriptionFlags
1624bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001625 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1626 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1627 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001628}
1629
1630/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001631type VkFlags VkCommandPoolCreateFlags
1632bitfield VkCommandPoolCreateFlagBits {
1633 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1634 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001635}
1636
1637/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001638type VkFlags VkCommandPoolResetFlags
1639bitfield VkCommandPoolResetFlagBits {
1640 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001641}
1642
Jesse Hall3fbc8562015-11-29 22:10:52 -08001643type VkFlags VkCommandBufferResetFlags
1644bitfield VkCommandBufferResetFlagBits {
1645 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001646}
1647
Jesse Halld8bade02015-11-24 10:24:18 -08001648type VkFlags VkSampleCountFlags
1649bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001650 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1651 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1652 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1653 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1654 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1655 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1656 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1657}
1658
Jesse Halld8bade02015-11-24 10:24:18 -08001659type VkFlags VkStencilFaceFlags
1660bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001661 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1662 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001663 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001664}
1665
Jesse Halla6429252015-11-29 18:59:42 -08001666/// Instance creation flags
1667type VkFlags VkInstanceCreateFlags
1668//bitfield VkInstanceCreateFlagBits {
1669//}
1670
1671/// Device creation flags
1672type VkFlags VkDeviceCreateFlags
1673//bitfield VkDeviceCreateFlagBits {
1674//}
1675
1676/// Device queue creation flags
1677type VkFlags VkDeviceQueueCreateFlags
1678//bitfield VkDeviceQueueCreateFlagBits {
1679//}
1680
1681/// Query pool creation flags
1682type VkFlags VkQueryPoolCreateFlags
1683//bitfield VkQueryPoolCreateFlagBits {
1684//}
1685
1686/// Buffer view creation flags
1687type VkFlags VkBufferViewCreateFlags
1688//bitfield VkBufferViewCreateFlagBits {
1689//}
1690
1691/// Pipeline cache creation flags
1692type VkFlags VkPipelineCacheCreateFlags
1693//bitfield VkPipelineCacheCreateFlagBits {
1694//}
1695
1696/// Pipeline shader stage creation flags
1697type VkFlags VkPipelineShaderStageCreateFlags
1698//bitfield VkPipelineShaderStageCreateFlagBits {
1699//}
1700
1701/// Descriptor set layout creation flags
1702type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001703bitfield VkDescriptorSetLayoutCreateFlagBits {
1704 //@extension("VK_KHR_push_descriptor") // 81
1705 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1706}
Jesse Halla6429252015-11-29 18:59:42 -08001707
1708/// Pipeline vertex input state creation flags
1709type VkFlags VkPipelineVertexInputStateCreateFlags
1710//bitfield VkPipelineVertexInputStateCreateFlagBits {
1711//}
1712
1713/// Pipeline input assembly state creation flags
1714type VkFlags VkPipelineInputAssemblyStateCreateFlags
1715//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1716//}
1717
1718/// Tessellation state creation flags
1719type VkFlags VkPipelineTessellationStateCreateFlags
1720//bitfield VkPipelineTessellationStateCreateFlagBits {
1721//}
1722
1723/// Viewport state creation flags
1724type VkFlags VkPipelineViewportStateCreateFlags
1725//bitfield VkPipelineViewportStateCreateFlagBits {
1726//}
1727
Jesse Hall3fbc8562015-11-29 22:10:52 -08001728/// Rasterization state creation flags
1729type VkFlags VkPipelineRasterizationStateCreateFlags
1730//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001731//}
1732
1733/// Multisample state creation flags
1734type VkFlags VkPipelineMultisampleStateCreateFlags
1735//bitfield VkPipelineMultisampleStateCreateFlagBits {
1736//}
1737
1738/// Color blend state creation flags
1739type VkFlags VkPipelineColorBlendStateCreateFlags
1740//bitfield VkPipelineColorBlendStateCreateFlagBits {
1741//}
1742
1743/// Depth/stencil state creation flags
1744type VkFlags VkPipelineDepthStencilStateCreateFlags
1745//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1746//}
1747
1748/// Dynamic state creation flags
1749type VkFlags VkPipelineDynamicStateCreateFlags
1750//bitfield VkPipelineDynamicStateCreateFlagBits {
1751//}
1752
1753/// Pipeline layout creation flags
1754type VkFlags VkPipelineLayoutCreateFlags
1755//bitfield VkPipelineLayoutCreateFlagBits {
1756//}
1757
1758/// Sampler creation flags
1759type VkFlags VkSamplerCreateFlags
1760//bitfield VkSamplerCreateFlagBits {
1761//}
1762
1763/// Render pass creation flags
1764type VkFlags VkRenderPassCreateFlags
1765//bitfield VkRenderPassCreateFlagBits {
1766//}
1767
1768/// Framebuffer creation flags
1769type VkFlags VkFramebufferCreateFlags
1770//bitfield VkFramebufferCreateFlagBits {
1771//}
1772
Jesse Halldc6d36c2015-11-29 19:12:15 -08001773/// Dependency flags
1774type VkFlags VkDependencyFlags
1775bitfield VkDependencyFlagBits {
1776 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001777
1778 //@extension("VK_KHX_multiview") // 54
1779 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1780
1781 //@extension("VK_KHX_device_group") // 61
1782 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001783}
1784
Jesse Hallc7467b72015-11-29 21:05:26 -08001785/// Cull mode flags
1786type VkFlags VkCullModeFlags
1787bitfield VkCullModeFlagBits {
1788 VK_CULL_MODE_NONE = 0x00000000,
1789 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1790 VK_CULL_MODE_BACK_BIT = 0x00000002,
1791 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1792}
1793
Jesse Hallad250842017-03-10 18:35:38 -08001794@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001795type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001796@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001797bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001798 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001799 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1800 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1801 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1802 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1803 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1804 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1805 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1806 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001807}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001808
Jesse Hallad250842017-03-10 18:35:38 -08001809@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001810type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001811@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001812bitfield VkCompositeAlphaFlagBitsKHR {
1813 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1814 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1815 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1816 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1817}
1818
Jesse Hallad250842017-03-10 18:35:38 -08001819@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001820type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001821@extension("VK_KHR_swapchain") // 2
1822bitfield VkSwapchainCreateFlagBitsKHR {
1823 //@extension("VK_KHX_device_group") // 61
1824 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1825}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001826
Jesse Hallad250842017-03-10 18:35:38 -08001827@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001828type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001829@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001830bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001831 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1832 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1833 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1834 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001835}
1836
Jesse Hallad250842017-03-10 18:35:38 -08001837@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001838type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001839//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001840//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1841//}
1842
Jesse Hallad250842017-03-10 18:35:38 -08001843@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001844type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001845//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001846//bitfield VkDisplayModeCreateFlagBitsKHR {
1847//}
1848
Jesse Hallad250842017-03-10 18:35:38 -08001849@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001850type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001851//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001852//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1853//}
1854
Jesse Hallad250842017-03-10 18:35:38 -08001855@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001856type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001857//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001858//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1859//}
1860
Jesse Hallad250842017-03-10 18:35:38 -08001861@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001862type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001863//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001864//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1865//}
1866
Jesse Hallad250842017-03-10 18:35:38 -08001867@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001868type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001869//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001870//bitfield VkMirSurfaceCreateFlagBitsKHR {
1871//}
1872
Jesse Hallad250842017-03-10 18:35:38 -08001873@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001874type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001875//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001876//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1877//}
1878
Jesse Hallad250842017-03-10 18:35:38 -08001879@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001880type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001881//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001882//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1883//}
1884
Jesse Hallad250842017-03-10 18:35:38 -08001885@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001886type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08001887@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001888bitfield VkSwapchainImageUsageFlagBitsANDROID {
1889 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
1890}
1891
Jesse Hallad250842017-03-10 18:35:38 -08001892@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001893type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08001894@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001895bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001896 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1897 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1898 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001899 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1900 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1901}
1902
Jesse Hallad250842017-03-10 18:35:38 -08001903@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001904type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001905@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001906bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001907 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1908 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1909 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1910 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13001911}
1912
Jesse Hallad250842017-03-10 18:35:38 -08001913@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001914type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001915@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001916bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001917 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1918 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1919 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13001920}
1921
Jesse Hallad250842017-03-10 18:35:38 -08001922@extension("VK_KHX_device_group") // 61
1923type VkFlags VkPeerMemoryFeatureFlagsKHX
1924@extension("VK_KHX_device_group") // 61
1925bitfield VkPeerMemoryFeatureFlagBitsKHX {
1926 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1927 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1928 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1929 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1930}
1931
1932@extension("VK_KHX_device_group") // 61
1933type VkFlags VkMemoryAllocateFlagsKHX
1934@extension("VK_KHX_device_group") // 61
1935bitfield VkMemoryAllocateFlagBitsKHX {
1936 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1937}
1938
1939@extension("VK_KHX_device_group") // 61
1940type VkFlags VkDeviceGroupPresentModeFlagsKHX
1941@extension("VK_KHX_device_group") // 61
1942bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1943 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1944 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1945 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1946 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1947}
1948
1949@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001950type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08001951//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001952//bitfield VkViSurfaceCreateFlagBitsNN {
1953//}
1954
Jesse Hallad250842017-03-10 18:35:38 -08001955@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001956type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001957//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001958//bitfield VkCommandPoolTrimFlagBitsKHR {
1959//}
1960
Jesse Hallad250842017-03-10 18:35:38 -08001961@extension("VK_KHX_external_memory_capabilities") // 72
1962type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1963@extension("VK_KHX_external_memory_capabilities") // 72
1964bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1965 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1966 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1967 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1968 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1969 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1970 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1971 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1972}
1973
1974@extension("VK_KHX_external_memory_capabilities") // 72
1975type VkFlags VkExternalMemoryFeatureFlagsKHX
1976@extension("VK_KHX_external_memory_capabilities") // 72
1977bitfield VkExternalMemoryFeatureFlagBitsKHX {
1978 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1979 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1980 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1981}
1982
1983@extension("VK_KHX_external_semaphore_capabilities") // 77
1984type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
1985@extension("VK_KHX_external_semaphore_capabilities") // 77
1986bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
1987 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
1988 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
1989 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
1990 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
1991 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
1992}
1993
1994@extension("VK_KHX_external_semaphore_capabilities") // 77
1995type VkFlags VkExternalSemaphoreFeatureFlagsKHX
1996@extension("VK_KHX_external_semaphore_capabilities") // 77
1997bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
1998 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
1999 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
2000}
2001
2002@extension("VK_KHR_descriptor_update_template") // 86
2003type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2004//@extension("VK_KHR_descriptor_update_template") // 86
2005//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2006//}
2007
2008@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002009type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002010@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002011bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002012 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2013 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2014 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2015 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002016}
2017
Jesse Hallad250842017-03-10 18:35:38 -08002018@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002019type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002020@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002021bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002022 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2023 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002024}
2025
Jesse Hallad250842017-03-10 18:35:38 -08002026@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002027type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002028@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002029bitfield VkSurfaceCounterFlagBitsEXT {
2030 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2031}
2032
Jesse Hallad250842017-03-10 18:35:38 -08002033@extension("VK_NV_viewport_swizzle") // 99
2034type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2035//@extension("VK_NV_viewport_swizzle") // 99
2036//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2037//}
2038
2039@extension("VK_EXT_discard_rectangles") // 100
2040type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2041//@extension("VK_EXT_discard_rectangles") // 100
2042//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2043//}
2044
2045@extension("VK_MVK_ios_surface") // 123
2046type VkFlags VkIOSSurfaceCreateFlagsMVK
2047//@extension("VK_MVK_ios_surface") // 123
2048//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2049//}
2050
2051@extension("VK_MVK_macos_surface") // 124
2052type VkFlags VkMacOSSurfaceCreateFlagsMVK
2053//@extension("VK_MVK_macos_surface") // 124
2054//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2055//}
2056
Jesse Halld27f6aa2015-08-15 17:58:48 -07002057//////////////////
2058// Structures //
2059//////////////////
2060
2061class VkOffset2D {
2062 s32 x
2063 s32 y
2064}
2065
2066class VkOffset3D {
2067 s32 x
2068 s32 y
2069 s32 z
2070}
2071
2072class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002073 u32 width
2074 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002075}
2076
2077class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002078 u32 width
2079 u32 height
2080 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002081}
2082
2083class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002084 f32 x
2085 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002086 f32 width
2087 f32 height
2088 f32 minDepth
2089 f32 maxDepth
2090}
2091
2092class VkRect2D {
2093 VkOffset2D offset
2094 VkExtent2D extent
2095}
2096
Jesse Halla15a4bf2015-11-19 22:48:02 -08002097class VkClearRect {
2098 VkRect2D rect
2099 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002100 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002101}
2102
Jesse Hall65ab5522015-11-30 00:07:16 -08002103class VkComponentMapping {
2104 VkComponentSwizzle r
2105 VkComponentSwizzle g
2106 VkComponentSwizzle b
2107 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002108}
2109
2110class VkPhysicalDeviceProperties {
2111 u32 apiVersion
2112 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002113 u32 vendorID
2114 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002115 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002116 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2117 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002118 VkPhysicalDeviceLimits limits
2119 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002120}
2121
2122class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002123 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002124 u32 specVersion /// version of the extension specification implemented
2125}
2126
2127class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002128 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002129 u32 specVersion /// version of the layer specification implemented
2130 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002131 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002132}
2133
Jesse Halla366a512015-11-19 22:30:07 -08002134class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002135 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2136 const void* pNext /// Next structure in chain
2137 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002138 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002139 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002140 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002141 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002142 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002143 const VkSemaphore* pSignalSemaphores
2144}
2145
Jesse Halld27f6aa2015-08-15 17:58:48 -07002146class VkApplicationInfo {
2147 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2148 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002149 const char* pApplicationName
2150 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002151 const char* pEngineName
2152 u32 engineVersion
2153 u32 apiVersion
2154}
2155
Jesse Hall3fbc8562015-11-29 22:10:52 -08002156class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002157 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002158 PFN_vkAllocationFunction pfnAllocation
2159 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002160 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002161 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002162 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002163}
2164
2165class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002166 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2167 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002168 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002169 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002170 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002171 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002172}
2173
2174class VkDeviceCreateInfo {
2175 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2176 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002177 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002178 u32 queueCreateInfoCount
2179 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002180 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002181 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002182 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002183 const char* const* ppEnabledExtensionNames
2184 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002185}
2186
2187class VkInstanceCreateInfo {
2188 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2189 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002190 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002191 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002192 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002193 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002194 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002195 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2196}
2197
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002198class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002199 VkQueueFlags queueFlags /// Queue flags
2200 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002201 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002202 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002203}
2204
2205class VkPhysicalDeviceMemoryProperties {
2206 u32 memoryTypeCount
2207 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2208 u32 memoryHeapCount
2209 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2210}
2211
Jesse Hall3fbc8562015-11-29 22:10:52 -08002212class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002213 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002214 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002215 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002216 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2217}
2218
2219class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002220 VkDeviceSize size /// Specified in bytes
2221 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002222 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2223}
2224
2225class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002226 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002227 VkExtent3D imageGranularity
2228 VkSparseImageFormatFlags flags
2229}
2230
2231class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002232 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002233 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002234 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2235 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2236 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002237}
2238
2239class VkMemoryType {
2240 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2241 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2242}
2243
2244class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002245 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002246 VkMemoryHeapFlags flags /// Flags for the heap
2247}
2248
2249class VkMappedMemoryRange {
2250 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2251 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002252 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002253 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2254 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002255}
2256
2257class VkFormatProperties {
2258 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2259 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002260 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002261}
2262
2263class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002264 VkExtent3D maxExtent /// max image dimensions for this resource type
2265 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002266 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002267 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2268 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2269}
2270
Jesse Halla15a4bf2015-11-19 22:48:02 -08002271class VkDescriptorImageInfo {
2272 VkSampler sampler
2273 VkImageView imageView
2274 VkImageLayout imageLayout
2275}
2276
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002277class VkDescriptorBufferInfo {
2278 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2279 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2280 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002281}
2282
Jesse Halld27f6aa2015-08-15 17:58:48 -07002283class VkWriteDescriptorSet {
2284 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2285 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002286 VkDescriptorSet dstSet /// Destination descriptor set
2287 u32 dstBinding /// Binding within the destination descriptor set to write
2288 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002289 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002290 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 -08002291 const VkDescriptorImageInfo* pImageInfo
2292 const VkDescriptorBufferInfo* pBufferInfo
2293 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002294}
2295
2296class VkCopyDescriptorSet {
2297 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2298 const void* pNext /// Pointer to next structure
2299 VkDescriptorSet srcSet /// Source descriptor set
2300 u32 srcBinding /// Binding within the source descriptor set to copy from
2301 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002302 VkDescriptorSet dstSet /// Destination descriptor set
2303 u32 dstBinding /// Binding within the destination descriptor set to copy to
2304 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002305 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002306}
2307
2308class VkBufferCreateInfo {
2309 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2310 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002311 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002312 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002313 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002314 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002315 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002316 const u32* pQueueFamilyIndices
2317}
2318
2319class VkBufferViewCreateInfo {
2320 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2321 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002322 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002323 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002324 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002325 VkDeviceSize offset /// Specified in bytes
2326 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002327}
2328
2329class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002330 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002331 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002332 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002333}
2334
2335class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002336 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002337 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002338 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002339 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002340 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002341}
2342
2343class VkMemoryBarrier {
2344 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2345 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002346 VkAccessFlags srcAccessMask
2347 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002348}
2349
2350class VkBufferMemoryBarrier {
2351 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2352 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002353 VkAccessFlags srcAccessMask
2354 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002355 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002356 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002357 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002358 VkDeviceSize offset /// Offset within the buffer to sync
2359 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002360}
2361
2362class VkImageMemoryBarrier {
2363 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2364 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002365 VkAccessFlags srcAccessMask
2366 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002367 VkImageLayout oldLayout /// Current layout of the image
2368 VkImageLayout newLayout /// New layout to transition the image to
2369 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002370 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002371 VkImage image /// Image to sync
2372 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2373}
2374
2375class VkImageCreateInfo {
2376 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2377 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002378 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002379 VkImageType imageType
2380 VkFormat format
2381 VkExtent3D extent
2382 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002383 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002384 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002385 VkImageTiling tiling
2386 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002387 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002388 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002389 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002390 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002391}
2392
2393class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002394 VkDeviceSize offset /// Specified in bytes
2395 VkDeviceSize size /// Specified in bytes
2396 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002397 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002398 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002399}
2400
2401class VkImageViewCreateInfo {
2402 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2403 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002404 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002405 VkImage image
2406 VkImageViewType viewType
2407 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002408 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002409 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002410}
2411
2412class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002413 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002414 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002415 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002416}
2417
Jesse Halla6429252015-11-29 18:59:42 -08002418class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002419 VkDeviceSize resourceOffset /// Specified in bytes
2420 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002421 VkDeviceMemory memory
2422 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002423 VkSparseMemoryBindFlags flags
2424}
2425
Jesse Halla6429252015-11-29 18:59:42 -08002426class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002427 VkImageSubresource subresource
2428 VkOffset3D offset
2429 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002430 VkDeviceMemory memory
2431 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002432 VkSparseMemoryBindFlags flags
2433}
2434
Jesse Halla6429252015-11-29 18:59:42 -08002435class VkSparseBufferMemoryBindInfo {
2436 VkBuffer buffer
2437 u32 bindCount
2438 const VkSparseMemoryBind* pBinds
2439}
2440
2441class VkSparseImageOpaqueMemoryBindInfo {
2442 VkImage image
2443 u32 bindCount
2444 const VkSparseMemoryBind* pBinds
2445}
2446
2447class VkSparseImageMemoryBindInfo {
2448 VkImage image
2449 u32 bindCount
2450 const VkSparseMemoryBind* pBinds
2451}
2452
2453class VkBindSparseInfo {
2454 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2455 const void* pNext
2456 u32 waitSemaphoreCount
2457 const VkSemaphore* pWaitSemaphores
2458 u32 numBufferBinds
2459 const VkSparseBufferMemoryBindInfo* pBufferBinds
2460 u32 numImageOpaqueBinds
2461 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2462 u32 numImageBinds
2463 const VkSparseImageMemoryBindInfo* pImageBinds
2464 u32 signalSemaphoreCount
2465 const VkSemaphore* pSignalSemaphores
2466}
2467
Jesse Hall65ab5522015-11-30 00:07:16 -08002468class VkImageSubresourceLayers {
2469 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002470 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002471 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002472 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002473}
2474
Jesse Halld27f6aa2015-08-15 17:58:48 -07002475class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002476 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002477 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002478 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002479 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002480 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2481}
2482
2483class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002484 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002485 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002486 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002487 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002488}
2489
2490class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002491 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002492 u32 bufferRowLength /// Specified in texels
2493 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002494 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002495 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2496 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2497}
2498
2499class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002500 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002501 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002502 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002503 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002504 VkExtent3D extent
2505}
2506
2507class VkShaderModuleCreateInfo {
2508 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2509 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002510 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002511 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002512 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002513}
2514
Jesse Halld27f6aa2015-08-15 17:58:48 -07002515class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002516 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002517 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002518 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002519 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2520 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2521}
2522
2523class VkDescriptorSetLayoutCreateInfo {
2524 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2525 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002526 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002527 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002528 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002529}
2530
Jesse Hall65ab5522015-11-30 00:07:16 -08002531class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002532 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002533 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002534}
2535
2536class VkDescriptorPoolCreateInfo {
2537 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2538 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002539 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002540 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002541 u32 poolSizeCount
2542 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002543}
2544
Jesse Hall3fbc8562015-11-29 22:10:52 -08002545class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002546 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002547 const void* pNext /// Pointer to next structure
2548 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002549 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002550 const VkDescriptorSetLayout* pSetLayouts
2551}
2552
Jesse Halld27f6aa2015-08-15 17:58:48 -07002553class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002554 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002555 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002556 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002557}
2558
2559class VkSpecializationInfo {
2560 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002561 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002562 platform.size_t dataSize /// Size in bytes of pData
2563 const void* pData /// Pointer to SpecConstant data
2564}
2565
2566class VkPipelineShaderStageCreateInfo {
2567 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2568 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002569 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002570 VkShaderStageFlagBits stage
2571 VkShaderModule module
2572 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002573 const VkSpecializationInfo* pSpecializationInfo
2574}
2575
2576class VkComputePipelineCreateInfo {
2577 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2578 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002579 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002580 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002581 VkPipelineLayout layout /// Interface layout of the pipeline
2582 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
2583 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
2584}
2585
2586class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002587 u32 binding /// Vertex buffer binding id
2588 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002589 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002590}
2591
2592class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002593 u32 location /// location of the shader vertex attrib
2594 u32 binding /// Vertex buffer binding id
2595 VkFormat format /// format of source data
2596 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002597}
2598
2599class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002600 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2601 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002602 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002603 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002604 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002605 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002606 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2607}
2608
2609class VkPipelineInputAssemblyStateCreateInfo {
2610 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2611 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002612 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002613 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002614 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002615}
2616
2617class VkPipelineTessellationStateCreateInfo {
2618 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2619 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002620 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002621 u32 patchControlPoints
2622}
2623
2624class VkPipelineViewportStateCreateInfo {
2625 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2626 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002627 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002628 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002629 const VkViewport* pViewports
2630 u32 scissorCount
2631 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002632}
2633
Jesse Hall3fbc8562015-11-29 22:10:52 -08002634class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002635 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002636 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002637 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002638 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002639 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002640 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002641 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002642 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002643 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002644 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002645 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002646 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002647 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002648}
2649
2650class VkPipelineMultisampleStateCreateInfo {
2651 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2652 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002653 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002654 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002655 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002656 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002657 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002658 VkBool32 alphaToCoverageEnable
2659 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002660}
2661
2662class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002663 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002664 VkBlendFactor srcColorBlendFactor
2665 VkBlendFactor dstColorBlendFactor
2666 VkBlendOp colorBlendOp
2667 VkBlendFactor srcAlphaBlendFactor
2668 VkBlendFactor dstAlphaBlendFactor
2669 VkBlendOp alphaBlendOp
2670 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002671}
2672
2673class VkPipelineColorBlendStateCreateInfo {
2674 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2675 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002676 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002677 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002678 VkLogicOp logicOp
2679 u32 attachmentCount /// # of pAttachments
2680 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002681 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002682}
2683
2684class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002685 VkStencilOp failOp
2686 VkStencilOp passOp
2687 VkStencilOp depthFailOp
2688 VkCompareOp compareOp
2689 u32 compareMask
2690 u32 writeMask
2691 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002692}
2693
2694class VkPipelineDepthStencilStateCreateInfo {
2695 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2696 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002697 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002698 VkBool32 depthTestEnable
2699 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002700 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002701 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2702 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002703 VkStencilOpState front
2704 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002705 f32 minDepthBounds
2706 f32 maxDepthBounds
2707}
2708
2709class VkPipelineDynamicStateCreateInfo {
2710 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2711 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002712 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002713 u32 dynamicStateCount
2714 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002715}
2716
2717class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002718 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2719 const void* pNext /// Pointer to next structure
2720 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002721 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002722 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002723 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2724 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2725 const VkPipelineTessellationStateCreateInfo* pTessellationState
2726 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002727 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002728 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2729 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2730 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002731 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002732 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002733 VkRenderPass renderPass
2734 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002735 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
2736 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 -07002737}
2738
2739class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002740 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2741 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002742 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002743 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2744 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002745}
2746
2747class VkPushConstantRange {
2748 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002749 u32 offset /// Start of the range, in bytes
2750 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002751}
2752
2753class VkPipelineLayoutCreateInfo {
2754 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2755 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002756 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002757 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002758 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2759 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2760 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2761}
2762
2763class VkSamplerCreateInfo {
2764 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2765 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002766 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002767 VkFilter magFilter /// Filter mode for magnification
2768 VkFilter minFilter /// Filter mode for minifiation
2769 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2770 VkSamplerAddressMode addressModeU
2771 VkSamplerAddressMode addressModeV
2772 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002773 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002774 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002775 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002776 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002777 VkCompareOp compareOp
2778 f32 minLod
2779 f32 maxLod
2780 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002781 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002782}
2783
Jesse Hall3fbc8562015-11-29 22:10:52 -08002784class VkCommandPoolCreateInfo {
2785 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002786 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002787 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002788 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002789}
2790
Jesse Hall3fbc8562015-11-29 22:10:52 -08002791class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002792 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002793 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002794 VkCommandPool commandPool
2795 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002796 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002797}
2798
Jesse Hall3dd678a2016-01-08 21:52:01 -08002799class VkCommandBufferInheritanceInfo {
2800 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002801 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002802 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002803 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002804 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002805 VkBool32 occlusionQueryEnable
2806 VkQueryControlFlags queryFlags
2807 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002808}
2809
Jesse Hall3dd678a2016-01-08 21:52:01 -08002810class VkCommandBufferBeginInfo {
2811 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2812 const void* pNext /// Pointer to next structure
2813 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2814 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2815}
2816
Jesse Halld27f6aa2015-08-15 17:58:48 -07002817class VkRenderPassBeginInfo {
2818 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2819 const void* pNext /// Pointer to next structure
2820 VkRenderPass renderPass
2821 VkFramebuffer framebuffer
2822 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002823 u32 clearValueCount
2824 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002825}
2826
2827@union
2828/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2829class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002830 f32[4] float32
2831 s32[4] int32
2832 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002833}
2834
2835class VkClearDepthStencilValue {
2836 f32 depth
2837 u32 stencil
2838}
2839
2840@union
2841/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2842class VkClearValue {
2843 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002844 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002845}
2846
Jesse Hallae38f732015-11-19 21:32:50 -08002847class VkClearAttachment {
2848 VkImageAspectFlags aspectMask
2849 u32 colorAttachment
2850 VkClearValue clearValue
2851}
2852
Jesse Halld27f6aa2015-08-15 17:58:48 -07002853class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002854 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002855 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002856 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002857 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2858 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2859 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2860 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2861 VkImageLayout initialLayout
2862 VkImageLayout finalLayout
2863}
2864
2865class VkAttachmentReference {
2866 u32 attachment
2867 VkImageLayout layout
2868}
2869
2870class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002871 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002872 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002873 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002874 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002875 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002876 const VkAttachmentReference* pColorAttachments
2877 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002878 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002879 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002880 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002881}
2882
2883class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002884 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002885 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002886 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002887 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002888 VkAccessFlags srcAccessMask
2889 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002890 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002891}
2892
2893class VkRenderPassCreateInfo {
2894 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2895 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002896 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002897 u32 attachmentCount
2898 const VkAttachmentDescription* pAttachments
2899 u32 subpassCount
2900 const VkSubpassDescription* pSubpasses
2901 u32 dependencyCount
2902 const VkSubpassDependency* pDependencies
2903}
2904
2905class VkEventCreateInfo {
2906 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2907 const void* pNext /// Pointer to next structure
2908 VkEventCreateFlags flags /// Event creation flags
2909}
2910
2911class VkFenceCreateInfo {
2912 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2913 const void* pNext /// Pointer to next structure
2914 VkFenceCreateFlags flags /// Fence creation flags
2915}
2916
2917class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002918 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2919 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2920 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2921 VkBool32 independentBlend /// blending operations are controlled per-attachment
2922 VkBool32 geometryShader /// geometry stage
2923 VkBool32 tessellationShader /// tessellation control and evaluation stage
2924 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002925 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002926 VkBool32 logicOp /// logic operations
2927 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002928 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002929 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002930 VkBool32 depthBiasClamp /// depth bias clamping
2931 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2932 VkBool32 depthBounds /// depth bounds test
2933 VkBool32 wideLines /// lines with width greater than 1
2934 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002935 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2936 VkBool32 multiViewport
2937 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002938 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2939 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2940 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002941 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002942 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002943 VkBool32 vertexPipelineStoresAndAtomics
2944 VkBool32 fragmentStoresAndAtomics
2945 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002946 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2947 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2948 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002949 VkBool32 shaderStorageImageReadWithoutFormat
2950 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002951 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2952 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2953 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2954 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2955 VkBool32 shaderClipDistance /// clip distance in shaders
2956 VkBool32 shaderCullDistance /// cull distance in shaders
2957 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2958 VkBool32 shaderInt64 /// 64-bit integers in shaders
2959 VkBool32 shaderInt16 /// 16-bit integers in shaders
2960 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002961 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002962 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2963 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2964 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2965 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2966 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2967 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2968 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2969 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2970 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002971 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002972 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002973}
2974
2975class VkPhysicalDeviceLimits {
2976 /// resource maximum sizes
2977 u32 maxImageDimension1D /// max 1D image dimension
2978 u32 maxImageDimension2D /// max 2D image dimension
2979 u32 maxImageDimension3D /// max 3D image dimension
2980 u32 maxImageDimensionCube /// max cubemap image dimension
2981 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002982 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002983 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
2984 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002985 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
2986 /// memory limits
2987 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08002988 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002989 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
2990 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002991 /// descriptor set limits
2992 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002993 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
2994 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
2995 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
2996 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
2997 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002998 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08002999 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003000 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3001 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003002 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003003 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003004 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003005 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3006 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003007 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003008 /// vertex stage limits
3009 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003010 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003011 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3012 u32 maxVertexInputBindingStride /// max vertex input binding stride
3013 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3014 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003015 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003016 u32 maxTessellationPatchSize /// max patch size (vertices)
3017 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3018 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3019 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3020 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3021 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3022 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003023 /// geometry stage limits
3024 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3025 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3026 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3027 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3028 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3029 /// fragment stage limits
3030 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003031 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003032 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003033 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3034 /// compute stage limits
3035 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3036 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3037 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3038 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3039
3040 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3041 u32 subTexelPrecisionBits /// num bits of subtexel precision
3042 u32 mipmapPrecisionBits /// num bits of mipmap precision
3043
3044 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003045 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003046
3047 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3048 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3049
3050 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003051 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3052 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3053 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3054
Jesse Halldc6d36c2015-11-29 19:12:15 -08003055 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3056 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3057 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3058 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003059
Jesse Hallfbf97b02015-11-20 14:17:03 -08003060 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003061 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003062 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003063 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3064 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3065 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3066 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3067
3068 u32 maxFramebufferWidth /// max width for a framebuffer
3069 u32 maxFramebufferHeight /// max height for a framebuffer
3070 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003071 VkSampleCountFlags framebufferColorSampleCounts
3072 VkSampleCountFlags framebufferDepthSampleCounts
3073 VkSampleCountFlags framebufferStencilSampleCounts
3074 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003075 u32 maxColorAttachments /// max num of framebuffer color attachments
3076
Jesse Hall091ed9e2015-11-30 00:55:29 -08003077 VkSampleCountFlags sampledImageColorSampleCounts
3078 VkSampleCountFlags sampledImageIntegerSampleCounts
3079 VkSampleCountFlags sampledImageDepthSampleCounts
3080 VkSampleCountFlags sampledImageStencilSampleCounts
3081 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003082 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003083 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003084
Jesse Halla9bb62b2015-11-21 19:31:56 -08003085 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003086
3087 u32 maxClipDistances /// max number of clip distances
3088 u32 maxCullDistances /// max number of cull distances
3089 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3090
Jesse Hallfbf97b02015-11-20 14:17:03 -08003091 u32 discreteQueuePriorities
3092
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003093 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3094 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003095 f32 pointSizeGranularity /// granularity of supported point sizes
3096 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003097 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003098 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003099
Jesse Hall65ab5522015-11-30 00:07:16 -08003100 VkDeviceSize optimalBufferCopyOffsetAlignment
3101 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003102 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003103}
3104
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003105class VkPhysicalDeviceSparseProperties {
3106 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 -08003107 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 -07003108 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3109 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 -07003110 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
3111}
3112
Jesse Halld27f6aa2015-08-15 17:58:48 -07003113class VkSemaphoreCreateInfo {
3114 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3115 const void* pNext /// Pointer to next structure
3116 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3117}
3118
3119class VkQueryPoolCreateInfo {
3120 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3121 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003122 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003123 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003124 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003125 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3126}
3127
3128class VkFramebufferCreateInfo {
3129 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3130 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003131 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003132 VkRenderPass renderPass
3133 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003134 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003135 u32 width
3136 u32 height
3137 u32 layers
3138}
3139
Jesse Hall3fbc8562015-11-29 22:10:52 -08003140class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003141 u32 vertexCount
3142 u32 instanceCount
3143 u32 firstVertex
3144 u32 firstInstance
3145}
3146
Jesse Hall3fbc8562015-11-29 22:10:52 -08003147class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003148 u32 indexCount
3149 u32 instanceCount
3150 u32 firstIndex
3151 s32 vertexOffset
3152 u32 firstInstance
3153}
3154
Jesse Hall3fbc8562015-11-29 22:10:52 -08003155class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003156 u32 x
3157 u32 y
3158 u32 z
3159}
3160
Jesse Hallad250842017-03-10 18:35:38 -08003161@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003162class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003163 u32 minImageCount
3164 u32 maxImageCount
3165 VkExtent2D currentExtent
3166 VkExtent2D minImageExtent
3167 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003168 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003169 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003170 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003171 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003172 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003173}
3174
Jesse Hallad250842017-03-10 18:35:38 -08003175@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003176class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003177 VkFormat format
3178 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003179}
3180
Jesse Hallad250842017-03-10 18:35:38 -08003181@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003182class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003183 VkStructureType sType
3184 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003185 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003186 VkSurfaceKHR surface
3187 u32 minImageCount
3188 VkFormat imageFormat
3189 VkColorSpaceKHR imageColorSpace
3190 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003191 u32 imageArrayLayers
3192 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003193 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003194 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003195 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003196 VkSurfaceTransformFlagBitsKHR preTransform
3197 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003198 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003199 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003200 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003201}
3202
Jesse Hallad250842017-03-10 18:35:38 -08003203@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003204class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003205 VkStructureType sType
3206 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003207 u32 waitSemaphoreCount
3208 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003209 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003210 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003211 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003212 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003213}
3214
Jesse Hallad250842017-03-10 18:35:38 -08003215@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003216class VkDisplayPropertiesKHR {
3217 VkDisplayKHR display
3218 const char* displayName
3219 VkExtent2D physicalDimensions
3220 VkExtent2D physicalResolution
3221 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003222 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003223 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003224}
3225
Jesse Hallad250842017-03-10 18:35:38 -08003226@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003227class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003228 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003229 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003230}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003231
Jesse Hallad250842017-03-10 18:35:38 -08003232@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003233class VkDisplayModePropertiesKHR {
3234 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003235 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003236}
3237
Jesse Hallad250842017-03-10 18:35:38 -08003238@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003239class VkDisplayModeCreateInfoKHR {
3240 VkStructureType sType
3241 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003242 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003243 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003244}
3245
Jesse Hallad250842017-03-10 18:35:38 -08003246@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003247class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003248 VkDisplayKHR currentDisplay
3249 u32 currentStackIndex
3250}
3251
Jesse Hallad250842017-03-10 18:35:38 -08003252@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003253class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003254 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3255 VkOffset2D minSrcPosition
3256 VkOffset2D maxSrcPosition
3257 VkExtent2D minSrcExtent
3258 VkExtent2D maxSrcExtent
3259 VkOffset2D minDstPosition
3260 VkOffset2D maxDstPosition
3261 VkExtent2D minDstExtent
3262 VkExtent2D maxDstExtent
3263}
3264
Jesse Hallad250842017-03-10 18:35:38 -08003265@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003266class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003267 VkStructureType sType
3268 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003269 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003270 VkDisplayModeKHR displayMode
3271 u32 planeIndex
3272 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003273 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003274 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003275 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3276 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003277}
3278
Jesse Hallad250842017-03-10 18:35:38 -08003279@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003280class VkDisplayPresentInfoKHR {
3281 VkStructureType sType
3282 const void* pNext
3283 VkRect2D srcRect
3284 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003285 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003286}
3287
Jesse Hallad250842017-03-10 18:35:38 -08003288@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003289class VkXlibSurfaceCreateInfoKHR {
3290 VkStructureType sType
3291 const void* pNext
3292 VkXlibSurfaceCreateFlagsKHR flags
3293 platform.Display* dpy
3294 platform.Window window
3295}
3296
Jesse Hallad250842017-03-10 18:35:38 -08003297@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003298class VkXcbSurfaceCreateInfoKHR {
3299 VkStructureType sType
3300 const void* pNext
3301 VkXcbSurfaceCreateFlagsKHR flags
3302 platform.xcb_connection_t* connection
3303 platform.xcb_window_t window
3304}
3305
Jesse Hallad250842017-03-10 18:35:38 -08003306@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003307class VkWaylandSurfaceCreateInfoKHR {
3308 VkStructureType sType
3309 const void* pNext
3310 VkWaylandSurfaceCreateFlagsKHR flags
3311 platform.wl_display* display
3312 platform.wl_surface* surface
3313}
3314
Jesse Hallad250842017-03-10 18:35:38 -08003315@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003316class VkMirSurfaceCreateInfoKHR {
3317 VkStructureType sType
3318 const void* pNext
3319 VkMirSurfaceCreateFlagsKHR flags
3320 platform.MirConnection* connection
3321 platform.MirSurface* mirSurface
3322}
3323
Jesse Hallad250842017-03-10 18:35:38 -08003324@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003325class VkAndroidSurfaceCreateInfoKHR {
3326 VkStructureType sType
3327 const void* pNext
3328 VkAndroidSurfaceCreateFlagsKHR flags
3329 platform.ANativeWindow* window
3330}
3331
Jesse Hallad250842017-03-10 18:35:38 -08003332@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003333class VkWin32SurfaceCreateInfoKHR {
3334 VkStructureType sType
3335 const void* pNext
3336 VkWin32SurfaceCreateFlagsKHR flags
3337 platform.HINSTANCE hinstance
3338 platform.HWND hwnd
3339}
3340
Jesse Hallad250842017-03-10 18:35:38 -08003341@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003342@internal class Gralloc1Usage {
3343 u64 consumer
3344 u64 producer
3345}
3346
Jesse Hallad250842017-03-10 18:35:38 -08003347@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003348class VkNativeBufferANDROID {
3349 VkStructureType sType
3350 const void* pNext
3351 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003352 s32 stride
3353 s32 format
3354 s32 usage
3355 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003356}
3357
Jesse Hallad250842017-03-10 18:35:38 -08003358@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003359class VkSwapchainImageCreateInfoANDROID {
3360 VkStructureType sType
3361 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003362 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003363}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003364
Jesse Hallad250842017-03-10 18:35:38 -08003365@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003366class VkPhysicalDevicePresentationPropertiesANDROID {
3367 VkStructureType sType
3368 void* pNext
3369 VkBool32 sharedImage
3370}
3371
Jesse Hallad250842017-03-10 18:35:38 -08003372@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003373class VkDebugReportCallbackCreateInfoEXT {
3374 VkStructureType sType
3375 const void* pNext
3376 VkDebugReportFlagsEXT flags
3377 PFN_vkDebugReportCallbackEXT pfnCallback
3378 void* pUserData
3379}
3380
Jesse Hallad250842017-03-10 18:35:38 -08003381@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003382class VkPipelineRasterizationStateRasterizationOrderAMD {
3383 VkStructureType sType
3384 const void* pNext
3385 VkRasterizationOrderAMD rasterizationOrder
3386}
3387
Jesse Hallad250842017-03-10 18:35:38 -08003388@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003389class VkDebugMarkerObjectNameInfoEXT {
3390 VkStructureType sType
3391 const void* pNext
3392 VkDebugReportObjectTypeEXT objectType
3393 u64 object
3394 const char* pObjectName
3395}
3396
Jesse Hallad250842017-03-10 18:35:38 -08003397@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003398class VkDebugMarkerObjectTagInfoEXT {
3399 VkStructureType sType
3400 const void* pNext
3401 VkDebugReportObjectTypeEXT objectType
3402 u64 object
3403 u64 tagName
3404 platform.size_t tagSize
3405 const void* pTag
3406}
3407
Jesse Hallad250842017-03-10 18:35:38 -08003408@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003409class VkDebugMarkerMarkerInfoEXT {
3410 VkStructureType sType
3411 const void* pNext
3412 const char* pMarkerName
3413 f32[4] color
3414}
3415
Jesse Hallad250842017-03-10 18:35:38 -08003416@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003417class VkDedicatedAllocationImageCreateInfoNV {
3418 VkStructureType sType
3419 const void* pNext
3420 VkBool32 dedicatedAllocation
3421}
3422
Jesse Hallad250842017-03-10 18:35:38 -08003423@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003424class VkDedicatedAllocationBufferCreateInfoNV {
3425 VkStructureType sType
3426 const void* pNext
3427 VkBool32 dedicatedAllocation
3428}
3429
Jesse Hallad250842017-03-10 18:35:38 -08003430@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003431class VkDedicatedAllocationMemoryAllocateInfoNV {
3432 VkStructureType sType
3433 const void* pNext
3434 VkImage image
3435 VkBuffer buffer
3436}
3437
Jesse Hallad250842017-03-10 18:35:38 -08003438@extension("VK_KHX_multiview") // 54
3439class VkRenderPassMultiviewCreateInfoKHX {
3440 VkStructureType sType
3441 const void* pNext
3442 u32 subpassCount
3443 const u32* pViewMasks
3444 u32 dependencyCount
3445 const s32* pViewOffsets
3446 u32 correlationMaskCount
3447 const u32* pCorrelationMasks
3448}
3449
3450@extension("VK_KHX_multiview") // 54
3451class VkPhysicalDeviceMultiviewFeaturesKHX {
3452 VkStructureType sType
3453 void* pNext
3454 VkBool32 multiview
3455 VkBool32 multiviewGeometryShader
3456 VkBool32 multiviewTessellationShader
3457}
3458
3459@extension("VK_KHX_multiview") // 54
3460class VkPhysicalDeviceMultiviewPropertiesKHX {
3461 VkStructureType sType
3462 void* pNext
3463 u32 maxMultiviewViewCount
3464 u32 maxMultiviewInstanceIndex
3465}
3466
3467@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003468class VkExternalImageFormatPropertiesNV {
3469 VkImageFormatProperties imageFormatProperties
3470 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3471 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3472 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3473}
3474
Jesse Hallad250842017-03-10 18:35:38 -08003475@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003476class VkExternalMemoryImageCreateInfoNV {
3477 VkStructureType sType
3478 const void* pNext
3479 VkExternalMemoryHandleTypeFlagsNV handleTypes
3480}
3481
Jesse Hallad250842017-03-10 18:35:38 -08003482@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003483class VkExportMemoryAllocateInfoNV {
3484 VkStructureType sType
3485 const void* pNext
3486 VkExternalMemoryHandleTypeFlagsNV handleTypes
3487}
3488
Jesse Hallad250842017-03-10 18:35:38 -08003489@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003490class VkImportMemoryWin32HandleInfoNV {
3491 VkStructureType sType
3492 const void* pNext
3493 VkExternalMemoryHandleTypeFlagsNV handleType
3494 platform.HANDLE handle
3495}
3496
Jesse Hallad250842017-03-10 18:35:38 -08003497@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003498class VkExportMemoryWin32HandleInfoNV {
3499 VkStructureType sType
3500 const void* pNext
3501 const platform.SECURITY_ATTRIBUTES* pAttributes
3502 platform.DWORD dwAccess
3503}
3504
Jesse Hallad250842017-03-10 18:35:38 -08003505@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003506class VkWin32KeyedMutexAcquireReleaseInfoNV {
3507 VkStructureType sType
3508 const void* pNext
3509 u32 acquireCount
3510 const VkDeviceMemory* pAcquireSyncs
3511 const u64* pAcquireKeys
3512 const u32* pAcquireTimeoutMilliseconds
3513 u32 releaseCount
3514 const VkDeviceMemory* pReleaseSyncs
3515 const u64* pReleaseKeys
3516}
3517
Jesse Hallad250842017-03-10 18:35:38 -08003518@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003519class VkPhysicalDeviceFeatures2KHR {
3520 VkStructureType sType
3521 void* pNext
3522 VkPhysicalDeviceFeatures features
3523}
3524
Jesse Hallad250842017-03-10 18:35:38 -08003525@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003526class VkPhysicalDeviceProperties2KHR {
3527 VkStructureType sType
3528 void* pNext
3529 VkPhysicalDeviceProperties properties
3530}
3531
Jesse Hallad250842017-03-10 18:35:38 -08003532@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003533class VkFormatProperties2KHR {
3534 VkStructureType sType
3535 void* pNext
3536 VkFormatProperties formatProperties
3537}
3538
Jesse Hallad250842017-03-10 18:35:38 -08003539@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003540class VkImageFormatProperties2KHR {
3541 VkStructureType sType
3542 void* pNext
3543 VkImageFormatProperties imageFormatProperties
3544}
3545
Jesse Hallad250842017-03-10 18:35:38 -08003546@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003547class VkPhysicalDeviceImageFormatInfo2KHR {
3548 VkStructureType sType
3549 const void* pNext
3550 VkFormat format
3551 VkImageType type
3552 VkImageTiling tiling
3553 VkImageUsageFlags usage
3554 VkImageCreateFlags flags
3555}
3556
Jesse Hallad250842017-03-10 18:35:38 -08003557@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003558class VkQueueFamilyProperties2KHR {
3559 VkStructureType sType
3560 void* pNext
3561 VkQueueFamilyProperties queueFamilyProperties
3562}
3563
Jesse Hallad250842017-03-10 18:35:38 -08003564@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003565class VkPhysicalDeviceMemoryProperties2KHR {
3566 VkStructureType sType
3567 void* pNext
3568 VkPhysicalDeviceMemoryProperties memoryProperties
3569}
3570
Jesse Hallad250842017-03-10 18:35:38 -08003571@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003572class VkSparseImageFormatProperties2KHR {
3573 VkStructureType sType
3574 void* pNext
3575 VkSparseImageFormatProperties properties
3576}
3577
Jesse Hallad250842017-03-10 18:35:38 -08003578@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003579class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3580 VkStructureType sType
3581 const void* pNext
3582 VkFormat format
3583 VkImageType type
3584 VkSampleCountFlagBits samples
3585 VkImageUsageFlags usage
3586 VkImageTiling tiling
3587}
3588
Jesse Hallad250842017-03-10 18:35:38 -08003589@extension("VK_KHX_device_group") // 61
3590class VkMemoryAllocateFlagsInfoKHX {
3591 VkStructureType sType
3592 const void* pNext
3593 VkMemoryAllocateFlagsKHX flags
3594 u32 deviceMask
3595}
3596
3597@extension("VK_KHX_device_group") // 61
3598class VkBindBufferMemoryInfoKHX {
3599 VkStructureType sType
3600 const void* pNext
3601 VkBuffer buffer
3602 VkDeviceMemory memory
3603 VkDeviceSize memoryOffset
3604 u32 deviceIndexCount
3605 const u32* pDeviceIndices
3606}
3607
3608@extension("VK_KHX_device_group") // 61
3609class VkBindImageMemoryInfoKHX {
3610 VkStructureType sType
3611 const void* pNext
3612 VkImage image
3613 VkDeviceMemory memory
3614 VkDeviceSize memoryOffset
3615 u32 deviceIndexCount
3616 const u32* pDeviceIndices
3617 u32 SFRRectCount
3618 const VkRect2D* pSFRRects
3619}
3620
3621@extension("VK_KHX_device_group") // 61
3622class VkDeviceGroupRenderPassBeginInfoKHX {
3623 VkStructureType sType
3624 const void* pNext
3625 u32 deviceMask
3626 u32 deviceRenderAreaCount
3627 const VkRect2D* pDeviceRenderAreas
3628}
3629
3630@extension("VK_KHX_device_group") // 61
3631class VkDeviceGroupCommandBufferBeginInfoKHX {
3632 VkStructureType sType
3633 const void* pNext
3634 u32 deviceMask
3635}
3636
3637@extension("VK_KHX_device_group") // 61
3638class VkDeviceGroupSubmitInfoKHX {
3639 VkStructureType sType
3640 const void* pNext
3641 u32 waitSemaphoreCount
3642 const u32* pWaitSemaphoreDeviceIndices
3643 u32 commandBufferCount
3644 const u32* pCommandBufferDeviceMasks
3645 u32 signalSemaphoreCount
3646 const u32* pSignalSemaphoreDeviceIndices
3647}
3648
3649@extension("VK_KHX_device_group") // 61
3650class VkDeviceGroupBindSparseInfoKHX {
3651 VkStructureType sType
3652 const void* pNext
3653 u32 resourceDeviceIndex
3654 u32 memoryDeviceIndex
3655}
3656
3657@extension("VK_KHX_device_group") // 61
3658class VkDeviceGroupPresentCapabilitiesKHX {
3659 VkStructureType sType
3660 const void* pNext
3661 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3662 VkDeviceGroupPresentModeFlagsKHX modes
3663}
3664
3665@extension("VK_KHX_device_group") // 61
3666class VkImageSwapchainCreateInfoKHX {
3667 VkStructureType sType
3668 const void* pNext
3669 VkSwapchainKHR swapchain
3670}
3671
3672@extension("VK_KHX_device_group") // 61
3673class VkBindImageMemorySwapchainInfoKHX {
3674 VkStructureType sType
3675 const void* pNext
3676 VkSwapchainKHR swapchain
3677 u32 imageIndex
3678}
3679
3680@extension("VK_KHX_device_group") // 61
3681class VkAcquireNextImageInfoKHX {
3682 VkStructureType sType
3683 const void* pNext
3684 VkSwapchainKHR swapchain
3685 u64 timeout
3686 VkSemaphore semaphore
3687 VkFence fence
3688 u32 deviceMask
3689}
3690
3691@extension("VK_KHX_device_group") // 61
3692class VkDeviceGroupPresentInfoKHX {
3693 VkStructureType sType
3694 const void* pNext
3695 u32 swapchainCount
3696 const u32* pDeviceMasks
3697 VkDeviceGroupPresentModeFlagBitsKHX mode
3698}
3699
3700@extension("VK_KHX_device_group") // 61
3701class VkDeviceGroupSwapchainCreateInfoKHX {
3702 VkStructureType sType
3703 const void* pNext
3704 VkDeviceGroupPresentModeFlagsKHX modes
3705}
3706
3707@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13003708class VkValidationFlagsEXT {
3709 VkStructureType sType
3710 const void* pNext
3711 u32 disabledValidationCheckCount
3712 VkValidationCheckEXT* pDisabledValidationChecks
3713}
3714
Jesse Hallad250842017-03-10 18:35:38 -08003715@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08003716class VkViSurfaceCreateInfoNN {
3717 VkStructureType sType
3718 const void* pNext
3719 VkViSurfaceCreateFlagsNN flags
3720 void* window
3721}
3722
Jesse Hallad250842017-03-10 18:35:38 -08003723@extension("VK_KHX_device_group_creation") // 71
3724class VkPhysicalDeviceGroupPropertiesKHX {
3725 VkStructureType sType
3726 const void* pNext
3727 u32 physicalDeviceCount
3728 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3729 VkBool32 subsetAllocation
3730}
3731
3732@extension("VK_KHX_device_group_creation") // 71
3733class VkDeviceGroupDeviceCreateInfoKHX {
3734 VkStructureType sType
3735 const void* pNext
3736 u32 physicalDeviceCount
3737 const VkPhysicalDevice* pPhysicalDevices
3738}
3739
3740@extension("VK_KHX_external_memory_capabilities") // 72
3741class VkExternalMemoryPropertiesKHX {
3742 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3743 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3744 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3745}
3746
3747@extension("VK_KHX_external_memory_capabilities") // 72
3748class VkPhysicalDeviceExternalImageFormatInfoKHX {
3749 VkStructureType sType
3750 const void* pNext
3751 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3752}
3753
3754@extension("VK_KHX_external_memory_capabilities") // 72
3755class VkExternalImageFormatPropertiesKHX {
3756 VkStructureType sType
3757 void* pNext
3758 VkExternalMemoryPropertiesKHX externalMemoryProperties
3759}
3760
3761@extension("VK_KHX_external_memory_capabilities") // 72
3762class VkPhysicalDeviceExternalBufferInfoKHX {
3763 VkStructureType sType
3764 const void* pNext
3765 VkBufferCreateFlags flags
3766 VkBufferUsageFlags usage
3767 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3768}
3769
3770@extension("VK_KHX_external_memory_capabilities") // 72
3771class VkExternalBufferPropertiesKHX {
3772 VkStructureType sType
3773 void* pNext
3774 VkExternalMemoryPropertiesKHX externalMemoryProperties
3775}
3776
3777@extension("VK_KHX_external_memory_capabilities") // 72
3778class VkPhysicalDeviceIDPropertiesKHX {
3779 VkStructureType sType
3780 void* pNext
3781 u8[VK_UUID_SIZE] deviceUUID
3782 u8[VK_UUID_SIZE] driverUUID
3783 u8[VK_LUID_SIZE_KHX] deviceLUID
3784 VkBool32 deviceLUIDValid
3785}
3786
Jesse Hallad250842017-03-10 18:35:38 -08003787@extension("VK_KHX_external_memory") // 73
3788class VkExternalMemoryImageCreateInfoKHX {
3789 VkStructureType sType
3790 const void* pNext
3791 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3792}
3793
3794@extension("VK_KHX_external_memory") // 73
3795class VkExternalMemoryBufferCreateInfoKHX {
3796 VkStructureType sType
3797 const void* pNext
3798 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3799}
3800
3801@extension("VK_KHX_external_memory") // 73
3802class VkExportMemoryAllocateInfoKHX {
3803 VkStructureType sType
3804 const void* pNext
3805 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3806}
3807
3808@extension("VK_KHX_external_memory_win32") // 74
3809class VkImportMemoryWin32HandleInfoKHX {
3810 VkStructureType sType
3811 const void* pNext
3812 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3813 platform.HANDLE handle
3814}
3815
3816@extension("VK_KHX_external_memory_win32") // 74
3817class VkExportMemoryWin32HandleInfoKHX {
3818 VkStructureType sType
3819 const void* pNext
3820 const platform.SECURITY_ATTRIBUTES* pAttributes
3821 platform.DWORD dwAccess
3822 platform.LPCWSTR name
3823}
3824
3825@extension("VK_KHX_external_memory_win32") // 74
3826class VkMemoryWin32HandlePropertiesKHX {
3827 VkStructureType sType
3828 void* pNext
3829 u32 memoryTypeBits
3830}
3831
3832@extension("VK_KHX_external_memory_fd") // 75
3833class VkImportMemoryFdInfoKHX {
3834 VkStructureType sType
3835 const void* pNext
3836 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3837 int fd
3838}
3839
3840@extension("VK_KHX_external_memory_fd") // 75
3841class VkMemoryFdPropertiesKHX {
3842 VkStructureType sType
3843 void* pNext
3844 u32 memoryTypeBits
3845}
3846
3847@extension("VK_KHX_win32_keyed_mutex") // 76
3848class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3849 VkStructureType sType
3850 const void* pNext
3851 u32 acquireCount
3852 const VkDeviceMemory* pAcquireSyncs
3853 const u64* pAcquireKeys
3854 const u32* pAcquireTimeouts
3855 u32 releaseCount
3856 const VkDeviceMemory* pReleaseSyncs
3857 const u64* pReleaseKeys
3858}
3859
3860@extension("VK_KHX_external_semaphore_capabilities") // 77
3861class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3862 VkStructureType sType
3863 const void* pNext
3864 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3865}
3866
3867@extension("VK_KHX_external_semaphore_capabilities") // 77
3868class VkExternalSemaphorePropertiesKHX {
3869 VkStructureType sType
3870 void* pNext
3871 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3872 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3873 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3874}
3875
3876@extension("VK_KHX_external_semaphore") // 78
3877class VkExportSemaphoreCreateInfoKHX {
3878 VkStructureType sType
3879 const void* pNext
3880 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3881}
3882
3883@extension("VK_KHX_external_semaphore_win32") // 79
3884class VkImportSemaphoreWin32HandleInfoKHX {
3885 VkStructureType sType
3886 const void* pNext
3887 VkSemaphore semaphore
3888 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3889 platform.HANDLE handle
3890}
3891
3892@extension("VK_KHX_external_semaphore_win32") // 79
3893class VkExportSemaphoreWin32HandleInfoKHX {
3894 VkStructureType sType
3895 const void* pNext
3896 const platform.SECURITY_ATTRIBUTES* pAttributes
3897 platform.DWORD dwAccess
3898 platform.LPCWSTR name
3899}
3900
3901@extension("VK_KHX_external_semaphore_win32") // 79
3902class VkD3D12FenceSubmitInfoKHX {
3903 VkStructureType sType
3904 const void* pNext
3905 u32 waitSemaphoreValuesCount
3906 const u64* pWaitSemaphoreValues
3907 u32 signalSemaphoreValuesCount
3908 const u64* pSignalSemaphoreValues
3909}
3910
3911@extension("VK_KHX_external_semaphore_fd") // 80
3912class VkImportSemaphoreFdInfoKHX {
3913 VkStructureType sType
3914 const void* pNext
3915 VkSemaphore semaphore
3916 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3917 s32 fd
3918}
3919
3920@extension("VK_KHR_push_descriptor") // 81
3921class VkPhysicalDevicePushDescriptorPropertiesKHR {
3922 VkStructureType sType
3923 void* pNext
3924 u32 maxPushDescriptors
3925}
3926
3927@extension("VK_KHR_incremental_present") // 85
3928class VkRectLayerKHR {
3929 VkOffset2D offset
3930 VkExtent2D extent
3931 u32 layer
3932}
3933
3934@extension("VK_KHR_incremental_present") // 85
3935class VkPresentRegionKHR {
3936 u32 rectangleCount
3937 const VkRectLayerKHR* pRectangles
3938}
3939
3940@extension("VK_KHR_incremental_present") // 85
3941class VkPresentRegionsKHR {
3942 VkStructureType sType
3943 const void* pNext
3944 u32 swapchainCount
3945 const VkPresentRegionKHR* pRegions
3946}
3947
3948@extension("VK_KHR_descriptor_update_template") // 86
3949class VkDescriptorUpdateTemplateEntryKHR {
3950 u32 dstBinding
3951 u32 dstArrayElement
3952 u32 descriptorCount
3953 VkDescriptorType descriptorType
3954 platform.size_t offset
3955 platform.size_t stride
3956}
3957
3958@extension("VK_KHR_descriptor_update_template") // 86
3959class VkDescriptorUpdateTemplateCreateInfoKHR {
3960 VkStructureType sType
3961 void* pNext
3962 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3963 u32 descriptorUpdateEntryCount
3964 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3965 VkDescriptorUpdateTemplateTypeKHR templateType
3966 VkDescriptorSetLayout descriptorSetLayout
3967 VkPipelineBindPoint pipelineBindPoint
3968 VkPipelineLayout pipelineLayout
3969 u32 set
3970}
3971
3972@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003973class VkDeviceGeneratedCommandsFeaturesNVX {
3974 VkStructureType sType
3975 const void* pNext
3976 VkBool32 computeBindingPointSupport
3977}
3978
Jesse Hallad250842017-03-10 18:35:38 -08003979@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003980class VkDeviceGeneratedCommandsLimitsNVX {
3981 VkStructureType sType
3982 const void* pNext
3983 u32 maxIndirectCommandsLayoutTokenCount
3984 u32 maxObjectEntryCounts
3985 u32 minSequenceCountBufferOffsetAlignment
3986 u32 minSequenceIndexBufferOffsetAlignment
3987 u32 minCommandsTokenBufferOffsetAlignment
3988}
3989
Jesse Hallad250842017-03-10 18:35:38 -08003990@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003991class VkIndirectCommandsTokenNVX {
3992 VkIndirectCommandsTokenTypeNVX tokenType
3993 VkBuffer buffer
3994 VkDeviceSize offset
3995}
3996
Jesse Hallad250842017-03-10 18:35:38 -08003997@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003998class VkIndirectCommandsLayoutTokenNVX {
3999 VkIndirectCommandsTokenTypeNVX tokenType
4000 u32 bindingUnit
4001 u32 dynamicCount
4002 u32 divisor
4003}
4004
Jesse Hallad250842017-03-10 18:35:38 -08004005@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004006class VkIndirectCommandsLayoutCreateInfoNVX {
4007 VkStructureType sType
4008 const void* pNext
4009 VkPipelineBindPoint pipelineBindPoint
4010 VkIndirectCommandsLayoutUsageFlagsNVX flags
4011 u32 tokenCount
4012 const VkIndirectCommandsLayoutTokenNVX* pTokens
4013}
4014
Jesse Hallad250842017-03-10 18:35:38 -08004015@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004016class VkCmdProcessCommandsInfoNVX {
4017 VkStructureType sType
4018 const void* pNext
4019 VkObjectTableNVX objectTable
4020 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4021 u32 indirectCommandsTokenCount
4022 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4023 u32 maxSequencesCount
4024 VkCommandBuffer targetCommandBuffer
4025 VkBuffer sequencesCountBuffer
4026 VkDeviceSize sequencesCountOffset
4027 VkBuffer sequencesIndexBuffer
4028 VkDeviceSize sequencesIndexOffset
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 VkCmdReserveSpaceForCommandsInfoNVX {
4033 VkStructureType sType
4034 const void* pNext
4035 VkObjectTableNVX objectTable
4036 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4037 u32 maxSequencesCount
4038}
4039
Jesse Hallad250842017-03-10 18:35:38 -08004040@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004041class VkObjectTableCreateInfoNVX {
4042 VkStructureType sType
4043 const void* pNext
4044 u32 objectCount
4045 const VkObjectEntryTypeNVX* pObjectEntryTypes
4046 const u32* pObjectEntryCounts
4047 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4048 u32 maxUniformBuffersPerDescriptor
4049 u32 maxStorageBuffersPerDescriptor
4050 u32 maxStorageImagesPerDescriptor
4051 u32 maxSampledImagesPerDescriptor
4052 u32 maxPipelineLayouts
4053}
4054
Jesse Hallad250842017-03-10 18:35:38 -08004055@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004056class VkObjectTableEntryNVX {
4057 VkObjectEntryTypeNVX type
4058 VkObjectEntryUsageFlagsNVX flags
4059}
4060
Jesse Hallad250842017-03-10 18:35:38 -08004061@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004062class VkObjectTablePipelineEntryNVX {
4063 VkObjectEntryTypeNVX type
4064 VkObjectEntryUsageFlagsNVX flags
4065 VkPipeline pipeline
4066}
4067
Jesse Hallad250842017-03-10 18:35:38 -08004068@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004069class VkObjectTableDescriptorSetEntryNVX {
4070 VkObjectEntryTypeNVX type
4071 VkObjectEntryUsageFlagsNVX flags
4072 VkPipelineLayout pipelineLayout
4073 VkDescriptorSet descriptorSet
4074}
4075
Jesse Hallad250842017-03-10 18:35:38 -08004076@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004077class VkObjectTableVertexBufferEntryNVX {
4078 VkObjectEntryTypeNVX type
4079 VkObjectEntryUsageFlagsNVX flags
4080 VkBuffer buffer
4081}
4082
Jesse Hallad250842017-03-10 18:35:38 -08004083@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004084class VkObjectTableIndexBufferEntryNVX {
4085 VkObjectEntryTypeNVX type
4086 VkObjectEntryUsageFlagsNVX flags
4087 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004088 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004089}
4090
Jesse Hallad250842017-03-10 18:35:38 -08004091@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004092class VkObjectTablePushConstantEntryNVX {
4093 VkObjectEntryTypeNVX type
4094 VkObjectEntryUsageFlagsNVX flags
4095 VkPipelineLayout pipelineLayout
4096 VkShaderStageFlags stageFlags
4097}
4098
Jesse Hallad250842017-03-10 18:35:38 -08004099@extension("VK_NV_clip_space_w_scaling") // 88
4100class VkViewportWScalingNV {
4101 f32 xcoeff
4102 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004103}
4104
Jesse Hallad250842017-03-10 18:35:38 -08004105@extension("VK_NV_clip_space_w_scaling") // 88
4106class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004107 VkStructureType sType
4108 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004109 VkBool32 viewportWScalingEnable
4110 u32 viewportCount
4111 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004112}
4113
Jesse Hallad250842017-03-10 18:35:38 -08004114@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004115class VkSurfaceCapabilities2EXT {
4116 VkStructureType sType
4117 void* pNext
4118 u32 minImageCount
4119 u32 maxImageCount
4120 VkExtent2D currentExtent
4121 VkExtent2D minImageExtent
4122 VkExtent2D maxImageExtent
4123 u32 maxImageArrayLayers
4124 VkSurfaceTransformFlagsKHR supportedTransforms
4125 VkSurfaceTransformFlagBitsKHR currentTransform
4126 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4127 VkImageUsageFlags supportedUsageFlags
4128 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4129}
4130
Jesse Hallad250842017-03-10 18:35:38 -08004131@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004132class VkDisplayPowerInfoEXT {
4133 VkStructureType sType
4134 const void* pNext
4135 VkDisplayPowerStateEXT powerState
4136}
4137
Jesse Hallad250842017-03-10 18:35:38 -08004138@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004139class VkDeviceEventInfoEXT {
4140 VkStructureType sType
4141 const void* pNext
4142 VkDeviceEventTypeEXT deviceEvent
4143}
4144
Jesse Hallad250842017-03-10 18:35:38 -08004145@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004146class VkDisplayEventInfoEXT {
4147 VkStructureType sType
4148 const void* pNext
4149 VkDisplayEventTypeEXT displayEvent
4150}
4151
Jesse Hallad250842017-03-10 18:35:38 -08004152@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004153class VkSwapchainCounterCreateInfoEXT {
4154 VkStructureType sType
4155 const void* pNext
4156 VkSurfaceCounterFlagsEXT surfaceCounters
4157}
4158
Jesse Hallad250842017-03-10 18:35:38 -08004159@extension("VK_GOOGLE_display_timing") // 93
4160class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004161 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08004162}
4163
4164@extension("VK_GOOGLE_display_timing") // 93
4165class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004166 u32 presentID
4167 u64 desiredPresentTime
4168 u64 actualPresentTime
4169 u64 earliestPresentTime
4170 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08004171}
4172
4173@extension("VK_GOOGLE_display_timing") // 93
4174class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004175 u32 presentID
4176 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08004177}
4178
4179@extension("VK_GOOGLE_display_timing") // 93
4180class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004181 VkStructureType sType
4182 const void* pNext
4183 u32 swapchainCount
4184 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08004185}
4186
4187@extension("VK_NVX_multiview_per_view_attributes") // 98
4188class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4189 VkStructureType sType
4190 void* pNext
4191 VkBool32 perViewPositionAllComponents
4192}
4193
4194@extension("VK_NV_viewport_swizzle") // 99
4195class VkViewportSwizzleNV {
4196 VkViewportCoordinateSwizzleNV x
4197 VkViewportCoordinateSwizzleNV y
4198 VkViewportCoordinateSwizzleNV z
4199 VkViewportCoordinateSwizzleNV w
4200}
4201
4202@extension("VK_NV_viewport_swizzle") // 99
4203class VkPipelineViewportSwizzleStateCreateInfoNV {
4204 VkStructureType sType
4205 const void* pNext
4206 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4207 u32 viewportCount
4208 const VkViewportSwizzleNV* pViewportSwizzles
4209}
4210
4211@extension("VK_EXT_discard_rectangles") // 100
4212class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4213 VkStructureType sType
4214 const void* pNext
4215 u32 maxDiscardRectangles
4216}
4217
4218@extension("VK_EXT_discard_rectangles") // 100
4219class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004220 VkStructureType sType
4221 const void* pNext
4222 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4223 VkDiscardRectangleModeEXT discardRectangleMode
4224 u32 discardRectangleCount
4225 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08004226}
4227
4228@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004229class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004230 f32 x
4231 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004232}
4233
Jesse Hallad250842017-03-10 18:35:38 -08004234@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004235class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08004236 VkStructureType sType
4237 const void* pNext
4238 VkXYColorEXT displayPrimaryRed
4239 VkXYColorEXT displayPrimaryGreen
4240 VkXYColorEXT displayPrimaryBlue
4241 VkXYColorEXT whitePoint
4242 f32 maxLuminance
4243 f32 minLuminance
4244 f32 maxContentLightLevel
4245 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004246}
4247
Jesse Hallad250842017-03-10 18:35:38 -08004248@extension("VK_MVK_ios_surface") // 123
4249class VkIOSSurfaceCreateInfoMVK {
4250 VkStructureType sType
4251 const void* pNext
4252 VkIOSSurfaceCreateFlagsMVK flags
4253 const void* pView
4254}
4255
4256@extension("VK_MVK_macos_surface") // 124
4257class VkMacOSSurfaceCreateInfoMVK {
4258 VkStructureType sType
4259 const void* pNext
4260 VkMacOSSurfaceCreateFlagsMVK flags
4261 const void* pView
4262}
4263
Jesse Halld27f6aa2015-08-15 17:58:48 -07004264////////////////
4265// Commands //
4266////////////////
4267
4268// Function pointers. TODO: add support for function pointers.
4269
4270@external type void* PFN_vkVoidFunction
4271@pfn cmd void vkVoidFunction() {
4272}
4273
Jesse Hall3fbc8562015-11-29 22:10:52 -08004274@external type void* PFN_vkAllocationFunction
4275@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004276 void* pUserData,
4277 platform.size_t size,
4278 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004279 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004280 return ?
4281}
4282
Jesse Hall3fbc8562015-11-29 22:10:52 -08004283@external type void* PFN_vkReallocationFunction
4284@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004285 void* pUserData,
4286 void* pOriginal,
4287 platform.size_t size,
4288 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004289 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004290 return ?
4291}
4292
4293@external type void* PFN_vkFreeFunction
4294@pfn cmd void vkFreeFunction(
4295 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004296 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004297}
4298
Jesse Hall3fbc8562015-11-29 22:10:52 -08004299@external type void* PFN_vkInternalAllocationNotification
4300@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004301 void* pUserData,
4302 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004303 VkInternalAllocationType allocationType,
4304 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004305}
4306
4307@external type void* PFN_vkInternalFreeNotification
4308@pfn cmd void vkInternalFreeNotification(
4309 void* pUserData,
4310 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004311 VkInternalAllocationType allocationType,
4312 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004313}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004314
4315// Global functions
4316
4317@threadSafety("system")
4318cmd VkResult vkCreateInstance(
4319 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004320 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004321 VkInstance* pInstance) {
4322 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4323
4324 instance := ?
4325 pInstance[0] = instance
4326 State.Instances[instance] = new!InstanceObject()
4327
Jesse Hall3dd678a2016-01-08 21:52:01 -08004328 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4329 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004330
4331 return ?
4332}
4333
4334@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004335cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004336 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004337 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004338 instanceObject := GetInstance(instance)
4339
4340 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004341}
4342
4343@threadSafety("system")
4344cmd VkResult vkEnumeratePhysicalDevices(
4345 VkInstance instance,
4346 u32* pPhysicalDeviceCount,
4347 VkPhysicalDevice* pPhysicalDevices) {
4348 instanceObject := GetInstance(instance)
4349
4350 physicalDeviceCount := as!u32(?)
4351 pPhysicalDeviceCount[0] = physicalDeviceCount
4352 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4353
4354 for i in (0 .. physicalDeviceCount) {
4355 physicalDevice := ?
4356 physicalDevices[i] = physicalDevice
4357 if !(physicalDevice in State.PhysicalDevices) {
4358 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4359 }
4360 }
4361
4362 return ?
4363}
4364
4365cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4366 VkDevice device,
4367 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004368 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004369 device := GetDevice(device)
4370 }
4371
4372 return ?
4373}
4374
4375cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4376 VkInstance instance,
4377 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004378 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004379 instanceObject := GetInstance(instance)
4380 }
4381
4382 return ?
4383}
4384
Jesse Hall606a54e2015-11-19 22:17:28 -08004385cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004386 VkPhysicalDevice physicalDevice,
4387 VkPhysicalDeviceProperties* pProperties) {
4388 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4389
4390 properties := ?
4391 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004392}
4393
Jesse Hall606a54e2015-11-19 22:17:28 -08004394cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004395 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004396 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004397 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004398 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004399 // TODO: Figure out how to express fetch-count-or-properties
4400 // This version fails 'apic validate' with 'fence not allowed in
4401 // *semantic.Branch'. Other attempts have failed with the same or other
4402 // errors.
4403 // if pQueueFamilyProperties != null {
4404 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4405 // for i in (0 .. pCount[0]) {
4406 // queueProperties := as!VkQueueFamilyProperties(?)
4407 // queuesProperties[i] = queueProperties
4408 // }
4409 // } else {
4410 // count := ?
4411 // pCount[0] = count
4412 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004413}
4414
Jesse Hall606a54e2015-11-19 22:17:28 -08004415cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004416 VkPhysicalDevice physicalDevice,
4417 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4418 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4419
4420 memoryProperties := ?
4421 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004422}
4423
Jesse Hall606a54e2015-11-19 22:17:28 -08004424cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004425 VkPhysicalDevice physicalDevice,
4426 VkPhysicalDeviceFeatures* pFeatures) {
4427 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4428
4429 features := ?
4430 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004431}
4432
Jesse Hall606a54e2015-11-19 22:17:28 -08004433cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004434 VkPhysicalDevice physicalDevice,
4435 VkFormat format,
4436 VkFormatProperties* pFormatProperties) {
4437 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4438
4439 formatProperties := ?
4440 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004441}
4442
Jesse Halla9e57032015-11-30 01:03:10 -08004443cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004444 VkPhysicalDevice physicalDevice,
4445 VkFormat format,
4446 VkImageType type,
4447 VkImageTiling tiling,
4448 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004449 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004450 VkImageFormatProperties* pImageFormatProperties) {
4451 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4452
4453 imageFormatProperties := ?
4454 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004455
4456 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004457}
4458
Jesse Halld27f6aa2015-08-15 17:58:48 -07004459
4460// Device functions
4461
4462@threadSafety("system")
4463cmd VkResult vkCreateDevice(
4464 VkPhysicalDevice physicalDevice,
4465 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004466 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004467 VkDevice* pDevice) {
4468 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4469 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4470
4471 device := ?
4472 pDevice[0] = device
4473 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4474
4475 return ?
4476}
4477
4478@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004479cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004480 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004481 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004482 deviceObject := GetDevice(device)
4483
4484 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004485}
4486
4487
4488// Extension discovery functions
4489
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004490cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004491 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004492 VkLayerProperties* pProperties) {
4493 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004494 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004495
4496 properties := pProperties[0:count]
4497 for i in (0 .. count) {
4498 property := ?
4499 properties[i] = property
4500 }
4501
4502 return ?
4503}
4504
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004505cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004506 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004507 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004508 VkExtensionProperties* pProperties) {
4509 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004510 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004511
4512 properties := pProperties[0:count]
4513 for i in (0 .. count) {
4514 property := ?
4515 properties[i] = property
4516 }
4517
4518 return ?
4519}
4520
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004521cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004522 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004523 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004524 VkLayerProperties* pProperties) {
4525 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4526 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004527 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004528
4529 properties := pProperties[0:count]
4530 for i in (0 .. count) {
4531 property := ?
4532 properties[i] = property
4533 }
4534
4535 return ?
4536}
4537
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004538cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004539 VkPhysicalDevice physicalDevice,
4540 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004541 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004542 VkExtensionProperties* pProperties) {
4543 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4544
4545 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004546 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004547
4548 properties := pProperties[0:count]
4549 for i in (0 .. count) {
4550 property := ?
4551 properties[i] = property
4552 }
4553
4554 return ?
4555}
4556
4557
4558// Queue functions
4559
4560@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004561cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004562 VkDevice device,
4563 u32 queueFamilyIndex,
4564 u32 queueIndex,
4565 VkQueue* pQueue) {
4566 deviceObject := GetDevice(device)
4567
4568 queue := ?
4569 pQueue[0] = queue
4570
4571 if !(queue in State.Queues) {
4572 State.Queues[queue] = new!QueueObject(device: device)
4573 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004574}
4575
4576@threadSafety("app")
4577cmd VkResult vkQueueSubmit(
4578 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004579 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004580 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004581 VkFence fence) {
4582 queueObject := GetQueue(queue)
4583
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004584 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004585 fenceObject := GetFence(fence)
4586 assert(fenceObject.device == queueObject.device)
4587 }
4588
Jesse Hall3fbc8562015-11-29 22:10:52 -08004589 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4590 // for i in (0 .. commandBufferCount) {
4591 // commandBuffer := commandBuffers[i]
4592 // commandBufferObject := GetCommandBuffer(commandBuffer)
4593 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004594 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004595 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4596 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004597 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004598
4599 return ?
4600}
4601
4602@threadSafety("system")
4603cmd VkResult vkQueueWaitIdle(
4604 VkQueue queue) {
4605 queueObject := GetQueue(queue)
4606
4607 return ?
4608}
4609
4610@threadSafety("system")
4611cmd VkResult vkDeviceWaitIdle(
4612 VkDevice device) {
4613 deviceObject := GetDevice(device)
4614
4615 return ?
4616}
4617
4618
4619// Memory functions
4620
4621@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004622cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004623 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004624 const VkMemoryAllocateInfo* pAllocateInfo,
4625 const VkAllocationCallbacks* pAllocator,
4626 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004627 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004628 deviceObject := GetDevice(device)
4629
Jesse Hall3fbc8562015-11-29 22:10:52 -08004630 memory := ?
4631 pMemory[0] = memory
4632 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004633 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004634 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004635
4636 return ?
4637}
4638
4639@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004640cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004641 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004642 VkDeviceMemory memory,
4643 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004644 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004645 memoryObject := GetDeviceMemory(memory)
4646 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004647
4648 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004649 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004650 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004651 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4652 "vkFreeMemory: commandBuffers still bound")
4653 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004654}
4655
4656@threadSafety("app")
4657cmd VkResult vkMapMemory(
4658 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004659 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004660 VkDeviceSize offset,
4661 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004662 VkMemoryMapFlags flags,
4663 void** ppData) {
4664 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004665 memoryObject := GetDeviceMemory(memory)
4666 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004667
4668 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004669 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004670
4671 return ?
4672}
4673
4674@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004675cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004676 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004677 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004678 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004679 memoryObject := GetDeviceMemory(memory)
4680 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004681}
4682
4683cmd VkResult vkFlushMappedMemoryRanges(
4684 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004685 u32 memoryRangeCount
4686 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004687 deviceObject := GetDevice(device)
4688
Jesse Hall3fbc8562015-11-29 22:10:52 -08004689 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4690 for i in (0 .. memoryRangeCount) {
4691 memoryRange := memoryRanges[i]
4692 memoryObject := GetDeviceMemory(memoryRange.memory)
4693 assert(memoryObject.device == device)
4694 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004695 }
4696
4697 return ?
4698}
4699
4700cmd VkResult vkInvalidateMappedMemoryRanges(
4701 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004702 u32 memoryRangeCount,
4703 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004704 deviceObject := GetDevice(device)
4705
Jesse Hall3fbc8562015-11-29 22:10:52 -08004706 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4707 for i in (0 .. memoryRangeCount) {
4708 memoryRange := memoryRanges[i]
4709 memoryObject := GetDeviceMemory(memoryRange.memory)
4710 assert(memoryObject.device == device)
4711 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004712 }
4713
4714 return ?
4715}
4716
4717
4718// Memory management API functions
4719
Jesse Hall606a54e2015-11-19 22:17:28 -08004720cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004721 VkDevice device,
4722 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004723 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004724 deviceObject := GetDevice(device)
4725
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004726 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004727 memoryObject := GetDeviceMemory(memory)
4728 assert(memoryObject.device == device)
4729 }
4730
4731 committedMemoryInBytes := ?
4732 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004733}
4734
Jesse Hall606a54e2015-11-19 22:17:28 -08004735cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004736 VkDevice device,
4737 VkBuffer buffer,
4738 VkMemoryRequirements* pMemoryRequirements) {
4739 deviceObject := GetDevice(device)
4740 bufferObject := GetBuffer(buffer)
4741 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004742}
4743
4744cmd VkResult vkBindBufferMemory(
4745 VkDevice device,
4746 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004747 VkDeviceMemory memory,
4748 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004749 deviceObject := GetDevice(device)
4750 bufferObject := GetBuffer(buffer)
4751 assert(bufferObject.device == device)
4752
4753 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004754 if bufferObject.memory != NULL_HANDLE {
4755 memoryObject := GetDeviceMemory(bufferObject.memory)
4756 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004757 }
4758
4759 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004760 if memory != NULL_HANDLE {
4761 memoryObject := GetDeviceMemory(memory)
4762 assert(memoryObject.device == device)
4763 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004764 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004765 bufferObject.memory = memory
4766 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004767
4768 return ?
4769}
4770
Jesse Hall606a54e2015-11-19 22:17:28 -08004771cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004772 VkDevice device,
4773 VkImage image,
4774 VkMemoryRequirements* pMemoryRequirements) {
4775 deviceObject := GetDevice(device)
4776 imageObject := GetImage(image)
4777 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004778}
4779
4780cmd VkResult vkBindImageMemory(
4781 VkDevice device,
4782 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004783 VkDeviceMemory memory,
4784 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004785 deviceObject := GetDevice(device)
4786 imageObject := GetImage(image)
4787 assert(imageObject.device == device)
4788
4789 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004790 if imageObject.memory != NULL_HANDLE {
4791 memoryObject := GetDeviceMemory(imageObject.memory)
4792 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004793 }
4794
4795 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004796 if memory != NULL_HANDLE {
4797 memoryObject := GetDeviceMemory(memory)
4798 assert(memoryObject.device == device)
4799 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004800 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004801 imageObject.memory = memory
4802 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004803
4804 return ?
4805}
4806
Jesse Hall606a54e2015-11-19 22:17:28 -08004807cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004808 VkDevice device,
4809 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004810 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004811 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4812 deviceObject := GetDevice(device)
4813 imageObject := GetImage(image)
4814 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004815}
4816
Jesse Hall606a54e2015-11-19 22:17:28 -08004817cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004818 VkPhysicalDevice physicalDevice,
4819 VkFormat format,
4820 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004821 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004822 VkImageUsageFlags usage,
4823 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004824 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004825 VkSparseImageFormatProperties* pProperties) {
4826 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004827}
4828
Jesse Halla6429252015-11-29 18:59:42 -08004829cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004830 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004831 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004832 const VkBindSparseInfo* pBindInfo,
4833 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004834 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004835
4836 return ?
4837}
4838
4839
4840// Fence functions
4841
4842@threadSafety("system")
4843cmd VkResult vkCreateFence(
4844 VkDevice device,
4845 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004846 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004847 VkFence* pFence) {
4848 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4849 deviceObject := GetDevice(device)
4850
4851 fence := ?
4852 pFence[0] = fence
4853 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004854 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004855
4856 return ?
4857}
4858
4859@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004860cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004861 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004862 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004863 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004864 deviceObject := GetDevice(device)
4865 fenceObject := GetFence(fence)
4866 assert(fenceObject.device == device)
4867
4868 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004869}
4870
4871@threadSafety("system")
4872cmd VkResult vkResetFences(
4873 VkDevice device,
4874 u32 fenceCount,
4875 const VkFence* pFences) {
4876 deviceObject := GetDevice(device)
4877
4878 fences := pFences[0:fenceCount]
4879 for i in (0 .. fenceCount) {
4880 fence := fences[i]
4881 fenceObject := GetFence(fence)
4882 assert(fenceObject.device == device)
4883 fenceObject.signaled = false
4884 }
4885
4886 return ?
4887}
4888
4889@threadSafety("system")
4890cmd VkResult vkGetFenceStatus(
4891 VkDevice device,
4892 VkFence fence) {
4893 deviceObject := GetDevice(device)
4894 fenceObject := GetFence(fence)
4895 assert(fenceObject.device == device)
4896
4897 return ?
4898}
4899
4900@threadSafety("system")
4901cmd VkResult vkWaitForFences(
4902 VkDevice device,
4903 u32 fenceCount,
4904 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004905 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004906 u64 timeout) { /// timeout in nanoseconds
4907 deviceObject := GetDevice(device)
4908
4909 fences := pFences[0:fenceCount]
4910 for i in (0 .. fenceCount) {
4911 fence := fences[i]
4912 fenceObject := GetFence(fence)
4913 assert(fenceObject.device == device)
4914 }
4915
4916 return ?
4917}
4918
4919
4920// Queue semaphore functions
4921
4922@threadSafety("system")
4923cmd VkResult vkCreateSemaphore(
4924 VkDevice device,
4925 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004926 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004927 VkSemaphore* pSemaphore) {
4928 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4929 deviceObject := GetDevice(device)
4930
4931 semaphore := ?
4932 pSemaphore[0] = semaphore
4933 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4934
4935 return ?
4936}
4937
4938@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004939cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004940 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004941 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004942 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004943 deviceObject := GetDevice(device)
4944 semaphoreObject := GetSemaphore(semaphore)
4945 assert(semaphoreObject.device == device)
4946
4947 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004948}
4949
Jesse Halld27f6aa2015-08-15 17:58:48 -07004950
4951// Event functions
4952
4953@threadSafety("system")
4954cmd VkResult vkCreateEvent(
4955 VkDevice device,
4956 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004957 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004958 VkEvent* pEvent) {
4959 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
4960 deviceObject := GetDevice(device)
4961
4962 event := ?
4963 pEvent[0] = event
4964 State.Events[event] = new!EventObject(device: device)
4965
4966 return ?
4967}
4968
4969@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004970cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004971 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004972 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004973 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004974 deviceObject := GetDevice(device)
4975 eventObject := GetEvent(event)
4976 assert(eventObject.device == device)
4977
4978 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004979}
4980
4981@threadSafety("system")
4982cmd VkResult vkGetEventStatus(
4983 VkDevice device,
4984 VkEvent event) {
4985 deviceObject := GetDevice(device)
4986 eventObject := GetEvent(event)
4987 assert(eventObject.device == device)
4988
4989 return ?
4990}
4991
4992@threadSafety("system")
4993cmd VkResult vkSetEvent(
4994 VkDevice device,
4995 VkEvent event) {
4996 deviceObject := GetDevice(device)
4997 eventObject := GetEvent(event)
4998 assert(eventObject.device == device)
4999
5000 return ?
5001}
5002
5003@threadSafety("system")
5004cmd VkResult vkResetEvent(
5005 VkDevice device,
5006 VkEvent event) {
5007 deviceObject := GetDevice(device)
5008 eventObject := GetEvent(event)
5009 assert(eventObject.device == device)
5010
5011 return ?
5012}
5013
5014
5015// Query functions
5016
5017@threadSafety("system")
5018cmd VkResult vkCreateQueryPool(
5019 VkDevice device,
5020 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005021 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005022 VkQueryPool* pQueryPool) {
5023 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5024 deviceObject := GetDevice(device)
5025
5026 queryPool := ?
5027 pQueryPool[0] = queryPool
5028 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5029
5030 return ?
5031}
5032
5033@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005034cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005035 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005036 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005037 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005038 deviceObject := GetDevice(device)
5039 queryPoolObject := GetQueryPool(queryPool)
5040 assert(queryPoolObject.device == device)
5041
5042 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005043}
5044
5045@threadSafety("system")
5046cmd VkResult vkGetQueryPoolResults(
5047 VkDevice device,
5048 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005049 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005050 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005051 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005052 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005053 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005054 VkQueryResultFlags flags) {
5055 deviceObject := GetDevice(device)
5056 queryPoolObject := GetQueryPool(queryPool)
5057 assert(queryPoolObject.device == device)
5058
Jesse Halld27f6aa2015-08-15 17:58:48 -07005059 data := pData[0:dataSize]
5060
5061 return ?
5062}
5063
5064// Buffer functions
5065
5066@threadSafety("system")
5067cmd VkResult vkCreateBuffer(
5068 VkDevice device,
5069 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005070 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005071 VkBuffer* pBuffer) {
5072 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5073 deviceObject := GetDevice(device)
5074
5075 buffer := ?
5076 pBuffer[0] = buffer
5077 State.Buffers[buffer] = new!BufferObject(device: device)
5078
5079 return ?
5080}
5081
5082@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005083cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005084 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005085 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005086 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005087 deviceObject := GetDevice(device)
5088 bufferObject := GetBuffer(buffer)
5089 assert(bufferObject.device == device)
5090
Jesse Hall3fbc8562015-11-29 22:10:52 -08005091 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005092 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005093}
5094
5095
5096// Buffer view functions
5097
5098@threadSafety("system")
5099cmd VkResult vkCreateBufferView(
5100 VkDevice device,
5101 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005102 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005103 VkBufferView* pView) {
5104 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5105 deviceObject := GetDevice(device)
5106
5107 bufferObject := GetBuffer(pCreateInfo.buffer)
5108 assert(bufferObject.device == device)
5109
5110 view := ?
5111 pView[0] = view
5112 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5113
5114 return ?
5115}
5116
5117@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005118cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005119 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005120 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005121 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005122 deviceObject := GetDevice(device)
5123 bufferViewObject := GetBufferView(bufferView)
5124 assert(bufferViewObject.device == device)
5125
5126 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005127}
5128
5129
5130// Image functions
5131
5132@threadSafety("system")
5133cmd VkResult vkCreateImage(
5134 VkDevice device,
5135 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005136 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005137 VkImage* pImage) {
5138 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5139 deviceObject := GetDevice(device)
5140
5141 image := ?
5142 pImage[0] = image
5143 State.Images[image] = new!ImageObject(device: device)
5144
5145 return ?
5146}
5147
5148@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005149cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005150 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005151 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005152 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005153 deviceObject := GetDevice(device)
5154 imageObject := GetImage(image)
5155 assert(imageObject.device == device)
5156
Jesse Hall3fbc8562015-11-29 22:10:52 -08005157 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005158 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005159}
5160
Jesse Hall606a54e2015-11-19 22:17:28 -08005161cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005162 VkDevice device,
5163 VkImage image,
5164 const VkImageSubresource* pSubresource,
5165 VkSubresourceLayout* pLayout) {
5166 deviceObject := GetDevice(device)
5167 imageObject := GetImage(image)
5168 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005169}
5170
5171
5172// Image view functions
5173
5174@threadSafety("system")
5175cmd VkResult vkCreateImageView(
5176 VkDevice device,
5177 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005178 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005179 VkImageView* pView) {
5180 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5181 deviceObject := GetDevice(device)
5182
5183 imageObject := GetImage(pCreateInfo.image)
5184 assert(imageObject.device == device)
5185
5186 view := ?
5187 pView[0] = view
5188 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5189
5190 return ?
5191}
5192
5193@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005194cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005195 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005196 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005197 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005198 deviceObject := GetDevice(device)
5199 imageViewObject := GetImageView(imageView)
5200 assert(imageViewObject.device == device)
5201
5202 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005203}
5204
5205
5206// Shader functions
5207
5208cmd VkResult vkCreateShaderModule(
5209 VkDevice device,
5210 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005211 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005212 VkShaderModule* pShaderModule) {
5213 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5214 deviceObject := GetDevice(device)
5215
5216 shaderModule := ?
5217 pShaderModule[0] = shaderModule
5218 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5219
5220 return ?
5221}
5222
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005223cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005224 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005225 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005226 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005227 deviceObject := GetDevice(device)
5228 shaderModuleObject := GetShaderModule(shaderModule)
5229 assert(shaderModuleObject.device == device)
5230
5231 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005232}
5233
Jesse Halld27f6aa2015-08-15 17:58:48 -07005234
5235// Pipeline functions
5236
5237cmd VkResult vkCreatePipelineCache(
5238 VkDevice device,
5239 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005240 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005241 VkPipelineCache* pPipelineCache) {
5242 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5243 deviceObject := GetDevice(device)
5244
5245 pipelineCache := ?
5246 pPipelineCache[0] = pipelineCache
5247 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5248
5249 return ?
5250}
5251
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005252cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005253 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005254 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005255 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005256 deviceObject := GetDevice(device)
5257 pipelineCacheObject := GetPipelineCache(pipelineCache)
5258 assert(pipelineCacheObject.device == device)
5259
5260 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005261}
5262
Jesse Halld27f6aa2015-08-15 17:58:48 -07005263cmd VkResult vkGetPipelineCacheData(
5264 VkDevice device,
5265 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005266 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005267 void* pData) {
5268 deviceObject := GetDevice(device)
5269 pipelineCacheObject := GetPipelineCache(pipelineCache)
5270 assert(pipelineCacheObject.device == device)
5271
5272 return ?
5273}
5274
5275cmd VkResult vkMergePipelineCaches(
5276 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005277 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005278 u32 srcCacheCount,
5279 const VkPipelineCache* pSrcCaches) {
5280 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005281 dstCacheObject := GetPipelineCache(dstCache)
5282 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005283
5284 srcCaches := pSrcCaches[0:srcCacheCount]
5285 for i in (0 .. srcCacheCount) {
5286 srcCache := srcCaches[i]
5287 srcCacheObject := GetPipelineCache(srcCache)
5288 assert(srcCacheObject.device == device)
5289 }
5290
5291 return ?
5292}
5293
5294cmd VkResult vkCreateGraphicsPipelines(
5295 VkDevice device,
5296 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005297 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005298 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005299 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005300 VkPipeline* pPipelines) {
5301 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005302 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005303 pipelineCacheObject := GetPipelineCache(pipelineCache)
5304 assert(pipelineCacheObject.device == device)
5305 }
5306
Jesse Hall03b6fe12015-11-24 12:44:21 -08005307 createInfos := pCreateInfos[0:createInfoCount]
5308 pipelines := pPipelines[0:createInfoCount]
5309 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005310 pipeline := ?
5311 pipelines[i] = pipeline
5312 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5313 }
5314
5315 return ?
5316}
5317
5318cmd VkResult vkCreateComputePipelines(
5319 VkDevice device,
5320 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005321 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005322 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005323 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005324 VkPipeline* pPipelines) {
5325 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005326 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005327 pipelineCacheObject := GetPipelineCache(pipelineCache)
5328 assert(pipelineCacheObject.device == device)
5329 }
5330
Jesse Hall03b6fe12015-11-24 12:44:21 -08005331 createInfos := pCreateInfos[0:createInfoCount]
5332 pipelines := pPipelines[0:createInfoCount]
5333 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005334 pipeline := ?
5335 pipelines[i] = pipeline
5336 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5337 }
5338
5339 return ?
5340}
5341
5342@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005343cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005344 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005345 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005346 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005347 deviceObject := GetDevice(device)
5348 pipelineObjects := GetPipeline(pipeline)
5349 assert(pipelineObjects.device == device)
5350
5351 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005352}
5353
5354
5355// Pipeline layout functions
5356
5357@threadSafety("system")
5358cmd VkResult vkCreatePipelineLayout(
5359 VkDevice device,
5360 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005361 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005362 VkPipelineLayout* pPipelineLayout) {
5363 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5364 deviceObject := GetDevice(device)
5365
5366 pipelineLayout := ?
5367 pPipelineLayout[0] = pipelineLayout
5368 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5369
5370 return ?
5371}
5372
5373@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005374cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005375 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005376 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005377 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005378 deviceObject := GetDevice(device)
5379 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5380 assert(pipelineLayoutObjects.device == device)
5381
5382 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005383}
5384
5385
5386// Sampler functions
5387
5388@threadSafety("system")
5389cmd VkResult vkCreateSampler(
5390 VkDevice device,
5391 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005392 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005393 VkSampler* pSampler) {
5394 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5395 deviceObject := GetDevice(device)
5396
5397 sampler := ?
5398 pSampler[0] = sampler
5399 State.Samplers[sampler] = new!SamplerObject(device: device)
5400
5401 return ?
5402}
5403
5404@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005405cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005406 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005407 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005408 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005409 deviceObject := GetDevice(device)
5410 samplerObject := GetSampler(sampler)
5411 assert(samplerObject.device == device)
5412
5413 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005414}
5415
5416
5417// Descriptor set functions
5418
5419@threadSafety("system")
5420cmd VkResult vkCreateDescriptorSetLayout(
5421 VkDevice device,
5422 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005423 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005424 VkDescriptorSetLayout* pSetLayout) {
5425 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5426 deviceObject := GetDevice(device)
5427
5428 setLayout := ?
5429 pSetLayout[0] = setLayout
5430 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5431
5432 return ?
5433}
5434
5435@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005436cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005437 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005438 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005439 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005440 deviceObject := GetDevice(device)
5441 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5442 assert(descriptorSetLayoutObject.device == device)
5443
5444 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005445}
5446
5447@threadSafety("system")
5448cmd VkResult vkCreateDescriptorPool(
5449 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005450 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005451 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005452 VkDescriptorPool* pDescriptorPool) {
5453 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5454 deviceObject := GetDevice(device)
5455
5456 descriptorPool := ?
5457 pDescriptorPool[0] = descriptorPool
5458 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5459
5460 return ?
5461}
5462
5463@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005464cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005465 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005466 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005467 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005468 deviceObject := GetDevice(device)
5469 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5470 assert(descriptorPoolObject.device == device)
5471
5472 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005473}
5474
5475@threadSafety("app")
5476cmd VkResult vkResetDescriptorPool(
5477 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005478 VkDescriptorPool descriptorPool,
5479 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005480 deviceObject := GetDevice(device)
5481 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5482 assert(descriptorPoolObject.device == device)
5483
5484 return ?
5485}
5486
5487@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005488cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005489 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005490 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005491 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005492 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005493 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005494 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005495
Jesse Hall03b6fe12015-11-24 12:44:21 -08005496 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5497 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005498 setLayout := setLayouts[i]
5499 setLayoutObject := GetDescriptorSetLayout(setLayout)
5500 assert(setLayoutObject.device == device)
5501 }
5502
Jesse Hall03b6fe12015-11-24 12:44:21 -08005503 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5504 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005505 descriptorSet := ?
5506 descriptorSets[i] = descriptorSet
5507 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5508 }
5509
5510 return ?
5511}
5512
Jesse Hallf09c6b12015-08-15 19:54:28 -07005513cmd VkResult vkFreeDescriptorSets(
5514 VkDevice device,
5515 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005516 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005517 const VkDescriptorSet* pDescriptorSets) {
5518 deviceObject := GetDevice(device)
5519 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5520
Jesse Hall03b6fe12015-11-24 12:44:21 -08005521 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5522 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005523 descriptorSet := descriptorSets[i]
5524 descriptorSetObject := GetDescriptorSet(descriptorSet)
5525 assert(descriptorSetObject.device == device)
5526 State.DescriptorSets[descriptorSet] = null
5527 }
5528
5529 return ?
5530}
5531
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005532cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005533 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005534 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005535 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005536 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005537 const VkCopyDescriptorSet* pDescriptorCopies) {
5538 deviceObject := GetDevice(device)
5539
Jesse Hallb00daad2015-11-29 19:46:20 -08005540 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5541 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005542 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005543 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005544 assert(descriptorWriteObject.device == device)
5545 }
5546
Jesse Hallb00daad2015-11-29 19:46:20 -08005547 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5548 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005549 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005550 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005551 assert(descriptorCopyObject.device == device)
5552 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005553}
5554
5555
5556// Framebuffer functions
5557
5558@threadSafety("system")
5559cmd VkResult vkCreateFramebuffer(
5560 VkDevice device,
5561 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005562 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005563 VkFramebuffer* pFramebuffer) {
5564 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5565 deviceObject := GetDevice(device)
5566
5567 framebuffer := ?
5568 pFramebuffer[0] = framebuffer
5569 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5570
5571 return ?
5572}
5573
5574@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005575cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005576 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005577 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005578 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005579 deviceObject := GetDevice(device)
5580 framebufferObject := GetFramebuffer(framebuffer)
5581 assert(framebufferObject.device == device)
5582
5583 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005584}
5585
5586
5587// Renderpass functions
5588
5589@threadSafety("system")
5590cmd VkResult vkCreateRenderPass(
5591 VkDevice device,
5592 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005593 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005594 VkRenderPass* pRenderPass) {
5595 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5596 deviceObject := GetDevice(device)
5597
5598 renderpass := ?
5599 pRenderPass[0] = renderpass
5600 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5601
5602 return ?
5603}
5604
5605@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005606cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005607 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005608 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005609 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005610 deviceObject := GetDevice(device)
5611 renderPassObject := GetRenderPass(renderPass)
5612 assert(renderPassObject.device == device)
5613
5614 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005615}
5616
Jesse Hall606a54e2015-11-19 22:17:28 -08005617cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005618 VkDevice device,
5619 VkRenderPass renderPass,
5620 VkExtent2D* pGranularity) {
5621 deviceObject := GetDevice(device)
5622 renderPassObject := GetRenderPass(renderPass)
5623
5624 granularity := ?
5625 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005626}
5627
5628// Command pool functions
5629
5630cmd VkResult vkCreateCommandPool(
5631 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005632 const VkCommandPoolCreateInfo* pCreateInfo,
5633 const VkAllocationCallbacks* pAllocator,
5634 VkCommandPool* pCommandPool) {
5635 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005636 deviceObject := GetDevice(device)
5637
Jesse Hall3fbc8562015-11-29 22:10:52 -08005638 commandPool := ?
5639 pCommandPool[0] = commandPool
5640 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005641
5642 return ?
5643}
5644
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005645cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005646 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005647 VkCommandPool commandPool,
5648 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005649 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005650 commandPoolObject := GetCommandPool(commandPool)
5651 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005652
Jesse Hall3fbc8562015-11-29 22:10:52 -08005653 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005654}
5655
5656cmd VkResult vkResetCommandPool(
5657 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005658 VkCommandPool commandPool,
5659 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005660 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005661 commandPoolObject := GetCommandPool(commandPool)
5662 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005663
5664 return ?
5665}
5666
5667// Command buffer functions
5668
Jesse Hall3fbc8562015-11-29 22:10:52 -08005669macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5670 memoryObject := GetDeviceMemory(memory)
5671 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005672
Jesse Hall3fbc8562015-11-29 22:10:52 -08005673 commandBufferObject := GetCommandBuffer(commandBuffer)
5674 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005675}
5676
Jesse Hall3fbc8562015-11-29 22:10:52 -08005677macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5678 memoryObject := GetDeviceMemory(memory)
5679 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005680
Jesse Hall3fbc8562015-11-29 22:10:52 -08005681 commandBufferObject := GetCommandBuffer(commandBuffer)
5682 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005683}
5684
5685@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005686cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005687 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005688 const VkCommandBufferAllocateInfo* pAllocateInfo,
5689 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005690 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005691
Jesse Hall3dd678a2016-01-08 21:52:01 -08005692 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005693 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005694 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005695 commandBuffer := ?
5696 commandBuffers[i] = commandBuffer
5697 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005698 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005699
5700 return ?
5701}
5702
5703@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005704cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005705 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005706 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005707 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005708 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005709 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005710
Jesse Hall3fbc8562015-11-29 22:10:52 -08005711 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005712 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005713 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5714 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005715 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005716 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005717 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005718}
5719
5720@threadSafety("app")
5721cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005722 VkCommandBuffer commandBuffer,
5723 const VkCommandBufferBeginInfo* pBeginInfo) {
5724 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5725 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005726
5727 // TODO: iterate over boundObjects and clear memory bindings
5728
5729 return ?
5730}
5731
5732@threadSafety("app")
5733cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005734 VkCommandBuffer commandBuffer) {
5735 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005736
5737 return ?
5738}
5739
5740@threadSafety("app")
5741cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005742 VkCommandBuffer commandBuffer,
5743 VkCommandBufferResetFlags flags) {
5744 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005745
5746 // TODO: iterate over boundObjects and clear memory bindings
5747
5748 return ?
5749}
5750
5751
5752// Command buffer building functions
5753
5754@threadSafety("app")
5755cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005756 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005757 VkPipelineBindPoint pipelineBindPoint,
5758 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005759 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005760 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005761 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005762
Jesse Halld8bade02015-11-24 10:24:18 -08005763 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005764 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5765 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5766 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005767 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005768}
5769
5770@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005771cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005772 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005773 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005774 u32 viewportCount,
5775 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005776 commandBufferObject := GetCommandBuffer(commandBuffer)
5777 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005778}
5779
5780@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005781cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005782 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005783 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005784 u32 scissorCount,
5785 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005786 commandBufferObject := GetCommandBuffer(commandBuffer)
5787 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005788}
5789
5790@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005791cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005792 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005793 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005794 commandBufferObject := GetCommandBuffer(commandBuffer)
5795 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005796}
5797
5798@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005799cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005800 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005801 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005802 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005803 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005804 commandBufferObject := GetCommandBuffer(commandBuffer)
5805 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005806}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005807
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005808@threadSafety("app")
5809cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005810 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005811 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5812 // an annotation as a quick hack to pass this to the template without
5813 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005814 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005815 commandBufferObject := GetCommandBuffer(commandBuffer)
5816 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005817}
5818
5819@threadSafety("app")
5820cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005821 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005822 f32 minDepthBounds,
5823 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005824 commandBufferObject := GetCommandBuffer(commandBuffer)
5825 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005826}
5827
5828@threadSafety("app")
5829cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005830 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005831 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005832 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005833 commandBufferObject := GetCommandBuffer(commandBuffer)
5834 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005835}
5836
5837@threadSafety("app")
5838cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005839 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005840 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005841 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005842 commandBufferObject := GetCommandBuffer(commandBuffer)
5843 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005844}
5845
5846@threadSafety("app")
5847cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005848 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005849 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005850 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005851 commandBufferObject := GetCommandBuffer(commandBuffer)
5852 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005853}
5854
5855@threadSafety("app")
5856cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005857 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005858 VkPipelineBindPoint pipelineBindPoint,
5859 VkPipelineLayout layout,
5860 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005861 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005862 const VkDescriptorSet* pDescriptorSets,
5863 u32 dynamicOffsetCount,
5864 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005865 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005866
Jesse Hall03b6fe12015-11-24 12:44:21 -08005867 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5868 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005869 descriptorSet := descriptorSets[i]
5870 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005871 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005872 }
5873
5874 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5875 for i in (0 .. dynamicOffsetCount) {
5876 dynamicOffset := dynamicOffsets[i]
5877 }
5878
Jesse Halld8bade02015-11-24 10:24:18 -08005879 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005880 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5881 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5882 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005883 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005884}
5885
5886@threadSafety("app")
5887cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005888 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005889 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005890 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005891 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005892 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005893 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005894 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005895
Jesse Hall3fbc8562015-11-29 22:10:52 -08005896 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005897
Jesse Hall3fbc8562015-11-29 22:10:52 -08005898 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005899}
5900
5901@threadSafety("app")
5902cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005903 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005904 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005905 u32 bindingCount,
5906 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005907 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005908 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005909
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005910 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005911 buffers := pBuffers[0:bindingCount]
5912 offsets := pOffsets[0:bindingCount]
5913 for i in (0 .. bindingCount) {
5914 buffer := buffers[i]
5915 offset := offsets[i]
5916 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005917 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005918
Jesse Hall3fbc8562015-11-29 22:10:52 -08005919 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005920 }
5921
Jesse Hall3fbc8562015-11-29 22:10:52 -08005922 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005923}
5924
5925@threadSafety("app")
5926cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005927 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005928 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005929 u32 instanceCount,
5930 u32 firstVertex,
5931 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005932 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005933
Jesse Hall3fbc8562015-11-29 22:10:52 -08005934 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005935}
5936
5937@threadSafety("app")
5938cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005939 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005940 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005941 u32 instanceCount,
5942 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005943 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005944 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005945 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005946
Jesse Hall3fbc8562015-11-29 22:10:52 -08005947 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005948}
5949
5950@threadSafety("app")
5951cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005952 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005953 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005954 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005955 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005956 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005957 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005958 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005959 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005960
Jesse Hall3fbc8562015-11-29 22:10:52 -08005961 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005962
Jesse Hall3fbc8562015-11-29 22:10:52 -08005963 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005964}
5965
5966@threadSafety("app")
5967cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005968 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005969 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005970 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005971 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005972 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005973 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005974 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005975 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005976
Jesse Hall3fbc8562015-11-29 22:10:52 -08005977 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005978
Jesse Hall3fbc8562015-11-29 22:10:52 -08005979 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005980}
5981
5982@threadSafety("app")
5983cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005984 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08005985 u32 groupCountX,
5986 u32 groupCountY,
5987 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005988 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005989
Jesse Hall3fbc8562015-11-29 22:10:52 -08005990 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005991}
5992
5993@threadSafety("app")
5994cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005995 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005996 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005997 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005998 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005999 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006000 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006001
Jesse Hall3fbc8562015-11-29 22:10:52 -08006002 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006003
Jesse Hall3fbc8562015-11-29 22:10:52 -08006004 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006005}
6006
6007@threadSafety("app")
6008cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006009 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006010 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006011 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006012 u32 regionCount,
6013 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006014 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006015 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006016 dstBufferObject := GetBuffer(dstBuffer)
6017 assert(commandBufferObject.device == srcBufferObject.device)
6018 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006019
6020 regions := pRegions[0:regionCount]
6021 for i in (0 .. regionCount) {
6022 region := regions[i]
6023 }
6024
Jesse Hall3fbc8562015-11-29 22:10:52 -08006025 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6026 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006027
Jesse Hall65ab5522015-11-30 00:07:16 -08006028 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006029}
6030
6031@threadSafety("app")
6032cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006033 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006034 VkImage srcImage,
6035 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006036 VkImage dstImage,
6037 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006038 u32 regionCount,
6039 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006040 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006041 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006042 dstImageObject := GetImage(dstImage)
6043 assert(commandBufferObject.device == srcImageObject.device)
6044 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045
6046 regions := pRegions[0:regionCount]
6047 for i in (0 .. regionCount) {
6048 region := regions[i]
6049 }
6050
Jesse Hall3fbc8562015-11-29 22:10:52 -08006051 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6052 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006053
Jesse Hall65ab5522015-11-30 00:07:16 -08006054 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006055}
6056
6057@threadSafety("app")
6058cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006059 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006060 VkImage srcImage,
6061 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006062 VkImage dstImage,
6063 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006064 u32 regionCount,
6065 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006066 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006067 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006068 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006069 dstImageObject := GetImage(dstImage)
6070 assert(commandBufferObject.device == srcImageObject.device)
6071 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006072
6073 regions := pRegions[0:regionCount]
6074 for i in (0 .. regionCount) {
6075 region := regions[i]
6076 }
6077
Jesse Hall3fbc8562015-11-29 22:10:52 -08006078 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6079 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006080
Jesse Hall3fbc8562015-11-29 22:10:52 -08006081 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006082}
6083
6084@threadSafety("app")
6085cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006086 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006087 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006088 VkImage dstImage,
6089 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006090 u32 regionCount,
6091 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006092 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006093 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006094 dstImageObject := GetImage(dstImage)
6095 assert(commandBufferObject.device == srcBufferObject.device)
6096 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006097
6098 regions := pRegions[0:regionCount]
6099 for i in (0 .. regionCount) {
6100 region := regions[i]
6101 }
6102
Jesse Hall3fbc8562015-11-29 22:10:52 -08006103 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6104 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006105
Jesse Hall65ab5522015-11-30 00:07:16 -08006106 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006107}
6108
6109@threadSafety("app")
6110cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006111 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006112 VkImage srcImage,
6113 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006114 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006115 u32 regionCount,
6116 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006117 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006118 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006119 dstBufferObject := GetBuffer(dstBuffer)
6120 assert(commandBufferObject.device == srcImageObject.device)
6121 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006122
6123 regions := pRegions[0:regionCount]
6124 for i in (0 .. regionCount) {
6125 region := regions[i]
6126 }
6127
Jesse Hall3fbc8562015-11-29 22:10:52 -08006128 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6129 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006130
Jesse Hall65ab5522015-11-30 00:07:16 -08006131 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006132}
6133
6134@threadSafety("app")
6135cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006136 VkCommandBuffer commandBuffer,
6137 VkBuffer dstBuffer,
6138 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006139 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006140 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006141 commandBufferObject := GetCommandBuffer(commandBuffer)
6142 dstBufferObject := GetBuffer(dstBuffer)
6143 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006144
6145 data := pData[0:dataSize]
6146
Jesse Hall3fbc8562015-11-29 22:10:52 -08006147 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006148
Jesse Hall65ab5522015-11-30 00:07:16 -08006149 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006150}
6151
6152@threadSafety("app")
6153cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006154 VkCommandBuffer commandBuffer,
6155 VkBuffer dstBuffer,
6156 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006157 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006158 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006159 commandBufferObject := GetCommandBuffer(commandBuffer)
6160 dstBufferObject := GetBuffer(dstBuffer)
6161 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006162
Jesse Hall65ab5522015-11-30 00:07:16 -08006163 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006164}
6165
6166@threadSafety("app")
6167cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006168 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006169 VkImage image,
6170 VkImageLayout imageLayout,
6171 const VkClearColorValue* pColor,
6172 u32 rangeCount,
6173 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006174 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006175 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006176 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006177
6178 ranges := pRanges[0:rangeCount]
6179 for i in (0 .. rangeCount) {
6180 range := ranges[i]
6181 }
6182
Jesse Hall3fbc8562015-11-29 22:10:52 -08006183 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006184
Jesse Hall3fbc8562015-11-29 22:10:52 -08006185 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006186}
6187
6188@threadSafety("app")
6189cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006190 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006191 VkImage image,
6192 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006193 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006194 u32 rangeCount,
6195 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006196 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006197 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006198 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006199
6200 ranges := pRanges[0:rangeCount]
6201 for i in (0 .. rangeCount) {
6202 range := ranges[i]
6203 }
6204
Jesse Hall3fbc8562015-11-29 22:10:52 -08006205 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006206
Jesse Hall3fbc8562015-11-29 22:10:52 -08006207 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006208}
6209
6210@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006211cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006212 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006213 u32 attachmentCount,
6214 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006215 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006216 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006217 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006218
6219 rects := pRects[0:rectCount]
6220 for i in (0 .. rectCount) {
6221 rect := rects[i]
6222 }
6223
Jesse Hall3fbc8562015-11-29 22:10:52 -08006224 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006225}
6226
6227@threadSafety("app")
6228cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006229 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006230 VkImage srcImage,
6231 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006232 VkImage dstImage,
6233 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006234 u32 regionCount,
6235 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006236 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006237 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006238 dstImageObject := GetImage(dstImage)
6239 assert(commandBufferObject.device == srcImageObject.device)
6240 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006241
6242 regions := pRegions[0:regionCount]
6243 for i in (0 .. regionCount) {
6244 region := regions[i]
6245 }
6246
Jesse Hall3fbc8562015-11-29 22:10:52 -08006247 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6248 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006249
Jesse Hall3fbc8562015-11-29 22:10:52 -08006250 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006251}
6252
6253@threadSafety("app")
6254cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006255 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006256 VkEvent event,
6257 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006258 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006259 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006260 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006261}
6262
6263@threadSafety("app")
6264cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006265 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006266 VkEvent event,
6267 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006268 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006269 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006270 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006271}
6272
6273@threadSafety("app")
6274cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006275 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006276 u32 eventCount,
6277 const VkEvent* pEvents,
6278 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006279 VkPipelineStageFlags dstStageMask,
6280 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006281 const VkMemoryBarrier* pMemoryBarriers,
6282 u32 bufferMemoryBarrierCount,
6283 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6284 u32 imageMemoryBarrierCount,
6285 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006286 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006287
6288 events := pEvents[0:eventCount]
6289 for i in (0 .. eventCount) {
6290 event := events[i]
6291 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006292 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006293 }
6294
Jesse Hall3dd678a2016-01-08 21:52:01 -08006295 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006296 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006297 memoryBarrier := memoryBarriers[i]
6298 }
6299 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6300 for i in (0 .. bufferMemoryBarrierCount) {
6301 bufferMemoryBarrier := bufferMemoryBarriers[i]
6302 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6303 assert(bufferObject.device == commandBufferObject.device)
6304 }
6305 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6306 for i in (0 .. imageMemoryBarrierCount) {
6307 imageMemoryBarrier := imageMemoryBarriers[i]
6308 imageObject := GetImage(imageMemoryBarrier.image)
6309 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006310 }
6311}
6312
6313@threadSafety("app")
6314cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006315 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006316 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006317 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006318 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006319 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006320 const VkMemoryBarrier* pMemoryBarriers,
6321 u32 bufferMemoryBarrierCount,
6322 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6323 u32 imageMemoryBarrierCount,
6324 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006325 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006326
Jesse Hall3dd678a2016-01-08 21:52:01 -08006327 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006328 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006329 memoryBarrier := memoryBarriers[i]
6330 }
6331 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6332 for i in (0 .. bufferMemoryBarrierCount) {
6333 bufferMemoryBarrier := bufferMemoryBarriers[i]
6334 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6335 assert(bufferObject.device == commandBufferObject.device)
6336 }
6337 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6338 for i in (0 .. imageMemoryBarrierCount) {
6339 imageMemoryBarrier := imageMemoryBarriers[i]
6340 imageObject := GetImage(imageMemoryBarrier.image)
6341 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006342 }
6343}
6344
6345@threadSafety("app")
6346cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006347 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006348 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006349 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006350 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006351 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006352 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006353 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006354}
6355
6356@threadSafety("app")
6357cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006358 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006359 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006360 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006361 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006362 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006363 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006364}
6365
6366@threadSafety("app")
6367cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006368 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006369 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006370 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006371 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006372 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006373 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006374 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006375}
6376
6377@threadSafety("app")
6378cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006379 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006380 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006381 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006382 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006383 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006384 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006385 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006386}
6387
6388@threadSafety("app")
6389cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006390 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006391 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006392 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006393 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006394 VkBuffer dstBuffer,
6395 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006396 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006397 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006398 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006399 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006400 dstBufferObject := GetBuffer(dstBuffer)
6401 assert(commandBufferObject.device == queryPoolObject.device)
6402 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006403}
6404
6405cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006406 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006407 VkPipelineLayout layout,
6408 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006409 u32 offset,
6410 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006411 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006412 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006413 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006414 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006415}
6416
6417@threadSafety("app")
6418cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006419 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006420 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006421 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006422 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006423 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6424 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006425 assert(commandBufferObject.device == renderPassObject.device)
6426 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006427
Jesse Hall3fbc8562015-11-29 22:10:52 -08006428 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006429}
6430
6431cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006432 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006433 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006434 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006435}
6436
6437@threadSafety("app")
6438cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006439 VkCommandBuffer commandBuffer) {
6440 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006441
Jesse Hall3fbc8562015-11-29 22:10:52 -08006442 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006443}
6444
6445cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006446 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006447 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006448 const VkCommandBuffer* pCommandBuffers) {
6449 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006450
Jesse Hall3dd678a2016-01-08 21:52:01 -08006451 commandBuffers := pCommandBuffers[0:commandBufferCount]
6452 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006453 secondaryCommandBuffer := commandBuffers[i]
6454 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6455 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006456 }
6457}
6458
Jesse Hallad250842017-03-10 18:35:38 -08006459@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006460cmd void vkDestroySurfaceKHR(
6461 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006462 VkSurfaceKHR surface,
6463 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006464 instanceObject := GetInstance(instance)
6465 surfaceObject := GetSurface(surface)
6466 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006467
Jesse Hall1356b0d2015-11-23 17:24:58 -08006468 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006469}
6470
Jesse Hallad250842017-03-10 18:35:38 -08006471@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006472cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006473 VkPhysicalDevice physicalDevice,
6474 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006475 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006476 VkBool32* pSupported) {
6477 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006478
6479 return ?
6480}
6481
Jesse Hallad250842017-03-10 18:35:38 -08006482@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006483cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6484 VkPhysicalDevice physicalDevice,
6485 VkSurfaceKHR surface,
6486 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6487 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6488
6489 surfaceCapabilities := ?
6490 pSurfaceCapabilities[0] = surfaceCapabilities
6491
6492 return ?
6493}
6494
Jesse Hallad250842017-03-10 18:35:38 -08006495@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006496cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6497 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006498 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006499 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006500 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006501 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006502
6503 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006504 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006505 surfaceFormats := pSurfaceFormats[0:count]
6506
6507 for i in (0 .. count) {
6508 surfaceFormat := ?
6509 surfaceFormats[i] = surfaceFormat
6510 }
6511
6512 return ?
6513}
6514
Jesse Hallad250842017-03-10 18:35:38 -08006515@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006516cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6517 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006518 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006519 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006520 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006521 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006522
6523 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006524 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006525 presentModes := pPresentModes[0:count]
6526
6527 for i in (0 .. count) {
6528 presentMode := ?
6529 presentModes[i] = presentMode
6530 }
6531
6532 return ?
6533}
6534
Jesse Hallad250842017-03-10 18:35:38 -08006535@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006536cmd VkResult vkCreateSwapchainKHR(
6537 VkDevice device,
6538 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006539 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006540 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006541 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006542 deviceObject := GetDevice(device)
6543
6544 swapchain := ?
6545 pSwapchain[0] = swapchain
6546 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6547
6548 return ?
6549}
6550
Jesse Hallad250842017-03-10 18:35:38 -08006551@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006552cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006553 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006554 VkSwapchainKHR swapchain,
6555 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006556 deviceObject := GetDevice(device)
6557 swapchainObject := GetSwapchain(swapchain)
6558 assert(swapchainObject.device == device)
6559
6560 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006561}
6562
Jesse Hallad250842017-03-10 18:35:38 -08006563@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006564cmd VkResult vkGetSwapchainImagesKHR(
6565 VkDevice device,
6566 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006567 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006568 VkImage* pSwapchainImages) {
6569 deviceObject := GetDevice(device)
6570
6571 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006572 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006573 swapchainImages := pSwapchainImages[0:count]
6574
6575 for i in (0 .. count) {
6576 swapchainImage := ?
6577 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006578 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006579 }
6580
6581 return ?
6582}
6583
Jesse Hallad250842017-03-10 18:35:38 -08006584@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006585cmd VkResult vkAcquireNextImageKHR(
6586 VkDevice device,
6587 VkSwapchainKHR swapchain,
6588 u64 timeout,
6589 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006590 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006591 u32* pImageIndex) {
6592 deviceObject := GetDevice(device)
6593 swapchainObject := GetSwapchain(swapchain)
6594
6595 imageIndex := ?
6596 pImageIndex[0] = imageIndex
6597
6598 return ?
6599}
6600
Jesse Hallad250842017-03-10 18:35:38 -08006601@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006602cmd VkResult vkQueuePresentKHR(
6603 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006604 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006605 queueObject := GetQueue(queue)
6606
6607 presentInfo := ?
6608 pPresentInfo[0] = presentInfo
6609
6610 return ?
6611}
6612
Jesse Hallad250842017-03-10 18:35:38 -08006613@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006614cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6615 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006616 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006617 VkDisplayPropertiesKHR* pProperties) {
6618 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6619 return ?
6620}
6621
Jesse Hallad250842017-03-10 18:35:38 -08006622@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006623cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6624 VkPhysicalDevice physicalDevice,
6625 u32* pPropertyCount,
6626 VkDisplayPlanePropertiesKHR* pProperties) {
6627 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6628 return ?
6629}
6630
Jesse Hallad250842017-03-10 18:35:38 -08006631@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006632cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6633 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006634 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006635 u32* pDisplayCount,
6636 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006637 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6638 return ?
6639}
6640
Jesse Hallad250842017-03-10 18:35:38 -08006641@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006642cmd VkResult vkGetDisplayModePropertiesKHR(
6643 VkPhysicalDevice physicalDevice,
6644 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006645 u32* pPropertyCount,
6646 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006647 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6648 return ?
6649}
6650
Jesse Hallad250842017-03-10 18:35:38 -08006651@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006652cmd VkResult vkCreateDisplayModeKHR(
6653 VkPhysicalDevice physicalDevice,
6654 VkDisplayKHR display,
6655 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006656 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006657 VkDisplayModeKHR* pMode) {
6658 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6659 return ?
6660}
6661
Jesse Hallad250842017-03-10 18:35:38 -08006662@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006663cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006664 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006665 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006666 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006667 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006668 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6669 return ?
6670}
6671
Jesse Hallad250842017-03-10 18:35:38 -08006672@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006673cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6674 VkInstance instance,
6675 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006676 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006677 VkSurfaceKHR* pSurface) {
6678 return ?
6679}
6680
Jesse Hallad250842017-03-10 18:35:38 -08006681@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006682cmd VkResult vkCreateSharedSwapchainsKHR(
6683 VkDevice device,
6684 u32 swapchainCount,
6685 const VkSwapchainCreateInfoKHR* pCreateInfos,
6686 const VkAllocationCallbacks* pAllocator,
6687 VkSwapchainKHR* pSwapchains) {
6688 return ?
6689}
6690
Jesse Hallad250842017-03-10 18:35:38 -08006691@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006692cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006693 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006694 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006695 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006696 VkSurfaceKHR* pSurface) {
6697 instanceObject := GetInstance(instance)
6698 return ?
6699}
6700
Jesse Hallad250842017-03-10 18:35:38 -08006701@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006702cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6703 VkPhysicalDevice physicalDevice,
6704 u32 queueFamilyIndex,
6705 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006706 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006707 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6708 return ?
6709}
6710
Jesse Hallad250842017-03-10 18:35:38 -08006711@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006712cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006713 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006714 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006715 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006716 VkSurfaceKHR* pSurface) {
6717 instanceObject := GetInstance(instance)
6718 return ?
6719}
6720
Jesse Hallad250842017-03-10 18:35:38 -08006721@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006722cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6723 VkPhysicalDevice physicalDevice,
6724 u32 queueFamilyIndex,
6725 platform.xcb_connection_t* connection,
6726 platform.xcb_visualid_t visual_id) {
6727 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6728 return ?
6729}
6730
Jesse Hallad250842017-03-10 18:35:38 -08006731@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006732cmd VkResult vkCreateWaylandSurfaceKHR(
6733 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006734 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006735 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006736 VkSurfaceKHR* pSurface) {
6737 instanceObject := GetInstance(instance)
6738 return ?
6739}
6740
Jesse Hallad250842017-03-10 18:35:38 -08006741@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006742cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6743 VkPhysicalDevice physicalDevice,
6744 u32 queueFamilyIndex,
6745 platform.wl_display* display) {
6746 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6747 return ?
6748}
6749
Jesse Hallad250842017-03-10 18:35:38 -08006750@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006751cmd VkResult vkCreateMirSurfaceKHR(
6752 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006753 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006754 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006755 VkSurfaceKHR* pSurface) {
6756 instanceObject := GetInstance(instance)
6757 return ?
6758}
6759
Jesse Hallad250842017-03-10 18:35:38 -08006760@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006761cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6762 VkPhysicalDevice physicalDevice,
6763 u32 queueFamilyIndex,
6764 platform.MirConnection* connection) {
6765 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6766 return ?
6767}
6768
Jesse Hallad250842017-03-10 18:35:38 -08006769@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006770cmd VkResult vkCreateAndroidSurfaceKHR(
6771 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006772 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006773 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006774 VkSurfaceKHR* pSurface) {
6775 instanceObject := GetInstance(instance)
6776 return ?
6777}
6778
Jesse Hallad250842017-03-10 18:35:38 -08006779@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006780cmd VkResult vkCreateWin32SurfaceKHR(
6781 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006782 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006783 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006784 VkSurfaceKHR* pSurface) {
6785 instanceObject := GetInstance(instance)
6786 return ?
6787}
6788
Jesse Hallad250842017-03-10 18:35:38 -08006789@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006790cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6791 VkPhysicalDevice physicalDevice,
6792 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006793 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006794 return ?
6795}
6796
Jesse Hallad250842017-03-10 18:35:38 -08006797@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006798@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08006799cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6800 VkDevice device,
6801 VkFormat format,
6802 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006803 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08006804 return ?
6805}
6806
Jesse Hallad250842017-03-10 18:35:38 -08006807@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006808@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13006809cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
6810 VkDevice device,
6811 VkFormat format,
6812 VkImageUsageFlags imageUsage,
6813 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006814 u64* grallocConsumerUsage,
6815 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13006816 return ?
6817}
6818
Jesse Hallad250842017-03-10 18:35:38 -08006819@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006820cmd VkResult vkAcquireImageANDROID(
6821 VkDevice device,
6822 VkImage image,
6823 int nativeFenceFd,
6824 VkSemaphore semaphore,
6825 VkFence fence) {
6826 return ?
6827}
6828
Jesse Hallad250842017-03-10 18:35:38 -08006829@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006830cmd VkResult vkQueueSignalReleaseImageANDROID(
6831 VkQueue queue,
6832 u32 waitSemaphoreCount,
6833 const VkSemaphore* pWaitSemaphores,
6834 VkImage image,
6835 int* pNativeFenceFd) {
6836 return ?
6837}
6838
Jesse Hallad250842017-03-10 18:35:38 -08006839@extension("VK_EXT_debug_report") // 12
6840@external type void* PFN_vkDebugReportCallbackEXT
6841@extension("VK_EXT_debug_report") // 12
6842@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6843 VkDebugReportFlagsEXT flags,
6844 VkDebugReportObjectTypeEXT objectType,
6845 u64 object,
6846 platform.size_t location,
6847 s32 messageCode,
6848 const char* pLayerPrefix,
6849 const char* pMessage,
6850 void* pUserData) {
6851 return ?
6852}
6853
6854@extension("VK_EXT_debug_report") // 12
6855cmd VkResult vkCreateDebugReportCallbackEXT(
6856 VkInstance instance,
6857 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6858 const VkAllocationCallbacks* pAllocator,
6859 VkDebugReportCallbackEXT* pCallback) {
6860 return ?
6861}
6862
6863@extension("VK_EXT_debug_report") // 12
6864cmd void vkDestroyDebugReportCallbackEXT(
6865 VkInstance instance,
6866 VkDebugReportCallbackEXT callback,
6867 const VkAllocationCallbacks* pAllocator) {
6868}
6869
6870@extension("VK_EXT_debug_report") // 12
6871cmd void vkDebugReportMessageEXT(
6872 VkInstance instance,
6873 VkDebugReportFlagsEXT flags,
6874 VkDebugReportObjectTypeEXT objectType,
6875 u64 object,
6876 platform.size_t location,
6877 s32 messageCode,
6878 const char* pLayerPrefix,
6879 const char* pMessage) {
6880}
6881
6882@extension("VK_EXT_debug_marker") // 23
6883cmd VkResult vkDebugMarkerSetObjectTagEXT(
6884 VkDevice device,
6885 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6886 return ?
6887}
6888
6889@extension("VK_EXT_debug_marker") // 23
6890cmd VkResult vkDebugMarkerSetObjectNameEXT(
6891 VkDevice device,
6892 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6893 return ?
6894}
6895
6896@extension("VK_EXT_debug_marker") // 23
6897cmd void vkCmdDebugMarkerBeginEXT(
6898 VkCommandBuffer commandBuffer,
6899 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6900}
6901
6902@extension("VK_EXT_debug_marker") // 23
6903cmd void vkCmdDebugMarkerEndEXT(
6904 VkCommandBuffer commandBuffer) {
6905}
6906
6907@extension("VK_EXT_debug_marker") // 23
6908cmd void vkCmdDebugMarkerInsertEXT(
6909 VkCommandBuffer commandBuffer,
6910 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6911}
6912
6913@extension("VK_AMD_draw_indirect_count") // 34
6914cmd void vkCmdDrawIndirectCountAMD(
6915 VkCommandBuffer commandBuffer,
6916 VkBuffer buffer,
6917 VkDeviceSize offset,
6918 VkBuffer countBuffer,
6919 VkDeviceSize countBufferOffset,
6920 u32 maxDrawCount,
6921 u32 stride) {
6922}
6923
6924@extension("VK_AMD_draw_indirect_count") // 34
6925cmd void vkCmdDrawIndexedIndirectCountAMD(
6926 VkCommandBuffer commandBuffer,
6927 VkBuffer buffer,
6928 VkDeviceSize offset,
6929 VkBuffer countBuffer,
6930 VkDeviceSize countBufferOffset,
6931 u32 maxDrawCount,
6932 u32 stride) {
6933}
6934
6935@extension("VK_NV_external_memory_capabilities") // 56
6936cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6937 VkPhysicalDevice physicalDevice,
6938 VkFormat format,
6939 VkImageType type,
6940 VkImageTiling tiling,
6941 VkImageUsageFlags usage,
6942 VkImageCreateFlags flags,
6943 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6944 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6945 return ?
6946}
6947
6948@extension("VK_NV_external_memory_win32") // 58
6949cmd VkResult vkGetMemoryWin32HandleNV(
6950 VkDevice device,
6951 VkDeviceMemory memory,
6952 VkExternalMemoryHandleTypeFlagsNV handleType,
6953 platform.HANDLE* pHandle) {
6954 return ?
6955}
6956
6957@extension("VK_KHR_get_physical_device_properties2") // 60
6958cmd void vkGetPhysicalDeviceFeatures2KHR(
6959 VkPhysicalDevice physicalDevice,
6960 VkPhysicalDeviceFeatures2KHR* pFeatures) {
6961}
6962
6963@extension("VK_KHR_get_physical_device_properties2") // 60
6964cmd void vkGetPhysicalDeviceProperties2KHR(
6965 VkPhysicalDevice physicalDevice,
6966 VkPhysicalDeviceProperties2KHR* pProperties) {
6967}
6968
6969@extension("VK_KHR_get_physical_device_properties2") // 60
6970cmd void vkGetPhysicalDeviceFormatProperties2KHR(
6971 VkPhysicalDevice physicalDevice,
6972 VkFormat format,
6973 VkFormatProperties2KHR* pFormatProperties) {
6974}
6975
6976@extension("VK_KHR_get_physical_device_properties2") // 60
6977cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
6978 VkPhysicalDevice physicalDevice,
6979 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
6980 VkImageFormatProperties2KHR* pImageFormatProperties) {
6981 return ?
6982}
6983
6984@extension("VK_KHR_get_physical_device_properties2") // 60
6985cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
6986 VkPhysicalDevice physicalDevice,
6987 u32* pQueueFamilyPropertyCount,
6988 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
6989}
6990
6991@extension("VK_KHR_get_physical_device_properties2") // 60
6992cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
6993 VkPhysicalDevice physicalDevice,
6994 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
6995}
6996
6997@extension("VK_KHR_get_physical_device_properties2") // 60
6998cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
6999 VkPhysicalDevice physicalDevice,
7000 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7001 u32* pPropertyCount,
7002 VkSparseImageFormatProperties2KHR* pProperties) {
7003}
7004
7005@extension("VK_KHX_device_group") // 61
7006cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7007 VkDevice device,
7008 u32 heapIndex,
7009 u32 localDeviceIndex,
7010 u32 remoteDeviceIndex,
7011 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7012}
7013
7014@extension("VK_KHX_device_group") // 61
7015cmd VkResult vkBindBufferMemory2KHX(
7016 VkDevice device,
7017 u32 bindInfoCount,
7018 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7019 return ?
7020}
7021
7022@extension("VK_KHX_device_group") // 61
7023cmd VkResult vkBindImageMemory2KHX(
7024 VkDevice device,
7025 u32 bindInfoCount,
7026 const VkBindImageMemoryInfoKHX* pBindInfos) {
7027 return ?
7028}
7029
7030@extension("VK_KHX_device_group") // 61
7031cmd void vkCmdSetDeviceMaskKHX(
7032 VkCommandBuffer commandBuffer,
7033 u32 deviceMask) {
7034}
7035
7036@extension("VK_KHX_device_group") // 61
7037cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7038 VkDevice device,
7039 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7040 return ?
7041}
7042
7043@extension("VK_KHX_device_group") // 61
7044cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7045 VkDevice device,
7046 VkSurfaceKHR surface,
7047 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7048 return ?
7049}
7050
7051@extension("VK_KHX_device_group") // 61
7052cmd VkResult vkAcquireNextImage2KHX(
7053 VkDevice device,
7054 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7055 u32* pImageIndex) {
7056 return ?
7057}
7058
7059@extension("VK_KHX_device_group") // 61
7060cmd void vkCmdDispatchBaseKHX(
7061 VkCommandBuffer commandBuffer,
7062 u32 baseGroupX,
7063 u32 baseGroupY,
7064 u32 baseGroupZ,
7065 u32 groupCountX,
7066 u32 groupCountY,
7067 u32 groupCountZ) {
7068}
7069
7070@extension("VK_KHX_device_group") // 61
7071cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7072 VkPhysicalDevice physicalDevice,
7073 VkSurfaceKHR surface,
7074 u32* pRectCount,
7075 VkRect2D* pRects) {
7076 return ?
7077}
7078
7079@extension("VK_NN_vi_surface") // 63
7080cmd VkResult vkCreateViSurfaceNN(
7081 VkInstance instance,
7082 const VkViSurfaceCreateInfoNN* pCreateInfo,
7083 const VkAllocationCallbacks* pAllocator,
7084 VkSurfaceKHR* pSurface) {
7085 return ?
7086}
7087
7088@extension("VK_KHR_maintenance1") // 70
7089cmd void vkTrimCommandPoolKHR(
7090 VkDevice device,
7091 VkCommandPool commandPool,
7092 VkCommandPoolTrimFlagsKHR flags) {
7093}
7094
7095@extension("VK_KHX_device_group_creation") // 71
7096cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7097 VkInstance instance,
7098 u32* pPhysicalDeviceGroupCount,
7099 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7100 return ?
7101}
7102
7103@extension("VK_KHX_external_memory_capabilities") // 72
7104cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7105 VkPhysicalDevice physicalDevice,
7106 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7107 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7108}
7109
Jesse Hallad250842017-03-10 18:35:38 -08007110@extension("VK_KHX_external_memory_win32") // 74
7111cmd VkResult vkGetMemoryWin32HandleKHX(
7112 VkDevice device,
7113 VkDeviceMemory memory,
7114 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7115 platform.HANDLE* pHandle) {
7116 return ?
7117}
7118
7119@extension("VK_KHX_external_memory_win32") // 74
7120cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7121 VkDevice device,
7122 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7123 platform.HANDLE handle,
7124 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7125 return ?
7126}
7127
7128@extension("VK_KHX_external_memory_fd") // 75
7129cmd VkResult vkGetMemoryFdKHX(
7130 VkDevice device,
7131 VkDeviceMemory memory,
7132 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7133 s32* pFd) {
7134 return ?
7135}
7136
7137@extension("VK_KHX_external_memory_fd") // 75
7138cmd VkResult vkGetMemoryFdPropertiesKHX(
7139 VkDevice device,
7140 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7141 s32 fd,
7142 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7143 return ?
7144}
7145
7146@extension("VK_KHX_external_semaphore_capabilities") // 77
7147cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7148 VkPhysicalDevice physicalDevice,
7149 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7150 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7151}
7152
7153@extension("VK_KHX_external_semaphore_win32") // 79
7154cmd VkResult vkImportSemaphoreWin32HandleKHX(
7155 VkDevice device,
7156 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7157 return ?
7158}
7159
7160@extension("VK_KHX_external_semaphore_win32") // 79
7161cmd VkResult vkGetSemaphoreWin32HandleKHX(
7162 VkDevice device,
7163 VkSemaphore semaphore,
7164 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7165 platform.HANDLE* pHandle) {
7166 return ?
7167}
7168
7169@extension("VK_KHX_external_semaphore_fd") // 80
7170cmd VkResult vkImportSemaphoreFdKHX(
7171 VkDevice device,
7172 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7173 return ?
7174}
7175
7176@extension("VK_KHX_external_semaphore_fd") // 80
7177cmd VkResult vkGetSemaphoreFdKHX(
7178 VkDevice device,
7179 VkSemaphore semaphore,
7180 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7181 s32* pFd) {
7182 return ?
7183}
7184
7185@extension("VK_KHR_push_descriptor") // 81
7186cmd void vkCmdPushDescriptorSetKHR(
7187 VkCommandBuffer commandBuffer,
7188 VkPipelineBindPoint pipelineBindPoint,
7189 VkPipelineLayout layout,
7190 u32 set,
7191 u32 descriptorWriteCount,
7192 const VkWriteDescriptorSet* pDescriptorWrites) {
7193}
7194
7195@extension("VK_KHR_descriptor_update_template") // 86
7196cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7197 VkDevice device,
7198 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7199 const VkAllocationCallbacks* pAllocator,
7200 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7201 return ?
7202}
7203
7204@extension("VK_KHR_descriptor_update_template") // 86
7205cmd void vkDestroyDescriptorUpdateTemplateKHR(
7206 VkDevice device,
7207 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7208 const VkAllocationCallbacks* pAllocator) {
7209}
7210
7211@extension("VK_KHR_descriptor_update_template") // 86
7212cmd void vkUpdateDescriptorSetWithTemplateKHR(
7213 VkDevice device,
7214 VkDescriptorSet descriptorSet,
7215 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7216 const void* pData) {
7217}
7218
7219@extension("VK_KHR_descriptor_update_template") // 86
7220cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7221 VkCommandBuffer commandBuffer,
7222 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7223 VkPipelineLayout layout,
7224 u32 set,
7225 const void* pData) {
7226}
7227
7228@extension("VK_NVX_device_generated_commands") // 87
7229cmd void vkCmdProcessCommandsNVX(
7230 VkCommandBuffer commandBuffer,
7231 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7232}
7233
7234@extension("VK_NVX_device_generated_commands") // 87
7235cmd void vkCmdReserveSpaceForCommandsNVX(
7236 VkCommandBuffer commandBuffer,
7237 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7238}
7239
7240@extension("VK_NVX_device_generated_commands") // 87
7241cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7242 VkDevice device,
7243 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7244 const VkAllocationCallbacks* pAllocator,
7245 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7246 return ?
7247}
7248
7249@extension("VK_NVX_device_generated_commands") // 87
7250cmd void vkDestroyIndirectCommandsLayoutNVX(
7251 VkDevice device,
7252 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7253 const VkAllocationCallbacks* pAllocator) {
7254}
7255
7256@extension("VK_NVX_device_generated_commands") // 87
7257cmd VkResult vkCreateObjectTableNVX(
7258 VkDevice device,
7259 const VkObjectTableCreateInfoNVX* pCreateInfo,
7260 const VkAllocationCallbacks* pAllocator,
7261 VkObjectTableNVX* pObjectTable) {
7262 return ?
7263}
7264
7265@extension("VK_NVX_device_generated_commands") // 87
7266cmd void vkDestroyObjectTableNVX(
7267 VkDevice device,
7268 VkObjectTableNVX objectTable,
7269 const VkAllocationCallbacks* pAllocator) {
7270}
7271
7272@extension("VK_NVX_device_generated_commands") // 87
7273cmd VkResult vkRegisterObjectsNVX(
7274 VkDevice device,
7275 VkObjectTableNVX objectTable,
7276 u32 objectCount,
7277 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7278 const u32* pObjectIndices) {
7279 return ?
7280}
7281
7282@extension("VK_NVX_device_generated_commands") // 87
7283cmd VkResult vkUnregisterObjectsNVX(
7284 VkDevice device,
7285 VkObjectTableNVX objectTable,
7286 u32 objectCount,
7287 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7288 const u32* pObjectIndices) {
7289 return ?
7290}
7291
7292@extension("VK_NVX_device_generated_commands") // 87
7293cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7294 VkPhysicalDevice physicalDevice,
7295 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7296 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7297}
7298
7299@extension("VK_NV_clip_space_w_scaling") // 88
7300cmd void vkCmdSetViewportWScalingNV(
7301 VkCommandBuffer commandBuffer,
7302 u32 firstViewport,
7303 u32 viewportCount,
7304 const VkViewportWScalingNV* pViewportWScalings) {
7305}
7306
7307@extension("VK_EXT_direct_mode_display") // 89
7308cmd VkResult vkReleaseDisplayEXT(
7309 VkPhysicalDevice physicalDevice,
7310 VkDisplayKHR display) {
7311 return ?
7312}
7313
7314@extension("VK_EXT_acquire_xlib_display") // 90
7315cmd VkResult vkAcquireXlibDisplayEXT(
7316 VkPhysicalDevice physicalDevice,
7317 platform.Display* dpy,
7318 VkDisplayKHR display) {
7319 return ?
7320}
7321
7322@extension("VK_EXT_acquire_xlib_display") // 90
7323cmd VkResult vkGetRandROutputDisplayEXT(
7324 VkPhysicalDevice physicalDevice,
7325 platform.Display* dpy,
7326 platform.RROutput rrOutput,
7327 VkDisplayKHR* pDisplay) {
7328 return ?
7329}
7330
7331@extension("VK_EXT_display_surface_counter") // 91
7332cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7333 VkPhysicalDevice physicalDevice,
7334 VkSurfaceKHR surface,
7335 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7336 return ?
7337}
7338
7339@extension("VK_EXT_display_control") // 92
7340cmd VkResult vkDisplayPowerControlEXT(
7341 VkDevice device,
7342 VkDisplayKHR display,
7343 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7344 return ?
7345}
7346
7347@extension("VK_EXT_display_control") // 92
7348cmd VkResult vkRegisterDeviceEventEXT(
7349 VkDevice device,
7350 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7351 const VkAllocationCallbacks* pAllocator,
7352 VkFence* pFence) {
7353 return ?
7354}
7355
7356@extension("VK_EXT_display_control") // 92
7357cmd VkResult vkRegisterDisplayEventEXT(
7358 VkDevice device,
7359 VkDisplayKHR display,
7360 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7361 const VkAllocationCallbacks* pAllocator,
7362 VkFence* pFence) {
7363 return ?
7364}
7365
7366@extension("VK_EXT_display_control") // 92
7367cmd VkResult vkGetSwapchainCounterEXT(
7368 VkDevice device,
7369 VkSwapchainKHR swapchain,
7370 VkSurfaceCounterFlagBitsEXT counter,
7371 u64* pCounterValue) {
7372 return ?
7373}
7374
7375@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007376cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007377 VkDevice device,
7378 VkSwapchainKHR swapchain,
7379 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007380 deviceObject := GetDevice(device)
7381 swapchainObject := GetSwapchain(swapchain)
7382
7383 displayTimingProperties := ?
7384 pDisplayTimingProperties[0] = displayTimingProperties
7385
7386 return ?
7387}
7388
Jesse Hallad250842017-03-10 18:35:38 -08007389@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007390cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007391 VkDevice device,
7392 VkSwapchainKHR swapchain,
7393 u32* pPresentationTimingCount,
7394 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007395 return ?
7396}
7397
Jesse Hallad250842017-03-10 18:35:38 -08007398@extension("VK_EXT_discard_rectangles") // 100
7399cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007400 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007401 u32 firstDiscardRectangle,
7402 u32 discardRectangleCount,
7403 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007404}
7405
Jesse Hallad250842017-03-10 18:35:38 -08007406@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007407cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08007408 VkDevice device,
7409 u32 swapchainCount,
7410 const VkSwapchainKHR* pSwapchains,
7411 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08007412}
7413
Jesse Hallad250842017-03-10 18:35:38 -08007414@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007415cmd VkResult vkGetSwapchainStatusKHR(
7416 VkDevice device,
7417 VkSwapchainKHR swapchain) {
7418 return ?
7419}
7420
Jesse Hallad250842017-03-10 18:35:38 -08007421@extension("VK_MVK_ios_surface") // 123
7422cmd VkResult vkCreateIOSSurfaceMVK(
7423 VkInstance instance,
7424 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7425 const VkAllocationCallbacks* pAllocator,
7426 VkSurfaceKHR* pSurface) {
7427 return ?
7428}
7429
7430@extension("VK_MVK_macos_surface") // 124
7431cmd VkResult vkCreateMacOSSurfaceMVK(
7432 VkInstance instance,
7433 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7434 const VkAllocationCallbacks* pAllocator,
7435 VkSurfaceKHR* pSurface) {
7436 return ?
7437}
7438
Jesse Halld27f6aa2015-08-15 17:58:48 -07007439////////////////
7440// Validation //
7441////////////////
7442
7443extern void validate(string layerName, bool condition, string message)
7444
7445
7446/////////////////////////////
7447// Internal State Tracking //
7448/////////////////////////////
7449
7450StateObject State
7451
7452@internal class StateObject {
7453 // Dispatchable objects.
7454 map!(VkInstance, ref!InstanceObject) Instances
7455 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7456 map!(VkDevice, ref!DeviceObject) Devices
7457 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007458 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007459
7460 // Non-dispatchable objects.
7461 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7462 map!(VkBuffer, ref!BufferObject) Buffers
7463 map!(VkBufferView, ref!BufferViewObject) BufferViews
7464 map!(VkImage, ref!ImageObject) Images
7465 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007466 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007467 map!(VkPipeline, ref!PipelineObject) Pipelines
7468 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7469 map!(VkSampler, ref!SamplerObject) Samplers
7470 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7471 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7472 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007473 map!(VkFence, ref!FenceObject) Fences
7474 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7475 map!(VkEvent, ref!EventObject) Events
7476 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7477 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7478 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7479 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007480 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007481 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007482 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007483}
7484
7485@internal class InstanceObject {
7486}
7487
7488@internal class PhysicalDeviceObject {
7489 VkInstance instance
7490}
7491
7492@internal class DeviceObject {
7493 VkPhysicalDevice physicalDevice
7494}
7495
7496@internal class QueueObject {
7497 VkDevice device
7498 VkQueueFlags flags
7499}
7500
Jesse Hall3fbc8562015-11-29 22:10:52 -08007501@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007502 VkDevice device
7503 map!(u64, VkDeviceMemory) boundObjects
7504 VkQueueFlags queueFlags
7505}
7506
7507@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007508 VkDevice device
7509 VkDeviceSize allocationSize
7510 map!(u64, VkDeviceSize) boundObjects
7511 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007512}
7513
7514@internal class BufferObject {
7515 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007516 VkDeviceMemory memory
7517 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007518}
7519
7520@internal class BufferViewObject {
7521 VkDevice device
7522 VkBuffer buffer
7523}
7524
7525@internal class ImageObject {
7526 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007527 VkDeviceMemory memory
7528 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007529}
7530
7531@internal class ImageViewObject {
7532 VkDevice device
7533 VkImage image
7534}
7535
Jesse Halld27f6aa2015-08-15 17:58:48 -07007536@internal class ShaderObject {
7537 VkDevice device
7538}
7539
7540@internal class ShaderModuleObject {
7541 VkDevice device
7542}
7543
7544@internal class PipelineObject {
7545 VkDevice device
7546}
7547
7548@internal class PipelineLayoutObject {
7549 VkDevice device
7550}
7551
7552@internal class SamplerObject {
7553 VkDevice device
7554}
7555
7556@internal class DescriptorSetObject {
7557 VkDevice device
7558}
7559
7560@internal class DescriptorSetLayoutObject {
7561 VkDevice device
7562}
7563
7564@internal class DescriptorPoolObject {
7565 VkDevice device
7566}
7567
Jesse Halld27f6aa2015-08-15 17:58:48 -07007568@internal class FenceObject {
7569 VkDevice device
7570 bool signaled
7571}
7572
7573@internal class SemaphoreObject {
7574 VkDevice device
7575}
7576
7577@internal class EventObject {
7578 VkDevice device
7579}
7580
7581@internal class QueryPoolObject {
7582 VkDevice device
7583}
7584
7585@internal class FramebufferObject {
7586 VkDevice device
7587}
7588
7589@internal class RenderPassObject {
7590 VkDevice device
7591}
7592
7593@internal class PipelineCacheObject {
7594 VkDevice device
7595}
7596
Jesse Hall3fbc8562015-11-29 22:10:52 -08007597@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007598 VkDevice device
7599}
7600
Jesse Hall1356b0d2015-11-23 17:24:58 -08007601@internal class SurfaceObject {
7602 VkInstance instance
7603}
7604
Michael Lentine88594d72015-11-12 12:49:45 -08007605@internal class SwapchainObject {
7606 VkDevice device
7607}
7608
Jesse Halld27f6aa2015-08-15 17:58:48 -07007609macro ref!InstanceObject GetInstance(VkInstance instance) {
7610 assert(instance in State.Instances)
7611 return State.Instances[instance]
7612}
7613
7614macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7615 assert(physicalDevice in State.PhysicalDevices)
7616 return State.PhysicalDevices[physicalDevice]
7617}
7618
7619macro ref!DeviceObject GetDevice(VkDevice device) {
7620 assert(device in State.Devices)
7621 return State.Devices[device]
7622}
7623
7624macro ref!QueueObject GetQueue(VkQueue queue) {
7625 assert(queue in State.Queues)
7626 return State.Queues[queue]
7627}
7628
Jesse Hall3fbc8562015-11-29 22:10:52 -08007629macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7630 assert(commandBuffer in State.CommandBuffers)
7631 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007632}
7633
Jesse Hall3fbc8562015-11-29 22:10:52 -08007634macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7635 assert(memory in State.DeviceMemories)
7636 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007637}
7638
7639macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7640 assert(buffer in State.Buffers)
7641 return State.Buffers[buffer]
7642}
7643
7644macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7645 assert(bufferView in State.BufferViews)
7646 return State.BufferViews[bufferView]
7647}
7648
7649macro ref!ImageObject GetImage(VkImage image) {
7650 assert(image in State.Images)
7651 return State.Images[image]
7652}
7653
7654macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7655 assert(imageView in State.ImageViews)
7656 return State.ImageViews[imageView]
7657}
7658
Jesse Halld27f6aa2015-08-15 17:58:48 -07007659macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7660 assert(shaderModule in State.ShaderModules)
7661 return State.ShaderModules[shaderModule]
7662}
7663
7664macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7665 assert(pipeline in State.Pipelines)
7666 return State.Pipelines[pipeline]
7667}
7668
7669macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7670 assert(pipelineLayout in State.PipelineLayouts)
7671 return State.PipelineLayouts[pipelineLayout]
7672}
7673
7674macro ref!SamplerObject GetSampler(VkSampler sampler) {
7675 assert(sampler in State.Samplers)
7676 return State.Samplers[sampler]
7677}
7678
7679macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7680 assert(descriptorSet in State.DescriptorSets)
7681 return State.DescriptorSets[descriptorSet]
7682}
7683
7684macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7685 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7686 return State.DescriptorSetLayouts[descriptorSetLayout]
7687}
7688
7689macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7690 assert(descriptorPool in State.DescriptorPools)
7691 return State.DescriptorPools[descriptorPool]
7692}
7693
Jesse Halld27f6aa2015-08-15 17:58:48 -07007694macro ref!FenceObject GetFence(VkFence fence) {
7695 assert(fence in State.Fences)
7696 return State.Fences[fence]
7697}
7698
7699macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7700 assert(semaphore in State.Semaphores)
7701 return State.Semaphores[semaphore]
7702}
7703
7704macro ref!EventObject GetEvent(VkEvent event) {
7705 assert(event in State.Events)
7706 return State.Events[event]
7707}
7708
7709macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7710 assert(queryPool in State.QueryPools)
7711 return State.QueryPools[queryPool]
7712}
7713
7714macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7715 assert(framebuffer in State.Framebuffers)
7716 return State.Framebuffers[framebuffer]
7717}
7718
7719macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7720 assert(renderPass in State.RenderPasses)
7721 return State.RenderPasses[renderPass]
7722}
7723
7724macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7725 assert(pipelineCache in State.PipelineCaches)
7726 return State.PipelineCaches[pipelineCache]
7727}
7728
Jesse Hall3fbc8562015-11-29 22:10:52 -08007729macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7730 assert(commandPool in State.CommandPools)
7731 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007732}
Michael Lentine88594d72015-11-12 12:49:45 -08007733
Jesse Hall1356b0d2015-11-23 17:24:58 -08007734macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7735 assert(surface in State.Surfaces)
7736 return State.Surfaces[surface]
7737}
7738
Michael Lentine88594d72015-11-12 12:49:45 -08007739macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7740 assert(swapchain in State.Swapchains)
7741 return State.Swapchains[swapchain]
7742}
Jesse Halld8bade02015-11-24 10:24:18 -08007743
7744macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7745 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7746}