blob: 8a8fc39ec48c170c717d234f87d0680506ea0efe [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 Hallad250842017-03-10 18:35:38 -080031define VERSION_PATCH 42
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 Hall543a7ff2016-01-08 16:38:30 -080076@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 5
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
285@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_NAME "VK_GOOGLE_display_timing"
286
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
1082 //@extension("VK_MVK_ios_surface") // 123
1083 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1084
1085 //@extension("VK_MVK_macos_surface") // 124
1086 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001087}
1088
Jesse Hall65ab5522015-11-30 00:07:16 -08001089enum VkSubpassContents {
1090 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1091 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001092}
1093
Jesse Hall543a7ff2016-01-08 16:38:30 -08001094enum VkPipelineCacheHeaderVersion {
1095 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1096}
1097
Jesse Hallbd888842015-11-30 21:44:14 -08001098@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001099/// Error and return codes
1100enum VkResult {
1101 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001102 VK_SUCCESS = 0,
1103 VK_NOT_READY = 1,
1104 VK_TIMEOUT = 2,
1105 VK_EVENT_SET = 3,
1106 VK_EVENT_RESET = 4,
1107 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001108
Jesse Hallad250842017-03-10 18:35:38 -08001109 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001110 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001111
Jesse Halld27f6aa2015-08-15 17:58:48 -07001112 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001113 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1114 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1115 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1116 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1117 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1118 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1119 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1120 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1121 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1122 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1123 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001124 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001125
Jesse Hallad250842017-03-10 18:35:38 -08001126 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001127 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001128 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001129
Jesse Hallad250842017-03-10 18:35:38 -08001130 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001131 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001132
Jesse Hallad250842017-03-10 18:35:38 -08001133 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001134 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001135
Jesse Hallad250842017-03-10 18:35:38 -08001136 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001137 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001138
Jesse Hallad250842017-03-10 18:35:38 -08001139 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001140 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001141
Jesse Hallad250842017-03-10 18:35:38 -08001142 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001143 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001144
1145 //@extension("VK_KHX_external_memory") // 73
1146 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001147}
1148
1149enum VkDynamicState {
1150 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1151 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1152 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1153 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1154 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1155 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1156 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1157 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1158 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001159
1160 //@extension("VK_NV_clip_space_w_scaling") // 88
1161 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1162
1163 //@extension("VK_EXT_discard_rectangles") // 100
1164 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001165}
1166
Jesse Hallad250842017-03-10 18:35:38 -08001167@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001168enum VkPresentModeKHR {
1169 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1170 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1171 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001172 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001173
Chris Forbes1d5f68c2017-01-31 10:17:01 +13001174 //@extension("VK_KHR_shared_presentable_image")
Jesse Hall77ad05b2017-03-10 22:02:20 -08001175 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1176 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001177}
1178
Jesse Hallad250842017-03-10 18:35:38 -08001179@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001180enum VkColorSpaceKHR {
1181 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001182
1183 //@extension("VK_EXT_swapchain_colorspace")
Jesse Hall889cd9a2017-02-25 22:12:23 -08001184 VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001185 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002,
1186 VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003,
1187 VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004,
1188 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005,
1189 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006,
1190 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007,
1191 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008,
1192 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009,
1193 VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010,
1194 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1195 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Michael Lentine88594d72015-11-12 12:49:45 -08001196}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001197
Jesse Hallad250842017-03-10 18:35:38 -08001198@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001199enum VkDebugReportObjectTypeEXT {
1200 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1201 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1202 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1203 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1204 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1205 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1206 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1207 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1208 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1209 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1210 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1211 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1212 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1213 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1214 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1215 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1216 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1217 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1218 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1219 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1220 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1221 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1222 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1223 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1224 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1225 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1226 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1227 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1228 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001229 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1230 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1231 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1232 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hall715b86a2016-01-16 16:34:29 -08001233}
1234
Jesse Hallad250842017-03-10 18:35:38 -08001235@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001236enum VkDebugReportErrorEXT {
1237 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1238 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1239}
1240
Jesse Hallad250842017-03-10 18:35:38 -08001241@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001242enum VkRasterizationOrderAMD {
1243 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1244 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1245}
1246
Jesse Hallad250842017-03-10 18:35:38 -08001247@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001248enum VkValidationCheckEXT {
1249 VK_VALIDATION_CHECK_ALL_EXT = 0,
1250}
1251
Jesse Hallad250842017-03-10 18:35:38 -08001252@extension("VK_KHR_descriptor_update_template") // 86
1253enum VkDescriptorUpdateTemplateTypeKHR {
1254 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1255 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1256}
1257
1258@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001259enum VkIndirectCommandsTokenTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001260 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1261 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1262 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1263 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1264 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1265 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1266 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1267 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001268}
1269
Jesse Hallad250842017-03-10 18:35:38 -08001270@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001271enum VkObjectEntryTypeNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08001272 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1273 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1274 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1275 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1276 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001277}
Jesse Hall715b86a2016-01-16 16:34:29 -08001278
Jesse Hallad250842017-03-10 18:35:38 -08001279@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001280enum VkDisplayPowerStateEXT {
1281 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1282 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1283 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1284}
1285
Jesse Hallad250842017-03-10 18:35:38 -08001286@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001287enum VkDeviceEventTypeEXT {
1288 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1289}
1290
Jesse Hallad250842017-03-10 18:35:38 -08001291@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001292enum VkDisplayEventTypeEXT {
1293 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1294}
1295
Jesse Hallad250842017-03-10 18:35:38 -08001296@extension("VK_NV_viewport_swizzle") // 99
1297enum VkViewportCoordinateSwizzleNV {
1298 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1299 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1300 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1301 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1302 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1303 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1304 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1305 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1306}
1307
1308@extension("VK_EXT_discard_rectangles") // 100
1309enum VkDiscardRectangleModeEXT {
1310 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1311 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1312}
1313
Jesse Halld27f6aa2015-08-15 17:58:48 -07001314/////////////////
1315// Bitfields //
1316/////////////////
1317
Jesse Halld27f6aa2015-08-15 17:58:48 -07001318/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001319type VkFlags VkQueueFlags
1320bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001321 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1322 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001323 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001324 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001325}
1326
1327/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001328type VkFlags VkMemoryPropertyFlags
1329bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001330 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1331 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1332 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1333 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1334 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001335}
1336
1337/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001338type VkFlags VkMemoryHeapFlags
1339bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001340 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001341
1342 //@extension("VK_KHX_device_group_creation") // 71
1343 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001344}
1345
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001346/// Access flags
1347type VkFlags VkAccessFlags
1348bitfield VkAccessFlagBits {
1349 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1350 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1351 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1352 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1353 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1354 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1355 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1356 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1357 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1358 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1359 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1360 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1361 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1362 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1363 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1364 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1365 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001366
Jesse Hallad250842017-03-10 18:35:38 -08001367 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001368 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001369 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001370}
1371
1372/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001373type VkFlags VkBufferUsageFlags
1374bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001375 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1376 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001377 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1378 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1379 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1380 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1381 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1382 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1383 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1384}
1385
1386/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001387type VkFlags VkBufferCreateFlags
1388bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001389 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001390 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1391 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1392}
1393
1394/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001395type VkFlags VkShaderStageFlags
1396bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001397 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001398 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1399 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001400 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1401 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1402 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001403 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001404
1405 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1406}
1407
Jesse Hallfbf97b02015-11-20 14:17:03 -08001408/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001409type VkFlags VkDescriptorPoolCreateFlags
1410bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001411 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1412}
1413
1414/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001415type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001416//bitfield VkDescriptorPoolResetFlagBits {
1417//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001418
Jesse Halld27f6aa2015-08-15 17:58:48 -07001419/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001420type VkFlags VkImageUsageFlags
1421bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001422 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1423 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001424 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1425 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1426 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001427 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001428 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1429 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1430}
1431
1432/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001433type VkFlags VkImageCreateFlags
1434bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001435 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001436 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1437 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 -07001438 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1439 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 -08001440
Jesse Hallad250842017-03-10 18:35:38 -08001441 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001442 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08001443
1444 //@extension("VK_KHX_device_group") // 61
1445 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001446}
1447
Jesse Hallb00daad2015-11-29 19:46:20 -08001448/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001449type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001450//bitfield VkImageViewCreateFlagBits {
1451//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001452
1453/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001454type VkFlags VkPipelineCreateFlags
1455bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001456 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1457 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1458 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08001459
1460 //@extension("VK_KHX_device_group") // 61
1461 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1462 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001463}
1464
Jesse Hall65ab5522015-11-30 00:07:16 -08001465/// Color component flags
1466type VkFlags VkColorComponentFlags
1467bitfield VkColorComponentFlagBits {
1468 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1469 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1470 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1471 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001472}
1473
1474/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001475type VkFlags VkFenceCreateFlags
1476bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001477 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1478}
1479
1480/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001481type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001482//bitfield VkSemaphoreCreateFlagBits {
1483//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001484
1485/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001486type VkFlags VkFormatFeatureFlags
1487bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001488 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1489 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1490 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1491 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1492 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1493 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1494 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1495 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1496 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1497 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001498 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1499 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 -08001500 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001501
Jesse Hallad250842017-03-10 18:35:38 -08001502 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001503 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001504
Jesse Hallad250842017-03-10 18:35:38 -08001505 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001506 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1507 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001508}
1509
1510/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001511type VkFlags VkQueryControlFlags
1512bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001513 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001514}
1515
1516/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001517type VkFlags VkQueryResultFlags
1518bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001519 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1520 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1521 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1522 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1523}
1524
1525/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001526type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001527//bitfield VkShaderModuleCreateFlagBits {
1528//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001529
Jesse Halld27f6aa2015-08-15 17:58:48 -07001530/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001531type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001532//bitfield VkEventCreateFlagBits {
1533//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001534
Jesse Halla15a4bf2015-11-19 22:48:02 -08001535/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001536type VkFlags VkCommandBufferUsageFlags
1537bitfield VkCommandBufferUsageFlagBits {
1538 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1539 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1540 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001541}
1542
1543/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001544type VkFlags VkQueryPipelineStatisticFlags
1545bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001546 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1547 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1548 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1549 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1550 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1551 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1552 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1553 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1554 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1555 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1556 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001557}
1558
1559/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001560type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001561//bitfield VkMemoryMapFlagBits {
1562//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001563
1564/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001565type VkFlags VkImageAspectFlags
1566bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001567 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1568 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1569 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1570 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1571}
1572
1573/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001574type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001575bitfield VkSparseMemoryBindFlagBits {
1576 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1577}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001578
1579/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001580type VkFlags VkSparseImageFormatFlags
1581bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001582 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1583 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.
1584 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001585}
1586
1587/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001588type VkFlags VkPipelineStageFlags
1589bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001590 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1591 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1592 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1593 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001594 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1595 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001596 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1597 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1598 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1599 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1600 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1601 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1602 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001603 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1604 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001605
Jesse Hall543a7ff2016-01-08 16:38:30 -08001606 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1607 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13001608
Jesse Hallad250842017-03-10 18:35:38 -08001609 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001610 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001611}
1612
1613/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001614type VkFlags VkAttachmentDescriptionFlags
1615bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001616 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 -07001617}
1618
1619/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001620type VkFlags VkSubpassDescriptionFlags
1621bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08001622 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1623 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1624 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001625}
1626
1627/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001628type VkFlags VkCommandPoolCreateFlags
1629bitfield VkCommandPoolCreateFlagBits {
1630 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1631 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001632}
1633
1634/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001635type VkFlags VkCommandPoolResetFlags
1636bitfield VkCommandPoolResetFlagBits {
1637 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001638}
1639
Jesse Hall3fbc8562015-11-29 22:10:52 -08001640type VkFlags VkCommandBufferResetFlags
1641bitfield VkCommandBufferResetFlagBits {
1642 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001643}
1644
Jesse Halld8bade02015-11-24 10:24:18 -08001645type VkFlags VkSampleCountFlags
1646bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001647 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1648 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1649 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1650 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1651 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1652 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1653 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1654}
1655
Jesse Halld8bade02015-11-24 10:24:18 -08001656type VkFlags VkStencilFaceFlags
1657bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001658 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1659 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001660 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001661}
1662
Jesse Halla6429252015-11-29 18:59:42 -08001663/// Instance creation flags
1664type VkFlags VkInstanceCreateFlags
1665//bitfield VkInstanceCreateFlagBits {
1666//}
1667
1668/// Device creation flags
1669type VkFlags VkDeviceCreateFlags
1670//bitfield VkDeviceCreateFlagBits {
1671//}
1672
1673/// Device queue creation flags
1674type VkFlags VkDeviceQueueCreateFlags
1675//bitfield VkDeviceQueueCreateFlagBits {
1676//}
1677
1678/// Query pool creation flags
1679type VkFlags VkQueryPoolCreateFlags
1680//bitfield VkQueryPoolCreateFlagBits {
1681//}
1682
1683/// Buffer view creation flags
1684type VkFlags VkBufferViewCreateFlags
1685//bitfield VkBufferViewCreateFlagBits {
1686//}
1687
1688/// Pipeline cache creation flags
1689type VkFlags VkPipelineCacheCreateFlags
1690//bitfield VkPipelineCacheCreateFlagBits {
1691//}
1692
1693/// Pipeline shader stage creation flags
1694type VkFlags VkPipelineShaderStageCreateFlags
1695//bitfield VkPipelineShaderStageCreateFlagBits {
1696//}
1697
1698/// Descriptor set layout creation flags
1699type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08001700bitfield VkDescriptorSetLayoutCreateFlagBits {
1701 //@extension("VK_KHR_push_descriptor") // 81
1702 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1703}
Jesse Halla6429252015-11-29 18:59:42 -08001704
1705/// Pipeline vertex input state creation flags
1706type VkFlags VkPipelineVertexInputStateCreateFlags
1707//bitfield VkPipelineVertexInputStateCreateFlagBits {
1708//}
1709
1710/// Pipeline input assembly state creation flags
1711type VkFlags VkPipelineInputAssemblyStateCreateFlags
1712//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1713//}
1714
1715/// Tessellation state creation flags
1716type VkFlags VkPipelineTessellationStateCreateFlags
1717//bitfield VkPipelineTessellationStateCreateFlagBits {
1718//}
1719
1720/// Viewport state creation flags
1721type VkFlags VkPipelineViewportStateCreateFlags
1722//bitfield VkPipelineViewportStateCreateFlagBits {
1723//}
1724
Jesse Hall3fbc8562015-11-29 22:10:52 -08001725/// Rasterization state creation flags
1726type VkFlags VkPipelineRasterizationStateCreateFlags
1727//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001728//}
1729
1730/// Multisample state creation flags
1731type VkFlags VkPipelineMultisampleStateCreateFlags
1732//bitfield VkPipelineMultisampleStateCreateFlagBits {
1733//}
1734
1735/// Color blend state creation flags
1736type VkFlags VkPipelineColorBlendStateCreateFlags
1737//bitfield VkPipelineColorBlendStateCreateFlagBits {
1738//}
1739
1740/// Depth/stencil state creation flags
1741type VkFlags VkPipelineDepthStencilStateCreateFlags
1742//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1743//}
1744
1745/// Dynamic state creation flags
1746type VkFlags VkPipelineDynamicStateCreateFlags
1747//bitfield VkPipelineDynamicStateCreateFlagBits {
1748//}
1749
1750/// Pipeline layout creation flags
1751type VkFlags VkPipelineLayoutCreateFlags
1752//bitfield VkPipelineLayoutCreateFlagBits {
1753//}
1754
1755/// Sampler creation flags
1756type VkFlags VkSamplerCreateFlags
1757//bitfield VkSamplerCreateFlagBits {
1758//}
1759
1760/// Render pass creation flags
1761type VkFlags VkRenderPassCreateFlags
1762//bitfield VkRenderPassCreateFlagBits {
1763//}
1764
1765/// Framebuffer creation flags
1766type VkFlags VkFramebufferCreateFlags
1767//bitfield VkFramebufferCreateFlagBits {
1768//}
1769
Jesse Halldc6d36c2015-11-29 19:12:15 -08001770/// Dependency flags
1771type VkFlags VkDependencyFlags
1772bitfield VkDependencyFlagBits {
1773 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001774
1775 //@extension("VK_KHX_multiview") // 54
1776 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1777
1778 //@extension("VK_KHX_device_group") // 61
1779 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001780}
1781
Jesse Hallc7467b72015-11-29 21:05:26 -08001782/// Cull mode flags
1783type VkFlags VkCullModeFlags
1784bitfield VkCullModeFlagBits {
1785 VK_CULL_MODE_NONE = 0x00000000,
1786 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1787 VK_CULL_MODE_BACK_BIT = 0x00000002,
1788 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1789}
1790
Jesse Hallad250842017-03-10 18:35:38 -08001791@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001792type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001793@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001794bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001795 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001796 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1797 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1798 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1799 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1800 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1801 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1802 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1803 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001804}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001805
Jesse Hallad250842017-03-10 18:35:38 -08001806@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001807type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001808@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001809bitfield VkCompositeAlphaFlagBitsKHR {
1810 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1811 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1812 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1813 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1814}
1815
Jesse Hallad250842017-03-10 18:35:38 -08001816@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001817type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001818@extension("VK_KHR_swapchain") // 2
1819bitfield VkSwapchainCreateFlagBitsKHR {
1820 //@extension("VK_KHX_device_group") // 61
1821 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1822}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001823
Jesse Hallad250842017-03-10 18:35:38 -08001824@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001825type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001826@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001827bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001828 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1829 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1830 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1831 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001832}
1833
Jesse Hallad250842017-03-10 18:35:38 -08001834@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001835type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001836//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001837//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1838//}
1839
Jesse Hallad250842017-03-10 18:35:38 -08001840@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001841type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001842//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001843//bitfield VkDisplayModeCreateFlagBitsKHR {
1844//}
1845
Jesse Hallad250842017-03-10 18:35:38 -08001846@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001847type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001848//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001849//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1850//}
1851
Jesse Hallad250842017-03-10 18:35:38 -08001852@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001853type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001854//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001855//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1856//}
1857
Jesse Hallad250842017-03-10 18:35:38 -08001858@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001859type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001860//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001861//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1862//}
1863
Jesse Hallad250842017-03-10 18:35:38 -08001864@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001865type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001866//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001867//bitfield VkMirSurfaceCreateFlagBitsKHR {
1868//}
1869
Jesse Hallad250842017-03-10 18:35:38 -08001870@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001871type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001872//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001873//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1874//}
1875
Jesse Hallad250842017-03-10 18:35:38 -08001876@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001877type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001878//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001879//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1880//}
1881
Jesse Hallad250842017-03-10 18:35:38 -08001882@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001883type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08001884@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08001885bitfield VkSwapchainImageUsageFlagBitsANDROID {
1886 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
1887}
1888
Jesse Hallad250842017-03-10 18:35:38 -08001889@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001890type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08001891@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001892bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001893 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1894 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1895 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001896 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1897 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1898}
1899
Jesse Hallad250842017-03-10 18:35:38 -08001900@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001901type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001902@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001903bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001904 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1905 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1906 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1907 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13001908}
1909
Jesse Hallad250842017-03-10 18:35:38 -08001910@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001911type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08001912@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13001913bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08001914 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1915 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1916 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13001917}
1918
Jesse Hallad250842017-03-10 18:35:38 -08001919@extension("VK_KHX_device_group") // 61
1920type VkFlags VkPeerMemoryFeatureFlagsKHX
1921@extension("VK_KHX_device_group") // 61
1922bitfield VkPeerMemoryFeatureFlagBitsKHX {
1923 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1924 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1925 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1926 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1927}
1928
1929@extension("VK_KHX_device_group") // 61
1930type VkFlags VkMemoryAllocateFlagsKHX
1931@extension("VK_KHX_device_group") // 61
1932bitfield VkMemoryAllocateFlagBitsKHX {
1933 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1934}
1935
1936@extension("VK_KHX_device_group") // 61
1937type VkFlags VkDeviceGroupPresentModeFlagsKHX
1938@extension("VK_KHX_device_group") // 61
1939bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1940 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1941 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1942 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1943 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1944}
1945
1946@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001947type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08001948//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001949//bitfield VkViSurfaceCreateFlagBitsNN {
1950//}
1951
Jesse Hallad250842017-03-10 18:35:38 -08001952@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001953type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08001954//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001955//bitfield VkCommandPoolTrimFlagBitsKHR {
1956//}
1957
Jesse Hallad250842017-03-10 18:35:38 -08001958@extension("VK_KHX_external_memory_capabilities") // 72
1959type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1960@extension("VK_KHX_external_memory_capabilities") // 72
1961bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1962 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1963 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1964 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1965 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1966 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1967 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1968 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1969}
1970
1971@extension("VK_KHX_external_memory_capabilities") // 72
1972type VkFlags VkExternalMemoryFeatureFlagsKHX
1973@extension("VK_KHX_external_memory_capabilities") // 72
1974bitfield VkExternalMemoryFeatureFlagBitsKHX {
1975 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1976 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1977 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1978}
1979
1980@extension("VK_KHX_external_semaphore_capabilities") // 77
1981type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
1982@extension("VK_KHX_external_semaphore_capabilities") // 77
1983bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
1984 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
1985 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
1986 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
1987 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
1988 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
1989}
1990
1991@extension("VK_KHX_external_semaphore_capabilities") // 77
1992type VkFlags VkExternalSemaphoreFeatureFlagsKHX
1993@extension("VK_KHX_external_semaphore_capabilities") // 77
1994bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
1995 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
1996 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
1997}
1998
1999@extension("VK_KHR_descriptor_update_template") // 86
2000type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2001//@extension("VK_KHR_descriptor_update_template") // 86
2002//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2003//}
2004
2005@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002006type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002007@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002008bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002009 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2010 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2011 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2012 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002013}
2014
Jesse Hallad250842017-03-10 18:35:38 -08002015@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002016type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002017@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002018bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002019 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2020 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002021}
2022
Jesse Hallad250842017-03-10 18:35:38 -08002023@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002024type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002025@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002026bitfield VkSurfaceCounterFlagBitsEXT {
2027 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2028}
2029
Jesse Hallad250842017-03-10 18:35:38 -08002030@extension("VK_NV_viewport_swizzle") // 99
2031type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2032//@extension("VK_NV_viewport_swizzle") // 99
2033//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2034//}
2035
2036@extension("VK_EXT_discard_rectangles") // 100
2037type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2038//@extension("VK_EXT_discard_rectangles") // 100
2039//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2040//}
2041
2042@extension("VK_MVK_ios_surface") // 123
2043type VkFlags VkIOSSurfaceCreateFlagsMVK
2044//@extension("VK_MVK_ios_surface") // 123
2045//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2046//}
2047
2048@extension("VK_MVK_macos_surface") // 124
2049type VkFlags VkMacOSSurfaceCreateFlagsMVK
2050//@extension("VK_MVK_macos_surface") // 124
2051//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2052//}
2053
Jesse Halld27f6aa2015-08-15 17:58:48 -07002054//////////////////
2055// Structures //
2056//////////////////
2057
2058class VkOffset2D {
2059 s32 x
2060 s32 y
2061}
2062
2063class VkOffset3D {
2064 s32 x
2065 s32 y
2066 s32 z
2067}
2068
2069class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002070 u32 width
2071 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002072}
2073
2074class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002075 u32 width
2076 u32 height
2077 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002078}
2079
2080class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002081 f32 x
2082 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002083 f32 width
2084 f32 height
2085 f32 minDepth
2086 f32 maxDepth
2087}
2088
2089class VkRect2D {
2090 VkOffset2D offset
2091 VkExtent2D extent
2092}
2093
Jesse Halla15a4bf2015-11-19 22:48:02 -08002094class VkClearRect {
2095 VkRect2D rect
2096 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002097 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002098}
2099
Jesse Hall65ab5522015-11-30 00:07:16 -08002100class VkComponentMapping {
2101 VkComponentSwizzle r
2102 VkComponentSwizzle g
2103 VkComponentSwizzle b
2104 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002105}
2106
2107class VkPhysicalDeviceProperties {
2108 u32 apiVersion
2109 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002110 u32 vendorID
2111 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002112 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002113 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2114 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002115 VkPhysicalDeviceLimits limits
2116 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002117}
2118
2119class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002120 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002121 u32 specVersion /// version of the extension specification implemented
2122}
2123
2124class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002125 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002126 u32 specVersion /// version of the layer specification implemented
2127 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002128 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002129}
2130
Jesse Halla366a512015-11-19 22:30:07 -08002131class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002132 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2133 const void* pNext /// Next structure in chain
2134 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002135 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002136 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002137 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002138 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002139 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002140 const VkSemaphore* pSignalSemaphores
2141}
2142
Jesse Halld27f6aa2015-08-15 17:58:48 -07002143class VkApplicationInfo {
2144 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2145 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002146 const char* pApplicationName
2147 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002148 const char* pEngineName
2149 u32 engineVersion
2150 u32 apiVersion
2151}
2152
Jesse Hall3fbc8562015-11-29 22:10:52 -08002153class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002154 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002155 PFN_vkAllocationFunction pfnAllocation
2156 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002157 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002158 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002159 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002160}
2161
2162class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002163 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2164 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002165 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002166 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002167 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002168 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002169}
2170
2171class VkDeviceCreateInfo {
2172 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2173 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002174 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002175 u32 queueCreateInfoCount
2176 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002177 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002178 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002179 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002180 const char* const* ppEnabledExtensionNames
2181 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002182}
2183
2184class VkInstanceCreateInfo {
2185 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2186 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002187 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002188 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002189 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002190 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002191 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002192 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2193}
2194
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002195class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002196 VkQueueFlags queueFlags /// Queue flags
2197 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002198 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002199 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002200}
2201
2202class VkPhysicalDeviceMemoryProperties {
2203 u32 memoryTypeCount
2204 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2205 u32 memoryHeapCount
2206 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2207}
2208
Jesse Hall3fbc8562015-11-29 22:10:52 -08002209class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002210 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002211 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002212 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002213 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2214}
2215
2216class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002217 VkDeviceSize size /// Specified in bytes
2218 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002219 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2220}
2221
2222class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002223 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002224 VkExtent3D imageGranularity
2225 VkSparseImageFormatFlags flags
2226}
2227
2228class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002229 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002230 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002231 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2232 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2233 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002234}
2235
2236class VkMemoryType {
2237 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2238 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2239}
2240
2241class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002242 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002243 VkMemoryHeapFlags flags /// Flags for the heap
2244}
2245
2246class VkMappedMemoryRange {
2247 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2248 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002249 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002250 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2251 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002252}
2253
2254class VkFormatProperties {
2255 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2256 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002257 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002258}
2259
2260class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002261 VkExtent3D maxExtent /// max image dimensions for this resource type
2262 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002263 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002264 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2265 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2266}
2267
Jesse Halla15a4bf2015-11-19 22:48:02 -08002268class VkDescriptorImageInfo {
2269 VkSampler sampler
2270 VkImageView imageView
2271 VkImageLayout imageLayout
2272}
2273
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002274class VkDescriptorBufferInfo {
2275 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2276 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2277 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002278}
2279
Jesse Halld27f6aa2015-08-15 17:58:48 -07002280class VkWriteDescriptorSet {
2281 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2282 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002283 VkDescriptorSet dstSet /// Destination descriptor set
2284 u32 dstBinding /// Binding within the destination descriptor set to write
2285 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002286 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002287 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 -08002288 const VkDescriptorImageInfo* pImageInfo
2289 const VkDescriptorBufferInfo* pBufferInfo
2290 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002291}
2292
2293class VkCopyDescriptorSet {
2294 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2295 const void* pNext /// Pointer to next structure
2296 VkDescriptorSet srcSet /// Source descriptor set
2297 u32 srcBinding /// Binding within the source descriptor set to copy from
2298 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002299 VkDescriptorSet dstSet /// Destination descriptor set
2300 u32 dstBinding /// Binding within the destination descriptor set to copy to
2301 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002302 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002303}
2304
2305class VkBufferCreateInfo {
2306 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2307 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002308 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002309 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002310 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002311 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002312 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002313 const u32* pQueueFamilyIndices
2314}
2315
2316class VkBufferViewCreateInfo {
2317 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2318 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002319 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002320 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002321 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002322 VkDeviceSize offset /// Specified in bytes
2323 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002324}
2325
2326class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002327 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002328 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002329 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002330}
2331
2332class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002333 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002334 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002335 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002336 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002337 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002338}
2339
2340class VkMemoryBarrier {
2341 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2342 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002343 VkAccessFlags srcAccessMask
2344 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002345}
2346
2347class VkBufferMemoryBarrier {
2348 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2349 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002350 VkAccessFlags srcAccessMask
2351 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002352 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002353 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002354 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002355 VkDeviceSize offset /// Offset within the buffer to sync
2356 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002357}
2358
2359class VkImageMemoryBarrier {
2360 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2361 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002362 VkAccessFlags srcAccessMask
2363 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002364 VkImageLayout oldLayout /// Current layout of the image
2365 VkImageLayout newLayout /// New layout to transition the image to
2366 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002367 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002368 VkImage image /// Image to sync
2369 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2370}
2371
2372class VkImageCreateInfo {
2373 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2374 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002375 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002376 VkImageType imageType
2377 VkFormat format
2378 VkExtent3D extent
2379 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002380 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002381 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002382 VkImageTiling tiling
2383 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002384 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002385 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002386 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002387 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002388}
2389
2390class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002391 VkDeviceSize offset /// Specified in bytes
2392 VkDeviceSize size /// Specified in bytes
2393 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002394 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002395 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002396}
2397
2398class VkImageViewCreateInfo {
2399 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2400 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002401 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002402 VkImage image
2403 VkImageViewType viewType
2404 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002405 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002406 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002407}
2408
2409class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002410 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002411 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002412 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002413}
2414
Jesse Halla6429252015-11-29 18:59:42 -08002415class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002416 VkDeviceSize resourceOffset /// Specified in bytes
2417 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002418 VkDeviceMemory memory
2419 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002420 VkSparseMemoryBindFlags flags
2421}
2422
Jesse Halla6429252015-11-29 18:59:42 -08002423class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002424 VkImageSubresource subresource
2425 VkOffset3D offset
2426 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002427 VkDeviceMemory memory
2428 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002429 VkSparseMemoryBindFlags flags
2430}
2431
Jesse Halla6429252015-11-29 18:59:42 -08002432class VkSparseBufferMemoryBindInfo {
2433 VkBuffer buffer
2434 u32 bindCount
2435 const VkSparseMemoryBind* pBinds
2436}
2437
2438class VkSparseImageOpaqueMemoryBindInfo {
2439 VkImage image
2440 u32 bindCount
2441 const VkSparseMemoryBind* pBinds
2442}
2443
2444class VkSparseImageMemoryBindInfo {
2445 VkImage image
2446 u32 bindCount
2447 const VkSparseMemoryBind* pBinds
2448}
2449
2450class VkBindSparseInfo {
2451 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2452 const void* pNext
2453 u32 waitSemaphoreCount
2454 const VkSemaphore* pWaitSemaphores
2455 u32 numBufferBinds
2456 const VkSparseBufferMemoryBindInfo* pBufferBinds
2457 u32 numImageOpaqueBinds
2458 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2459 u32 numImageBinds
2460 const VkSparseImageMemoryBindInfo* pImageBinds
2461 u32 signalSemaphoreCount
2462 const VkSemaphore* pSignalSemaphores
2463}
2464
Jesse Hall65ab5522015-11-30 00:07:16 -08002465class VkImageSubresourceLayers {
2466 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002467 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002468 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002469 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002470}
2471
Jesse Halld27f6aa2015-08-15 17:58:48 -07002472class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002473 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002474 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002475 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002476 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002477 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2478}
2479
2480class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002481 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002482 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002483 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002484 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002485}
2486
2487class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002488 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002489 u32 bufferRowLength /// Specified in texels
2490 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002491 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002492 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2493 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2494}
2495
2496class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002497 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002498 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002499 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002500 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002501 VkExtent3D extent
2502}
2503
2504class VkShaderModuleCreateInfo {
2505 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2506 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002507 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002508 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002509 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002510}
2511
Jesse Halld27f6aa2015-08-15 17:58:48 -07002512class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002513 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002514 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002515 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002516 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2517 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2518}
2519
2520class VkDescriptorSetLayoutCreateInfo {
2521 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2522 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002523 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002524 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002525 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002526}
2527
Jesse Hall65ab5522015-11-30 00:07:16 -08002528class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002529 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002530 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002531}
2532
2533class VkDescriptorPoolCreateInfo {
2534 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2535 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002536 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002537 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002538 u32 poolSizeCount
2539 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002540}
2541
Jesse Hall3fbc8562015-11-29 22:10:52 -08002542class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002543 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002544 const void* pNext /// Pointer to next structure
2545 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002546 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002547 const VkDescriptorSetLayout* pSetLayouts
2548}
2549
Jesse Halld27f6aa2015-08-15 17:58:48 -07002550class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002551 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002552 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002553 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002554}
2555
2556class VkSpecializationInfo {
2557 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002558 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002559 platform.size_t dataSize /// Size in bytes of pData
2560 const void* pData /// Pointer to SpecConstant data
2561}
2562
2563class VkPipelineShaderStageCreateInfo {
2564 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2565 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002566 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002567 VkShaderStageFlagBits stage
2568 VkShaderModule module
2569 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002570 const VkSpecializationInfo* pSpecializationInfo
2571}
2572
2573class VkComputePipelineCreateInfo {
2574 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2575 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002576 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002577 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002578 VkPipelineLayout layout /// Interface layout of the pipeline
2579 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
2580 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
2581}
2582
2583class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002584 u32 binding /// Vertex buffer binding id
2585 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002586 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002587}
2588
2589class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002590 u32 location /// location of the shader vertex attrib
2591 u32 binding /// Vertex buffer binding id
2592 VkFormat format /// format of source data
2593 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002594}
2595
2596class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002597 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2598 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002599 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002600 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002601 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002602 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002603 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2604}
2605
2606class VkPipelineInputAssemblyStateCreateInfo {
2607 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2608 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002609 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002610 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002611 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002612}
2613
2614class VkPipelineTessellationStateCreateInfo {
2615 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2616 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002617 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002618 u32 patchControlPoints
2619}
2620
2621class VkPipelineViewportStateCreateInfo {
2622 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2623 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002624 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002625 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002626 const VkViewport* pViewports
2627 u32 scissorCount
2628 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002629}
2630
Jesse Hall3fbc8562015-11-29 22:10:52 -08002631class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002632 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002633 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002634 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002635 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002636 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002637 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002638 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002639 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002640 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002641 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002642 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002643 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002644 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002645}
2646
2647class VkPipelineMultisampleStateCreateInfo {
2648 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2649 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002650 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002651 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002652 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002653 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002654 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002655 VkBool32 alphaToCoverageEnable
2656 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002657}
2658
2659class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002660 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002661 VkBlendFactor srcColorBlendFactor
2662 VkBlendFactor dstColorBlendFactor
2663 VkBlendOp colorBlendOp
2664 VkBlendFactor srcAlphaBlendFactor
2665 VkBlendFactor dstAlphaBlendFactor
2666 VkBlendOp alphaBlendOp
2667 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002668}
2669
2670class VkPipelineColorBlendStateCreateInfo {
2671 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2672 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002673 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002674 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002675 VkLogicOp logicOp
2676 u32 attachmentCount /// # of pAttachments
2677 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002678 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002679}
2680
2681class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002682 VkStencilOp failOp
2683 VkStencilOp passOp
2684 VkStencilOp depthFailOp
2685 VkCompareOp compareOp
2686 u32 compareMask
2687 u32 writeMask
2688 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002689}
2690
2691class VkPipelineDepthStencilStateCreateInfo {
2692 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2693 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002694 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002695 VkBool32 depthTestEnable
2696 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002697 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002698 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2699 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002700 VkStencilOpState front
2701 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002702 f32 minDepthBounds
2703 f32 maxDepthBounds
2704}
2705
2706class VkPipelineDynamicStateCreateInfo {
2707 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2708 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002709 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002710 u32 dynamicStateCount
2711 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002712}
2713
2714class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002715 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2716 const void* pNext /// Pointer to next structure
2717 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002718 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002719 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002720 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2721 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2722 const VkPipelineTessellationStateCreateInfo* pTessellationState
2723 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002724 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002725 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2726 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2727 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002728 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002729 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002730 VkRenderPass renderPass
2731 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002732 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
2733 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 -07002734}
2735
2736class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002737 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2738 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002739 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002740 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2741 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002742}
2743
2744class VkPushConstantRange {
2745 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002746 u32 offset /// Start of the range, in bytes
2747 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002748}
2749
2750class VkPipelineLayoutCreateInfo {
2751 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2752 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002753 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002754 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002755 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2756 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2757 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2758}
2759
2760class VkSamplerCreateInfo {
2761 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2762 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002763 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002764 VkFilter magFilter /// Filter mode for magnification
2765 VkFilter minFilter /// Filter mode for minifiation
2766 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2767 VkSamplerAddressMode addressModeU
2768 VkSamplerAddressMode addressModeV
2769 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002770 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002771 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002772 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002773 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002774 VkCompareOp compareOp
2775 f32 minLod
2776 f32 maxLod
2777 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002778 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002779}
2780
Jesse Hall3fbc8562015-11-29 22:10:52 -08002781class VkCommandPoolCreateInfo {
2782 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002783 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002784 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002785 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002786}
2787
Jesse Hall3fbc8562015-11-29 22:10:52 -08002788class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002789 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002790 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002791 VkCommandPool commandPool
2792 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002793 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002794}
2795
Jesse Hall3dd678a2016-01-08 21:52:01 -08002796class VkCommandBufferInheritanceInfo {
2797 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002798 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002799 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002800 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002801 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002802 VkBool32 occlusionQueryEnable
2803 VkQueryControlFlags queryFlags
2804 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002805}
2806
Jesse Hall3dd678a2016-01-08 21:52:01 -08002807class VkCommandBufferBeginInfo {
2808 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2809 const void* pNext /// Pointer to next structure
2810 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2811 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2812}
2813
Jesse Halld27f6aa2015-08-15 17:58:48 -07002814class VkRenderPassBeginInfo {
2815 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2816 const void* pNext /// Pointer to next structure
2817 VkRenderPass renderPass
2818 VkFramebuffer framebuffer
2819 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002820 u32 clearValueCount
2821 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002822}
2823
2824@union
2825/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2826class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002827 f32[4] float32
2828 s32[4] int32
2829 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002830}
2831
2832class VkClearDepthStencilValue {
2833 f32 depth
2834 u32 stencil
2835}
2836
2837@union
2838/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2839class VkClearValue {
2840 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002841 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002842}
2843
Jesse Hallae38f732015-11-19 21:32:50 -08002844class VkClearAttachment {
2845 VkImageAspectFlags aspectMask
2846 u32 colorAttachment
2847 VkClearValue clearValue
2848}
2849
Jesse Halld27f6aa2015-08-15 17:58:48 -07002850class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002851 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002852 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002853 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002854 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2855 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2856 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2857 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2858 VkImageLayout initialLayout
2859 VkImageLayout finalLayout
2860}
2861
2862class VkAttachmentReference {
2863 u32 attachment
2864 VkImageLayout layout
2865}
2866
2867class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002868 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002869 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002870 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002871 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002872 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002873 const VkAttachmentReference* pColorAttachments
2874 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002875 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002876 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002877 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002878}
2879
2880class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002881 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002882 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002883 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002884 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002885 VkAccessFlags srcAccessMask
2886 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002887 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002888}
2889
2890class VkRenderPassCreateInfo {
2891 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2892 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002893 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002894 u32 attachmentCount
2895 const VkAttachmentDescription* pAttachments
2896 u32 subpassCount
2897 const VkSubpassDescription* pSubpasses
2898 u32 dependencyCount
2899 const VkSubpassDependency* pDependencies
2900}
2901
2902class VkEventCreateInfo {
2903 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2904 const void* pNext /// Pointer to next structure
2905 VkEventCreateFlags flags /// Event creation flags
2906}
2907
2908class VkFenceCreateInfo {
2909 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2910 const void* pNext /// Pointer to next structure
2911 VkFenceCreateFlags flags /// Fence creation flags
2912}
2913
2914class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002915 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2916 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2917 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2918 VkBool32 independentBlend /// blending operations are controlled per-attachment
2919 VkBool32 geometryShader /// geometry stage
2920 VkBool32 tessellationShader /// tessellation control and evaluation stage
2921 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002922 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002923 VkBool32 logicOp /// logic operations
2924 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002925 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002926 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002927 VkBool32 depthBiasClamp /// depth bias clamping
2928 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2929 VkBool32 depthBounds /// depth bounds test
2930 VkBool32 wideLines /// lines with width greater than 1
2931 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002932 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2933 VkBool32 multiViewport
2934 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002935 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2936 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2937 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002938 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002939 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002940 VkBool32 vertexPipelineStoresAndAtomics
2941 VkBool32 fragmentStoresAndAtomics
2942 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002943 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2944 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2945 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002946 VkBool32 shaderStorageImageReadWithoutFormat
2947 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002948 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2949 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2950 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2951 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2952 VkBool32 shaderClipDistance /// clip distance in shaders
2953 VkBool32 shaderCullDistance /// cull distance in shaders
2954 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2955 VkBool32 shaderInt64 /// 64-bit integers in shaders
2956 VkBool32 shaderInt16 /// 16-bit integers in shaders
2957 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002958 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002959 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2960 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2961 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2962 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2963 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2964 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2965 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2966 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2967 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002968 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002969 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002970}
2971
2972class VkPhysicalDeviceLimits {
2973 /// resource maximum sizes
2974 u32 maxImageDimension1D /// max 1D image dimension
2975 u32 maxImageDimension2D /// max 2D image dimension
2976 u32 maxImageDimension3D /// max 3D image dimension
2977 u32 maxImageDimensionCube /// max cubemap image dimension
2978 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002979 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002980 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
2981 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002982 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
2983 /// memory limits
2984 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08002985 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002986 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
2987 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002988 /// descriptor set limits
2989 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002990 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
2991 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
2992 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
2993 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
2994 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002995 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08002996 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002997 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
2998 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002999 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003000 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003001 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003002 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3003 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003004 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003005 /// vertex stage limits
3006 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003007 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003008 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3009 u32 maxVertexInputBindingStride /// max vertex input binding stride
3010 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3011 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003012 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003013 u32 maxTessellationPatchSize /// max patch size (vertices)
3014 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3015 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3016 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3017 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3018 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3019 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003020 /// geometry stage limits
3021 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3022 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3023 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3024 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3025 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3026 /// fragment stage limits
3027 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003028 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003029 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003030 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3031 /// compute stage limits
3032 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3033 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3034 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3035 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3036
3037 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3038 u32 subTexelPrecisionBits /// num bits of subtexel precision
3039 u32 mipmapPrecisionBits /// num bits of mipmap precision
3040
3041 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003042 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003043
3044 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3045 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3046
3047 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003048 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3049 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3050 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3051
Jesse Halldc6d36c2015-11-29 19:12:15 -08003052 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3053 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3054 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3055 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003056
Jesse Hallfbf97b02015-11-20 14:17:03 -08003057 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003058 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003059 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003060 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3061 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3062 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3063 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3064
3065 u32 maxFramebufferWidth /// max width for a framebuffer
3066 u32 maxFramebufferHeight /// max height for a framebuffer
3067 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003068 VkSampleCountFlags framebufferColorSampleCounts
3069 VkSampleCountFlags framebufferDepthSampleCounts
3070 VkSampleCountFlags framebufferStencilSampleCounts
3071 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003072 u32 maxColorAttachments /// max num of framebuffer color attachments
3073
Jesse Hall091ed9e2015-11-30 00:55:29 -08003074 VkSampleCountFlags sampledImageColorSampleCounts
3075 VkSampleCountFlags sampledImageIntegerSampleCounts
3076 VkSampleCountFlags sampledImageDepthSampleCounts
3077 VkSampleCountFlags sampledImageStencilSampleCounts
3078 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003079 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003080 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003081
Jesse Halla9bb62b2015-11-21 19:31:56 -08003082 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003083
3084 u32 maxClipDistances /// max number of clip distances
3085 u32 maxCullDistances /// max number of cull distances
3086 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3087
Jesse Hallfbf97b02015-11-20 14:17:03 -08003088 u32 discreteQueuePriorities
3089
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003090 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3091 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003092 f32 pointSizeGranularity /// granularity of supported point sizes
3093 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003094 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003095 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003096
Jesse Hall65ab5522015-11-30 00:07:16 -08003097 VkDeviceSize optimalBufferCopyOffsetAlignment
3098 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003099 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003100}
3101
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003102class VkPhysicalDeviceSparseProperties {
3103 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 -08003104 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 -07003105 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3106 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 -07003107 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
3108}
3109
Jesse Halld27f6aa2015-08-15 17:58:48 -07003110class VkSemaphoreCreateInfo {
3111 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3112 const void* pNext /// Pointer to next structure
3113 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3114}
3115
3116class VkQueryPoolCreateInfo {
3117 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3118 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003119 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003120 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003121 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003122 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3123}
3124
3125class VkFramebufferCreateInfo {
3126 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3127 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003128 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003129 VkRenderPass renderPass
3130 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003131 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003132 u32 width
3133 u32 height
3134 u32 layers
3135}
3136
Jesse Hall3fbc8562015-11-29 22:10:52 -08003137class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003138 u32 vertexCount
3139 u32 instanceCount
3140 u32 firstVertex
3141 u32 firstInstance
3142}
3143
Jesse Hall3fbc8562015-11-29 22:10:52 -08003144class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003145 u32 indexCount
3146 u32 instanceCount
3147 u32 firstIndex
3148 s32 vertexOffset
3149 u32 firstInstance
3150}
3151
Jesse Hall3fbc8562015-11-29 22:10:52 -08003152class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003153 u32 x
3154 u32 y
3155 u32 z
3156}
3157
Jesse Hallad250842017-03-10 18:35:38 -08003158@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003159class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003160 u32 minImageCount
3161 u32 maxImageCount
3162 VkExtent2D currentExtent
3163 VkExtent2D minImageExtent
3164 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003165 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003166 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003167 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003168 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003169 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003170}
3171
Jesse Hallad250842017-03-10 18:35:38 -08003172@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003173class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003174 VkFormat format
3175 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003176}
3177
Jesse Hallad250842017-03-10 18:35:38 -08003178@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003179class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003180 VkStructureType sType
3181 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003182 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003183 VkSurfaceKHR surface
3184 u32 minImageCount
3185 VkFormat imageFormat
3186 VkColorSpaceKHR imageColorSpace
3187 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003188 u32 imageArrayLayers
3189 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003190 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003191 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003192 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003193 VkSurfaceTransformFlagBitsKHR preTransform
3194 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003195 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003196 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003197 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003198}
3199
Jesse Hallad250842017-03-10 18:35:38 -08003200@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003201class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003202 VkStructureType sType
3203 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003204 u32 waitSemaphoreCount
3205 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003206 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003207 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003208 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003209 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003210}
3211
Jesse Hallad250842017-03-10 18:35:38 -08003212@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003213class VkDisplayPropertiesKHR {
3214 VkDisplayKHR display
3215 const char* displayName
3216 VkExtent2D physicalDimensions
3217 VkExtent2D physicalResolution
3218 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003219 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003220 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003221}
3222
Jesse Hallad250842017-03-10 18:35:38 -08003223@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003224class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003225 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003226 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003227}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003228
Jesse Hallad250842017-03-10 18:35:38 -08003229@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003230class VkDisplayModePropertiesKHR {
3231 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003232 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003233}
3234
Jesse Hallad250842017-03-10 18:35:38 -08003235@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003236class VkDisplayModeCreateInfoKHR {
3237 VkStructureType sType
3238 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003239 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003240 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003241}
3242
Jesse Hallad250842017-03-10 18:35:38 -08003243@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003244class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003245 VkDisplayKHR currentDisplay
3246 u32 currentStackIndex
3247}
3248
Jesse Hallad250842017-03-10 18:35:38 -08003249@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003250class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003251 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3252 VkOffset2D minSrcPosition
3253 VkOffset2D maxSrcPosition
3254 VkExtent2D minSrcExtent
3255 VkExtent2D maxSrcExtent
3256 VkOffset2D minDstPosition
3257 VkOffset2D maxDstPosition
3258 VkExtent2D minDstExtent
3259 VkExtent2D maxDstExtent
3260}
3261
Jesse Hallad250842017-03-10 18:35:38 -08003262@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003263class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003264 VkStructureType sType
3265 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003266 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003267 VkDisplayModeKHR displayMode
3268 u32 planeIndex
3269 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003270 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003271 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003272 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3273 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003274}
3275
Jesse Hallad250842017-03-10 18:35:38 -08003276@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003277class VkDisplayPresentInfoKHR {
3278 VkStructureType sType
3279 const void* pNext
3280 VkRect2D srcRect
3281 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003282 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003283}
3284
Jesse Hallad250842017-03-10 18:35:38 -08003285@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003286class VkXlibSurfaceCreateInfoKHR {
3287 VkStructureType sType
3288 const void* pNext
3289 VkXlibSurfaceCreateFlagsKHR flags
3290 platform.Display* dpy
3291 platform.Window window
3292}
3293
Jesse Hallad250842017-03-10 18:35:38 -08003294@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003295class VkXcbSurfaceCreateInfoKHR {
3296 VkStructureType sType
3297 const void* pNext
3298 VkXcbSurfaceCreateFlagsKHR flags
3299 platform.xcb_connection_t* connection
3300 platform.xcb_window_t window
3301}
3302
Jesse Hallad250842017-03-10 18:35:38 -08003303@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003304class VkWaylandSurfaceCreateInfoKHR {
3305 VkStructureType sType
3306 const void* pNext
3307 VkWaylandSurfaceCreateFlagsKHR flags
3308 platform.wl_display* display
3309 platform.wl_surface* surface
3310}
3311
Jesse Hallad250842017-03-10 18:35:38 -08003312@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003313class VkMirSurfaceCreateInfoKHR {
3314 VkStructureType sType
3315 const void* pNext
3316 VkMirSurfaceCreateFlagsKHR flags
3317 platform.MirConnection* connection
3318 platform.MirSurface* mirSurface
3319}
3320
Jesse Hallad250842017-03-10 18:35:38 -08003321@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003322class VkAndroidSurfaceCreateInfoKHR {
3323 VkStructureType sType
3324 const void* pNext
3325 VkAndroidSurfaceCreateFlagsKHR flags
3326 platform.ANativeWindow* window
3327}
3328
Jesse Hallad250842017-03-10 18:35:38 -08003329@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003330class VkWin32SurfaceCreateInfoKHR {
3331 VkStructureType sType
3332 const void* pNext
3333 VkWin32SurfaceCreateFlagsKHR flags
3334 platform.HINSTANCE hinstance
3335 platform.HWND hwnd
3336}
3337
Jesse Hallad250842017-03-10 18:35:38 -08003338@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08003339@internal class Gralloc1Usage {
3340 u64 consumer
3341 u64 producer
3342}
3343
Jesse Hallad250842017-03-10 18:35:38 -08003344@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003345class VkNativeBufferANDROID {
3346 VkStructureType sType
3347 const void* pNext
3348 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08003349 s32 stride
3350 s32 format
3351 s32 usage
3352 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08003353}
3354
Jesse Hallad250842017-03-10 18:35:38 -08003355@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13003356class VkSwapchainImageCreateInfoANDROID {
3357 VkStructureType sType
3358 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13003359 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13003360}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07003361
Jesse Hallad250842017-03-10 18:35:38 -08003362@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13003363class VkPhysicalDevicePresentationPropertiesANDROID {
3364 VkStructureType sType
3365 void* pNext
3366 VkBool32 sharedImage
3367}
3368
Jesse Hallad250842017-03-10 18:35:38 -08003369@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003370class VkDebugReportCallbackCreateInfoEXT {
3371 VkStructureType sType
3372 const void* pNext
3373 VkDebugReportFlagsEXT flags
3374 PFN_vkDebugReportCallbackEXT pfnCallback
3375 void* pUserData
3376}
3377
Jesse Hallad250842017-03-10 18:35:38 -08003378@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003379class VkPipelineRasterizationStateRasterizationOrderAMD {
3380 VkStructureType sType
3381 const void* pNext
3382 VkRasterizationOrderAMD rasterizationOrder
3383}
3384
Jesse Hallad250842017-03-10 18:35:38 -08003385@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003386class VkDebugMarkerObjectNameInfoEXT {
3387 VkStructureType sType
3388 const void* pNext
3389 VkDebugReportObjectTypeEXT objectType
3390 u64 object
3391 const char* pObjectName
3392}
3393
Jesse Hallad250842017-03-10 18:35:38 -08003394@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003395class VkDebugMarkerObjectTagInfoEXT {
3396 VkStructureType sType
3397 const void* pNext
3398 VkDebugReportObjectTypeEXT objectType
3399 u64 object
3400 u64 tagName
3401 platform.size_t tagSize
3402 const void* pTag
3403}
3404
Jesse Hallad250842017-03-10 18:35:38 -08003405@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003406class VkDebugMarkerMarkerInfoEXT {
3407 VkStructureType sType
3408 const void* pNext
3409 const char* pMarkerName
3410 f32[4] color
3411}
3412
Jesse Hallad250842017-03-10 18:35:38 -08003413@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003414class VkDedicatedAllocationImageCreateInfoNV {
3415 VkStructureType sType
3416 const void* pNext
3417 VkBool32 dedicatedAllocation
3418}
3419
Jesse Hallad250842017-03-10 18:35:38 -08003420@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003421class VkDedicatedAllocationBufferCreateInfoNV {
3422 VkStructureType sType
3423 const void* pNext
3424 VkBool32 dedicatedAllocation
3425}
3426
Jesse Hallad250842017-03-10 18:35:38 -08003427@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07003428class VkDedicatedAllocationMemoryAllocateInfoNV {
3429 VkStructureType sType
3430 const void* pNext
3431 VkImage image
3432 VkBuffer buffer
3433}
3434
Jesse Hallad250842017-03-10 18:35:38 -08003435@extension("VK_KHX_multiview") // 54
3436class VkRenderPassMultiviewCreateInfoKHX {
3437 VkStructureType sType
3438 const void* pNext
3439 u32 subpassCount
3440 const u32* pViewMasks
3441 u32 dependencyCount
3442 const s32* pViewOffsets
3443 u32 correlationMaskCount
3444 const u32* pCorrelationMasks
3445}
3446
3447@extension("VK_KHX_multiview") // 54
3448class VkPhysicalDeviceMultiviewFeaturesKHX {
3449 VkStructureType sType
3450 void* pNext
3451 VkBool32 multiview
3452 VkBool32 multiviewGeometryShader
3453 VkBool32 multiviewTessellationShader
3454}
3455
3456@extension("VK_KHX_multiview") // 54
3457class VkPhysicalDeviceMultiviewPropertiesKHX {
3458 VkStructureType sType
3459 void* pNext
3460 u32 maxMultiviewViewCount
3461 u32 maxMultiviewInstanceIndex
3462}
3463
3464@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003465class VkExternalImageFormatPropertiesNV {
3466 VkImageFormatProperties imageFormatProperties
3467 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3468 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3469 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3470}
3471
Jesse Hallad250842017-03-10 18:35:38 -08003472@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003473class VkExternalMemoryImageCreateInfoNV {
3474 VkStructureType sType
3475 const void* pNext
3476 VkExternalMemoryHandleTypeFlagsNV handleTypes
3477}
3478
Jesse Hallad250842017-03-10 18:35:38 -08003479@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003480class VkExportMemoryAllocateInfoNV {
3481 VkStructureType sType
3482 const void* pNext
3483 VkExternalMemoryHandleTypeFlagsNV handleTypes
3484}
3485
Jesse Hallad250842017-03-10 18:35:38 -08003486@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003487class VkImportMemoryWin32HandleInfoNV {
3488 VkStructureType sType
3489 const void* pNext
3490 VkExternalMemoryHandleTypeFlagsNV handleType
3491 platform.HANDLE handle
3492}
3493
Jesse Hallad250842017-03-10 18:35:38 -08003494@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003495class VkExportMemoryWin32HandleInfoNV {
3496 VkStructureType sType
3497 const void* pNext
3498 const platform.SECURITY_ATTRIBUTES* pAttributes
3499 platform.DWORD dwAccess
3500}
3501
Jesse Hallad250842017-03-10 18:35:38 -08003502@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003503class VkWin32KeyedMutexAcquireReleaseInfoNV {
3504 VkStructureType sType
3505 const void* pNext
3506 u32 acquireCount
3507 const VkDeviceMemory* pAcquireSyncs
3508 const u64* pAcquireKeys
3509 const u32* pAcquireTimeoutMilliseconds
3510 u32 releaseCount
3511 const VkDeviceMemory* pReleaseSyncs
3512 const u64* pReleaseKeys
3513}
3514
Jesse Hallad250842017-03-10 18:35:38 -08003515@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003516class VkPhysicalDeviceFeatures2KHR {
3517 VkStructureType sType
3518 void* pNext
3519 VkPhysicalDeviceFeatures features
3520}
3521
Jesse Hallad250842017-03-10 18:35:38 -08003522@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003523class VkPhysicalDeviceProperties2KHR {
3524 VkStructureType sType
3525 void* pNext
3526 VkPhysicalDeviceProperties properties
3527}
3528
Jesse Hallad250842017-03-10 18:35:38 -08003529@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003530class VkFormatProperties2KHR {
3531 VkStructureType sType
3532 void* pNext
3533 VkFormatProperties formatProperties
3534}
3535
Jesse Hallad250842017-03-10 18:35:38 -08003536@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003537class VkImageFormatProperties2KHR {
3538 VkStructureType sType
3539 void* pNext
3540 VkImageFormatProperties imageFormatProperties
3541}
3542
Jesse Hallad250842017-03-10 18:35:38 -08003543@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003544class VkPhysicalDeviceImageFormatInfo2KHR {
3545 VkStructureType sType
3546 const void* pNext
3547 VkFormat format
3548 VkImageType type
3549 VkImageTiling tiling
3550 VkImageUsageFlags usage
3551 VkImageCreateFlags flags
3552}
3553
Jesse Hallad250842017-03-10 18:35:38 -08003554@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003555class VkQueueFamilyProperties2KHR {
3556 VkStructureType sType
3557 void* pNext
3558 VkQueueFamilyProperties queueFamilyProperties
3559}
3560
Jesse Hallad250842017-03-10 18:35:38 -08003561@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003562class VkPhysicalDeviceMemoryProperties2KHR {
3563 VkStructureType sType
3564 void* pNext
3565 VkPhysicalDeviceMemoryProperties memoryProperties
3566}
3567
Jesse Hallad250842017-03-10 18:35:38 -08003568@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003569class VkSparseImageFormatProperties2KHR {
3570 VkStructureType sType
3571 void* pNext
3572 VkSparseImageFormatProperties properties
3573}
3574
Jesse Hallad250842017-03-10 18:35:38 -08003575@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13003576class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3577 VkStructureType sType
3578 const void* pNext
3579 VkFormat format
3580 VkImageType type
3581 VkSampleCountFlagBits samples
3582 VkImageUsageFlags usage
3583 VkImageTiling tiling
3584}
3585
Jesse Hallad250842017-03-10 18:35:38 -08003586@extension("VK_KHX_device_group") // 61
3587class VkMemoryAllocateFlagsInfoKHX {
3588 VkStructureType sType
3589 const void* pNext
3590 VkMemoryAllocateFlagsKHX flags
3591 u32 deviceMask
3592}
3593
3594@extension("VK_KHX_device_group") // 61
3595class VkBindBufferMemoryInfoKHX {
3596 VkStructureType sType
3597 const void* pNext
3598 VkBuffer buffer
3599 VkDeviceMemory memory
3600 VkDeviceSize memoryOffset
3601 u32 deviceIndexCount
3602 const u32* pDeviceIndices
3603}
3604
3605@extension("VK_KHX_device_group") // 61
3606class VkBindImageMemoryInfoKHX {
3607 VkStructureType sType
3608 const void* pNext
3609 VkImage image
3610 VkDeviceMemory memory
3611 VkDeviceSize memoryOffset
3612 u32 deviceIndexCount
3613 const u32* pDeviceIndices
3614 u32 SFRRectCount
3615 const VkRect2D* pSFRRects
3616}
3617
3618@extension("VK_KHX_device_group") // 61
3619class VkDeviceGroupRenderPassBeginInfoKHX {
3620 VkStructureType sType
3621 const void* pNext
3622 u32 deviceMask
3623 u32 deviceRenderAreaCount
3624 const VkRect2D* pDeviceRenderAreas
3625}
3626
3627@extension("VK_KHX_device_group") // 61
3628class VkDeviceGroupCommandBufferBeginInfoKHX {
3629 VkStructureType sType
3630 const void* pNext
3631 u32 deviceMask
3632}
3633
3634@extension("VK_KHX_device_group") // 61
3635class VkDeviceGroupSubmitInfoKHX {
3636 VkStructureType sType
3637 const void* pNext
3638 u32 waitSemaphoreCount
3639 const u32* pWaitSemaphoreDeviceIndices
3640 u32 commandBufferCount
3641 const u32* pCommandBufferDeviceMasks
3642 u32 signalSemaphoreCount
3643 const u32* pSignalSemaphoreDeviceIndices
3644}
3645
3646@extension("VK_KHX_device_group") // 61
3647class VkDeviceGroupBindSparseInfoKHX {
3648 VkStructureType sType
3649 const void* pNext
3650 u32 resourceDeviceIndex
3651 u32 memoryDeviceIndex
3652}
3653
3654@extension("VK_KHX_device_group") // 61
3655class VkDeviceGroupPresentCapabilitiesKHX {
3656 VkStructureType sType
3657 const void* pNext
3658 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3659 VkDeviceGroupPresentModeFlagsKHX modes
3660}
3661
3662@extension("VK_KHX_device_group") // 61
3663class VkImageSwapchainCreateInfoKHX {
3664 VkStructureType sType
3665 const void* pNext
3666 VkSwapchainKHR swapchain
3667}
3668
3669@extension("VK_KHX_device_group") // 61
3670class VkBindImageMemorySwapchainInfoKHX {
3671 VkStructureType sType
3672 const void* pNext
3673 VkSwapchainKHR swapchain
3674 u32 imageIndex
3675}
3676
3677@extension("VK_KHX_device_group") // 61
3678class VkAcquireNextImageInfoKHX {
3679 VkStructureType sType
3680 const void* pNext
3681 VkSwapchainKHR swapchain
3682 u64 timeout
3683 VkSemaphore semaphore
3684 VkFence fence
3685 u32 deviceMask
3686}
3687
3688@extension("VK_KHX_device_group") // 61
3689class VkDeviceGroupPresentInfoKHX {
3690 VkStructureType sType
3691 const void* pNext
3692 u32 swapchainCount
3693 const u32* pDeviceMasks
3694 VkDeviceGroupPresentModeFlagBitsKHX mode
3695}
3696
3697@extension("VK_KHX_device_group") // 61
3698class VkDeviceGroupSwapchainCreateInfoKHX {
3699 VkStructureType sType
3700 const void* pNext
3701 VkDeviceGroupPresentModeFlagsKHX modes
3702}
3703
3704@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13003705class VkValidationFlagsEXT {
3706 VkStructureType sType
3707 const void* pNext
3708 u32 disabledValidationCheckCount
3709 VkValidationCheckEXT* pDisabledValidationChecks
3710}
3711
Jesse Hallad250842017-03-10 18:35:38 -08003712@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08003713class VkViSurfaceCreateInfoNN {
3714 VkStructureType sType
3715 const void* pNext
3716 VkViSurfaceCreateFlagsNN flags
3717 void* window
3718}
3719
Jesse Hallad250842017-03-10 18:35:38 -08003720@extension("VK_KHX_device_group_creation") // 71
3721class VkPhysicalDeviceGroupPropertiesKHX {
3722 VkStructureType sType
3723 const void* pNext
3724 u32 physicalDeviceCount
3725 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3726 VkBool32 subsetAllocation
3727}
3728
3729@extension("VK_KHX_device_group_creation") // 71
3730class VkDeviceGroupDeviceCreateInfoKHX {
3731 VkStructureType sType
3732 const void* pNext
3733 u32 physicalDeviceCount
3734 const VkPhysicalDevice* pPhysicalDevices
3735}
3736
3737@extension("VK_KHX_external_memory_capabilities") // 72
3738class VkExternalMemoryPropertiesKHX {
3739 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3740 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3741 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3742}
3743
3744@extension("VK_KHX_external_memory_capabilities") // 72
3745class VkPhysicalDeviceExternalImageFormatInfoKHX {
3746 VkStructureType sType
3747 const void* pNext
3748 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3749}
3750
3751@extension("VK_KHX_external_memory_capabilities") // 72
3752class VkExternalImageFormatPropertiesKHX {
3753 VkStructureType sType
3754 void* pNext
3755 VkExternalMemoryPropertiesKHX externalMemoryProperties
3756}
3757
3758@extension("VK_KHX_external_memory_capabilities") // 72
3759class VkPhysicalDeviceExternalBufferInfoKHX {
3760 VkStructureType sType
3761 const void* pNext
3762 VkBufferCreateFlags flags
3763 VkBufferUsageFlags usage
3764 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3765}
3766
3767@extension("VK_KHX_external_memory_capabilities") // 72
3768class VkExternalBufferPropertiesKHX {
3769 VkStructureType sType
3770 void* pNext
3771 VkExternalMemoryPropertiesKHX externalMemoryProperties
3772}
3773
3774@extension("VK_KHX_external_memory_capabilities") // 72
3775class VkPhysicalDeviceIDPropertiesKHX {
3776 VkStructureType sType
3777 void* pNext
3778 u8[VK_UUID_SIZE] deviceUUID
3779 u8[VK_UUID_SIZE] driverUUID
3780 u8[VK_LUID_SIZE_KHX] deviceLUID
3781 VkBool32 deviceLUIDValid
3782}
3783
3784@extension("VK_KHX_external_memory_capabilities") // 72
3785class VkPhysicalDeviceProperties2KHX {
3786 VkStructureType sType
3787 void* pNext
3788 VkPhysicalDeviceProperties properties
3789}
3790
3791@extension("VK_KHX_external_memory_capabilities") // 72
3792class VkImageFormatProperties2KHX {
3793 VkStructureType sType
3794 void* pNext
3795 VkImageFormatProperties imageFormatProperties
3796}
3797
3798@extension("VK_KHX_external_memory_capabilities") // 72
3799class VkPhysicalDeviceImageFormatInfo2KHX {
3800 VkStructureType sType
3801 const void* pNext
3802 VkFormat format
3803 VkImageType type
3804 VkImageTiling tiling
3805 VkImageUsageFlags usage
3806 VkImageCreateFlags flags
3807}
3808
3809@extension("VK_KHX_external_memory") // 73
3810class VkExternalMemoryImageCreateInfoKHX {
3811 VkStructureType sType
3812 const void* pNext
3813 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3814}
3815
3816@extension("VK_KHX_external_memory") // 73
3817class VkExternalMemoryBufferCreateInfoKHX {
3818 VkStructureType sType
3819 const void* pNext
3820 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3821}
3822
3823@extension("VK_KHX_external_memory") // 73
3824class VkExportMemoryAllocateInfoKHX {
3825 VkStructureType sType
3826 const void* pNext
3827 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3828}
3829
3830@extension("VK_KHX_external_memory_win32") // 74
3831class VkImportMemoryWin32HandleInfoKHX {
3832 VkStructureType sType
3833 const void* pNext
3834 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3835 platform.HANDLE handle
3836}
3837
3838@extension("VK_KHX_external_memory_win32") // 74
3839class VkExportMemoryWin32HandleInfoKHX {
3840 VkStructureType sType
3841 const void* pNext
3842 const platform.SECURITY_ATTRIBUTES* pAttributes
3843 platform.DWORD dwAccess
3844 platform.LPCWSTR name
3845}
3846
3847@extension("VK_KHX_external_memory_win32") // 74
3848class VkMemoryWin32HandlePropertiesKHX {
3849 VkStructureType sType
3850 void* pNext
3851 u32 memoryTypeBits
3852}
3853
3854@extension("VK_KHX_external_memory_fd") // 75
3855class VkImportMemoryFdInfoKHX {
3856 VkStructureType sType
3857 const void* pNext
3858 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3859 int fd
3860}
3861
3862@extension("VK_KHX_external_memory_fd") // 75
3863class VkMemoryFdPropertiesKHX {
3864 VkStructureType sType
3865 void* pNext
3866 u32 memoryTypeBits
3867}
3868
3869@extension("VK_KHX_win32_keyed_mutex") // 76
3870class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3871 VkStructureType sType
3872 const void* pNext
3873 u32 acquireCount
3874 const VkDeviceMemory* pAcquireSyncs
3875 const u64* pAcquireKeys
3876 const u32* pAcquireTimeouts
3877 u32 releaseCount
3878 const VkDeviceMemory* pReleaseSyncs
3879 const u64* pReleaseKeys
3880}
3881
3882@extension("VK_KHX_external_semaphore_capabilities") // 77
3883class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3884 VkStructureType sType
3885 const void* pNext
3886 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3887}
3888
3889@extension("VK_KHX_external_semaphore_capabilities") // 77
3890class VkExternalSemaphorePropertiesKHX {
3891 VkStructureType sType
3892 void* pNext
3893 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3894 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3895 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3896}
3897
3898@extension("VK_KHX_external_semaphore") // 78
3899class VkExportSemaphoreCreateInfoKHX {
3900 VkStructureType sType
3901 const void* pNext
3902 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3903}
3904
3905@extension("VK_KHX_external_semaphore_win32") // 79
3906class VkImportSemaphoreWin32HandleInfoKHX {
3907 VkStructureType sType
3908 const void* pNext
3909 VkSemaphore semaphore
3910 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3911 platform.HANDLE handle
3912}
3913
3914@extension("VK_KHX_external_semaphore_win32") // 79
3915class VkExportSemaphoreWin32HandleInfoKHX {
3916 VkStructureType sType
3917 const void* pNext
3918 const platform.SECURITY_ATTRIBUTES* pAttributes
3919 platform.DWORD dwAccess
3920 platform.LPCWSTR name
3921}
3922
3923@extension("VK_KHX_external_semaphore_win32") // 79
3924class VkD3D12FenceSubmitInfoKHX {
3925 VkStructureType sType
3926 const void* pNext
3927 u32 waitSemaphoreValuesCount
3928 const u64* pWaitSemaphoreValues
3929 u32 signalSemaphoreValuesCount
3930 const u64* pSignalSemaphoreValues
3931}
3932
3933@extension("VK_KHX_external_semaphore_fd") // 80
3934class VkImportSemaphoreFdInfoKHX {
3935 VkStructureType sType
3936 const void* pNext
3937 VkSemaphore semaphore
3938 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3939 s32 fd
3940}
3941
3942@extension("VK_KHR_push_descriptor") // 81
3943class VkPhysicalDevicePushDescriptorPropertiesKHR {
3944 VkStructureType sType
3945 void* pNext
3946 u32 maxPushDescriptors
3947}
3948
3949@extension("VK_KHR_incremental_present") // 85
3950class VkRectLayerKHR {
3951 VkOffset2D offset
3952 VkExtent2D extent
3953 u32 layer
3954}
3955
3956@extension("VK_KHR_incremental_present") // 85
3957class VkPresentRegionKHR {
3958 u32 rectangleCount
3959 const VkRectLayerKHR* pRectangles
3960}
3961
3962@extension("VK_KHR_incremental_present") // 85
3963class VkPresentRegionsKHR {
3964 VkStructureType sType
3965 const void* pNext
3966 u32 swapchainCount
3967 const VkPresentRegionKHR* pRegions
3968}
3969
3970@extension("VK_KHR_descriptor_update_template") // 86
3971class VkDescriptorUpdateTemplateEntryKHR {
3972 u32 dstBinding
3973 u32 dstArrayElement
3974 u32 descriptorCount
3975 VkDescriptorType descriptorType
3976 platform.size_t offset
3977 platform.size_t stride
3978}
3979
3980@extension("VK_KHR_descriptor_update_template") // 86
3981class VkDescriptorUpdateTemplateCreateInfoKHR {
3982 VkStructureType sType
3983 void* pNext
3984 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3985 u32 descriptorUpdateEntryCount
3986 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3987 VkDescriptorUpdateTemplateTypeKHR templateType
3988 VkDescriptorSetLayout descriptorSetLayout
3989 VkPipelineBindPoint pipelineBindPoint
3990 VkPipelineLayout pipelineLayout
3991 u32 set
3992}
3993
3994@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13003995class VkDeviceGeneratedCommandsFeaturesNVX {
3996 VkStructureType sType
3997 const void* pNext
3998 VkBool32 computeBindingPointSupport
3999}
4000
Jesse Hallad250842017-03-10 18:35:38 -08004001@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004002class VkDeviceGeneratedCommandsLimitsNVX {
4003 VkStructureType sType
4004 const void* pNext
4005 u32 maxIndirectCommandsLayoutTokenCount
4006 u32 maxObjectEntryCounts
4007 u32 minSequenceCountBufferOffsetAlignment
4008 u32 minSequenceIndexBufferOffsetAlignment
4009 u32 minCommandsTokenBufferOffsetAlignment
4010}
4011
Jesse Hallad250842017-03-10 18:35:38 -08004012@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004013class VkIndirectCommandsTokenNVX {
4014 VkIndirectCommandsTokenTypeNVX tokenType
4015 VkBuffer buffer
4016 VkDeviceSize offset
4017}
4018
Jesse Hallad250842017-03-10 18:35:38 -08004019@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004020class VkIndirectCommandsLayoutTokenNVX {
4021 VkIndirectCommandsTokenTypeNVX tokenType
4022 u32 bindingUnit
4023 u32 dynamicCount
4024 u32 divisor
4025}
4026
Jesse Hallad250842017-03-10 18:35:38 -08004027@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004028class VkIndirectCommandsLayoutCreateInfoNVX {
4029 VkStructureType sType
4030 const void* pNext
4031 VkPipelineBindPoint pipelineBindPoint
4032 VkIndirectCommandsLayoutUsageFlagsNVX flags
4033 u32 tokenCount
4034 const VkIndirectCommandsLayoutTokenNVX* pTokens
4035}
4036
Jesse Hallad250842017-03-10 18:35:38 -08004037@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004038class VkCmdProcessCommandsInfoNVX {
4039 VkStructureType sType
4040 const void* pNext
4041 VkObjectTableNVX objectTable
4042 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4043 u32 indirectCommandsTokenCount
4044 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
4045 u32 maxSequencesCount
4046 VkCommandBuffer targetCommandBuffer
4047 VkBuffer sequencesCountBuffer
4048 VkDeviceSize sequencesCountOffset
4049 VkBuffer sequencesIndexBuffer
4050 VkDeviceSize sequencesIndexOffset
4051}
4052
Jesse Hallad250842017-03-10 18:35:38 -08004053@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004054class VkCmdReserveSpaceForCommandsInfoNVX {
4055 VkStructureType sType
4056 const void* pNext
4057 VkObjectTableNVX objectTable
4058 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4059 u32 maxSequencesCount
4060}
4061
Jesse Hallad250842017-03-10 18:35:38 -08004062@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004063class VkObjectTableCreateInfoNVX {
4064 VkStructureType sType
4065 const void* pNext
4066 u32 objectCount
4067 const VkObjectEntryTypeNVX* pObjectEntryTypes
4068 const u32* pObjectEntryCounts
4069 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4070 u32 maxUniformBuffersPerDescriptor
4071 u32 maxStorageBuffersPerDescriptor
4072 u32 maxStorageImagesPerDescriptor
4073 u32 maxSampledImagesPerDescriptor
4074 u32 maxPipelineLayouts
4075}
4076
Jesse Hallad250842017-03-10 18:35:38 -08004077@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004078class VkObjectTableEntryNVX {
4079 VkObjectEntryTypeNVX type
4080 VkObjectEntryUsageFlagsNVX flags
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 VkObjectTablePipelineEntryNVX {
4085 VkObjectEntryTypeNVX type
4086 VkObjectEntryUsageFlagsNVX flags
4087 VkPipeline pipeline
4088}
4089
Jesse Hallad250842017-03-10 18:35:38 -08004090@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004091class VkObjectTableDescriptorSetEntryNVX {
4092 VkObjectEntryTypeNVX type
4093 VkObjectEntryUsageFlagsNVX flags
4094 VkPipelineLayout pipelineLayout
4095 VkDescriptorSet descriptorSet
4096}
4097
Jesse Hallad250842017-03-10 18:35:38 -08004098@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004099class VkObjectTableVertexBufferEntryNVX {
4100 VkObjectEntryTypeNVX type
4101 VkObjectEntryUsageFlagsNVX flags
4102 VkBuffer buffer
4103}
4104
Jesse Hallad250842017-03-10 18:35:38 -08004105@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004106class VkObjectTableIndexBufferEntryNVX {
4107 VkObjectEntryTypeNVX type
4108 VkObjectEntryUsageFlagsNVX flags
4109 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08004110 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13004111}
4112
Jesse Hallad250842017-03-10 18:35:38 -08004113@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13004114class VkObjectTablePushConstantEntryNVX {
4115 VkObjectEntryTypeNVX type
4116 VkObjectEntryUsageFlagsNVX flags
4117 VkPipelineLayout pipelineLayout
4118 VkShaderStageFlags stageFlags
4119}
4120
Jesse Hallad250842017-03-10 18:35:38 -08004121@extension("VK_NV_clip_space_w_scaling") // 88
4122class VkViewportWScalingNV {
4123 f32 xcoeff
4124 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08004125}
4126
Jesse Hallad250842017-03-10 18:35:38 -08004127@extension("VK_NV_clip_space_w_scaling") // 88
4128class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08004129 VkStructureType sType
4130 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004131 VkBool32 viewportWScalingEnable
4132 u32 viewportCount
4133 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08004134}
4135
Jesse Hallad250842017-03-10 18:35:38 -08004136@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08004137class VkSurfaceCapabilities2EXT {
4138 VkStructureType sType
4139 void* pNext
4140 u32 minImageCount
4141 u32 maxImageCount
4142 VkExtent2D currentExtent
4143 VkExtent2D minImageExtent
4144 VkExtent2D maxImageExtent
4145 u32 maxImageArrayLayers
4146 VkSurfaceTransformFlagsKHR supportedTransforms
4147 VkSurfaceTransformFlagBitsKHR currentTransform
4148 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4149 VkImageUsageFlags supportedUsageFlags
4150 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4151}
4152
Jesse Hallad250842017-03-10 18:35:38 -08004153@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004154class VkDisplayPowerInfoEXT {
4155 VkStructureType sType
4156 const void* pNext
4157 VkDisplayPowerStateEXT powerState
4158}
4159
Jesse Hallad250842017-03-10 18:35:38 -08004160@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004161class VkDeviceEventInfoEXT {
4162 VkStructureType sType
4163 const void* pNext
4164 VkDeviceEventTypeEXT deviceEvent
4165}
4166
Jesse Hallad250842017-03-10 18:35:38 -08004167@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004168class VkDisplayEventInfoEXT {
4169 VkStructureType sType
4170 const void* pNext
4171 VkDisplayEventTypeEXT displayEvent
4172}
4173
Jesse Hallad250842017-03-10 18:35:38 -08004174@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08004175class VkSwapchainCounterCreateInfoEXT {
4176 VkStructureType sType
4177 const void* pNext
4178 VkSurfaceCounterFlagsEXT surfaceCounters
4179}
4180
Jesse Hallad250842017-03-10 18:35:38 -08004181@extension("VK_GOOGLE_display_timing") // 93
4182class VkRefreshCycleDurationGOOGLE {
4183 u64 minRefreshDuration
4184 u64 maxRefreshDuration
4185}
4186
4187@extension("VK_GOOGLE_display_timing") // 93
4188class VkPastPresentationTimingGOOGLE {
4189 u32 presentID
4190 u64 desiredPresentTime
4191 u64 actualPresentTime
4192 u64 earliestPresentTime
4193 u64 presentMargin
4194}
4195
4196@extension("VK_GOOGLE_display_timing") // 93
4197class VkPresentTimeGOOGLE {
4198 u32 presentID
4199 u64 desiredPresentTime
4200}
4201
4202@extension("VK_GOOGLE_display_timing") // 93
4203class VkPresentTimesInfoGOOGLE {
4204 VkStructureType sType
4205 const void* pNext
4206 u32 swapchainCount
4207 const VkPresentTimeGOOGLE* pTimes
4208}
4209
4210@extension("VK_NVX_multiview_per_view_attributes") // 98
4211class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4212 VkStructureType sType
4213 void* pNext
4214 VkBool32 perViewPositionAllComponents
4215}
4216
4217@extension("VK_NV_viewport_swizzle") // 99
4218class VkViewportSwizzleNV {
4219 VkViewportCoordinateSwizzleNV x
4220 VkViewportCoordinateSwizzleNV y
4221 VkViewportCoordinateSwizzleNV z
4222 VkViewportCoordinateSwizzleNV w
4223}
4224
4225@extension("VK_NV_viewport_swizzle") // 99
4226class VkPipelineViewportSwizzleStateCreateInfoNV {
4227 VkStructureType sType
4228 const void* pNext
4229 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4230 u32 viewportCount
4231 const VkViewportSwizzleNV* pViewportSwizzles
4232}
4233
4234@extension("VK_EXT_discard_rectangles") // 100
4235class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4236 VkStructureType sType
4237 const void* pNext
4238 u32 maxDiscardRectangles
4239}
4240
4241@extension("VK_EXT_discard_rectangles") // 100
4242class VkPipelineDiscardRectangleStateCreateInfoEXT {
4243 VkStructureType sType
4244 const void* pNext
4245 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4246 VkDiscardRectangleModeEXT discardRectangleMode
4247 u32 discardRectangleCount
4248 const VkRect2D* pDiscardRectangles
4249}
4250
4251@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004252class VkXYColorEXT {
4253 f32 x
4254 f32 y
4255}
4256
Jesse Hallad250842017-03-10 18:35:38 -08004257@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07004258class VkHdrMetadataEXT {
4259 VkXYColorEXT displayPrimaryRed
4260 VkXYColorEXT displayPrimaryGreen
4261 VkXYColorEXT displayPrimaryBlue
4262 VkXYColorEXT whitePoint
4263 f32 maxLuminance
4264 f32 minLuminance
4265 f32 maxContentLightLevel
4266 f32 maxFrameAverageLightLevel
4267}
4268
Jesse Hallad250842017-03-10 18:35:38 -08004269@extension("VK_MVK_ios_surface") // 123
4270class VkIOSSurfaceCreateInfoMVK {
4271 VkStructureType sType
4272 const void* pNext
4273 VkIOSSurfaceCreateFlagsMVK flags
4274 const void* pView
4275}
4276
4277@extension("VK_MVK_macos_surface") // 124
4278class VkMacOSSurfaceCreateInfoMVK {
4279 VkStructureType sType
4280 const void* pNext
4281 VkMacOSSurfaceCreateFlagsMVK flags
4282 const void* pView
4283}
4284
Jesse Halld27f6aa2015-08-15 17:58:48 -07004285////////////////
4286// Commands //
4287////////////////
4288
4289// Function pointers. TODO: add support for function pointers.
4290
4291@external type void* PFN_vkVoidFunction
4292@pfn cmd void vkVoidFunction() {
4293}
4294
Jesse Hall3fbc8562015-11-29 22:10:52 -08004295@external type void* PFN_vkAllocationFunction
4296@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004297 void* pUserData,
4298 platform.size_t size,
4299 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004300 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004301 return ?
4302}
4303
Jesse Hall3fbc8562015-11-29 22:10:52 -08004304@external type void* PFN_vkReallocationFunction
4305@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004306 void* pUserData,
4307 void* pOriginal,
4308 platform.size_t size,
4309 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004310 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004311 return ?
4312}
4313
4314@external type void* PFN_vkFreeFunction
4315@pfn cmd void vkFreeFunction(
4316 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004317 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004318}
4319
Jesse Hall3fbc8562015-11-29 22:10:52 -08004320@external type void* PFN_vkInternalAllocationNotification
4321@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004322 void* pUserData,
4323 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004324 VkInternalAllocationType allocationType,
4325 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004326}
4327
4328@external type void* PFN_vkInternalFreeNotification
4329@pfn cmd void vkInternalFreeNotification(
4330 void* pUserData,
4331 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004332 VkInternalAllocationType allocationType,
4333 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004334}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004335
4336// Global functions
4337
4338@threadSafety("system")
4339cmd VkResult vkCreateInstance(
4340 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004341 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004342 VkInstance* pInstance) {
4343 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4344
4345 instance := ?
4346 pInstance[0] = instance
4347 State.Instances[instance] = new!InstanceObject()
4348
Jesse Hall3dd678a2016-01-08 21:52:01 -08004349 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4350 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004351
4352 return ?
4353}
4354
4355@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004356cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004357 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004358 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004359 instanceObject := GetInstance(instance)
4360
4361 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004362}
4363
4364@threadSafety("system")
4365cmd VkResult vkEnumeratePhysicalDevices(
4366 VkInstance instance,
4367 u32* pPhysicalDeviceCount,
4368 VkPhysicalDevice* pPhysicalDevices) {
4369 instanceObject := GetInstance(instance)
4370
4371 physicalDeviceCount := as!u32(?)
4372 pPhysicalDeviceCount[0] = physicalDeviceCount
4373 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4374
4375 for i in (0 .. physicalDeviceCount) {
4376 physicalDevice := ?
4377 physicalDevices[i] = physicalDevice
4378 if !(physicalDevice in State.PhysicalDevices) {
4379 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4380 }
4381 }
4382
4383 return ?
4384}
4385
4386cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4387 VkDevice device,
4388 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004389 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004390 device := GetDevice(device)
4391 }
4392
4393 return ?
4394}
4395
4396cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4397 VkInstance instance,
4398 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004399 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004400 instanceObject := GetInstance(instance)
4401 }
4402
4403 return ?
4404}
4405
Jesse Hall606a54e2015-11-19 22:17:28 -08004406cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004407 VkPhysicalDevice physicalDevice,
4408 VkPhysicalDeviceProperties* pProperties) {
4409 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4410
4411 properties := ?
4412 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004413}
4414
Jesse Hall606a54e2015-11-19 22:17:28 -08004415cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004416 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004417 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004418 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004419 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004420 // TODO: Figure out how to express fetch-count-or-properties
4421 // This version fails 'apic validate' with 'fence not allowed in
4422 // *semantic.Branch'. Other attempts have failed with the same or other
4423 // errors.
4424 // if pQueueFamilyProperties != null {
4425 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4426 // for i in (0 .. pCount[0]) {
4427 // queueProperties := as!VkQueueFamilyProperties(?)
4428 // queuesProperties[i] = queueProperties
4429 // }
4430 // } else {
4431 // count := ?
4432 // pCount[0] = count
4433 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004434}
4435
Jesse Hall606a54e2015-11-19 22:17:28 -08004436cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004437 VkPhysicalDevice physicalDevice,
4438 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4439 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4440
4441 memoryProperties := ?
4442 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004443}
4444
Jesse Hall606a54e2015-11-19 22:17:28 -08004445cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004446 VkPhysicalDevice physicalDevice,
4447 VkPhysicalDeviceFeatures* pFeatures) {
4448 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4449
4450 features := ?
4451 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004452}
4453
Jesse Hall606a54e2015-11-19 22:17:28 -08004454cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004455 VkPhysicalDevice physicalDevice,
4456 VkFormat format,
4457 VkFormatProperties* pFormatProperties) {
4458 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4459
4460 formatProperties := ?
4461 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004462}
4463
Jesse Halla9e57032015-11-30 01:03:10 -08004464cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004465 VkPhysicalDevice physicalDevice,
4466 VkFormat format,
4467 VkImageType type,
4468 VkImageTiling tiling,
4469 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004470 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004471 VkImageFormatProperties* pImageFormatProperties) {
4472 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4473
4474 imageFormatProperties := ?
4475 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004476
4477 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004478}
4479
Jesse Halld27f6aa2015-08-15 17:58:48 -07004480
4481// Device functions
4482
4483@threadSafety("system")
4484cmd VkResult vkCreateDevice(
4485 VkPhysicalDevice physicalDevice,
4486 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004487 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004488 VkDevice* pDevice) {
4489 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4490 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4491
4492 device := ?
4493 pDevice[0] = device
4494 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4495
4496 return ?
4497}
4498
4499@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004500cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004501 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004502 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004503 deviceObject := GetDevice(device)
4504
4505 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004506}
4507
4508
4509// Extension discovery functions
4510
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004511cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004512 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004513 VkLayerProperties* pProperties) {
4514 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004515 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004516
4517 properties := pProperties[0:count]
4518 for i in (0 .. count) {
4519 property := ?
4520 properties[i] = property
4521 }
4522
4523 return ?
4524}
4525
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004526cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004527 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004528 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004529 VkExtensionProperties* pProperties) {
4530 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004531 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004532
4533 properties := pProperties[0:count]
4534 for i in (0 .. count) {
4535 property := ?
4536 properties[i] = property
4537 }
4538
4539 return ?
4540}
4541
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004542cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004543 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004544 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004545 VkLayerProperties* pProperties) {
4546 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4547 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004548 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004549
4550 properties := pProperties[0:count]
4551 for i in (0 .. count) {
4552 property := ?
4553 properties[i] = property
4554 }
4555
4556 return ?
4557}
4558
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004559cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004560 VkPhysicalDevice physicalDevice,
4561 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004562 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004563 VkExtensionProperties* pProperties) {
4564 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4565
4566 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004567 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004568
4569 properties := pProperties[0:count]
4570 for i in (0 .. count) {
4571 property := ?
4572 properties[i] = property
4573 }
4574
4575 return ?
4576}
4577
4578
4579// Queue functions
4580
4581@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004582cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004583 VkDevice device,
4584 u32 queueFamilyIndex,
4585 u32 queueIndex,
4586 VkQueue* pQueue) {
4587 deviceObject := GetDevice(device)
4588
4589 queue := ?
4590 pQueue[0] = queue
4591
4592 if !(queue in State.Queues) {
4593 State.Queues[queue] = new!QueueObject(device: device)
4594 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004595}
4596
4597@threadSafety("app")
4598cmd VkResult vkQueueSubmit(
4599 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004600 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004601 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004602 VkFence fence) {
4603 queueObject := GetQueue(queue)
4604
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004605 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004606 fenceObject := GetFence(fence)
4607 assert(fenceObject.device == queueObject.device)
4608 }
4609
Jesse Hall3fbc8562015-11-29 22:10:52 -08004610 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4611 // for i in (0 .. commandBufferCount) {
4612 // commandBuffer := commandBuffers[i]
4613 // commandBufferObject := GetCommandBuffer(commandBuffer)
4614 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004615 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004616 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4617 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004618 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004619
4620 return ?
4621}
4622
4623@threadSafety("system")
4624cmd VkResult vkQueueWaitIdle(
4625 VkQueue queue) {
4626 queueObject := GetQueue(queue)
4627
4628 return ?
4629}
4630
4631@threadSafety("system")
4632cmd VkResult vkDeviceWaitIdle(
4633 VkDevice device) {
4634 deviceObject := GetDevice(device)
4635
4636 return ?
4637}
4638
4639
4640// Memory functions
4641
4642@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004643cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004644 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004645 const VkMemoryAllocateInfo* pAllocateInfo,
4646 const VkAllocationCallbacks* pAllocator,
4647 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004648 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004649 deviceObject := GetDevice(device)
4650
Jesse Hall3fbc8562015-11-29 22:10:52 -08004651 memory := ?
4652 pMemory[0] = memory
4653 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004654 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004655 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004656
4657 return ?
4658}
4659
4660@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004661cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004662 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004663 VkDeviceMemory memory,
4664 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004665 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004666 memoryObject := GetDeviceMemory(memory)
4667 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004668
4669 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004670 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004671 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004672 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4673 "vkFreeMemory: commandBuffers still bound")
4674 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004675}
4676
4677@threadSafety("app")
4678cmd VkResult vkMapMemory(
4679 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004680 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004681 VkDeviceSize offset,
4682 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004683 VkMemoryMapFlags flags,
4684 void** ppData) {
4685 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004686 memoryObject := GetDeviceMemory(memory)
4687 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004688
4689 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004690 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004691
4692 return ?
4693}
4694
4695@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004696cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004697 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004698 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004699 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004700 memoryObject := GetDeviceMemory(memory)
4701 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004702}
4703
4704cmd VkResult vkFlushMappedMemoryRanges(
4705 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004706 u32 memoryRangeCount
4707 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004708 deviceObject := GetDevice(device)
4709
Jesse Hall3fbc8562015-11-29 22:10:52 -08004710 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4711 for i in (0 .. memoryRangeCount) {
4712 memoryRange := memoryRanges[i]
4713 memoryObject := GetDeviceMemory(memoryRange.memory)
4714 assert(memoryObject.device == device)
4715 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004716 }
4717
4718 return ?
4719}
4720
4721cmd VkResult vkInvalidateMappedMemoryRanges(
4722 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004723 u32 memoryRangeCount,
4724 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004725 deviceObject := GetDevice(device)
4726
Jesse Hall3fbc8562015-11-29 22:10:52 -08004727 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4728 for i in (0 .. memoryRangeCount) {
4729 memoryRange := memoryRanges[i]
4730 memoryObject := GetDeviceMemory(memoryRange.memory)
4731 assert(memoryObject.device == device)
4732 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004733 }
4734
4735 return ?
4736}
4737
4738
4739// Memory management API functions
4740
Jesse Hall606a54e2015-11-19 22:17:28 -08004741cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004742 VkDevice device,
4743 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004744 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004745 deviceObject := GetDevice(device)
4746
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004747 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004748 memoryObject := GetDeviceMemory(memory)
4749 assert(memoryObject.device == device)
4750 }
4751
4752 committedMemoryInBytes := ?
4753 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004754}
4755
Jesse Hall606a54e2015-11-19 22:17:28 -08004756cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004757 VkDevice device,
4758 VkBuffer buffer,
4759 VkMemoryRequirements* pMemoryRequirements) {
4760 deviceObject := GetDevice(device)
4761 bufferObject := GetBuffer(buffer)
4762 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004763}
4764
4765cmd VkResult vkBindBufferMemory(
4766 VkDevice device,
4767 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004768 VkDeviceMemory memory,
4769 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004770 deviceObject := GetDevice(device)
4771 bufferObject := GetBuffer(buffer)
4772 assert(bufferObject.device == device)
4773
4774 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004775 if bufferObject.memory != NULL_HANDLE {
4776 memoryObject := GetDeviceMemory(bufferObject.memory)
4777 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004778 }
4779
4780 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004781 if memory != NULL_HANDLE {
4782 memoryObject := GetDeviceMemory(memory)
4783 assert(memoryObject.device == device)
4784 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004785 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004786 bufferObject.memory = memory
4787 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004788
4789 return ?
4790}
4791
Jesse Hall606a54e2015-11-19 22:17:28 -08004792cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004793 VkDevice device,
4794 VkImage image,
4795 VkMemoryRequirements* pMemoryRequirements) {
4796 deviceObject := GetDevice(device)
4797 imageObject := GetImage(image)
4798 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004799}
4800
4801cmd VkResult vkBindImageMemory(
4802 VkDevice device,
4803 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004804 VkDeviceMemory memory,
4805 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004806 deviceObject := GetDevice(device)
4807 imageObject := GetImage(image)
4808 assert(imageObject.device == device)
4809
4810 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004811 if imageObject.memory != NULL_HANDLE {
4812 memoryObject := GetDeviceMemory(imageObject.memory)
4813 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004814 }
4815
4816 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004817 if memory != NULL_HANDLE {
4818 memoryObject := GetDeviceMemory(memory)
4819 assert(memoryObject.device == device)
4820 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004821 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004822 imageObject.memory = memory
4823 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004824
4825 return ?
4826}
4827
Jesse Hall606a54e2015-11-19 22:17:28 -08004828cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004829 VkDevice device,
4830 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004831 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004832 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4833 deviceObject := GetDevice(device)
4834 imageObject := GetImage(image)
4835 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004836}
4837
Jesse Hall606a54e2015-11-19 22:17:28 -08004838cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004839 VkPhysicalDevice physicalDevice,
4840 VkFormat format,
4841 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004842 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004843 VkImageUsageFlags usage,
4844 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004845 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004846 VkSparseImageFormatProperties* pProperties) {
4847 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004848}
4849
Jesse Halla6429252015-11-29 18:59:42 -08004850cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004851 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004852 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004853 const VkBindSparseInfo* pBindInfo,
4854 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004855 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004856
4857 return ?
4858}
4859
4860
4861// Fence functions
4862
4863@threadSafety("system")
4864cmd VkResult vkCreateFence(
4865 VkDevice device,
4866 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004867 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004868 VkFence* pFence) {
4869 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4870 deviceObject := GetDevice(device)
4871
4872 fence := ?
4873 pFence[0] = fence
4874 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004875 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004876
4877 return ?
4878}
4879
4880@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004881cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004882 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004883 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004884 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004885 deviceObject := GetDevice(device)
4886 fenceObject := GetFence(fence)
4887 assert(fenceObject.device == device)
4888
4889 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004890}
4891
4892@threadSafety("system")
4893cmd VkResult vkResetFences(
4894 VkDevice device,
4895 u32 fenceCount,
4896 const VkFence* pFences) {
4897 deviceObject := GetDevice(device)
4898
4899 fences := pFences[0:fenceCount]
4900 for i in (0 .. fenceCount) {
4901 fence := fences[i]
4902 fenceObject := GetFence(fence)
4903 assert(fenceObject.device == device)
4904 fenceObject.signaled = false
4905 }
4906
4907 return ?
4908}
4909
4910@threadSafety("system")
4911cmd VkResult vkGetFenceStatus(
4912 VkDevice device,
4913 VkFence fence) {
4914 deviceObject := GetDevice(device)
4915 fenceObject := GetFence(fence)
4916 assert(fenceObject.device == device)
4917
4918 return ?
4919}
4920
4921@threadSafety("system")
4922cmd VkResult vkWaitForFences(
4923 VkDevice device,
4924 u32 fenceCount,
4925 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004926 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004927 u64 timeout) { /// timeout in nanoseconds
4928 deviceObject := GetDevice(device)
4929
4930 fences := pFences[0:fenceCount]
4931 for i in (0 .. fenceCount) {
4932 fence := fences[i]
4933 fenceObject := GetFence(fence)
4934 assert(fenceObject.device == device)
4935 }
4936
4937 return ?
4938}
4939
4940
4941// Queue semaphore functions
4942
4943@threadSafety("system")
4944cmd VkResult vkCreateSemaphore(
4945 VkDevice device,
4946 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004947 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004948 VkSemaphore* pSemaphore) {
4949 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4950 deviceObject := GetDevice(device)
4951
4952 semaphore := ?
4953 pSemaphore[0] = semaphore
4954 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4955
4956 return ?
4957}
4958
4959@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004960cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004961 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004962 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004963 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004964 deviceObject := GetDevice(device)
4965 semaphoreObject := GetSemaphore(semaphore)
4966 assert(semaphoreObject.device == device)
4967
4968 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004969}
4970
Jesse Halld27f6aa2015-08-15 17:58:48 -07004971
4972// Event functions
4973
4974@threadSafety("system")
4975cmd VkResult vkCreateEvent(
4976 VkDevice device,
4977 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004978 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004979 VkEvent* pEvent) {
4980 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
4981 deviceObject := GetDevice(device)
4982
4983 event := ?
4984 pEvent[0] = event
4985 State.Events[event] = new!EventObject(device: device)
4986
4987 return ?
4988}
4989
4990@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004991cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004992 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004993 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004994 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004995 deviceObject := GetDevice(device)
4996 eventObject := GetEvent(event)
4997 assert(eventObject.device == device)
4998
4999 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005000}
5001
5002@threadSafety("system")
5003cmd VkResult vkGetEventStatus(
5004 VkDevice device,
5005 VkEvent event) {
5006 deviceObject := GetDevice(device)
5007 eventObject := GetEvent(event)
5008 assert(eventObject.device == device)
5009
5010 return ?
5011}
5012
5013@threadSafety("system")
5014cmd VkResult vkSetEvent(
5015 VkDevice device,
5016 VkEvent event) {
5017 deviceObject := GetDevice(device)
5018 eventObject := GetEvent(event)
5019 assert(eventObject.device == device)
5020
5021 return ?
5022}
5023
5024@threadSafety("system")
5025cmd VkResult vkResetEvent(
5026 VkDevice device,
5027 VkEvent event) {
5028 deviceObject := GetDevice(device)
5029 eventObject := GetEvent(event)
5030 assert(eventObject.device == device)
5031
5032 return ?
5033}
5034
5035
5036// Query functions
5037
5038@threadSafety("system")
5039cmd VkResult vkCreateQueryPool(
5040 VkDevice device,
5041 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005042 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005043 VkQueryPool* pQueryPool) {
5044 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
5045 deviceObject := GetDevice(device)
5046
5047 queryPool := ?
5048 pQueryPool[0] = queryPool
5049 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
5050
5051 return ?
5052}
5053
5054@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005055cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005056 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005057 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005058 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005059 deviceObject := GetDevice(device)
5060 queryPoolObject := GetQueryPool(queryPool)
5061 assert(queryPoolObject.device == device)
5062
5063 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005064}
5065
5066@threadSafety("system")
5067cmd VkResult vkGetQueryPoolResults(
5068 VkDevice device,
5069 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005070 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005071 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005072 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005073 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005074 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005075 VkQueryResultFlags flags) {
5076 deviceObject := GetDevice(device)
5077 queryPoolObject := GetQueryPool(queryPool)
5078 assert(queryPoolObject.device == device)
5079
Jesse Halld27f6aa2015-08-15 17:58:48 -07005080 data := pData[0:dataSize]
5081
5082 return ?
5083}
5084
5085// Buffer functions
5086
5087@threadSafety("system")
5088cmd VkResult vkCreateBuffer(
5089 VkDevice device,
5090 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005091 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005092 VkBuffer* pBuffer) {
5093 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5094 deviceObject := GetDevice(device)
5095
5096 buffer := ?
5097 pBuffer[0] = buffer
5098 State.Buffers[buffer] = new!BufferObject(device: device)
5099
5100 return ?
5101}
5102
5103@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005104cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005105 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005106 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005107 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005108 deviceObject := GetDevice(device)
5109 bufferObject := GetBuffer(buffer)
5110 assert(bufferObject.device == device)
5111
Jesse Hall3fbc8562015-11-29 22:10:52 -08005112 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005113 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005114}
5115
5116
5117// Buffer view functions
5118
5119@threadSafety("system")
5120cmd VkResult vkCreateBufferView(
5121 VkDevice device,
5122 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005123 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005124 VkBufferView* pView) {
5125 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5126 deviceObject := GetDevice(device)
5127
5128 bufferObject := GetBuffer(pCreateInfo.buffer)
5129 assert(bufferObject.device == device)
5130
5131 view := ?
5132 pView[0] = view
5133 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5134
5135 return ?
5136}
5137
5138@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005139cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005140 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005141 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005142 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005143 deviceObject := GetDevice(device)
5144 bufferViewObject := GetBufferView(bufferView)
5145 assert(bufferViewObject.device == device)
5146
5147 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005148}
5149
5150
5151// Image functions
5152
5153@threadSafety("system")
5154cmd VkResult vkCreateImage(
5155 VkDevice device,
5156 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005157 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005158 VkImage* pImage) {
5159 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5160 deviceObject := GetDevice(device)
5161
5162 image := ?
5163 pImage[0] = image
5164 State.Images[image] = new!ImageObject(device: device)
5165
5166 return ?
5167}
5168
5169@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005170cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005171 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005172 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005173 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005174 deviceObject := GetDevice(device)
5175 imageObject := GetImage(image)
5176 assert(imageObject.device == device)
5177
Jesse Hall3fbc8562015-11-29 22:10:52 -08005178 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005179 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005180}
5181
Jesse Hall606a54e2015-11-19 22:17:28 -08005182cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005183 VkDevice device,
5184 VkImage image,
5185 const VkImageSubresource* pSubresource,
5186 VkSubresourceLayout* pLayout) {
5187 deviceObject := GetDevice(device)
5188 imageObject := GetImage(image)
5189 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005190}
5191
5192
5193// Image view functions
5194
5195@threadSafety("system")
5196cmd VkResult vkCreateImageView(
5197 VkDevice device,
5198 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005199 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005200 VkImageView* pView) {
5201 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5202 deviceObject := GetDevice(device)
5203
5204 imageObject := GetImage(pCreateInfo.image)
5205 assert(imageObject.device == device)
5206
5207 view := ?
5208 pView[0] = view
5209 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5210
5211 return ?
5212}
5213
5214@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005215cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005216 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005217 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005218 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005219 deviceObject := GetDevice(device)
5220 imageViewObject := GetImageView(imageView)
5221 assert(imageViewObject.device == device)
5222
5223 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005224}
5225
5226
5227// Shader functions
5228
5229cmd VkResult vkCreateShaderModule(
5230 VkDevice device,
5231 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005232 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005233 VkShaderModule* pShaderModule) {
5234 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5235 deviceObject := GetDevice(device)
5236
5237 shaderModule := ?
5238 pShaderModule[0] = shaderModule
5239 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5240
5241 return ?
5242}
5243
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005244cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005245 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005246 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005247 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005248 deviceObject := GetDevice(device)
5249 shaderModuleObject := GetShaderModule(shaderModule)
5250 assert(shaderModuleObject.device == device)
5251
5252 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005253}
5254
Jesse Halld27f6aa2015-08-15 17:58:48 -07005255
5256// Pipeline functions
5257
5258cmd VkResult vkCreatePipelineCache(
5259 VkDevice device,
5260 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005261 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005262 VkPipelineCache* pPipelineCache) {
5263 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5264 deviceObject := GetDevice(device)
5265
5266 pipelineCache := ?
5267 pPipelineCache[0] = pipelineCache
5268 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5269
5270 return ?
5271}
5272
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005273cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005274 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005275 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005276 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005277 deviceObject := GetDevice(device)
5278 pipelineCacheObject := GetPipelineCache(pipelineCache)
5279 assert(pipelineCacheObject.device == device)
5280
5281 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005282}
5283
Jesse Halld27f6aa2015-08-15 17:58:48 -07005284cmd VkResult vkGetPipelineCacheData(
5285 VkDevice device,
5286 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005287 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005288 void* pData) {
5289 deviceObject := GetDevice(device)
5290 pipelineCacheObject := GetPipelineCache(pipelineCache)
5291 assert(pipelineCacheObject.device == device)
5292
5293 return ?
5294}
5295
5296cmd VkResult vkMergePipelineCaches(
5297 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005298 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005299 u32 srcCacheCount,
5300 const VkPipelineCache* pSrcCaches) {
5301 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005302 dstCacheObject := GetPipelineCache(dstCache)
5303 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005304
5305 srcCaches := pSrcCaches[0:srcCacheCount]
5306 for i in (0 .. srcCacheCount) {
5307 srcCache := srcCaches[i]
5308 srcCacheObject := GetPipelineCache(srcCache)
5309 assert(srcCacheObject.device == device)
5310 }
5311
5312 return ?
5313}
5314
5315cmd VkResult vkCreateGraphicsPipelines(
5316 VkDevice device,
5317 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005318 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005319 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005320 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005321 VkPipeline* pPipelines) {
5322 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005323 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005324 pipelineCacheObject := GetPipelineCache(pipelineCache)
5325 assert(pipelineCacheObject.device == device)
5326 }
5327
Jesse Hall03b6fe12015-11-24 12:44:21 -08005328 createInfos := pCreateInfos[0:createInfoCount]
5329 pipelines := pPipelines[0:createInfoCount]
5330 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005331 pipeline := ?
5332 pipelines[i] = pipeline
5333 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5334 }
5335
5336 return ?
5337}
5338
5339cmd VkResult vkCreateComputePipelines(
5340 VkDevice device,
5341 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005342 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005343 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005344 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005345 VkPipeline* pPipelines) {
5346 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005347 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005348 pipelineCacheObject := GetPipelineCache(pipelineCache)
5349 assert(pipelineCacheObject.device == device)
5350 }
5351
Jesse Hall03b6fe12015-11-24 12:44:21 -08005352 createInfos := pCreateInfos[0:createInfoCount]
5353 pipelines := pPipelines[0:createInfoCount]
5354 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005355 pipeline := ?
5356 pipelines[i] = pipeline
5357 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5358 }
5359
5360 return ?
5361}
5362
5363@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005364cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005365 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005366 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005367 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005368 deviceObject := GetDevice(device)
5369 pipelineObjects := GetPipeline(pipeline)
5370 assert(pipelineObjects.device == device)
5371
5372 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005373}
5374
5375
5376// Pipeline layout functions
5377
5378@threadSafety("system")
5379cmd VkResult vkCreatePipelineLayout(
5380 VkDevice device,
5381 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005382 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005383 VkPipelineLayout* pPipelineLayout) {
5384 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5385 deviceObject := GetDevice(device)
5386
5387 pipelineLayout := ?
5388 pPipelineLayout[0] = pipelineLayout
5389 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5390
5391 return ?
5392}
5393
5394@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005395cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005396 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005397 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005398 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005399 deviceObject := GetDevice(device)
5400 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5401 assert(pipelineLayoutObjects.device == device)
5402
5403 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005404}
5405
5406
5407// Sampler functions
5408
5409@threadSafety("system")
5410cmd VkResult vkCreateSampler(
5411 VkDevice device,
5412 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005413 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005414 VkSampler* pSampler) {
5415 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5416 deviceObject := GetDevice(device)
5417
5418 sampler := ?
5419 pSampler[0] = sampler
5420 State.Samplers[sampler] = new!SamplerObject(device: device)
5421
5422 return ?
5423}
5424
5425@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005426cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005427 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005428 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005429 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005430 deviceObject := GetDevice(device)
5431 samplerObject := GetSampler(sampler)
5432 assert(samplerObject.device == device)
5433
5434 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005435}
5436
5437
5438// Descriptor set functions
5439
5440@threadSafety("system")
5441cmd VkResult vkCreateDescriptorSetLayout(
5442 VkDevice device,
5443 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005444 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005445 VkDescriptorSetLayout* pSetLayout) {
5446 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5447 deviceObject := GetDevice(device)
5448
5449 setLayout := ?
5450 pSetLayout[0] = setLayout
5451 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5452
5453 return ?
5454}
5455
5456@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005457cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005458 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005459 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005460 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005461 deviceObject := GetDevice(device)
5462 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5463 assert(descriptorSetLayoutObject.device == device)
5464
5465 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005466}
5467
5468@threadSafety("system")
5469cmd VkResult vkCreateDescriptorPool(
5470 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005471 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005472 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005473 VkDescriptorPool* pDescriptorPool) {
5474 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5475 deviceObject := GetDevice(device)
5476
5477 descriptorPool := ?
5478 pDescriptorPool[0] = descriptorPool
5479 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5480
5481 return ?
5482}
5483
5484@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005485cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005486 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005487 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005488 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005489 deviceObject := GetDevice(device)
5490 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5491 assert(descriptorPoolObject.device == device)
5492
5493 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005494}
5495
5496@threadSafety("app")
5497cmd VkResult vkResetDescriptorPool(
5498 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005499 VkDescriptorPool descriptorPool,
5500 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005501 deviceObject := GetDevice(device)
5502 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5503 assert(descriptorPoolObject.device == device)
5504
5505 return ?
5506}
5507
5508@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005509cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005510 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005511 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005512 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005513 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005514 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005515 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005516
Jesse Hall03b6fe12015-11-24 12:44:21 -08005517 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5518 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005519 setLayout := setLayouts[i]
5520 setLayoutObject := GetDescriptorSetLayout(setLayout)
5521 assert(setLayoutObject.device == device)
5522 }
5523
Jesse Hall03b6fe12015-11-24 12:44:21 -08005524 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5525 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005526 descriptorSet := ?
5527 descriptorSets[i] = descriptorSet
5528 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5529 }
5530
5531 return ?
5532}
5533
Jesse Hallf09c6b12015-08-15 19:54:28 -07005534cmd VkResult vkFreeDescriptorSets(
5535 VkDevice device,
5536 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005537 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005538 const VkDescriptorSet* pDescriptorSets) {
5539 deviceObject := GetDevice(device)
5540 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5541
Jesse Hall03b6fe12015-11-24 12:44:21 -08005542 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5543 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005544 descriptorSet := descriptorSets[i]
5545 descriptorSetObject := GetDescriptorSet(descriptorSet)
5546 assert(descriptorSetObject.device == device)
5547 State.DescriptorSets[descriptorSet] = null
5548 }
5549
5550 return ?
5551}
5552
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005553cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005554 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005555 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005556 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005557 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005558 const VkCopyDescriptorSet* pDescriptorCopies) {
5559 deviceObject := GetDevice(device)
5560
Jesse Hallb00daad2015-11-29 19:46:20 -08005561 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5562 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005563 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005564 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005565 assert(descriptorWriteObject.device == device)
5566 }
5567
Jesse Hallb00daad2015-11-29 19:46:20 -08005568 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5569 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005570 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005571 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005572 assert(descriptorCopyObject.device == device)
5573 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005574}
5575
5576
5577// Framebuffer functions
5578
5579@threadSafety("system")
5580cmd VkResult vkCreateFramebuffer(
5581 VkDevice device,
5582 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005583 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005584 VkFramebuffer* pFramebuffer) {
5585 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5586 deviceObject := GetDevice(device)
5587
5588 framebuffer := ?
5589 pFramebuffer[0] = framebuffer
5590 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5591
5592 return ?
5593}
5594
5595@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005596cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005597 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005598 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005599 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005600 deviceObject := GetDevice(device)
5601 framebufferObject := GetFramebuffer(framebuffer)
5602 assert(framebufferObject.device == device)
5603
5604 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005605}
5606
5607
5608// Renderpass functions
5609
5610@threadSafety("system")
5611cmd VkResult vkCreateRenderPass(
5612 VkDevice device,
5613 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005614 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005615 VkRenderPass* pRenderPass) {
5616 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5617 deviceObject := GetDevice(device)
5618
5619 renderpass := ?
5620 pRenderPass[0] = renderpass
5621 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5622
5623 return ?
5624}
5625
5626@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005627cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005628 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005629 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005630 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005631 deviceObject := GetDevice(device)
5632 renderPassObject := GetRenderPass(renderPass)
5633 assert(renderPassObject.device == device)
5634
5635 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005636}
5637
Jesse Hall606a54e2015-11-19 22:17:28 -08005638cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005639 VkDevice device,
5640 VkRenderPass renderPass,
5641 VkExtent2D* pGranularity) {
5642 deviceObject := GetDevice(device)
5643 renderPassObject := GetRenderPass(renderPass)
5644
5645 granularity := ?
5646 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005647}
5648
5649// Command pool functions
5650
5651cmd VkResult vkCreateCommandPool(
5652 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005653 const VkCommandPoolCreateInfo* pCreateInfo,
5654 const VkAllocationCallbacks* pAllocator,
5655 VkCommandPool* pCommandPool) {
5656 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005657 deviceObject := GetDevice(device)
5658
Jesse Hall3fbc8562015-11-29 22:10:52 -08005659 commandPool := ?
5660 pCommandPool[0] = commandPool
5661 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005662
5663 return ?
5664}
5665
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005666cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005667 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005668 VkCommandPool commandPool,
5669 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005670 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005671 commandPoolObject := GetCommandPool(commandPool)
5672 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005673
Jesse Hall3fbc8562015-11-29 22:10:52 -08005674 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005675}
5676
5677cmd VkResult vkResetCommandPool(
5678 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005679 VkCommandPool commandPool,
5680 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005681 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005682 commandPoolObject := GetCommandPool(commandPool)
5683 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005684
5685 return ?
5686}
5687
5688// Command buffer functions
5689
Jesse Hall3fbc8562015-11-29 22:10:52 -08005690macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5691 memoryObject := GetDeviceMemory(memory)
5692 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005693
Jesse Hall3fbc8562015-11-29 22:10:52 -08005694 commandBufferObject := GetCommandBuffer(commandBuffer)
5695 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005696}
5697
Jesse Hall3fbc8562015-11-29 22:10:52 -08005698macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5699 memoryObject := GetDeviceMemory(memory)
5700 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005701
Jesse Hall3fbc8562015-11-29 22:10:52 -08005702 commandBufferObject := GetCommandBuffer(commandBuffer)
5703 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005704}
5705
5706@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005707cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005708 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005709 const VkCommandBufferAllocateInfo* pAllocateInfo,
5710 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005711 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005712
Jesse Hall3dd678a2016-01-08 21:52:01 -08005713 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005714 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005715 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005716 commandBuffer := ?
5717 commandBuffers[i] = commandBuffer
5718 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005719 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005720
5721 return ?
5722}
5723
5724@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005725cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005726 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005727 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005728 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005729 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005730 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005731
Jesse Hall3fbc8562015-11-29 22:10:52 -08005732 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005733 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005734 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5735 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005736 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005737 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005738 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005739}
5740
5741@threadSafety("app")
5742cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005743 VkCommandBuffer commandBuffer,
5744 const VkCommandBufferBeginInfo* pBeginInfo) {
5745 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5746 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005747
5748 // TODO: iterate over boundObjects and clear memory bindings
5749
5750 return ?
5751}
5752
5753@threadSafety("app")
5754cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005755 VkCommandBuffer commandBuffer) {
5756 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005757
5758 return ?
5759}
5760
5761@threadSafety("app")
5762cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005763 VkCommandBuffer commandBuffer,
5764 VkCommandBufferResetFlags flags) {
5765 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005766
5767 // TODO: iterate over boundObjects and clear memory bindings
5768
5769 return ?
5770}
5771
5772
5773// Command buffer building functions
5774
5775@threadSafety("app")
5776cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005777 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005778 VkPipelineBindPoint pipelineBindPoint,
5779 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005780 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005781 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005782 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005783
Jesse Halld8bade02015-11-24 10:24:18 -08005784 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005785 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5786 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5787 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005788 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005789}
5790
5791@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005792cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005793 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005794 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005795 u32 viewportCount,
5796 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005797 commandBufferObject := GetCommandBuffer(commandBuffer)
5798 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005799}
5800
5801@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005802cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005803 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005804 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005805 u32 scissorCount,
5806 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005807 commandBufferObject := GetCommandBuffer(commandBuffer)
5808 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005809}
5810
5811@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005812cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005813 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005814 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005815 commandBufferObject := GetCommandBuffer(commandBuffer)
5816 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005817}
5818
5819@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005820cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005821 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005822 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005823 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005824 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005825 commandBufferObject := GetCommandBuffer(commandBuffer)
5826 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005827}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005828
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005829@threadSafety("app")
5830cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005831 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005832 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5833 // an annotation as a quick hack to pass this to the template without
5834 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005835 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005836 commandBufferObject := GetCommandBuffer(commandBuffer)
5837 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005838}
5839
5840@threadSafety("app")
5841cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005842 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005843 f32 minDepthBounds,
5844 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005845 commandBufferObject := GetCommandBuffer(commandBuffer)
5846 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005847}
5848
5849@threadSafety("app")
5850cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005851 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005852 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005853 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005854 commandBufferObject := GetCommandBuffer(commandBuffer)
5855 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005856}
5857
5858@threadSafety("app")
5859cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005860 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005861 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005862 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005863 commandBufferObject := GetCommandBuffer(commandBuffer)
5864 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005865}
5866
5867@threadSafety("app")
5868cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005869 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005870 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005871 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005872 commandBufferObject := GetCommandBuffer(commandBuffer)
5873 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005874}
5875
5876@threadSafety("app")
5877cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005878 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005879 VkPipelineBindPoint pipelineBindPoint,
5880 VkPipelineLayout layout,
5881 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005882 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005883 const VkDescriptorSet* pDescriptorSets,
5884 u32 dynamicOffsetCount,
5885 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005886 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005887
Jesse Hall03b6fe12015-11-24 12:44:21 -08005888 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5889 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005890 descriptorSet := descriptorSets[i]
5891 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005892 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005893 }
5894
5895 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5896 for i in (0 .. dynamicOffsetCount) {
5897 dynamicOffset := dynamicOffsets[i]
5898 }
5899
Jesse Halld8bade02015-11-24 10:24:18 -08005900 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005901 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5902 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5903 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005904 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005905}
5906
5907@threadSafety("app")
5908cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005909 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005910 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005911 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005912 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005913 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005914 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005915 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005916
Jesse Hall3fbc8562015-11-29 22:10:52 -08005917 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005918
Jesse Hall3fbc8562015-11-29 22:10:52 -08005919 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005920}
5921
5922@threadSafety("app")
5923cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005924 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005925 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005926 u32 bindingCount,
5927 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005928 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005929 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005930
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005931 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005932 buffers := pBuffers[0:bindingCount]
5933 offsets := pOffsets[0:bindingCount]
5934 for i in (0 .. bindingCount) {
5935 buffer := buffers[i]
5936 offset := offsets[i]
5937 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005938 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005939
Jesse Hall3fbc8562015-11-29 22:10:52 -08005940 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005941 }
5942
Jesse Hall3fbc8562015-11-29 22:10:52 -08005943 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005944}
5945
5946@threadSafety("app")
5947cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005948 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005949 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005950 u32 instanceCount,
5951 u32 firstVertex,
5952 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005953 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005954
Jesse Hall3fbc8562015-11-29 22:10:52 -08005955 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005956}
5957
5958@threadSafety("app")
5959cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005960 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005961 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005962 u32 instanceCount,
5963 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005964 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005965 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005966 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005967
Jesse Hall3fbc8562015-11-29 22:10:52 -08005968 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005969}
5970
5971@threadSafety("app")
5972cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005973 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005974 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005975 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005976 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005977 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005978 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005979 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005980 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005981
Jesse Hall3fbc8562015-11-29 22:10:52 -08005982 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005983
Jesse Hall3fbc8562015-11-29 22:10:52 -08005984 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005985}
5986
5987@threadSafety("app")
5988cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005989 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005990 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005991 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005992 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005993 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005994 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005995 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005996 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005997
Jesse Hall3fbc8562015-11-29 22:10:52 -08005998 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005999
Jesse Hall3fbc8562015-11-29 22:10:52 -08006000 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006001}
6002
6003@threadSafety("app")
6004cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006005 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08006006 u32 groupCountX,
6007 u32 groupCountY,
6008 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006009 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006010
Jesse Hall3fbc8562015-11-29 22:10:52 -08006011 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006012}
6013
6014@threadSafety("app")
6015cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006016 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006017 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006018 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006019 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006020 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006021 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006022
Jesse Hall3fbc8562015-11-29 22:10:52 -08006023 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006024
Jesse Hall3fbc8562015-11-29 22:10:52 -08006025 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006026}
6027
6028@threadSafety("app")
6029cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006030 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006031 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006032 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006033 u32 regionCount,
6034 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006035 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006036 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006037 dstBufferObject := GetBuffer(dstBuffer)
6038 assert(commandBufferObject.device == srcBufferObject.device)
6039 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006040
6041 regions := pRegions[0:regionCount]
6042 for i in (0 .. regionCount) {
6043 region := regions[i]
6044 }
6045
Jesse Hall3fbc8562015-11-29 22:10:52 -08006046 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6047 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006048
Jesse Hall65ab5522015-11-30 00:07:16 -08006049 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006050}
6051
6052@threadSafety("app")
6053cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006054 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006055 VkImage srcImage,
6056 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006057 VkImage dstImage,
6058 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006059 u32 regionCount,
6060 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006061 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006062 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006063 dstImageObject := GetImage(dstImage)
6064 assert(commandBufferObject.device == srcImageObject.device)
6065 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006066
6067 regions := pRegions[0:regionCount]
6068 for i in (0 .. regionCount) {
6069 region := regions[i]
6070 }
6071
Jesse Hall3fbc8562015-11-29 22:10:52 -08006072 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6073 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006074
Jesse Hall65ab5522015-11-30 00:07:16 -08006075 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006076}
6077
6078@threadSafety("app")
6079cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006080 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006081 VkImage srcImage,
6082 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006083 VkImage dstImage,
6084 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006085 u32 regionCount,
6086 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006087 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006088 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006089 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006090 dstImageObject := GetImage(dstImage)
6091 assert(commandBufferObject.device == srcImageObject.device)
6092 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006093
6094 regions := pRegions[0:regionCount]
6095 for i in (0 .. regionCount) {
6096 region := regions[i]
6097 }
6098
Jesse Hall3fbc8562015-11-29 22:10:52 -08006099 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6100 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006101
Jesse Hall3fbc8562015-11-29 22:10:52 -08006102 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006103}
6104
6105@threadSafety("app")
6106cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006107 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006108 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006109 VkImage dstImage,
6110 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006111 u32 regionCount,
6112 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006113 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006114 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006115 dstImageObject := GetImage(dstImage)
6116 assert(commandBufferObject.device == srcBufferObject.device)
6117 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006118
6119 regions := pRegions[0:regionCount]
6120 for i in (0 .. regionCount) {
6121 region := regions[i]
6122 }
6123
Jesse Hall3fbc8562015-11-29 22:10:52 -08006124 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6125 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006126
Jesse Hall65ab5522015-11-30 00:07:16 -08006127 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006128}
6129
6130@threadSafety("app")
6131cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006132 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006133 VkImage srcImage,
6134 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006135 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006136 u32 regionCount,
6137 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006138 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006139 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006140 dstBufferObject := GetBuffer(dstBuffer)
6141 assert(commandBufferObject.device == srcImageObject.device)
6142 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006143
6144 regions := pRegions[0:regionCount]
6145 for i in (0 .. regionCount) {
6146 region := regions[i]
6147 }
6148
Jesse Hall3fbc8562015-11-29 22:10:52 -08006149 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6150 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006151
Jesse Hall65ab5522015-11-30 00:07:16 -08006152 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006153}
6154
6155@threadSafety("app")
6156cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006157 VkCommandBuffer commandBuffer,
6158 VkBuffer dstBuffer,
6159 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006160 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07006161 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006162 commandBufferObject := GetCommandBuffer(commandBuffer)
6163 dstBufferObject := GetBuffer(dstBuffer)
6164 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006165
6166 data := pData[0:dataSize]
6167
Jesse Hall3fbc8562015-11-29 22:10:52 -08006168 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006169
Jesse Hall65ab5522015-11-30 00:07:16 -08006170 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006171}
6172
6173@threadSafety("app")
6174cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006175 VkCommandBuffer commandBuffer,
6176 VkBuffer dstBuffer,
6177 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006178 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006179 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006180 commandBufferObject := GetCommandBuffer(commandBuffer)
6181 dstBufferObject := GetBuffer(dstBuffer)
6182 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006183
Jesse Hall65ab5522015-11-30 00:07:16 -08006184 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006185}
6186
6187@threadSafety("app")
6188cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006189 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006190 VkImage image,
6191 VkImageLayout imageLayout,
6192 const VkClearColorValue* pColor,
6193 u32 rangeCount,
6194 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006195 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006196 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006197 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006198
6199 ranges := pRanges[0:rangeCount]
6200 for i in (0 .. rangeCount) {
6201 range := ranges[i]
6202 }
6203
Jesse Hall3fbc8562015-11-29 22:10:52 -08006204 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006205
Jesse Hall3fbc8562015-11-29 22:10:52 -08006206 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006207}
6208
6209@threadSafety("app")
6210cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006211 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006212 VkImage image,
6213 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006214 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006215 u32 rangeCount,
6216 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006217 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006218 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006219 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006220
6221 ranges := pRanges[0:rangeCount]
6222 for i in (0 .. rangeCount) {
6223 range := ranges[i]
6224 }
6225
Jesse Hall3fbc8562015-11-29 22:10:52 -08006226 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006227
Jesse Hall3fbc8562015-11-29 22:10:52 -08006228 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006229}
6230
6231@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006232cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006233 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006234 u32 attachmentCount,
6235 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006236 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006237 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006238 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006239
6240 rects := pRects[0:rectCount]
6241 for i in (0 .. rectCount) {
6242 rect := rects[i]
6243 }
6244
Jesse Hall3fbc8562015-11-29 22:10:52 -08006245 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006246}
6247
6248@threadSafety("app")
6249cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006250 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006251 VkImage srcImage,
6252 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006253 VkImage dstImage,
6254 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006255 u32 regionCount,
6256 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006257 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006258 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006259 dstImageObject := GetImage(dstImage)
6260 assert(commandBufferObject.device == srcImageObject.device)
6261 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006262
6263 regions := pRegions[0:regionCount]
6264 for i in (0 .. regionCount) {
6265 region := regions[i]
6266 }
6267
Jesse Hall3fbc8562015-11-29 22:10:52 -08006268 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6269 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006270
Jesse Hall3fbc8562015-11-29 22:10:52 -08006271 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006272}
6273
6274@threadSafety("app")
6275cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006276 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006277 VkEvent event,
6278 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006279 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006280 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006281 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006282}
6283
6284@threadSafety("app")
6285cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006286 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006287 VkEvent event,
6288 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006289 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006290 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006291 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006292}
6293
6294@threadSafety("app")
6295cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006296 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006297 u32 eventCount,
6298 const VkEvent* pEvents,
6299 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006300 VkPipelineStageFlags dstStageMask,
6301 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006302 const VkMemoryBarrier* pMemoryBarriers,
6303 u32 bufferMemoryBarrierCount,
6304 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6305 u32 imageMemoryBarrierCount,
6306 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006307 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006308
6309 events := pEvents[0:eventCount]
6310 for i in (0 .. eventCount) {
6311 event := events[i]
6312 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006313 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006314 }
6315
Jesse Hall3dd678a2016-01-08 21:52:01 -08006316 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006317 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006318 memoryBarrier := memoryBarriers[i]
6319 }
6320 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6321 for i in (0 .. bufferMemoryBarrierCount) {
6322 bufferMemoryBarrier := bufferMemoryBarriers[i]
6323 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6324 assert(bufferObject.device == commandBufferObject.device)
6325 }
6326 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6327 for i in (0 .. imageMemoryBarrierCount) {
6328 imageMemoryBarrier := imageMemoryBarriers[i]
6329 imageObject := GetImage(imageMemoryBarrier.image)
6330 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006331 }
6332}
6333
6334@threadSafety("app")
6335cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006336 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006337 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006338 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006339 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006340 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006341 const VkMemoryBarrier* pMemoryBarriers,
6342 u32 bufferMemoryBarrierCount,
6343 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6344 u32 imageMemoryBarrierCount,
6345 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006346 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006347
Jesse Hall3dd678a2016-01-08 21:52:01 -08006348 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006349 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006350 memoryBarrier := memoryBarriers[i]
6351 }
6352 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6353 for i in (0 .. bufferMemoryBarrierCount) {
6354 bufferMemoryBarrier := bufferMemoryBarriers[i]
6355 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6356 assert(bufferObject.device == commandBufferObject.device)
6357 }
6358 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6359 for i in (0 .. imageMemoryBarrierCount) {
6360 imageMemoryBarrier := imageMemoryBarriers[i]
6361 imageObject := GetImage(imageMemoryBarrier.image)
6362 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006363 }
6364}
6365
6366@threadSafety("app")
6367cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006368 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006369 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006370 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006371 VkQueryControlFlags flags) {
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 vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006379 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006380 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006381 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006382 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006383 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006384 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006385}
6386
6387@threadSafety("app")
6388cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006389 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006390 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006391 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006392 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006393 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006394 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006395 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006396}
6397
6398@threadSafety("app")
6399cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006400 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006401 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006402 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006403 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006404 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006405 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006406 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006407}
6408
6409@threadSafety("app")
6410cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006411 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006412 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006413 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006414 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006415 VkBuffer dstBuffer,
6416 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006417 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006418 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006419 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006420 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006421 dstBufferObject := GetBuffer(dstBuffer)
6422 assert(commandBufferObject.device == queryPoolObject.device)
6423 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006424}
6425
6426cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006427 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006428 VkPipelineLayout layout,
6429 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006430 u32 offset,
6431 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006432 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006433 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006434 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006435 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006436}
6437
6438@threadSafety("app")
6439cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006440 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006441 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006442 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006443 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006444 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6445 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006446 assert(commandBufferObject.device == renderPassObject.device)
6447 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006448
Jesse Hall3fbc8562015-11-29 22:10:52 -08006449 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006450}
6451
6452cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006453 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006454 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006455 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006456}
6457
6458@threadSafety("app")
6459cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006460 VkCommandBuffer commandBuffer) {
6461 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006462
Jesse Hall3fbc8562015-11-29 22:10:52 -08006463 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006464}
6465
6466cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006467 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006468 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006469 const VkCommandBuffer* pCommandBuffers) {
6470 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006471
Jesse Hall3dd678a2016-01-08 21:52:01 -08006472 commandBuffers := pCommandBuffers[0:commandBufferCount]
6473 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006474 secondaryCommandBuffer := commandBuffers[i]
6475 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6476 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006477 }
6478}
6479
Jesse Hallad250842017-03-10 18:35:38 -08006480@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006481cmd void vkDestroySurfaceKHR(
6482 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006483 VkSurfaceKHR surface,
6484 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006485 instanceObject := GetInstance(instance)
6486 surfaceObject := GetSurface(surface)
6487 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006488
Jesse Hall1356b0d2015-11-23 17:24:58 -08006489 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006490}
6491
Jesse Hallad250842017-03-10 18:35:38 -08006492@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006493cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006494 VkPhysicalDevice physicalDevice,
6495 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006496 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006497 VkBool32* pSupported) {
6498 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006499
6500 return ?
6501}
6502
Jesse Hallad250842017-03-10 18:35:38 -08006503@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006504cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6505 VkPhysicalDevice physicalDevice,
6506 VkSurfaceKHR surface,
6507 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6508 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6509
6510 surfaceCapabilities := ?
6511 pSurfaceCapabilities[0] = surfaceCapabilities
6512
6513 return ?
6514}
6515
Jesse Hallad250842017-03-10 18:35:38 -08006516@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006517cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6518 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006519 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006520 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006521 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006522 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006523
6524 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006525 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006526 surfaceFormats := pSurfaceFormats[0:count]
6527
6528 for i in (0 .. count) {
6529 surfaceFormat := ?
6530 surfaceFormats[i] = surfaceFormat
6531 }
6532
6533 return ?
6534}
6535
Jesse Hallad250842017-03-10 18:35:38 -08006536@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006537cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6538 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006539 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006540 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006541 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006542 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006543
6544 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006545 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006546 presentModes := pPresentModes[0:count]
6547
6548 for i in (0 .. count) {
6549 presentMode := ?
6550 presentModes[i] = presentMode
6551 }
6552
6553 return ?
6554}
6555
Jesse Hallad250842017-03-10 18:35:38 -08006556@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006557cmd VkResult vkCreateSwapchainKHR(
6558 VkDevice device,
6559 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006560 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006561 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006562 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006563 deviceObject := GetDevice(device)
6564
6565 swapchain := ?
6566 pSwapchain[0] = swapchain
6567 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6568
6569 return ?
6570}
6571
Jesse Hallad250842017-03-10 18:35:38 -08006572@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006573cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006574 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006575 VkSwapchainKHR swapchain,
6576 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006577 deviceObject := GetDevice(device)
6578 swapchainObject := GetSwapchain(swapchain)
6579 assert(swapchainObject.device == device)
6580
6581 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006582}
6583
Jesse Hallad250842017-03-10 18:35:38 -08006584@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006585cmd VkResult vkGetSwapchainImagesKHR(
6586 VkDevice device,
6587 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006588 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006589 VkImage* pSwapchainImages) {
6590 deviceObject := GetDevice(device)
6591
6592 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006593 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006594 swapchainImages := pSwapchainImages[0:count]
6595
6596 for i in (0 .. count) {
6597 swapchainImage := ?
6598 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006599 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006600 }
6601
6602 return ?
6603}
6604
Jesse Hallad250842017-03-10 18:35:38 -08006605@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006606cmd VkResult vkAcquireNextImageKHR(
6607 VkDevice device,
6608 VkSwapchainKHR swapchain,
6609 u64 timeout,
6610 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006611 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006612 u32* pImageIndex) {
6613 deviceObject := GetDevice(device)
6614 swapchainObject := GetSwapchain(swapchain)
6615
6616 imageIndex := ?
6617 pImageIndex[0] = imageIndex
6618
6619 return ?
6620}
6621
Jesse Hallad250842017-03-10 18:35:38 -08006622@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006623cmd VkResult vkQueuePresentKHR(
6624 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006625 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006626 queueObject := GetQueue(queue)
6627
6628 presentInfo := ?
6629 pPresentInfo[0] = presentInfo
6630
6631 return ?
6632}
6633
Jesse Hallad250842017-03-10 18:35:38 -08006634@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006635cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6636 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006637 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006638 VkDisplayPropertiesKHR* pProperties) {
6639 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6640 return ?
6641}
6642
Jesse Hallad250842017-03-10 18:35:38 -08006643@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006644cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6645 VkPhysicalDevice physicalDevice,
6646 u32* pPropertyCount,
6647 VkDisplayPlanePropertiesKHR* pProperties) {
6648 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6649 return ?
6650}
6651
Jesse Hallad250842017-03-10 18:35:38 -08006652@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006653cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6654 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006655 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006656 u32* pDisplayCount,
6657 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006658 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6659 return ?
6660}
6661
Jesse Hallad250842017-03-10 18:35:38 -08006662@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006663cmd VkResult vkGetDisplayModePropertiesKHR(
6664 VkPhysicalDevice physicalDevice,
6665 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006666 u32* pPropertyCount,
6667 VkDisplayModePropertiesKHR* pProperties) {
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 Hall1356b0d2015-11-23 17:24:58 -08006673cmd VkResult vkCreateDisplayModeKHR(
6674 VkPhysicalDevice physicalDevice,
6675 VkDisplayKHR display,
6676 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006677 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006678 VkDisplayModeKHR* pMode) {
6679 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6680 return ?
6681}
6682
Jesse Hallad250842017-03-10 18:35:38 -08006683@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006684cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006685 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006686 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006687 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006688 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006689 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6690 return ?
6691}
6692
Jesse Hallad250842017-03-10 18:35:38 -08006693@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006694cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6695 VkInstance instance,
6696 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006697 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006698 VkSurfaceKHR* pSurface) {
6699 return ?
6700}
6701
Jesse Hallad250842017-03-10 18:35:38 -08006702@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006703cmd VkResult vkCreateSharedSwapchainsKHR(
6704 VkDevice device,
6705 u32 swapchainCount,
6706 const VkSwapchainCreateInfoKHR* pCreateInfos,
6707 const VkAllocationCallbacks* pAllocator,
6708 VkSwapchainKHR* pSwapchains) {
6709 return ?
6710}
6711
Jesse Hallad250842017-03-10 18:35:38 -08006712@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006713cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006714 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006715 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006716 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006717 VkSurfaceKHR* pSurface) {
6718 instanceObject := GetInstance(instance)
6719 return ?
6720}
6721
Jesse Hallad250842017-03-10 18:35:38 -08006722@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006723cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6724 VkPhysicalDevice physicalDevice,
6725 u32 queueFamilyIndex,
6726 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006727 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006728 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6729 return ?
6730}
6731
Jesse Hallad250842017-03-10 18:35:38 -08006732@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006733cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006734 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006735 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006736 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006737 VkSurfaceKHR* pSurface) {
6738 instanceObject := GetInstance(instance)
6739 return ?
6740}
6741
Jesse Hallad250842017-03-10 18:35:38 -08006742@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006743cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6744 VkPhysicalDevice physicalDevice,
6745 u32 queueFamilyIndex,
6746 platform.xcb_connection_t* connection,
6747 platform.xcb_visualid_t visual_id) {
6748 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6749 return ?
6750}
6751
Jesse Hallad250842017-03-10 18:35:38 -08006752@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006753cmd VkResult vkCreateWaylandSurfaceKHR(
6754 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006755 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006756 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006757 VkSurfaceKHR* pSurface) {
6758 instanceObject := GetInstance(instance)
6759 return ?
6760}
6761
Jesse Hallad250842017-03-10 18:35:38 -08006762@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006763cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6764 VkPhysicalDevice physicalDevice,
6765 u32 queueFamilyIndex,
6766 platform.wl_display* display) {
6767 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6768 return ?
6769}
6770
Jesse Hallad250842017-03-10 18:35:38 -08006771@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006772cmd VkResult vkCreateMirSurfaceKHR(
6773 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006774 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006775 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006776 VkSurfaceKHR* pSurface) {
6777 instanceObject := GetInstance(instance)
6778 return ?
6779}
6780
Jesse Hallad250842017-03-10 18:35:38 -08006781@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006782cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6783 VkPhysicalDevice physicalDevice,
6784 u32 queueFamilyIndex,
6785 platform.MirConnection* connection) {
6786 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6787 return ?
6788}
6789
Jesse Hallad250842017-03-10 18:35:38 -08006790@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006791cmd VkResult vkCreateAndroidSurfaceKHR(
6792 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006793 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006794 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006795 VkSurfaceKHR* pSurface) {
6796 instanceObject := GetInstance(instance)
6797 return ?
6798}
6799
Jesse Hallad250842017-03-10 18:35:38 -08006800@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006801cmd VkResult vkCreateWin32SurfaceKHR(
6802 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006803 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006804 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006805 VkSurfaceKHR* pSurface) {
6806 instanceObject := GetInstance(instance)
6807 return ?
6808}
6809
Jesse Hallad250842017-03-10 18:35:38 -08006810@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006811cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6812 VkPhysicalDevice physicalDevice,
6813 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006814 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006815 return ?
6816}
6817
Jesse Hallad250842017-03-10 18:35:38 -08006818@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006819@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08006820cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6821 VkDevice device,
6822 VkFormat format,
6823 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006824 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08006825 return ?
6826}
6827
Jesse Hallad250842017-03-10 18:35:38 -08006828@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08006829@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13006830cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
6831 VkDevice device,
6832 VkFormat format,
6833 VkImageUsageFlags imageUsage,
6834 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08006835 u64* grallocConsumerUsage,
6836 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13006837 return ?
6838}
6839
Jesse Hallad250842017-03-10 18:35:38 -08006840@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006841cmd VkResult vkAcquireImageANDROID(
6842 VkDevice device,
6843 VkImage image,
6844 int nativeFenceFd,
6845 VkSemaphore semaphore,
6846 VkFence fence) {
6847 return ?
6848}
6849
Jesse Hallad250842017-03-10 18:35:38 -08006850@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006851cmd VkResult vkQueueSignalReleaseImageANDROID(
6852 VkQueue queue,
6853 u32 waitSemaphoreCount,
6854 const VkSemaphore* pWaitSemaphores,
6855 VkImage image,
6856 int* pNativeFenceFd) {
6857 return ?
6858}
6859
Jesse Hallad250842017-03-10 18:35:38 -08006860@extension("VK_EXT_debug_report") // 12
6861@external type void* PFN_vkDebugReportCallbackEXT
6862@extension("VK_EXT_debug_report") // 12
6863@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6864 VkDebugReportFlagsEXT flags,
6865 VkDebugReportObjectTypeEXT objectType,
6866 u64 object,
6867 platform.size_t location,
6868 s32 messageCode,
6869 const char* pLayerPrefix,
6870 const char* pMessage,
6871 void* pUserData) {
6872 return ?
6873}
6874
6875@extension("VK_EXT_debug_report") // 12
6876cmd VkResult vkCreateDebugReportCallbackEXT(
6877 VkInstance instance,
6878 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6879 const VkAllocationCallbacks* pAllocator,
6880 VkDebugReportCallbackEXT* pCallback) {
6881 return ?
6882}
6883
6884@extension("VK_EXT_debug_report") // 12
6885cmd void vkDestroyDebugReportCallbackEXT(
6886 VkInstance instance,
6887 VkDebugReportCallbackEXT callback,
6888 const VkAllocationCallbacks* pAllocator) {
6889}
6890
6891@extension("VK_EXT_debug_report") // 12
6892cmd void vkDebugReportMessageEXT(
6893 VkInstance instance,
6894 VkDebugReportFlagsEXT flags,
6895 VkDebugReportObjectTypeEXT objectType,
6896 u64 object,
6897 platform.size_t location,
6898 s32 messageCode,
6899 const char* pLayerPrefix,
6900 const char* pMessage) {
6901}
6902
6903@extension("VK_EXT_debug_marker") // 23
6904cmd VkResult vkDebugMarkerSetObjectTagEXT(
6905 VkDevice device,
6906 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6907 return ?
6908}
6909
6910@extension("VK_EXT_debug_marker") // 23
6911cmd VkResult vkDebugMarkerSetObjectNameEXT(
6912 VkDevice device,
6913 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6914 return ?
6915}
6916
6917@extension("VK_EXT_debug_marker") // 23
6918cmd void vkCmdDebugMarkerBeginEXT(
6919 VkCommandBuffer commandBuffer,
6920 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6921}
6922
6923@extension("VK_EXT_debug_marker") // 23
6924cmd void vkCmdDebugMarkerEndEXT(
6925 VkCommandBuffer commandBuffer) {
6926}
6927
6928@extension("VK_EXT_debug_marker") // 23
6929cmd void vkCmdDebugMarkerInsertEXT(
6930 VkCommandBuffer commandBuffer,
6931 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6932}
6933
6934@extension("VK_AMD_draw_indirect_count") // 34
6935cmd void vkCmdDrawIndirectCountAMD(
6936 VkCommandBuffer commandBuffer,
6937 VkBuffer buffer,
6938 VkDeviceSize offset,
6939 VkBuffer countBuffer,
6940 VkDeviceSize countBufferOffset,
6941 u32 maxDrawCount,
6942 u32 stride) {
6943}
6944
6945@extension("VK_AMD_draw_indirect_count") // 34
6946cmd void vkCmdDrawIndexedIndirectCountAMD(
6947 VkCommandBuffer commandBuffer,
6948 VkBuffer buffer,
6949 VkDeviceSize offset,
6950 VkBuffer countBuffer,
6951 VkDeviceSize countBufferOffset,
6952 u32 maxDrawCount,
6953 u32 stride) {
6954}
6955
6956@extension("VK_NV_external_memory_capabilities") // 56
6957cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6958 VkPhysicalDevice physicalDevice,
6959 VkFormat format,
6960 VkImageType type,
6961 VkImageTiling tiling,
6962 VkImageUsageFlags usage,
6963 VkImageCreateFlags flags,
6964 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6965 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6966 return ?
6967}
6968
6969@extension("VK_NV_external_memory_win32") // 58
6970cmd VkResult vkGetMemoryWin32HandleNV(
6971 VkDevice device,
6972 VkDeviceMemory memory,
6973 VkExternalMemoryHandleTypeFlagsNV handleType,
6974 platform.HANDLE* pHandle) {
6975 return ?
6976}
6977
6978@extension("VK_KHR_get_physical_device_properties2") // 60
6979cmd void vkGetPhysicalDeviceFeatures2KHR(
6980 VkPhysicalDevice physicalDevice,
6981 VkPhysicalDeviceFeatures2KHR* pFeatures) {
6982}
6983
6984@extension("VK_KHR_get_physical_device_properties2") // 60
6985cmd void vkGetPhysicalDeviceProperties2KHR(
6986 VkPhysicalDevice physicalDevice,
6987 VkPhysicalDeviceProperties2KHR* pProperties) {
6988}
6989
6990@extension("VK_KHR_get_physical_device_properties2") // 60
6991cmd void vkGetPhysicalDeviceFormatProperties2KHR(
6992 VkPhysicalDevice physicalDevice,
6993 VkFormat format,
6994 VkFormatProperties2KHR* pFormatProperties) {
6995}
6996
6997@extension("VK_KHR_get_physical_device_properties2") // 60
6998cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
6999 VkPhysicalDevice physicalDevice,
7000 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
7001 VkImageFormatProperties2KHR* pImageFormatProperties) {
7002 return ?
7003}
7004
7005@extension("VK_KHR_get_physical_device_properties2") // 60
7006cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
7007 VkPhysicalDevice physicalDevice,
7008 u32* pQueueFamilyPropertyCount,
7009 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
7010}
7011
7012@extension("VK_KHR_get_physical_device_properties2") // 60
7013cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
7014 VkPhysicalDevice physicalDevice,
7015 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
7016}
7017
7018@extension("VK_KHR_get_physical_device_properties2") // 60
7019cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
7020 VkPhysicalDevice physicalDevice,
7021 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
7022 u32* pPropertyCount,
7023 VkSparseImageFormatProperties2KHR* pProperties) {
7024}
7025
7026@extension("VK_KHX_device_group") // 61
7027cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
7028 VkDevice device,
7029 u32 heapIndex,
7030 u32 localDeviceIndex,
7031 u32 remoteDeviceIndex,
7032 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
7033}
7034
7035@extension("VK_KHX_device_group") // 61
7036cmd VkResult vkBindBufferMemory2KHX(
7037 VkDevice device,
7038 u32 bindInfoCount,
7039 const VkBindBufferMemoryInfoKHX* pBindInfos) {
7040 return ?
7041}
7042
7043@extension("VK_KHX_device_group") // 61
7044cmd VkResult vkBindImageMemory2KHX(
7045 VkDevice device,
7046 u32 bindInfoCount,
7047 const VkBindImageMemoryInfoKHX* pBindInfos) {
7048 return ?
7049}
7050
7051@extension("VK_KHX_device_group") // 61
7052cmd void vkCmdSetDeviceMaskKHX(
7053 VkCommandBuffer commandBuffer,
7054 u32 deviceMask) {
7055}
7056
7057@extension("VK_KHX_device_group") // 61
7058cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
7059 VkDevice device,
7060 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
7061 return ?
7062}
7063
7064@extension("VK_KHX_device_group") // 61
7065cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
7066 VkDevice device,
7067 VkSurfaceKHR surface,
7068 VkDeviceGroupPresentModeFlagsKHX* pModes) {
7069 return ?
7070}
7071
7072@extension("VK_KHX_device_group") // 61
7073cmd VkResult vkAcquireNextImage2KHX(
7074 VkDevice device,
7075 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7076 u32* pImageIndex) {
7077 return ?
7078}
7079
7080@extension("VK_KHX_device_group") // 61
7081cmd void vkCmdDispatchBaseKHX(
7082 VkCommandBuffer commandBuffer,
7083 u32 baseGroupX,
7084 u32 baseGroupY,
7085 u32 baseGroupZ,
7086 u32 groupCountX,
7087 u32 groupCountY,
7088 u32 groupCountZ) {
7089}
7090
7091@extension("VK_KHX_device_group") // 61
7092cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7093 VkPhysicalDevice physicalDevice,
7094 VkSurfaceKHR surface,
7095 u32* pRectCount,
7096 VkRect2D* pRects) {
7097 return ?
7098}
7099
7100@extension("VK_NN_vi_surface") // 63
7101cmd VkResult vkCreateViSurfaceNN(
7102 VkInstance instance,
7103 const VkViSurfaceCreateInfoNN* pCreateInfo,
7104 const VkAllocationCallbacks* pAllocator,
7105 VkSurfaceKHR* pSurface) {
7106 return ?
7107}
7108
7109@extension("VK_KHR_maintenance1") // 70
7110cmd void vkTrimCommandPoolKHR(
7111 VkDevice device,
7112 VkCommandPool commandPool,
7113 VkCommandPoolTrimFlagsKHR flags) {
7114}
7115
7116@extension("VK_KHX_device_group_creation") // 71
7117cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7118 VkInstance instance,
7119 u32* pPhysicalDeviceGroupCount,
7120 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7121 return ?
7122}
7123
7124@extension("VK_KHX_external_memory_capabilities") // 72
7125cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7126 VkPhysicalDevice physicalDevice,
7127 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7128 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7129}
7130
7131@extension("VK_KHX_external_memory_capabilities") // 72
7132cmd void vkGetPhysicalDeviceProperties2KHX(
7133 VkPhysicalDevice physicalDevice,
7134 VkPhysicalDeviceProperties2KHX* pProperties) {
7135}
7136
7137@extension("VK_KHX_external_memory_capabilities") // 72
7138cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHX(
7139 VkPhysicalDevice physicalDevice,
7140 const VkPhysicalDeviceImageFormatInfo2KHX* pImageFormatInfo,
7141 VkImageFormatProperties2KHX* pImageFormatProperties) {
7142 return ?
7143}
7144
7145@extension("VK_KHX_external_memory_win32") // 74
7146cmd VkResult vkGetMemoryWin32HandleKHX(
7147 VkDevice device,
7148 VkDeviceMemory memory,
7149 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7150 platform.HANDLE* pHandle) {
7151 return ?
7152}
7153
7154@extension("VK_KHX_external_memory_win32") // 74
7155cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7156 VkDevice device,
7157 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7158 platform.HANDLE handle,
7159 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7160 return ?
7161}
7162
7163@extension("VK_KHX_external_memory_fd") // 75
7164cmd VkResult vkGetMemoryFdKHX(
7165 VkDevice device,
7166 VkDeviceMemory memory,
7167 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7168 s32* pFd) {
7169 return ?
7170}
7171
7172@extension("VK_KHX_external_memory_fd") // 75
7173cmd VkResult vkGetMemoryFdPropertiesKHX(
7174 VkDevice device,
7175 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7176 s32 fd,
7177 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7178 return ?
7179}
7180
7181@extension("VK_KHX_external_semaphore_capabilities") // 77
7182cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7183 VkPhysicalDevice physicalDevice,
7184 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7185 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7186}
7187
7188@extension("VK_KHX_external_semaphore_win32") // 79
7189cmd VkResult vkImportSemaphoreWin32HandleKHX(
7190 VkDevice device,
7191 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7192 return ?
7193}
7194
7195@extension("VK_KHX_external_semaphore_win32") // 79
7196cmd VkResult vkGetSemaphoreWin32HandleKHX(
7197 VkDevice device,
7198 VkSemaphore semaphore,
7199 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7200 platform.HANDLE* pHandle) {
7201 return ?
7202}
7203
7204@extension("VK_KHX_external_semaphore_fd") // 80
7205cmd VkResult vkImportSemaphoreFdKHX(
7206 VkDevice device,
7207 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7208 return ?
7209}
7210
7211@extension("VK_KHX_external_semaphore_fd") // 80
7212cmd VkResult vkGetSemaphoreFdKHX(
7213 VkDevice device,
7214 VkSemaphore semaphore,
7215 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7216 s32* pFd) {
7217 return ?
7218}
7219
7220@extension("VK_KHR_push_descriptor") // 81
7221cmd void vkCmdPushDescriptorSetKHR(
7222 VkCommandBuffer commandBuffer,
7223 VkPipelineBindPoint pipelineBindPoint,
7224 VkPipelineLayout layout,
7225 u32 set,
7226 u32 descriptorWriteCount,
7227 const VkWriteDescriptorSet* pDescriptorWrites) {
7228}
7229
7230@extension("VK_KHR_descriptor_update_template") // 86
7231cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7232 VkDevice device,
7233 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7234 const VkAllocationCallbacks* pAllocator,
7235 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7236 return ?
7237}
7238
7239@extension("VK_KHR_descriptor_update_template") // 86
7240cmd void vkDestroyDescriptorUpdateTemplateKHR(
7241 VkDevice device,
7242 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7243 const VkAllocationCallbacks* pAllocator) {
7244}
7245
7246@extension("VK_KHR_descriptor_update_template") // 86
7247cmd void vkUpdateDescriptorSetWithTemplateKHR(
7248 VkDevice device,
7249 VkDescriptorSet descriptorSet,
7250 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7251 const void* pData) {
7252}
7253
7254@extension("VK_KHR_descriptor_update_template") // 86
7255cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7256 VkCommandBuffer commandBuffer,
7257 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7258 VkPipelineLayout layout,
7259 u32 set,
7260 const void* pData) {
7261}
7262
7263@extension("VK_NVX_device_generated_commands") // 87
7264cmd void vkCmdProcessCommandsNVX(
7265 VkCommandBuffer commandBuffer,
7266 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7267}
7268
7269@extension("VK_NVX_device_generated_commands") // 87
7270cmd void vkCmdReserveSpaceForCommandsNVX(
7271 VkCommandBuffer commandBuffer,
7272 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7273}
7274
7275@extension("VK_NVX_device_generated_commands") // 87
7276cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7277 VkDevice device,
7278 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7279 const VkAllocationCallbacks* pAllocator,
7280 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7281 return ?
7282}
7283
7284@extension("VK_NVX_device_generated_commands") // 87
7285cmd void vkDestroyIndirectCommandsLayoutNVX(
7286 VkDevice device,
7287 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7288 const VkAllocationCallbacks* pAllocator) {
7289}
7290
7291@extension("VK_NVX_device_generated_commands") // 87
7292cmd VkResult vkCreateObjectTableNVX(
7293 VkDevice device,
7294 const VkObjectTableCreateInfoNVX* pCreateInfo,
7295 const VkAllocationCallbacks* pAllocator,
7296 VkObjectTableNVX* pObjectTable) {
7297 return ?
7298}
7299
7300@extension("VK_NVX_device_generated_commands") // 87
7301cmd void vkDestroyObjectTableNVX(
7302 VkDevice device,
7303 VkObjectTableNVX objectTable,
7304 const VkAllocationCallbacks* pAllocator) {
7305}
7306
7307@extension("VK_NVX_device_generated_commands") // 87
7308cmd VkResult vkRegisterObjectsNVX(
7309 VkDevice device,
7310 VkObjectTableNVX objectTable,
7311 u32 objectCount,
7312 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7313 const u32* pObjectIndices) {
7314 return ?
7315}
7316
7317@extension("VK_NVX_device_generated_commands") // 87
7318cmd VkResult vkUnregisterObjectsNVX(
7319 VkDevice device,
7320 VkObjectTableNVX objectTable,
7321 u32 objectCount,
7322 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7323 const u32* pObjectIndices) {
7324 return ?
7325}
7326
7327@extension("VK_NVX_device_generated_commands") // 87
7328cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7329 VkPhysicalDevice physicalDevice,
7330 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7331 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7332}
7333
7334@extension("VK_NV_clip_space_w_scaling") // 88
7335cmd void vkCmdSetViewportWScalingNV(
7336 VkCommandBuffer commandBuffer,
7337 u32 firstViewport,
7338 u32 viewportCount,
7339 const VkViewportWScalingNV* pViewportWScalings) {
7340}
7341
7342@extension("VK_EXT_direct_mode_display") // 89
7343cmd VkResult vkReleaseDisplayEXT(
7344 VkPhysicalDevice physicalDevice,
7345 VkDisplayKHR display) {
7346 return ?
7347}
7348
7349@extension("VK_EXT_acquire_xlib_display") // 90
7350cmd VkResult vkAcquireXlibDisplayEXT(
7351 VkPhysicalDevice physicalDevice,
7352 platform.Display* dpy,
7353 VkDisplayKHR display) {
7354 return ?
7355}
7356
7357@extension("VK_EXT_acquire_xlib_display") // 90
7358cmd VkResult vkGetRandROutputDisplayEXT(
7359 VkPhysicalDevice physicalDevice,
7360 platform.Display* dpy,
7361 platform.RROutput rrOutput,
7362 VkDisplayKHR* pDisplay) {
7363 return ?
7364}
7365
7366@extension("VK_EXT_display_surface_counter") // 91
7367cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7368 VkPhysicalDevice physicalDevice,
7369 VkSurfaceKHR surface,
7370 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7371 return ?
7372}
7373
7374@extension("VK_EXT_display_control") // 92
7375cmd VkResult vkDisplayPowerControlEXT(
7376 VkDevice device,
7377 VkDisplayKHR display,
7378 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7379 return ?
7380}
7381
7382@extension("VK_EXT_display_control") // 92
7383cmd VkResult vkRegisterDeviceEventEXT(
7384 VkDevice device,
7385 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7386 const VkAllocationCallbacks* pAllocator,
7387 VkFence* pFence) {
7388 return ?
7389}
7390
7391@extension("VK_EXT_display_control") // 92
7392cmd VkResult vkRegisterDisplayEventEXT(
7393 VkDevice device,
7394 VkDisplayKHR display,
7395 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7396 const VkAllocationCallbacks* pAllocator,
7397 VkFence* pFence) {
7398 return ?
7399}
7400
7401@extension("VK_EXT_display_control") // 92
7402cmd VkResult vkGetSwapchainCounterEXT(
7403 VkDevice device,
7404 VkSwapchainKHR swapchain,
7405 VkSurfaceCounterFlagBitsEXT counter,
7406 u64* pCounterValue) {
7407 return ?
7408}
7409
7410@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007411cmd VkResult vkGetRefreshCycleDurationGOOGLE(
7412 VkDevice device,
7413 VkSwapchainKHR swapchain,
7414 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
7415 deviceObject := GetDevice(device)
7416 swapchainObject := GetSwapchain(swapchain)
7417
7418 displayTimingProperties := ?
7419 pDisplayTimingProperties[0] = displayTimingProperties
7420
7421 return ?
7422}
7423
Jesse Hallad250842017-03-10 18:35:38 -08007424@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007425cmd VkResult vkGetPastPresentationTimingGOOGLE(
7426 VkDevice device,
7427 VkSwapchainKHR swapchain,
7428 u32* pPresentationTimingCount,
7429 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07007430 return ?
7431}
7432
Jesse Hallad250842017-03-10 18:35:38 -08007433@extension("VK_EXT_discard_rectangles") // 100
7434cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07007435 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007436 u32 firstDiscardRectangle,
7437 u32 discardRectangleCount,
7438 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07007439}
7440
Jesse Hallad250842017-03-10 18:35:38 -08007441@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08007442cmd void vkSetHdrMetadataEXT(
7443 VkDevice device,
7444 u32 swapchainCount,
7445 const VkSwapchainKHR* pSwapchains,
7446 const VkHdrMetadataEXT* pMetadata) {
7447}
7448
Jesse Hallad250842017-03-10 18:35:38 -08007449@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13007450cmd VkResult vkGetSwapchainStatusKHR(
7451 VkDevice device,
7452 VkSwapchainKHR swapchain) {
7453 return ?
7454}
7455
Jesse Hallad250842017-03-10 18:35:38 -08007456@extension("VK_MVK_ios_surface") // 123
7457cmd VkResult vkCreateIOSSurfaceMVK(
7458 VkInstance instance,
7459 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7460 const VkAllocationCallbacks* pAllocator,
7461 VkSurfaceKHR* pSurface) {
7462 return ?
7463}
7464
7465@extension("VK_MVK_macos_surface") // 124
7466cmd VkResult vkCreateMacOSSurfaceMVK(
7467 VkInstance instance,
7468 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7469 const VkAllocationCallbacks* pAllocator,
7470 VkSurfaceKHR* pSurface) {
7471 return ?
7472}
7473
Jesse Halld27f6aa2015-08-15 17:58:48 -07007474////////////////
7475// Validation //
7476////////////////
7477
7478extern void validate(string layerName, bool condition, string message)
7479
7480
7481/////////////////////////////
7482// Internal State Tracking //
7483/////////////////////////////
7484
7485StateObject State
7486
7487@internal class StateObject {
7488 // Dispatchable objects.
7489 map!(VkInstance, ref!InstanceObject) Instances
7490 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7491 map!(VkDevice, ref!DeviceObject) Devices
7492 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007493 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007494
7495 // Non-dispatchable objects.
7496 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7497 map!(VkBuffer, ref!BufferObject) Buffers
7498 map!(VkBufferView, ref!BufferViewObject) BufferViews
7499 map!(VkImage, ref!ImageObject) Images
7500 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007501 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007502 map!(VkPipeline, ref!PipelineObject) Pipelines
7503 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7504 map!(VkSampler, ref!SamplerObject) Samplers
7505 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7506 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7507 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007508 map!(VkFence, ref!FenceObject) Fences
7509 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7510 map!(VkEvent, ref!EventObject) Events
7511 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7512 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7513 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7514 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007515 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007516 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007517 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007518}
7519
7520@internal class InstanceObject {
7521}
7522
7523@internal class PhysicalDeviceObject {
7524 VkInstance instance
7525}
7526
7527@internal class DeviceObject {
7528 VkPhysicalDevice physicalDevice
7529}
7530
7531@internal class QueueObject {
7532 VkDevice device
7533 VkQueueFlags flags
7534}
7535
Jesse Hall3fbc8562015-11-29 22:10:52 -08007536@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007537 VkDevice device
7538 map!(u64, VkDeviceMemory) boundObjects
7539 VkQueueFlags queueFlags
7540}
7541
7542@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007543 VkDevice device
7544 VkDeviceSize allocationSize
7545 map!(u64, VkDeviceSize) boundObjects
7546 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007547}
7548
7549@internal class BufferObject {
7550 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007551 VkDeviceMemory memory
7552 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007553}
7554
7555@internal class BufferViewObject {
7556 VkDevice device
7557 VkBuffer buffer
7558}
7559
7560@internal class ImageObject {
7561 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007562 VkDeviceMemory memory
7563 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007564}
7565
7566@internal class ImageViewObject {
7567 VkDevice device
7568 VkImage image
7569}
7570
Jesse Halld27f6aa2015-08-15 17:58:48 -07007571@internal class ShaderObject {
7572 VkDevice device
7573}
7574
7575@internal class ShaderModuleObject {
7576 VkDevice device
7577}
7578
7579@internal class PipelineObject {
7580 VkDevice device
7581}
7582
7583@internal class PipelineLayoutObject {
7584 VkDevice device
7585}
7586
7587@internal class SamplerObject {
7588 VkDevice device
7589}
7590
7591@internal class DescriptorSetObject {
7592 VkDevice device
7593}
7594
7595@internal class DescriptorSetLayoutObject {
7596 VkDevice device
7597}
7598
7599@internal class DescriptorPoolObject {
7600 VkDevice device
7601}
7602
Jesse Halld27f6aa2015-08-15 17:58:48 -07007603@internal class FenceObject {
7604 VkDevice device
7605 bool signaled
7606}
7607
7608@internal class SemaphoreObject {
7609 VkDevice device
7610}
7611
7612@internal class EventObject {
7613 VkDevice device
7614}
7615
7616@internal class QueryPoolObject {
7617 VkDevice device
7618}
7619
7620@internal class FramebufferObject {
7621 VkDevice device
7622}
7623
7624@internal class RenderPassObject {
7625 VkDevice device
7626}
7627
7628@internal class PipelineCacheObject {
7629 VkDevice device
7630}
7631
Jesse Hall3fbc8562015-11-29 22:10:52 -08007632@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007633 VkDevice device
7634}
7635
Jesse Hall1356b0d2015-11-23 17:24:58 -08007636@internal class SurfaceObject {
7637 VkInstance instance
7638}
7639
Michael Lentine88594d72015-11-12 12:49:45 -08007640@internal class SwapchainObject {
7641 VkDevice device
7642}
7643
Jesse Halld27f6aa2015-08-15 17:58:48 -07007644macro ref!InstanceObject GetInstance(VkInstance instance) {
7645 assert(instance in State.Instances)
7646 return State.Instances[instance]
7647}
7648
7649macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7650 assert(physicalDevice in State.PhysicalDevices)
7651 return State.PhysicalDevices[physicalDevice]
7652}
7653
7654macro ref!DeviceObject GetDevice(VkDevice device) {
7655 assert(device in State.Devices)
7656 return State.Devices[device]
7657}
7658
7659macro ref!QueueObject GetQueue(VkQueue queue) {
7660 assert(queue in State.Queues)
7661 return State.Queues[queue]
7662}
7663
Jesse Hall3fbc8562015-11-29 22:10:52 -08007664macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7665 assert(commandBuffer in State.CommandBuffers)
7666 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007667}
7668
Jesse Hall3fbc8562015-11-29 22:10:52 -08007669macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7670 assert(memory in State.DeviceMemories)
7671 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007672}
7673
7674macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7675 assert(buffer in State.Buffers)
7676 return State.Buffers[buffer]
7677}
7678
7679macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7680 assert(bufferView in State.BufferViews)
7681 return State.BufferViews[bufferView]
7682}
7683
7684macro ref!ImageObject GetImage(VkImage image) {
7685 assert(image in State.Images)
7686 return State.Images[image]
7687}
7688
7689macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7690 assert(imageView in State.ImageViews)
7691 return State.ImageViews[imageView]
7692}
7693
Jesse Halld27f6aa2015-08-15 17:58:48 -07007694macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7695 assert(shaderModule in State.ShaderModules)
7696 return State.ShaderModules[shaderModule]
7697}
7698
7699macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7700 assert(pipeline in State.Pipelines)
7701 return State.Pipelines[pipeline]
7702}
7703
7704macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7705 assert(pipelineLayout in State.PipelineLayouts)
7706 return State.PipelineLayouts[pipelineLayout]
7707}
7708
7709macro ref!SamplerObject GetSampler(VkSampler sampler) {
7710 assert(sampler in State.Samplers)
7711 return State.Samplers[sampler]
7712}
7713
7714macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7715 assert(descriptorSet in State.DescriptorSets)
7716 return State.DescriptorSets[descriptorSet]
7717}
7718
7719macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7720 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7721 return State.DescriptorSetLayouts[descriptorSetLayout]
7722}
7723
7724macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7725 assert(descriptorPool in State.DescriptorPools)
7726 return State.DescriptorPools[descriptorPool]
7727}
7728
Jesse Halld27f6aa2015-08-15 17:58:48 -07007729macro ref!FenceObject GetFence(VkFence fence) {
7730 assert(fence in State.Fences)
7731 return State.Fences[fence]
7732}
7733
7734macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7735 assert(semaphore in State.Semaphores)
7736 return State.Semaphores[semaphore]
7737}
7738
7739macro ref!EventObject GetEvent(VkEvent event) {
7740 assert(event in State.Events)
7741 return State.Events[event]
7742}
7743
7744macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7745 assert(queryPool in State.QueryPools)
7746 return State.QueryPools[queryPool]
7747}
7748
7749macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7750 assert(framebuffer in State.Framebuffers)
7751 return State.Framebuffers[framebuffer]
7752}
7753
7754macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7755 assert(renderPass in State.RenderPasses)
7756 return State.RenderPasses[renderPass]
7757}
7758
7759macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7760 assert(pipelineCache in State.PipelineCaches)
7761 return State.PipelineCaches[pipelineCache]
7762}
7763
Jesse Hall3fbc8562015-11-29 22:10:52 -08007764macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7765 assert(commandPool in State.CommandPools)
7766 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007767}
Michael Lentine88594d72015-11-12 12:49:45 -08007768
Jesse Hall1356b0d2015-11-23 17:24:58 -08007769macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7770 assert(surface in State.Surfaces)
7771 return State.Surfaces[surface]
7772}
7773
Michael Lentine88594d72015-11-12 12:49:45 -08007774macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7775 assert(swapchain in State.Swapchains)
7776 return State.Swapchains[swapchain]
7777}
Jesse Halld8bade02015-11-24 10:24:18 -08007778
7779macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7780 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7781}