blob: 77bdd47739aee3decd55da538dc8da0630f596fb [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 Halld0599582017-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 Halld0599582017-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
Chia-I Wub262ddc2016-03-22 07:38:20 +080092@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 5
93@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 Hall99431972017-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 Hall3f5499b2016-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 Hall3f5499b2016-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 Hall99431972017-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 Hall3f5499b2016-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 Hall3f5499b2016-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
136@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
139// 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 Halld0599582017-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
160@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
163// 57
164@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
167// 58
168@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
171// 59
172@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 Hall08e2f482017-03-06 15:22:17 -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 Halld0599582017-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
184@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 Hall08e2f482017-03-06 15:22:17 -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 Halld0599582017-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
251// 86
252@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
253@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
254
Jesse Halleb02c472017-02-24 15:13:45 -0800255// 87
256@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
257@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
258
Jesse Halld0599582017-03-10 18:35:38 -0800259// 88
260@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
261@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
262
Jesse Hall08e2f482017-03-06 15:22:17 -0800263// 89
264@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
265@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
266
267// 90
268@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
269@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
270
271// 91
272@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
273@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
274
275// 92
276@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
277@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
278
Jesse Halld0599582017-03-10 18:35:38 -0800279// 95
280@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
281@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
282
283// 96
284@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
285@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
286
287// 97
288@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
289@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
290
291// 98
292@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
293@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
294
295// 99
296@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
297@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
298
299// 100
300@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
301@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
302
303// 123
304@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
305@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
306
307// 124
308@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
309@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
310
Jesse Halld27f6aa2015-08-15 17:58:48 -0700311/////////////
312// Types //
313/////////////
314
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700315type u32 VkBool32
316type u32 VkFlags
317type u64 VkDeviceSize
318type u32 VkSampleMask
319
Jesse Halld27f6aa2015-08-15 17:58:48 -0700320/// Dispatchable handle types.
321@dispatchHandle type u64 VkInstance
322@dispatchHandle type u64 VkPhysicalDevice
323@dispatchHandle type u64 VkDevice
324@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800325@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700326
327/// Non dispatchable handle types.
328@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800329@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700330@nonDispatchHandle type u64 VkBuffer
331@nonDispatchHandle type u64 VkBufferView
332@nonDispatchHandle type u64 VkImage
333@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700334@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700335@nonDispatchHandle type u64 VkPipeline
336@nonDispatchHandle type u64 VkPipelineLayout
337@nonDispatchHandle type u64 VkSampler
338@nonDispatchHandle type u64 VkDescriptorSet
339@nonDispatchHandle type u64 VkDescriptorSetLayout
340@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700341@nonDispatchHandle type u64 VkFence
342@nonDispatchHandle type u64 VkSemaphore
343@nonDispatchHandle type u64 VkEvent
344@nonDispatchHandle type u64 VkQueryPool
345@nonDispatchHandle type u64 VkFramebuffer
346@nonDispatchHandle type u64 VkRenderPass
347@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800348
Jesse Halld0599582017-03-10 18:35:38 -0800349// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800350@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800351
Jesse Halld0599582017-03-10 18:35:38 -0800352// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800353@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800354
Jesse Halld0599582017-03-10 18:35:38 -0800355// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800356@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
357@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700358
Jesse Halld0599582017-03-10 18:35:38 -0800359// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800360@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
361
Jesse Halld0599582017-03-10 18:35:38 -0800362// 86
363@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
364
365// 87
Jesse Halleb02c472017-02-24 15:13:45 -0800366@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
367@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
368
Jesse Halld27f6aa2015-08-15 17:58:48 -0700369
370/////////////
371// Enums //
372/////////////
373
374enum VkImageLayout {
375 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
376 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
377 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
378 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
379 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
380 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 -0800381 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
382 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 -0700383 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800384
Jesse Halld0599582017-03-10 18:35:38 -0800385 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800386 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700387}
388
389enum VkAttachmentLoadOp {
390 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
391 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
392 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
393}
394
395enum VkAttachmentStoreOp {
396 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
397 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
398}
399
400enum VkImageType {
401 VK_IMAGE_TYPE_1D = 0x00000000,
402 VK_IMAGE_TYPE_2D = 0x00000001,
403 VK_IMAGE_TYPE_3D = 0x00000002,
404}
405
406enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800407 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
408 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700409}
410
411enum VkImageViewType {
412 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
413 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
414 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
415 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
416 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
417 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
418 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
419}
420
Jesse Hall3fbc8562015-11-29 22:10:52 -0800421enum VkCommandBufferLevel {
422 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
423 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700424}
425
Jesse Hall65ab5522015-11-30 00:07:16 -0800426enum VkComponentSwizzle {
427 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
428 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
429 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
430 VK_COMPONENT_SWIZZLE_R = 0x00000003,
431 VK_COMPONENT_SWIZZLE_G = 0x00000004,
432 VK_COMPONENT_SWIZZLE_B = 0x00000005,
433 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700434}
435
436enum VkDescriptorType {
437 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
438 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
439 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
440 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
441 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
442 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
443 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
444 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
445 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
446 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
447 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
448}
449
Jesse Halld27f6aa2015-08-15 17:58:48 -0700450enum VkQueryType {
451 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
452 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800453 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700454}
455
Jesse Halld27f6aa2015-08-15 17:58:48 -0700456enum VkBorderColor {
457 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
458 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
459 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
460 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
461 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
462 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
463}
464
465enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800466 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
467 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700468}
469
470enum VkPrimitiveTopology {
471 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
472 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
473 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
474 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
475 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
476 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800477 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
478 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
479 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
480 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800481 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700482}
483
484enum VkSharingMode {
485 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
486 VK_SHARING_MODE_CONCURRENT = 0x00000001,
487}
488
489enum VkIndexType {
490 VK_INDEX_TYPE_UINT16 = 0x00000000,
491 VK_INDEX_TYPE_UINT32 = 0x00000001,
492}
493
Jesse Hall23ff73f2015-11-29 14:36:39 -0800494enum VkFilter {
495 VK_FILTER_NEAREST = 0x00000000,
496 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700497
Jesse Halld0599582017-03-10 18:35:38 -0800498 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700499 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700500}
501
Jesse Hall23ff73f2015-11-29 14:36:39 -0800502enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800503 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
504 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700505}
506
Jesse Hall23ff73f2015-11-29 14:36:39 -0800507enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800508 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
509 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
510 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
511 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
512 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700513}
514
515enum VkCompareOp {
516 VK_COMPARE_OP_NEVER = 0x00000000,
517 VK_COMPARE_OP_LESS = 0x00000001,
518 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800519 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700520 VK_COMPARE_OP_GREATER = 0x00000004,
521 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800522 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700523 VK_COMPARE_OP_ALWAYS = 0x00000007,
524}
525
Jesse Hall65ab5522015-11-30 00:07:16 -0800526enum VkPolygonMode {
527 VK_POLYGON_MODE_FILL = 0x00000000,
528 VK_POLYGON_MODE_LINE = 0x00000001,
529 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700530}
531
532enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800533 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
534 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700535}
536
Jesse Hall65ab5522015-11-30 00:07:16 -0800537enum VkBlendFactor {
538 VK_BLEND_FACTOR_ZERO = 0x00000000,
539 VK_BLEND_FACTOR_ONE = 0x00000001,
540 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
541 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
542 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
543 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
544 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
545 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
546 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
547 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
548 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
549 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
550 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
551 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
552 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
553 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
554 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
555 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
556 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700557}
558
559enum VkBlendOp {
560 VK_BLEND_OP_ADD = 0x00000000,
561 VK_BLEND_OP_SUBTRACT = 0x00000001,
562 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
563 VK_BLEND_OP_MIN = 0x00000003,
564 VK_BLEND_OP_MAX = 0x00000004,
565}
566
567enum VkStencilOp {
568 VK_STENCIL_OP_KEEP = 0x00000000,
569 VK_STENCIL_OP_ZERO = 0x00000001,
570 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800571 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
572 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700573 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800574 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
575 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700576}
577
578enum VkLogicOp {
579 VK_LOGIC_OP_CLEAR = 0x00000000,
580 VK_LOGIC_OP_AND = 0x00000001,
581 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
582 VK_LOGIC_OP_COPY = 0x00000003,
583 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800584 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700585 VK_LOGIC_OP_XOR = 0x00000006,
586 VK_LOGIC_OP_OR = 0x00000007,
587 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800588 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700589 VK_LOGIC_OP_INVERT = 0x0000000a,
590 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
591 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
592 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
593 VK_LOGIC_OP_NAND = 0x0000000e,
594 VK_LOGIC_OP_SET = 0x0000000f,
595}
596
Jesse Hall3fbc8562015-11-29 22:10:52 -0800597enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800598 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800599 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
600 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
601 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
602 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800603}
604
Jesse Hall3fbc8562015-11-29 22:10:52 -0800605enum VkInternalAllocationType {
606 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700607}
608
609enum VkPhysicalDeviceType {
610 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
611 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
612 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
613 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
614 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
615}
616
Jesse Hall65ab5522015-11-30 00:07:16 -0800617enum VkVertexInputRate {
618 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
619 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700620}
621
622/// Vulkan format definitions
623enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800624 VK_FORMAT_UNDEFINED = 0,
625 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
626 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
627 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
628 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
629 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
630 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
631 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
632 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
633 VK_FORMAT_R8_UNORM = 9,
634 VK_FORMAT_R8_SNORM = 10,
635 VK_FORMAT_R8_USCALED = 11,
636 VK_FORMAT_R8_SSCALED = 12,
637 VK_FORMAT_R8_UINT = 13,
638 VK_FORMAT_R8_SINT = 14,
639 VK_FORMAT_R8_SRGB = 15,
640 VK_FORMAT_R8G8_UNORM = 16,
641 VK_FORMAT_R8G8_SNORM = 17,
642 VK_FORMAT_R8G8_USCALED = 18,
643 VK_FORMAT_R8G8_SSCALED = 19,
644 VK_FORMAT_R8G8_UINT = 20,
645 VK_FORMAT_R8G8_SINT = 21,
646 VK_FORMAT_R8G8_SRGB = 22,
647 VK_FORMAT_R8G8B8_UNORM = 23,
648 VK_FORMAT_R8G8B8_SNORM = 24,
649 VK_FORMAT_R8G8B8_USCALED = 25,
650 VK_FORMAT_R8G8B8_SSCALED = 26,
651 VK_FORMAT_R8G8B8_UINT = 27,
652 VK_FORMAT_R8G8B8_SINT = 28,
653 VK_FORMAT_R8G8B8_SRGB = 29,
654 VK_FORMAT_B8G8R8_UNORM = 30,
655 VK_FORMAT_B8G8R8_SNORM = 31,
656 VK_FORMAT_B8G8R8_USCALED = 32,
657 VK_FORMAT_B8G8R8_SSCALED = 33,
658 VK_FORMAT_B8G8R8_UINT = 34,
659 VK_FORMAT_B8G8R8_SINT = 35,
660 VK_FORMAT_B8G8R8_SRGB = 36,
661 VK_FORMAT_R8G8B8A8_UNORM = 37,
662 VK_FORMAT_R8G8B8A8_SNORM = 38,
663 VK_FORMAT_R8G8B8A8_USCALED = 39,
664 VK_FORMAT_R8G8B8A8_SSCALED = 40,
665 VK_FORMAT_R8G8B8A8_UINT = 41,
666 VK_FORMAT_R8G8B8A8_SINT = 42,
667 VK_FORMAT_R8G8B8A8_SRGB = 43,
668 VK_FORMAT_B8G8R8A8_UNORM = 44,
669 VK_FORMAT_B8G8R8A8_SNORM = 45,
670 VK_FORMAT_B8G8R8A8_USCALED = 46,
671 VK_FORMAT_B8G8R8A8_SSCALED = 47,
672 VK_FORMAT_B8G8R8A8_UINT = 48,
673 VK_FORMAT_B8G8R8A8_SINT = 49,
674 VK_FORMAT_B8G8R8A8_SRGB = 50,
675 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
676 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
677 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
678 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
679 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
680 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
681 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
682 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
683 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
684 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
685 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
686 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
687 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
688 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
689 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
690 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
691 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
692 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
693 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
694 VK_FORMAT_R16_UNORM = 70,
695 VK_FORMAT_R16_SNORM = 71,
696 VK_FORMAT_R16_USCALED = 72,
697 VK_FORMAT_R16_SSCALED = 73,
698 VK_FORMAT_R16_UINT = 74,
699 VK_FORMAT_R16_SINT = 75,
700 VK_FORMAT_R16_SFLOAT = 76,
701 VK_FORMAT_R16G16_UNORM = 77,
702 VK_FORMAT_R16G16_SNORM = 78,
703 VK_FORMAT_R16G16_USCALED = 79,
704 VK_FORMAT_R16G16_SSCALED = 80,
705 VK_FORMAT_R16G16_UINT = 81,
706 VK_FORMAT_R16G16_SINT = 82,
707 VK_FORMAT_R16G16_SFLOAT = 83,
708 VK_FORMAT_R16G16B16_UNORM = 84,
709 VK_FORMAT_R16G16B16_SNORM = 85,
710 VK_FORMAT_R16G16B16_USCALED = 86,
711 VK_FORMAT_R16G16B16_SSCALED = 87,
712 VK_FORMAT_R16G16B16_UINT = 88,
713 VK_FORMAT_R16G16B16_SINT = 89,
714 VK_FORMAT_R16G16B16_SFLOAT = 90,
715 VK_FORMAT_R16G16B16A16_UNORM = 91,
716 VK_FORMAT_R16G16B16A16_SNORM = 92,
717 VK_FORMAT_R16G16B16A16_USCALED = 93,
718 VK_FORMAT_R16G16B16A16_SSCALED = 94,
719 VK_FORMAT_R16G16B16A16_UINT = 95,
720 VK_FORMAT_R16G16B16A16_SINT = 96,
721 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
722 VK_FORMAT_R32_UINT = 98,
723 VK_FORMAT_R32_SINT = 99,
724 VK_FORMAT_R32_SFLOAT = 100,
725 VK_FORMAT_R32G32_UINT = 101,
726 VK_FORMAT_R32G32_SINT = 102,
727 VK_FORMAT_R32G32_SFLOAT = 103,
728 VK_FORMAT_R32G32B32_UINT = 104,
729 VK_FORMAT_R32G32B32_SINT = 105,
730 VK_FORMAT_R32G32B32_SFLOAT = 106,
731 VK_FORMAT_R32G32B32A32_UINT = 107,
732 VK_FORMAT_R32G32B32A32_SINT = 108,
733 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
734 VK_FORMAT_R64_UINT = 110,
735 VK_FORMAT_R64_SINT = 111,
736 VK_FORMAT_R64_SFLOAT = 112,
737 VK_FORMAT_R64G64_UINT = 113,
738 VK_FORMAT_R64G64_SINT = 114,
739 VK_FORMAT_R64G64_SFLOAT = 115,
740 VK_FORMAT_R64G64B64_UINT = 116,
741 VK_FORMAT_R64G64B64_SINT = 117,
742 VK_FORMAT_R64G64B64_SFLOAT = 118,
743 VK_FORMAT_R64G64B64A64_UINT = 119,
744 VK_FORMAT_R64G64B64A64_SINT = 120,
745 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
746 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
747 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
748 VK_FORMAT_D16_UNORM = 124,
749 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
750 VK_FORMAT_D32_SFLOAT = 126,
751 VK_FORMAT_S8_UINT = 127,
752 VK_FORMAT_D16_UNORM_S8_UINT = 128,
753 VK_FORMAT_D24_UNORM_S8_UINT = 129,
754 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
755 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
756 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
757 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
758 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
759 VK_FORMAT_BC2_UNORM_BLOCK = 135,
760 VK_FORMAT_BC2_SRGB_BLOCK = 136,
761 VK_FORMAT_BC3_UNORM_BLOCK = 137,
762 VK_FORMAT_BC3_SRGB_BLOCK = 138,
763 VK_FORMAT_BC4_UNORM_BLOCK = 139,
764 VK_FORMAT_BC4_SNORM_BLOCK = 140,
765 VK_FORMAT_BC5_UNORM_BLOCK = 141,
766 VK_FORMAT_BC5_SNORM_BLOCK = 142,
767 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
768 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
769 VK_FORMAT_BC7_UNORM_BLOCK = 145,
770 VK_FORMAT_BC7_SRGB_BLOCK = 146,
771 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
772 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
773 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
774 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
775 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
776 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
777 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
778 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
779 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
780 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
781 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
782 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
783 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
784 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
785 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
786 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
787 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
788 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
789 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
790 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
791 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
792 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
793 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
794 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
795 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
796 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
797 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
798 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
799 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
800 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
801 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
802 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
803 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
804 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
805 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
806 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
807 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
808 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Jesse Halleb02c472017-02-24 15:13:45 -0800809
Jesse Halld0599582017-03-10 18:35:38 -0800810 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -0800811 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
812 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
813 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
814 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
815 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
816 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
817 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
818 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700819}
820
Jesse Halld27f6aa2015-08-15 17:58:48 -0700821/// Structure type enumerant
822enum VkStructureType {
823 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -0800824 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
825 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
826 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
827 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800828 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -0800829 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
830 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
831 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
832 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700833 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -0800834 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
835 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
836 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
837 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
838 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
839 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800840 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
841 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
842 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
843 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
844 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
845 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
846 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
847 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
848 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
849 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
850 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
851 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
852 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
853 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
854 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
855 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
856 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800857 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800858 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
859 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
860 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
861 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
862 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800863 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -0800864 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
865 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
866 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
867 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
868 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
869 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
870 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
871 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800872
Jesse Halld0599582017-03-10 18:35:38 -0800873 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800874 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
875 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800876
Jesse Halld0599582017-03-10 18:35:38 -0800877 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -0800878 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
879 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800880
Jesse Halld0599582017-03-10 18:35:38 -0800881 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -0800882 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800883
Jesse Halld0599582017-03-10 18:35:38 -0800884 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800885 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
886
Jesse Halld0599582017-03-10 18:35:38 -0800887 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800888 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
889
Jesse Halld0599582017-03-10 18:35:38 -0800890 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800891 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
892
Jesse Halld0599582017-03-10 18:35:38 -0800893 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800894 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
895
Jesse Halld0599582017-03-10 18:35:38 -0800896 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800897 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
898
Jesse Halld0599582017-03-10 18:35:38 -0800899 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800900 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -0800901
Jesse Halld0599582017-03-10 18:35:38 -0800902 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +0800903 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
904
Jesse Halld0599582017-03-10 18:35:38 -0800905 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -0700906 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
907
Jesse Halld0599582017-03-10 18:35:38 -0800908 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -0700909 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
910
Jesse Halld0599582017-03-10 18:35:38 -0800911 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -0700912 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -0700913 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -0700914 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700915
Jesse Halld0599582017-03-10 18:35:38 -0800916 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -0700917 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700918 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700919 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Jesse Halleb02c472017-02-24 15:13:45 -0800920
Jesse Halld0599582017-03-10 18:35:38 -0800921 //@extension("VK_KHX_multiview") // 54
922 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
923 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
924 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
925
926 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -0800927 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
928 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
929
Jesse Halld0599582017-03-10 18:35:38 -0800930 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -0800931 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
932 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
933
Jesse Halld0599582017-03-10 18:35:38 -0800934 //@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -0800935 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
936
Jesse Halld0599582017-03-10 18:35:38 -0800937 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -0800938 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
939 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
940 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
941 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
942 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
943 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
944 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
945 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
946 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
947
Jesse Halld0599582017-03-10 18:35:38 -0800948 //@extension("VK_KHX_device_group") // 61
949 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
950 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
951 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
952 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
953 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
954 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
955 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
956 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
957 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
958 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
959 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
960 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
961 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
962
963 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -0800964 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
965
Jesse Halld0599582017-03-10 18:35:38 -0800966 //@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -0800967 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
968
Jesse Halld0599582017-03-10 18:35:38 -0800969 //@extension("VK_KHX_device_group_creation") // 71
970 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
971 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
972
973 //@extension("VK_KHX_external_memory_capabilities") // 72
974 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000,
975 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001,
976 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002,
977 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003,
978 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004,
979 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005,
980 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006,
981 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007,
982
983 //@extension("VK_KHX_external_memory") // 73
984 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
985 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
986 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
987
988 //@extension("VK_KHX_external_memory_win32") // 74
989 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
990 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
991 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
992
993 //@extension("VK_KHX_external_memory_fd") // 75
994 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
995 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
996
997 //@extension("VK_KHX_win32_keyed_mutex") // 76
998 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
999
1000 //@extension("VK_KHX_external_semaphore_capabilities") // 77
1001 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
1002 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
1003
1004 //@extension("VK_KHX_external_semaphore") // 78
1005 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
1006
1007 //@extension("VK_KHX_external_semaphore_win32") // 79
1008 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
1009 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
1010 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
1011
1012 //@extension("VK_KHX_external_semaphore_fd") // 80
1013 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
1014
1015 //@extension("VK_KHR_push_descriptor") // 81
1016 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1017
1018 //@extension("VK_KHR_descriptor_update_template") // 86
1019 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1020
1021 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001022 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1023 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1024 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1025 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1026 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1027 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall08e2f482017-03-06 15:22:17 -08001028
Jesse Halld0599582017-03-10 18:35:38 -08001029 //@extension("VK_NV_clip_space_w_scaling") // 88
1030 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1031
1032 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001033 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1034
Jesse Halld0599582017-03-10 18:35:38 -08001035 //@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001036 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1037 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1038 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1039 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Halld0599582017-03-10 18:35:38 -08001040
1041 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1042 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1043
1044 //@extension("VK_NV_viewport_swizzle") // 99
1045 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1046
1047 //@extension("VK_EXT_discard_rectangles") // 100
1048 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1049 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1050
1051 //@extension("VK_MVK_ios_surface") // 123
1052 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1053
1054 //@extension("VK_MVK_macos_surface") // 124
1055 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001056}
1057
Jesse Hall65ab5522015-11-30 00:07:16 -08001058enum VkSubpassContents {
1059 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1060 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001061}
1062
Jesse Hall543a7ff2016-01-08 16:38:30 -08001063enum VkPipelineCacheHeaderVersion {
1064 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1065}
1066
Jesse Hallbd888842015-11-30 21:44:14 -08001067@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001068/// Error and return codes
1069enum VkResult {
1070 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001071 VK_SUCCESS = 0,
1072 VK_NOT_READY = 1,
1073 VK_TIMEOUT = 2,
1074 VK_EVENT_SET = 3,
1075 VK_EVENT_RESET = 4,
1076 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001077
Jesse Halld0599582017-03-10 18:35:38 -08001078 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001079 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001080
Jesse Halld27f6aa2015-08-15 17:58:48 -07001081 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001082 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1083 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1084 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1085 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1086 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1087 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1088 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1089 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1090 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1091 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1092 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall3f5499b2016-07-26 15:20:40 -07001093 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001094
Jesse Halld0599582017-03-10 18:35:38 -08001095 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001096 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Halld0599582017-03-10 18:35:38 -08001097 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001098
Jesse Halld0599582017-03-10 18:35:38 -08001099 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001100 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001101
Jesse Halld0599582017-03-10 18:35:38 -08001102 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001103 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001104
Jesse Halld0599582017-03-10 18:35:38 -08001105 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001106 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001107
Jesse Halld0599582017-03-10 18:35:38 -08001108 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001109 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall08e2f482017-03-06 15:22:17 -08001110
Jesse Halld0599582017-03-10 18:35:38 -08001111 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001112 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Halld0599582017-03-10 18:35:38 -08001113
1114 //@extension("VK_KHX_external_memory") // 73
1115 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001116}
1117
1118enum VkDynamicState {
1119 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1120 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1121 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1122 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1123 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1124 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1125 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1126 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1127 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Halld0599582017-03-10 18:35:38 -08001128
1129 //@extension("VK_NV_clip_space_w_scaling") // 88
1130 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1131
1132 //@extension("VK_EXT_discard_rectangles") // 100
1133 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001134}
1135
Jesse Halld0599582017-03-10 18:35:38 -08001136@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001137enum VkPresentModeKHR {
1138 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1139 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1140 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001141 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Michael Lentine88594d72015-11-12 12:49:45 -08001142}
1143
Jesse Halld0599582017-03-10 18:35:38 -08001144@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001145enum VkColorSpaceKHR {
1146 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
1147}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001148
Jesse Halld0599582017-03-10 18:35:38 -08001149@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001150enum VkDebugReportObjectTypeEXT {
1151 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1152 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1153 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1154 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1155 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1156 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1157 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1158 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1159 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1160 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1161 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1162 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1163 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1164 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1165 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1166 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1167 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1168 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1169 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1170 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1171 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1172 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1173 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1174 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1175 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1176 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1177 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1178 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1179 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Jesse Halleb02c472017-02-24 15:13:45 -08001180 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1181 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1182 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1183 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hall715b86a2016-01-16 16:34:29 -08001184}
1185
Jesse Halld0599582017-03-10 18:35:38 -08001186@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001187enum VkDebugReportErrorEXT {
1188 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1189 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1190}
1191
Jesse Halld0599582017-03-10 18:35:38 -08001192@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001193enum VkRasterizationOrderAMD {
1194 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1195 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1196}
1197
Jesse Halld0599582017-03-10 18:35:38 -08001198@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08001199enum VkValidationCheckEXT {
1200 VK_VALIDATION_CHECK_ALL_EXT = 0,
1201}
1202
Jesse Halld0599582017-03-10 18:35:38 -08001203@extension("VK_KHR_descriptor_update_template") // 86
1204enum VkDescriptorUpdateTemplateTypeKHR {
1205 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1206 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1207}
1208
1209@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001210enum VkIndirectCommandsTokenTypeNVX {
1211 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1212 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1213 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1214 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1215 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1216 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1217 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1218 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
1219}
1220
Jesse Halld0599582017-03-10 18:35:38 -08001221@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001222enum VkObjectEntryTypeNVX {
1223 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1224 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1225 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1226 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1227 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
1228}
Jesse Hall715b86a2016-01-16 16:34:29 -08001229
Jesse Halld0599582017-03-10 18:35:38 -08001230@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001231enum VkDisplayPowerStateEXT {
1232 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1233 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1234 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1235}
1236
Jesse Halld0599582017-03-10 18:35:38 -08001237@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001238enum VkDeviceEventTypeEXT {
1239 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1240}
1241
Jesse Halld0599582017-03-10 18:35:38 -08001242@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001243enum VkDisplayEventTypeEXT {
1244 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1245}
1246
Jesse Halld0599582017-03-10 18:35:38 -08001247@extension("VK_NV_viewport_swizzle") // 99
1248enum VkViewportCoordinateSwizzleNV {
1249 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1250 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1251 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1252 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1253 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1254 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1255 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1256 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1257}
1258
1259@extension("VK_EXT_discard_rectangles") // 100
1260enum VkDiscardRectangleModeEXT {
1261 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1262 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1263}
1264
Jesse Halld27f6aa2015-08-15 17:58:48 -07001265/////////////////
1266// Bitfields //
1267/////////////////
1268
Jesse Halld27f6aa2015-08-15 17:58:48 -07001269/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001270type VkFlags VkQueueFlags
1271bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001272 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1273 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001274 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001275 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001276}
1277
1278/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001279type VkFlags VkMemoryPropertyFlags
1280bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001281 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1282 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1283 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1284 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1285 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001286}
1287
1288/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001289type VkFlags VkMemoryHeapFlags
1290bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001291 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Halld0599582017-03-10 18:35:38 -08001292
1293 //@extension("VK_KHX_device_group_creation") // 71
1294 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001295}
1296
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001297/// Access flags
1298type VkFlags VkAccessFlags
1299bitfield VkAccessFlagBits {
1300 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1301 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1302 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1303 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1304 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1305 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1306 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1307 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1308 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1309 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1310 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1311 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1312 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1313 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1314 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1315 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1316 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Jesse Halleb02c472017-02-24 15:13:45 -08001317
Jesse Halld0599582017-03-10 18:35:38 -08001318 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001319 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
1320 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001321}
1322
1323/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001324type VkFlags VkBufferUsageFlags
1325bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001326 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1327 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001328 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1329 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1330 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1331 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1332 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1333 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1334 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1335}
1336
1337/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001338type VkFlags VkBufferCreateFlags
1339bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001340 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001341 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1342 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1343}
1344
1345/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001346type VkFlags VkShaderStageFlags
1347bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001348 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001349 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1350 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001351 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1352 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1353 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001354 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001355
1356 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1357}
1358
Jesse Hallfbf97b02015-11-20 14:17:03 -08001359/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001360type VkFlags VkDescriptorPoolCreateFlags
1361bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001362 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1363}
1364
1365/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001366type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001367//bitfield VkDescriptorPoolResetFlagBits {
1368//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001369
Jesse Halld27f6aa2015-08-15 17:58:48 -07001370/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001371type VkFlags VkImageUsageFlags
1372bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001373 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1374 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001375 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1376 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1377 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001378 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001379 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1380 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1381}
1382
1383/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001384type VkFlags VkImageCreateFlags
1385bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001386 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001387 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1388 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 -07001389 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1390 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image
Jesse Hall08e2f482017-03-06 15:22:17 -08001391
Jesse Halld0599582017-03-10 18:35:38 -08001392 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001393 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Halld0599582017-03-10 18:35:38 -08001394
1395 //@extension("VK_KHX_device_group") // 61
1396 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001397}
1398
Jesse Hallb00daad2015-11-29 19:46:20 -08001399/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001400type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001401//bitfield VkImageViewCreateFlagBits {
1402//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001403
1404/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001405type VkFlags VkPipelineCreateFlags
1406bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001407 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1408 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1409 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Halld0599582017-03-10 18:35:38 -08001410
1411 //@extension("VK_KHX_device_group") // 61
1412 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1413 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001414}
1415
Jesse Hall65ab5522015-11-30 00:07:16 -08001416/// Color component flags
1417type VkFlags VkColorComponentFlags
1418bitfield VkColorComponentFlagBits {
1419 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1420 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1421 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1422 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001423}
1424
1425/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001426type VkFlags VkFenceCreateFlags
1427bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001428 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1429}
1430
1431/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001432type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001433//bitfield VkSemaphoreCreateFlagBits {
1434//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001435
1436/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001437type VkFlags VkFormatFeatureFlags
1438bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001439 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1440 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1441 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1442 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1443 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1444 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1445 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1446 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1447 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1448 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001449 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1450 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 -08001451 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001452
Jesse Halld0599582017-03-10 18:35:38 -08001453 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001454 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall08e2f482017-03-06 15:22:17 -08001455
Jesse Halld0599582017-03-10 18:35:38 -08001456 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001457 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1458 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001459}
1460
1461/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001462type VkFlags VkQueryControlFlags
1463bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001464 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001465}
1466
1467/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001468type VkFlags VkQueryResultFlags
1469bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001470 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1471 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1472 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1473 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1474}
1475
1476/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001477type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001478//bitfield VkShaderModuleCreateFlagBits {
1479//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001480
Jesse Halld27f6aa2015-08-15 17:58:48 -07001481/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001482type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001483//bitfield VkEventCreateFlagBits {
1484//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001485
Jesse Halla15a4bf2015-11-19 22:48:02 -08001486/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001487type VkFlags VkCommandBufferUsageFlags
1488bitfield VkCommandBufferUsageFlagBits {
1489 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1490 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1491 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001492}
1493
1494/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001495type VkFlags VkQueryPipelineStatisticFlags
1496bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001497 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1498 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1499 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1500 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1501 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1502 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1503 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1504 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1505 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1506 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1507 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001508}
1509
1510/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001511type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001512//bitfield VkMemoryMapFlagBits {
1513//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001514
1515/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001516type VkFlags VkImageAspectFlags
1517bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001518 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1519 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1520 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1521 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1522}
1523
1524/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001525type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001526bitfield VkSparseMemoryBindFlagBits {
1527 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1528}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001529
1530/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001531type VkFlags VkSparseImageFormatFlags
1532bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001533 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1534 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.
1535 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001536}
1537
1538/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001539type VkFlags VkPipelineStageFlags
1540bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001541 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1542 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1543 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1544 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001545 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1546 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001547 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1548 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1549 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1550 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1551 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1552 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1553 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001554 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1555 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001556
Jesse Hall543a7ff2016-01-08 16:38:30 -08001557 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1558 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Jesse Halleb02c472017-02-24 15:13:45 -08001559
Jesse Halld0599582017-03-10 18:35:38 -08001560 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001561 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001562}
1563
1564/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001565type VkFlags VkAttachmentDescriptionFlags
1566bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001567 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 -07001568}
1569
1570/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001571type VkFlags VkSubpassDescriptionFlags
1572bitfield VkSubpassDescriptionFlagBits {
Jesse Halld0599582017-03-10 18:35:38 -08001573 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1574 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1575 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001576}
1577
1578/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001579type VkFlags VkCommandPoolCreateFlags
1580bitfield VkCommandPoolCreateFlagBits {
1581 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1582 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001583}
1584
1585/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001586type VkFlags VkCommandPoolResetFlags
1587bitfield VkCommandPoolResetFlagBits {
1588 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001589}
1590
Jesse Hall3fbc8562015-11-29 22:10:52 -08001591type VkFlags VkCommandBufferResetFlags
1592bitfield VkCommandBufferResetFlagBits {
1593 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001594}
1595
Jesse Halld8bade02015-11-24 10:24:18 -08001596type VkFlags VkSampleCountFlags
1597bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001598 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1599 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1600 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1601 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1602 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1603 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1604 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1605}
1606
Jesse Halld8bade02015-11-24 10:24:18 -08001607type VkFlags VkStencilFaceFlags
1608bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001609 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1610 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001611 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001612}
1613
Jesse Halla6429252015-11-29 18:59:42 -08001614/// Instance creation flags
1615type VkFlags VkInstanceCreateFlags
1616//bitfield VkInstanceCreateFlagBits {
1617//}
1618
1619/// Device creation flags
1620type VkFlags VkDeviceCreateFlags
1621//bitfield VkDeviceCreateFlagBits {
1622//}
1623
1624/// Device queue creation flags
1625type VkFlags VkDeviceQueueCreateFlags
1626//bitfield VkDeviceQueueCreateFlagBits {
1627//}
1628
1629/// Query pool creation flags
1630type VkFlags VkQueryPoolCreateFlags
1631//bitfield VkQueryPoolCreateFlagBits {
1632//}
1633
1634/// Buffer view creation flags
1635type VkFlags VkBufferViewCreateFlags
1636//bitfield VkBufferViewCreateFlagBits {
1637//}
1638
1639/// Pipeline cache creation flags
1640type VkFlags VkPipelineCacheCreateFlags
1641//bitfield VkPipelineCacheCreateFlagBits {
1642//}
1643
1644/// Pipeline shader stage creation flags
1645type VkFlags VkPipelineShaderStageCreateFlags
1646//bitfield VkPipelineShaderStageCreateFlagBits {
1647//}
1648
1649/// Descriptor set layout creation flags
1650type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Halld0599582017-03-10 18:35:38 -08001651bitfield VkDescriptorSetLayoutCreateFlagBits {
1652 //@extension("VK_KHR_push_descriptor") // 81
1653 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1654}
Jesse Halla6429252015-11-29 18:59:42 -08001655
1656/// Pipeline vertex input state creation flags
1657type VkFlags VkPipelineVertexInputStateCreateFlags
1658//bitfield VkPipelineVertexInputStateCreateFlagBits {
1659//}
1660
1661/// Pipeline input assembly state creation flags
1662type VkFlags VkPipelineInputAssemblyStateCreateFlags
1663//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1664//}
1665
1666/// Tessellation state creation flags
1667type VkFlags VkPipelineTessellationStateCreateFlags
1668//bitfield VkPipelineTessellationStateCreateFlagBits {
1669//}
1670
1671/// Viewport state creation flags
1672type VkFlags VkPipelineViewportStateCreateFlags
1673//bitfield VkPipelineViewportStateCreateFlagBits {
1674//}
1675
Jesse Hall3fbc8562015-11-29 22:10:52 -08001676/// Rasterization state creation flags
1677type VkFlags VkPipelineRasterizationStateCreateFlags
1678//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001679//}
1680
1681/// Multisample state creation flags
1682type VkFlags VkPipelineMultisampleStateCreateFlags
1683//bitfield VkPipelineMultisampleStateCreateFlagBits {
1684//}
1685
1686/// Color blend state creation flags
1687type VkFlags VkPipelineColorBlendStateCreateFlags
1688//bitfield VkPipelineColorBlendStateCreateFlagBits {
1689//}
1690
1691/// Depth/stencil state creation flags
1692type VkFlags VkPipelineDepthStencilStateCreateFlags
1693//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1694//}
1695
1696/// Dynamic state creation flags
1697type VkFlags VkPipelineDynamicStateCreateFlags
1698//bitfield VkPipelineDynamicStateCreateFlagBits {
1699//}
1700
1701/// Pipeline layout creation flags
1702type VkFlags VkPipelineLayoutCreateFlags
1703//bitfield VkPipelineLayoutCreateFlagBits {
1704//}
1705
1706/// Sampler creation flags
1707type VkFlags VkSamplerCreateFlags
1708//bitfield VkSamplerCreateFlagBits {
1709//}
1710
1711/// Render pass creation flags
1712type VkFlags VkRenderPassCreateFlags
1713//bitfield VkRenderPassCreateFlagBits {
1714//}
1715
1716/// Framebuffer creation flags
1717type VkFlags VkFramebufferCreateFlags
1718//bitfield VkFramebufferCreateFlagBits {
1719//}
1720
Jesse Halldc6d36c2015-11-29 19:12:15 -08001721/// Dependency flags
1722type VkFlags VkDependencyFlags
1723bitfield VkDependencyFlagBits {
1724 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Halld0599582017-03-10 18:35:38 -08001725
1726 //@extension("VK_KHX_multiview") // 54
1727 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1728
1729 //@extension("VK_KHX_device_group") // 61
1730 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001731}
1732
Jesse Hallc7467b72015-11-29 21:05:26 -08001733/// Cull mode flags
1734type VkFlags VkCullModeFlags
1735bitfield VkCullModeFlagBits {
1736 VK_CULL_MODE_NONE = 0x00000000,
1737 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1738 VK_CULL_MODE_BACK_BIT = 0x00000002,
1739 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1740}
1741
Jesse Halld0599582017-03-10 18:35:38 -08001742@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001743type VkFlags VkSurfaceTransformFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001744@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001745bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001746 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001747 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1748 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1749 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1750 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1751 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1752 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1753 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1754 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001755}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001756
Jesse Halld0599582017-03-10 18:35:38 -08001757@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001758type VkFlags VkCompositeAlphaFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001759@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001760bitfield VkCompositeAlphaFlagBitsKHR {
1761 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1762 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1763 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1764 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1765}
1766
Jesse Halld0599582017-03-10 18:35:38 -08001767@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001768type VkFlags VkSwapchainCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001769@extension("VK_KHR_swapchain") // 2
1770bitfield VkSwapchainCreateFlagBitsKHR {
1771 //@extension("VK_KHX_device_group") // 61
1772 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1773}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001774
Jesse Halld0599582017-03-10 18:35:38 -08001775@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001776type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001777@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001778bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001779 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1780 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1781 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1782 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001783}
1784
Jesse Halld0599582017-03-10 18:35:38 -08001785@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001786type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001787//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001788//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1789//}
1790
Jesse Halld0599582017-03-10 18:35:38 -08001791@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001792type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001793//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001794//bitfield VkDisplayModeCreateFlagBitsKHR {
1795//}
1796
Jesse Halld0599582017-03-10 18:35:38 -08001797@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001798type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001799//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001800//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1801//}
1802
Jesse Halld0599582017-03-10 18:35:38 -08001803@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001804type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001805//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001806//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1807//}
1808
Jesse Halld0599582017-03-10 18:35:38 -08001809@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001810type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001811//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001812//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1813//}
1814
Jesse Halld0599582017-03-10 18:35:38 -08001815@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001816type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001817//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001818//bitfield VkMirSurfaceCreateFlagBitsKHR {
1819//}
1820
Jesse Halld0599582017-03-10 18:35:38 -08001821@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001822type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001823//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001824//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1825//}
1826
Jesse Halld0599582017-03-10 18:35:38 -08001827@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001828type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001829//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001830//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1831//}
1832
Jesse Halld0599582017-03-10 18:35:38 -08001833@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001834type VkFlags VkDebugReportFlagsEXT
Jesse Halld0599582017-03-10 18:35:38 -08001835@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001836bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001837 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1838 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1839 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001840 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1841 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1842}
1843
Jesse Halld0599582017-03-10 18:35:38 -08001844@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001845type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Halld0599582017-03-10 18:35:38 -08001846@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001847bitfield VkExternalMemoryHandleTypeFlagBitsNV {
1848 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1849 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1850 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1851 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
1852}
1853
Jesse Halld0599582017-03-10 18:35:38 -08001854@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001855type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Halld0599582017-03-10 18:35:38 -08001856@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001857bitfield VkExternalMemoryFeatureFlagBitsNV {
1858 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1859 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1860 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
1861}
1862
Jesse Halld0599582017-03-10 18:35:38 -08001863@extension("VK_KHX_device_group") // 61
1864type VkFlags VkPeerMemoryFeatureFlagsKHX
1865@extension("VK_KHX_device_group") // 61
1866bitfield VkPeerMemoryFeatureFlagBitsKHX {
1867 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1868 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1869 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1870 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1871}
1872
1873@extension("VK_KHX_device_group") // 61
1874type VkFlags VkMemoryAllocateFlagsKHX
1875@extension("VK_KHX_device_group") // 61
1876bitfield VkMemoryAllocateFlagBitsKHX {
1877 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1878}
1879
1880@extension("VK_KHX_device_group") // 61
1881type VkFlags VkDeviceGroupPresentModeFlagsKHX
1882@extension("VK_KHX_device_group") // 61
1883bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1884 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1885 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1886 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1887 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1888}
1889
1890@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08001891type VkFlags VkViSurfaceCreateFlagsNN
Jesse Halld0599582017-03-10 18:35:38 -08001892//@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08001893//bitfield VkViSurfaceCreateFlagBitsNN {
1894//}
1895
Jesse Halld0599582017-03-10 18:35:38 -08001896@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001897type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001898//@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001899//bitfield VkCommandPoolTrimFlagBitsKHR {
1900//}
1901
Jesse Halld0599582017-03-10 18:35:38 -08001902@extension("VK_KHX_external_memory_capabilities") // 72
1903type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1904@extension("VK_KHX_external_memory_capabilities") // 72
1905bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1906 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1907 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1908 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1909 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1910 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1911 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1912 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1913}
1914
1915@extension("VK_KHX_external_memory_capabilities") // 72
1916type VkFlags VkExternalMemoryFeatureFlagsKHX
1917@extension("VK_KHX_external_memory_capabilities") // 72
1918bitfield VkExternalMemoryFeatureFlagBitsKHX {
1919 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1920 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1921 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1922}
1923
1924@extension("VK_KHX_external_semaphore_capabilities") // 77
1925type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
1926@extension("VK_KHX_external_semaphore_capabilities") // 77
1927bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
1928 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
1929 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
1930 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
1931 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
1932 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
1933}
1934
1935@extension("VK_KHX_external_semaphore_capabilities") // 77
1936type VkFlags VkExternalSemaphoreFeatureFlagsKHX
1937@extension("VK_KHX_external_semaphore_capabilities") // 77
1938bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
1939 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
1940 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
1941}
1942
1943@extension("VK_KHR_descriptor_update_template") // 86
1944type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
1945//@extension("VK_KHR_descriptor_update_template") // 86
1946//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
1947//}
1948
1949@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001950type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Halld0599582017-03-10 18:35:38 -08001951@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001952bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
1953 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
1954 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
1955 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
1956 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
1957}
1958
Jesse Halld0599582017-03-10 18:35:38 -08001959@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001960type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Halld0599582017-03-10 18:35:38 -08001961@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001962bitfield VkObjectEntryUsageFlagBitsNVX {
1963 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
1964 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
1965}
1966
Jesse Halld0599582017-03-10 18:35:38 -08001967@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001968type VkFlags VkSurfaceCounterFlagsEXT
Jesse Halld0599582017-03-10 18:35:38 -08001969@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001970bitfield VkSurfaceCounterFlagBitsEXT {
1971 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
1972}
Jesse Hall1356b0d2015-11-23 17:24:58 -08001973
Jesse Halld0599582017-03-10 18:35:38 -08001974@extension("VK_NV_viewport_swizzle") // 99
1975type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
1976//@extension("VK_NV_viewport_swizzle") // 99
1977//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
1978//}
1979
1980@extension("VK_EXT_discard_rectangles") // 100
1981type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
1982//@extension("VK_EXT_discard_rectangles") // 100
1983//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
1984//}
1985
1986@extension("VK_MVK_ios_surface") // 123
1987type VkFlags VkIOSSurfaceCreateFlagsMVK
1988//@extension("VK_MVK_ios_surface") // 123
1989//bitfield VkIOSSurfaceCreateFlagBitsMVK {
1990//}
1991
1992@extension("VK_MVK_macos_surface") // 124
1993type VkFlags VkMacOSSurfaceCreateFlagsMVK
1994//@extension("VK_MVK_macos_surface") // 124
1995//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
1996//}
1997
Jesse Halld27f6aa2015-08-15 17:58:48 -07001998//////////////////
1999// Structures //
2000//////////////////
2001
2002class VkOffset2D {
2003 s32 x
2004 s32 y
2005}
2006
2007class VkOffset3D {
2008 s32 x
2009 s32 y
2010 s32 z
2011}
2012
2013class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002014 u32 width
2015 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002016}
2017
2018class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002019 u32 width
2020 u32 height
2021 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002022}
2023
2024class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002025 f32 x
2026 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002027 f32 width
2028 f32 height
2029 f32 minDepth
2030 f32 maxDepth
2031}
2032
2033class VkRect2D {
2034 VkOffset2D offset
2035 VkExtent2D extent
2036}
2037
Jesse Halla15a4bf2015-11-19 22:48:02 -08002038class VkClearRect {
2039 VkRect2D rect
2040 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002041 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002042}
2043
Jesse Hall65ab5522015-11-30 00:07:16 -08002044class VkComponentMapping {
2045 VkComponentSwizzle r
2046 VkComponentSwizzle g
2047 VkComponentSwizzle b
2048 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002049}
2050
2051class VkPhysicalDeviceProperties {
2052 u32 apiVersion
2053 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002054 u32 vendorID
2055 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002056 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002057 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2058 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002059 VkPhysicalDeviceLimits limits
2060 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002061}
2062
2063class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002064 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002065 u32 specVersion /// version of the extension specification implemented
2066}
2067
2068class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002069 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002070 u32 specVersion /// version of the layer specification implemented
2071 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002072 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002073}
2074
Jesse Halla366a512015-11-19 22:30:07 -08002075class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002076 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2077 const void* pNext /// Next structure in chain
2078 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002079 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002080 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002081 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002082 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002083 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002084 const VkSemaphore* pSignalSemaphores
2085}
2086
Jesse Halld27f6aa2015-08-15 17:58:48 -07002087class VkApplicationInfo {
2088 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2089 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002090 const char* pApplicationName
2091 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002092 const char* pEngineName
2093 u32 engineVersion
2094 u32 apiVersion
2095}
2096
Jesse Hall3fbc8562015-11-29 22:10:52 -08002097class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002098 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002099 PFN_vkAllocationFunction pfnAllocation
2100 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002101 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002102 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002103 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002104}
2105
2106class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002107 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2108 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002109 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002110 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002111 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002112 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002113}
2114
2115class VkDeviceCreateInfo {
2116 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2117 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002118 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002119 u32 queueCreateInfoCount
2120 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002121 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002122 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002123 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002124 const char* const* ppEnabledExtensionNames
2125 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002126}
2127
2128class VkInstanceCreateInfo {
2129 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2130 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002131 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002132 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002133 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002134 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002135 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002136 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2137}
2138
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002139class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002140 VkQueueFlags queueFlags /// Queue flags
2141 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002142 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002143 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002144}
2145
2146class VkPhysicalDeviceMemoryProperties {
2147 u32 memoryTypeCount
2148 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2149 u32 memoryHeapCount
2150 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2151}
2152
Jesse Hall3fbc8562015-11-29 22:10:52 -08002153class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002154 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002155 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002156 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002157 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2158}
2159
2160class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002161 VkDeviceSize size /// Specified in bytes
2162 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002163 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2164}
2165
2166class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002167 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002168 VkExtent3D imageGranularity
2169 VkSparseImageFormatFlags flags
2170}
2171
2172class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002173 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002174 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002175 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2176 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2177 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002178}
2179
2180class VkMemoryType {
2181 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2182 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2183}
2184
2185class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002186 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002187 VkMemoryHeapFlags flags /// Flags for the heap
2188}
2189
2190class VkMappedMemoryRange {
2191 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2192 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002193 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002194 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2195 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002196}
2197
2198class VkFormatProperties {
2199 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2200 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002201 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002202}
2203
2204class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002205 VkExtent3D maxExtent /// max image dimensions for this resource type
2206 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002207 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002208 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2209 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2210}
2211
Jesse Halla15a4bf2015-11-19 22:48:02 -08002212class VkDescriptorImageInfo {
2213 VkSampler sampler
2214 VkImageView imageView
2215 VkImageLayout imageLayout
2216}
2217
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002218class VkDescriptorBufferInfo {
2219 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2220 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2221 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002222}
2223
Jesse Halld27f6aa2015-08-15 17:58:48 -07002224class VkWriteDescriptorSet {
2225 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2226 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002227 VkDescriptorSet dstSet /// Destination descriptor set
2228 u32 dstBinding /// Binding within the destination descriptor set to write
2229 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002230 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002231 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 -08002232 const VkDescriptorImageInfo* pImageInfo
2233 const VkDescriptorBufferInfo* pBufferInfo
2234 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002235}
2236
2237class VkCopyDescriptorSet {
2238 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2239 const void* pNext /// Pointer to next structure
2240 VkDescriptorSet srcSet /// Source descriptor set
2241 u32 srcBinding /// Binding within the source descriptor set to copy from
2242 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002243 VkDescriptorSet dstSet /// Destination descriptor set
2244 u32 dstBinding /// Binding within the destination descriptor set to copy to
2245 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002246 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002247}
2248
2249class VkBufferCreateInfo {
2250 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2251 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002252 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002253 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002254 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002255 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002256 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002257 const u32* pQueueFamilyIndices
2258}
2259
2260class VkBufferViewCreateInfo {
2261 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2262 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002263 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002264 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002265 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002266 VkDeviceSize offset /// Specified in bytes
2267 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002268}
2269
2270class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002271 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002272 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002273 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002274}
2275
2276class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002277 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002278 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002279 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002280 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002281 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002282}
2283
2284class VkMemoryBarrier {
2285 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2286 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002287 VkAccessFlags srcAccessMask
2288 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002289}
2290
2291class VkBufferMemoryBarrier {
2292 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2293 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002294 VkAccessFlags srcAccessMask
2295 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002296 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002297 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002298 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002299 VkDeviceSize offset /// Offset within the buffer to sync
2300 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002301}
2302
2303class VkImageMemoryBarrier {
2304 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2305 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002306 VkAccessFlags srcAccessMask
2307 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002308 VkImageLayout oldLayout /// Current layout of the image
2309 VkImageLayout newLayout /// New layout to transition the image to
2310 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002311 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002312 VkImage image /// Image to sync
2313 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2314}
2315
2316class VkImageCreateInfo {
2317 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2318 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002319 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002320 VkImageType imageType
2321 VkFormat format
2322 VkExtent3D extent
2323 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002324 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002325 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002326 VkImageTiling tiling
2327 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002328 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002329 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002330 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002331 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002332}
2333
2334class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002335 VkDeviceSize offset /// Specified in bytes
2336 VkDeviceSize size /// Specified in bytes
2337 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002338 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002339 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002340}
2341
2342class VkImageViewCreateInfo {
2343 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2344 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002345 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002346 VkImage image
2347 VkImageViewType viewType
2348 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002349 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002350 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002351}
2352
2353class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002354 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002355 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002356 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002357}
2358
Jesse Halla6429252015-11-29 18:59:42 -08002359class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002360 VkDeviceSize resourceOffset /// Specified in bytes
2361 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002362 VkDeviceMemory memory
2363 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002364 VkSparseMemoryBindFlags flags
2365}
2366
Jesse Halla6429252015-11-29 18:59:42 -08002367class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002368 VkImageSubresource subresource
2369 VkOffset3D offset
2370 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002371 VkDeviceMemory memory
2372 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002373 VkSparseMemoryBindFlags flags
2374}
2375
Jesse Halla6429252015-11-29 18:59:42 -08002376class VkSparseBufferMemoryBindInfo {
2377 VkBuffer buffer
2378 u32 bindCount
2379 const VkSparseMemoryBind* pBinds
2380}
2381
2382class VkSparseImageOpaqueMemoryBindInfo {
2383 VkImage image
2384 u32 bindCount
2385 const VkSparseMemoryBind* pBinds
2386}
2387
2388class VkSparseImageMemoryBindInfo {
2389 VkImage image
2390 u32 bindCount
2391 const VkSparseMemoryBind* pBinds
2392}
2393
2394class VkBindSparseInfo {
2395 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2396 const void* pNext
2397 u32 waitSemaphoreCount
2398 const VkSemaphore* pWaitSemaphores
2399 u32 numBufferBinds
2400 const VkSparseBufferMemoryBindInfo* pBufferBinds
2401 u32 numImageOpaqueBinds
2402 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2403 u32 numImageBinds
2404 const VkSparseImageMemoryBindInfo* pImageBinds
2405 u32 signalSemaphoreCount
2406 const VkSemaphore* pSignalSemaphores
2407}
2408
Jesse Hall65ab5522015-11-30 00:07:16 -08002409class VkImageSubresourceLayers {
2410 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002411 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002412 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002413 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002414}
2415
Jesse Halld27f6aa2015-08-15 17:58:48 -07002416class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002417 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002418 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002419 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002420 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002421 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2422}
2423
2424class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002425 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002426 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002427 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002428 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002429}
2430
2431class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002432 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002433 u32 bufferRowLength /// Specified in texels
2434 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002435 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002436 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2437 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2438}
2439
2440class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002441 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002442 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002443 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002444 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002445 VkExtent3D extent
2446}
2447
2448class VkShaderModuleCreateInfo {
2449 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2450 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002451 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002452 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002453 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002454}
2455
Jesse Halld27f6aa2015-08-15 17:58:48 -07002456class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002457 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002458 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002459 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002460 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2461 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2462}
2463
2464class VkDescriptorSetLayoutCreateInfo {
2465 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2466 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002467 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002468 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002469 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002470}
2471
Jesse Hall65ab5522015-11-30 00:07:16 -08002472class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002473 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002474 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002475}
2476
2477class VkDescriptorPoolCreateInfo {
2478 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2479 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002480 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002481 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002482 u32 poolSizeCount
2483 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002484}
2485
Jesse Hall3fbc8562015-11-29 22:10:52 -08002486class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002487 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002488 const void* pNext /// Pointer to next structure
2489 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002490 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002491 const VkDescriptorSetLayout* pSetLayouts
2492}
2493
Jesse Halld27f6aa2015-08-15 17:58:48 -07002494class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002495 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002496 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002497 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002498}
2499
2500class VkSpecializationInfo {
2501 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002502 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002503 platform.size_t dataSize /// Size in bytes of pData
2504 const void* pData /// Pointer to SpecConstant data
2505}
2506
2507class VkPipelineShaderStageCreateInfo {
2508 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2509 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002510 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002511 VkShaderStageFlagBits stage
2512 VkShaderModule module
2513 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002514 const VkSpecializationInfo* pSpecializationInfo
2515}
2516
2517class VkComputePipelineCreateInfo {
2518 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2519 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002520 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002521 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002522 VkPipelineLayout layout /// Interface layout of the pipeline
2523 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
2524 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
2525}
2526
2527class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002528 u32 binding /// Vertex buffer binding id
2529 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002530 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002531}
2532
2533class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002534 u32 location /// location of the shader vertex attrib
2535 u32 binding /// Vertex buffer binding id
2536 VkFormat format /// format of source data
2537 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002538}
2539
2540class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002541 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2542 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002543 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002544 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002545 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002546 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002547 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2548}
2549
2550class VkPipelineInputAssemblyStateCreateInfo {
2551 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2552 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002553 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002554 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002555 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002556}
2557
2558class VkPipelineTessellationStateCreateInfo {
2559 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2560 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002561 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002562 u32 patchControlPoints
2563}
2564
2565class VkPipelineViewportStateCreateInfo {
2566 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2567 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002568 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002569 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002570 const VkViewport* pViewports
2571 u32 scissorCount
2572 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002573}
2574
Jesse Hall3fbc8562015-11-29 22:10:52 -08002575class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002576 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002577 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002578 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002579 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002580 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002581 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002582 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002583 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002584 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002585 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002586 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002587 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002588 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002589}
2590
2591class VkPipelineMultisampleStateCreateInfo {
2592 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2593 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002594 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002595 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002596 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002597 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002598 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002599 VkBool32 alphaToCoverageEnable
2600 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002601}
2602
2603class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002604 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002605 VkBlendFactor srcColorBlendFactor
2606 VkBlendFactor dstColorBlendFactor
2607 VkBlendOp colorBlendOp
2608 VkBlendFactor srcAlphaBlendFactor
2609 VkBlendFactor dstAlphaBlendFactor
2610 VkBlendOp alphaBlendOp
2611 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002612}
2613
2614class VkPipelineColorBlendStateCreateInfo {
2615 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2616 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002617 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002618 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002619 VkLogicOp logicOp
2620 u32 attachmentCount /// # of pAttachments
2621 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002622 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002623}
2624
2625class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002626 VkStencilOp failOp
2627 VkStencilOp passOp
2628 VkStencilOp depthFailOp
2629 VkCompareOp compareOp
2630 u32 compareMask
2631 u32 writeMask
2632 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002633}
2634
2635class VkPipelineDepthStencilStateCreateInfo {
2636 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2637 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002638 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002639 VkBool32 depthTestEnable
2640 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002641 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002642 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2643 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002644 VkStencilOpState front
2645 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002646 f32 minDepthBounds
2647 f32 maxDepthBounds
2648}
2649
2650class VkPipelineDynamicStateCreateInfo {
2651 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2652 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002653 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002654 u32 dynamicStateCount
2655 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002656}
2657
2658class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002659 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2660 const void* pNext /// Pointer to next structure
2661 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002662 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002663 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002664 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2665 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2666 const VkPipelineTessellationStateCreateInfo* pTessellationState
2667 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002668 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002669 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2670 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2671 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002672 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002673 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002674 VkRenderPass renderPass
2675 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002676 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
2677 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 -07002678}
2679
2680class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002681 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2682 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002683 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002684 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2685 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002686}
2687
2688class VkPushConstantRange {
2689 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002690 u32 offset /// Start of the range, in bytes
2691 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002692}
2693
2694class VkPipelineLayoutCreateInfo {
2695 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2696 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002697 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002698 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002699 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2700 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2701 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2702}
2703
2704class VkSamplerCreateInfo {
2705 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2706 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002707 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002708 VkFilter magFilter /// Filter mode for magnification
2709 VkFilter minFilter /// Filter mode for minifiation
2710 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2711 VkSamplerAddressMode addressModeU
2712 VkSamplerAddressMode addressModeV
2713 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002714 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002715 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002716 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002717 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002718 VkCompareOp compareOp
2719 f32 minLod
2720 f32 maxLod
2721 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002722 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002723}
2724
Jesse Hall3fbc8562015-11-29 22:10:52 -08002725class VkCommandPoolCreateInfo {
2726 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002727 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002728 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002729 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002730}
2731
Jesse Hall3fbc8562015-11-29 22:10:52 -08002732class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002733 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002734 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002735 VkCommandPool commandPool
2736 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002737 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002738}
2739
Jesse Hall3dd678a2016-01-08 21:52:01 -08002740class VkCommandBufferInheritanceInfo {
2741 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002742 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002743 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002744 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002745 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002746 VkBool32 occlusionQueryEnable
2747 VkQueryControlFlags queryFlags
2748 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002749}
2750
Jesse Hall3dd678a2016-01-08 21:52:01 -08002751class VkCommandBufferBeginInfo {
2752 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2753 const void* pNext /// Pointer to next structure
2754 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2755 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2756}
2757
Jesse Halld27f6aa2015-08-15 17:58:48 -07002758class VkRenderPassBeginInfo {
2759 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2760 const void* pNext /// Pointer to next structure
2761 VkRenderPass renderPass
2762 VkFramebuffer framebuffer
2763 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002764 u32 clearValueCount
2765 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002766}
2767
2768@union
2769/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2770class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002771 f32[4] float32
2772 s32[4] int32
2773 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002774}
2775
2776class VkClearDepthStencilValue {
2777 f32 depth
2778 u32 stencil
2779}
2780
2781@union
2782/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2783class VkClearValue {
2784 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002785 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002786}
2787
Jesse Hallae38f732015-11-19 21:32:50 -08002788class VkClearAttachment {
2789 VkImageAspectFlags aspectMask
2790 u32 colorAttachment
2791 VkClearValue clearValue
2792}
2793
Jesse Halld27f6aa2015-08-15 17:58:48 -07002794class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002795 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002796 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002797 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002798 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2799 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2800 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2801 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2802 VkImageLayout initialLayout
2803 VkImageLayout finalLayout
2804}
2805
2806class VkAttachmentReference {
2807 u32 attachment
2808 VkImageLayout layout
2809}
2810
2811class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002812 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002813 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002814 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002815 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002816 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002817 const VkAttachmentReference* pColorAttachments
2818 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002819 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002820 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002821 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002822}
2823
2824class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002825 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002826 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002827 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002828 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002829 VkAccessFlags srcAccessMask
2830 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002831 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002832}
2833
2834class VkRenderPassCreateInfo {
2835 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2836 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002837 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002838 u32 attachmentCount
2839 const VkAttachmentDescription* pAttachments
2840 u32 subpassCount
2841 const VkSubpassDescription* pSubpasses
2842 u32 dependencyCount
2843 const VkSubpassDependency* pDependencies
2844}
2845
2846class VkEventCreateInfo {
2847 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2848 const void* pNext /// Pointer to next structure
2849 VkEventCreateFlags flags /// Event creation flags
2850}
2851
2852class VkFenceCreateInfo {
2853 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2854 const void* pNext /// Pointer to next structure
2855 VkFenceCreateFlags flags /// Fence creation flags
2856}
2857
2858class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002859 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2860 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2861 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2862 VkBool32 independentBlend /// blending operations are controlled per-attachment
2863 VkBool32 geometryShader /// geometry stage
2864 VkBool32 tessellationShader /// tessellation control and evaluation stage
2865 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002866 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002867 VkBool32 logicOp /// logic operations
2868 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002869 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002870 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002871 VkBool32 depthBiasClamp /// depth bias clamping
2872 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2873 VkBool32 depthBounds /// depth bounds test
2874 VkBool32 wideLines /// lines with width greater than 1
2875 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002876 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2877 VkBool32 multiViewport
2878 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002879 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2880 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2881 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002882 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002883 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002884 VkBool32 vertexPipelineStoresAndAtomics
2885 VkBool32 fragmentStoresAndAtomics
2886 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002887 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2888 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2889 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002890 VkBool32 shaderStorageImageReadWithoutFormat
2891 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002892 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2893 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2894 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2895 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2896 VkBool32 shaderClipDistance /// clip distance in shaders
2897 VkBool32 shaderCullDistance /// cull distance in shaders
2898 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2899 VkBool32 shaderInt64 /// 64-bit integers in shaders
2900 VkBool32 shaderInt16 /// 16-bit integers in shaders
2901 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002902 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002903 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2904 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2905 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2906 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2907 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2908 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2909 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2910 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2911 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002912 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002913 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002914}
2915
2916class VkPhysicalDeviceLimits {
2917 /// resource maximum sizes
2918 u32 maxImageDimension1D /// max 1D image dimension
2919 u32 maxImageDimension2D /// max 2D image dimension
2920 u32 maxImageDimension3D /// max 3D image dimension
2921 u32 maxImageDimensionCube /// max cubemap image dimension
2922 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002923 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002924 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
2925 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002926 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
2927 /// memory limits
2928 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08002929 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002930 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
2931 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002932 /// descriptor set limits
2933 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002934 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
2935 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
2936 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
2937 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
2938 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002939 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08002940 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002941 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
2942 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002943 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07002944 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002945 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07002946 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
2947 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002948 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002949 /// vertex stage limits
2950 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002951 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07002952 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
2953 u32 maxVertexInputBindingStride /// max vertex input binding stride
2954 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
2955 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08002956 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08002957 u32 maxTessellationPatchSize /// max patch size (vertices)
2958 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
2959 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
2960 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
2961 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
2962 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
2963 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07002964 /// geometry stage limits
2965 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
2966 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
2967 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
2968 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
2969 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
2970 /// fragment stage limits
2971 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08002972 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08002973 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07002974 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
2975 /// compute stage limits
2976 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
2977 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
2978 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
2979 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
2980
2981 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
2982 u32 subTexelPrecisionBits /// num bits of subtexel precision
2983 u32 mipmapPrecisionBits /// num bits of mipmap precision
2984
2985 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08002986 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002987
2988 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
2989 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
2990
2991 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07002992 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
2993 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
2994 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
2995
Jesse Halldc6d36c2015-11-29 19:12:15 -08002996 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
2997 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
2998 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
2999 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003000
Jesse Hallfbf97b02015-11-20 14:17:03 -08003001 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003002 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003003 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003004 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3005 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3006 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3007 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3008
3009 u32 maxFramebufferWidth /// max width for a framebuffer
3010 u32 maxFramebufferHeight /// max height for a framebuffer
3011 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003012 VkSampleCountFlags framebufferColorSampleCounts
3013 VkSampleCountFlags framebufferDepthSampleCounts
3014 VkSampleCountFlags framebufferStencilSampleCounts
3015 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003016 u32 maxColorAttachments /// max num of framebuffer color attachments
3017
Jesse Hall091ed9e2015-11-30 00:55:29 -08003018 VkSampleCountFlags sampledImageColorSampleCounts
3019 VkSampleCountFlags sampledImageIntegerSampleCounts
3020 VkSampleCountFlags sampledImageDepthSampleCounts
3021 VkSampleCountFlags sampledImageStencilSampleCounts
3022 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003023 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003024 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003025
Jesse Halla9bb62b2015-11-21 19:31:56 -08003026 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003027
3028 u32 maxClipDistances /// max number of clip distances
3029 u32 maxCullDistances /// max number of cull distances
3030 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3031
Jesse Hallfbf97b02015-11-20 14:17:03 -08003032 u32 discreteQueuePriorities
3033
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003034 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3035 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003036 f32 pointSizeGranularity /// granularity of supported point sizes
3037 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003038 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003039 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003040
Jesse Hall65ab5522015-11-30 00:07:16 -08003041 VkDeviceSize optimalBufferCopyOffsetAlignment
3042 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003043 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003044}
3045
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003046class VkPhysicalDeviceSparseProperties {
3047 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 -08003048 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 -07003049 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3050 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 -07003051 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
3052}
3053
Jesse Halld27f6aa2015-08-15 17:58:48 -07003054class VkSemaphoreCreateInfo {
3055 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3056 const void* pNext /// Pointer to next structure
3057 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3058}
3059
3060class VkQueryPoolCreateInfo {
3061 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3062 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003063 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003064 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003065 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003066 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3067}
3068
3069class VkFramebufferCreateInfo {
3070 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3071 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003072 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003073 VkRenderPass renderPass
3074 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003075 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003076 u32 width
3077 u32 height
3078 u32 layers
3079}
3080
Jesse Hall3fbc8562015-11-29 22:10:52 -08003081class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003082 u32 vertexCount
3083 u32 instanceCount
3084 u32 firstVertex
3085 u32 firstInstance
3086}
3087
Jesse Hall3fbc8562015-11-29 22:10:52 -08003088class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003089 u32 indexCount
3090 u32 instanceCount
3091 u32 firstIndex
3092 s32 vertexOffset
3093 u32 firstInstance
3094}
3095
Jesse Hall3fbc8562015-11-29 22:10:52 -08003096class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003097 u32 x
3098 u32 y
3099 u32 z
3100}
3101
Jesse Halld0599582017-03-10 18:35:38 -08003102@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003103class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003104 u32 minImageCount
3105 u32 maxImageCount
3106 VkExtent2D currentExtent
3107 VkExtent2D minImageExtent
3108 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003109 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003110 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003111 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003112 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003113 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003114}
3115
Jesse Halld0599582017-03-10 18:35:38 -08003116@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003117class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003118 VkFormat format
3119 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003120}
3121
Jesse Halld0599582017-03-10 18:35:38 -08003122@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003123class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003124 VkStructureType sType
3125 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003126 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003127 VkSurfaceKHR surface
3128 u32 minImageCount
3129 VkFormat imageFormat
3130 VkColorSpaceKHR imageColorSpace
3131 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003132 u32 imageArrayLayers
3133 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003134 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003135 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003136 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003137 VkSurfaceTransformFlagBitsKHR preTransform
3138 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003139 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003140 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003141 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003142}
3143
Jesse Halld0599582017-03-10 18:35:38 -08003144@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003145class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003146 VkStructureType sType
3147 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003148 u32 waitSemaphoreCount
3149 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003150 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003151 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003152 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003153 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003154}
3155
Jesse Halld0599582017-03-10 18:35:38 -08003156@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003157class VkDisplayPropertiesKHR {
3158 VkDisplayKHR display
3159 const char* displayName
3160 VkExtent2D physicalDimensions
3161 VkExtent2D physicalResolution
3162 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003163 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003164 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003165}
3166
Jesse Halld0599582017-03-10 18:35:38 -08003167@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003168class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003169 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003170 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003171}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003172
Jesse Halld0599582017-03-10 18:35:38 -08003173@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003174class VkDisplayModePropertiesKHR {
3175 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003176 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003177}
3178
Jesse Halld0599582017-03-10 18:35:38 -08003179@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003180class VkDisplayModeCreateInfoKHR {
3181 VkStructureType sType
3182 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003183 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003184 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003185}
3186
Jesse Halld0599582017-03-10 18:35:38 -08003187@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003188class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003189 VkDisplayKHR currentDisplay
3190 u32 currentStackIndex
3191}
3192
Jesse Halld0599582017-03-10 18:35:38 -08003193@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003194class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003195 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3196 VkOffset2D minSrcPosition
3197 VkOffset2D maxSrcPosition
3198 VkExtent2D minSrcExtent
3199 VkExtent2D maxSrcExtent
3200 VkOffset2D minDstPosition
3201 VkOffset2D maxDstPosition
3202 VkExtent2D minDstExtent
3203 VkExtent2D maxDstExtent
3204}
3205
Jesse Halld0599582017-03-10 18:35:38 -08003206@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003207class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003208 VkStructureType sType
3209 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003210 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003211 VkDisplayModeKHR displayMode
3212 u32 planeIndex
3213 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003214 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003215 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003216 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3217 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003218}
3219
Jesse Halld0599582017-03-10 18:35:38 -08003220@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003221class VkDisplayPresentInfoKHR {
3222 VkStructureType sType
3223 const void* pNext
3224 VkRect2D srcRect
3225 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003226 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003227}
3228
Jesse Halld0599582017-03-10 18:35:38 -08003229@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003230class VkXlibSurfaceCreateInfoKHR {
3231 VkStructureType sType
3232 const void* pNext
3233 VkXlibSurfaceCreateFlagsKHR flags
3234 platform.Display* dpy
3235 platform.Window window
3236}
3237
Jesse Halld0599582017-03-10 18:35:38 -08003238@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003239class VkXcbSurfaceCreateInfoKHR {
3240 VkStructureType sType
3241 const void* pNext
3242 VkXcbSurfaceCreateFlagsKHR flags
3243 platform.xcb_connection_t* connection
3244 platform.xcb_window_t window
3245}
3246
Jesse Halld0599582017-03-10 18:35:38 -08003247@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003248class VkWaylandSurfaceCreateInfoKHR {
3249 VkStructureType sType
3250 const void* pNext
3251 VkWaylandSurfaceCreateFlagsKHR flags
3252 platform.wl_display* display
3253 platform.wl_surface* surface
3254}
3255
Jesse Halld0599582017-03-10 18:35:38 -08003256@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003257class VkMirSurfaceCreateInfoKHR {
3258 VkStructureType sType
3259 const void* pNext
3260 VkMirSurfaceCreateFlagsKHR flags
3261 platform.MirConnection* connection
3262 platform.MirSurface* mirSurface
3263}
3264
Jesse Halld0599582017-03-10 18:35:38 -08003265@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003266class VkAndroidSurfaceCreateInfoKHR {
3267 VkStructureType sType
3268 const void* pNext
3269 VkAndroidSurfaceCreateFlagsKHR flags
3270 platform.ANativeWindow* window
3271}
3272
Jesse Halld0599582017-03-10 18:35:38 -08003273@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003274class VkWin32SurfaceCreateInfoKHR {
3275 VkStructureType sType
3276 const void* pNext
3277 VkWin32SurfaceCreateFlagsKHR flags
3278 platform.HINSTANCE hinstance
3279 platform.HWND hwnd
3280}
3281
Jesse Halld0599582017-03-10 18:35:38 -08003282@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003283class VkNativeBufferANDROID {
3284 VkStructureType sType
3285 const void* pNext
3286 platform.buffer_handle_t handle
3287 int stride
3288 int format
3289 int usage
3290}
3291
Jesse Halld0599582017-03-10 18:35:38 -08003292@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003293class VkDebugReportCallbackCreateInfoEXT {
3294 VkStructureType sType
3295 const void* pNext
3296 VkDebugReportFlagsEXT flags
3297 PFN_vkDebugReportCallbackEXT pfnCallback
3298 void* pUserData
3299}
3300
Jesse Halld0599582017-03-10 18:35:38 -08003301@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003302class VkPipelineRasterizationStateRasterizationOrderAMD {
3303 VkStructureType sType
3304 const void* pNext
3305 VkRasterizationOrderAMD rasterizationOrder
3306}
3307
Jesse Halld0599582017-03-10 18:35:38 -08003308@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003309class VkDebugMarkerObjectNameInfoEXT {
3310 VkStructureType sType
3311 const void* pNext
3312 VkDebugReportObjectTypeEXT objectType
3313 u64 object
3314 const char* pObjectName
3315}
3316
Jesse Halld0599582017-03-10 18:35:38 -08003317@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003318class VkDebugMarkerObjectTagInfoEXT {
3319 VkStructureType sType
3320 const void* pNext
3321 VkDebugReportObjectTypeEXT objectType
3322 u64 object
3323 u64 tagName
3324 platform.size_t tagSize
3325 const void* pTag
3326}
3327
Jesse Halld0599582017-03-10 18:35:38 -08003328@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003329class VkDebugMarkerMarkerInfoEXT {
3330 VkStructureType sType
3331 const void* pNext
3332 const char* pMarkerName
3333 f32[4] color
3334}
3335
Jesse Halld0599582017-03-10 18:35:38 -08003336@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003337class VkDedicatedAllocationImageCreateInfoNV {
3338 VkStructureType sType
3339 const void* pNext
3340 VkBool32 dedicatedAllocation
3341}
3342
Jesse Halld0599582017-03-10 18:35:38 -08003343@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003344class VkDedicatedAllocationBufferCreateInfoNV {
3345 VkStructureType sType
3346 const void* pNext
3347 VkBool32 dedicatedAllocation
3348}
3349
Jesse Halld0599582017-03-10 18:35:38 -08003350@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003351class VkDedicatedAllocationMemoryAllocateInfoNV {
3352 VkStructureType sType
3353 const void* pNext
3354 VkImage image
3355 VkBuffer buffer
3356}
3357
Jesse Halld0599582017-03-10 18:35:38 -08003358@extension("VK_KHX_multiview") // 54
3359class VkRenderPassMultiviewCreateInfoKHX {
3360 VkStructureType sType
3361 const void* pNext
3362 u32 subpassCount
3363 const u32* pViewMasks
3364 u32 dependencyCount
3365 const s32* pViewOffsets
3366 u32 correlationMaskCount
3367 const u32* pCorrelationMasks
3368}
3369
3370@extension("VK_KHX_multiview") // 54
3371class VkPhysicalDeviceMultiviewFeaturesKHX {
3372 VkStructureType sType
3373 void* pNext
3374 VkBool32 multiview
3375 VkBool32 multiviewGeometryShader
3376 VkBool32 multiviewTessellationShader
3377}
3378
3379@extension("VK_KHX_multiview") // 54
3380class VkPhysicalDeviceMultiviewPropertiesKHX {
3381 VkStructureType sType
3382 void* pNext
3383 u32 maxMultiviewViewCount
3384 u32 maxMultiviewInstanceIndex
3385}
3386
3387@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003388class VkExternalImageFormatPropertiesNV {
3389 VkImageFormatProperties imageFormatProperties
3390 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3391 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3392 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3393}
3394
Jesse Halld0599582017-03-10 18:35:38 -08003395@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003396class VkExternalMemoryImageCreateInfoNV {
3397 VkStructureType sType
3398 const void* pNext
3399 VkExternalMemoryHandleTypeFlagsNV handleTypes
3400}
3401
Jesse Halld0599582017-03-10 18:35:38 -08003402@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003403class VkExportMemoryAllocateInfoNV {
3404 VkStructureType sType
3405 const void* pNext
3406 VkExternalMemoryHandleTypeFlagsNV handleTypes
3407}
3408
Jesse Halld0599582017-03-10 18:35:38 -08003409@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003410class VkImportMemoryWin32HandleInfoNV {
3411 VkStructureType sType
3412 const void* pNext
3413 VkExternalMemoryHandleTypeFlagsNV handleType
3414 platform.HANDLE handle
3415}
3416
Jesse Halld0599582017-03-10 18:35:38 -08003417@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003418class VkExportMemoryWin32HandleInfoNV {
3419 VkStructureType sType
3420 const void* pNext
3421 const platform.SECURITY_ATTRIBUTES* pAttributes
3422 platform.DWORD dwAccess
3423}
3424
Jesse Halld0599582017-03-10 18:35:38 -08003425@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003426class VkWin32KeyedMutexAcquireReleaseInfoNV {
3427 VkStructureType sType
3428 const void* pNext
3429 u32 acquireCount
3430 const VkDeviceMemory* pAcquireSyncs
3431 const u64* pAcquireKeys
3432 const u32* pAcquireTimeoutMilliseconds
3433 u32 releaseCount
3434 const VkDeviceMemory* pReleaseSyncs
3435 const u64* pReleaseKeys
3436}
3437
Jesse Halld0599582017-03-10 18:35:38 -08003438@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003439class VkPhysicalDeviceFeatures2KHR {
3440 VkStructureType sType
3441 void* pNext
3442 VkPhysicalDeviceFeatures features
3443}
3444
Jesse Halld0599582017-03-10 18:35:38 -08003445@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003446class VkPhysicalDeviceProperties2KHR {
3447 VkStructureType sType
3448 void* pNext
3449 VkPhysicalDeviceProperties properties
3450}
3451
Jesse Halld0599582017-03-10 18:35:38 -08003452@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003453class VkFormatProperties2KHR {
3454 VkStructureType sType
3455 void* pNext
3456 VkFormatProperties formatProperties
3457}
3458
Jesse Halld0599582017-03-10 18:35:38 -08003459@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003460class VkImageFormatProperties2KHR {
3461 VkStructureType sType
3462 void* pNext
3463 VkImageFormatProperties imageFormatProperties
3464}
3465
Jesse Halld0599582017-03-10 18:35:38 -08003466@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003467class VkPhysicalDeviceImageFormatInfo2KHR {
3468 VkStructureType sType
3469 const void* pNext
3470 VkFormat format
3471 VkImageType type
3472 VkImageTiling tiling
3473 VkImageUsageFlags usage
3474 VkImageCreateFlags flags
3475}
3476
Jesse Halld0599582017-03-10 18:35:38 -08003477@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003478class VkQueueFamilyProperties2KHR {
3479 VkStructureType sType
3480 void* pNext
3481 VkQueueFamilyProperties queueFamilyProperties
3482}
3483
Jesse Halld0599582017-03-10 18:35:38 -08003484@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003485class VkPhysicalDeviceMemoryProperties2KHR {
3486 VkStructureType sType
3487 void* pNext
3488 VkPhysicalDeviceMemoryProperties memoryProperties
3489}
3490
Jesse Halld0599582017-03-10 18:35:38 -08003491@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003492class VkSparseImageFormatProperties2KHR {
3493 VkStructureType sType
3494 void* pNext
3495 VkSparseImageFormatProperties properties
3496}
3497
Jesse Halld0599582017-03-10 18:35:38 -08003498@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003499class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3500 VkStructureType sType
3501 const void* pNext
3502 VkFormat format
3503 VkImageType type
3504 VkSampleCountFlagBits samples
3505 VkImageUsageFlags usage
3506 VkImageTiling tiling
3507}
3508
Jesse Halld0599582017-03-10 18:35:38 -08003509@extension("VK_KHX_device_group") // 61
3510class VkMemoryAllocateFlagsInfoKHX {
3511 VkStructureType sType
3512 const void* pNext
3513 VkMemoryAllocateFlagsKHX flags
3514 u32 deviceMask
3515}
3516
3517@extension("VK_KHX_device_group") // 61
3518class VkBindBufferMemoryInfoKHX {
3519 VkStructureType sType
3520 const void* pNext
3521 VkBuffer buffer
3522 VkDeviceMemory memory
3523 VkDeviceSize memoryOffset
3524 u32 deviceIndexCount
3525 const u32* pDeviceIndices
3526}
3527
3528@extension("VK_KHX_device_group") // 61
3529class VkBindImageMemoryInfoKHX {
3530 VkStructureType sType
3531 const void* pNext
3532 VkImage image
3533 VkDeviceMemory memory
3534 VkDeviceSize memoryOffset
3535 u32 deviceIndexCount
3536 const u32* pDeviceIndices
3537 u32 SFRRectCount
3538 const VkRect2D* pSFRRects
3539}
3540
3541@extension("VK_KHX_device_group") // 61
3542class VkDeviceGroupRenderPassBeginInfoKHX {
3543 VkStructureType sType
3544 const void* pNext
3545 u32 deviceMask
3546 u32 deviceRenderAreaCount
3547 const VkRect2D* pDeviceRenderAreas
3548}
3549
3550@extension("VK_KHX_device_group") // 61
3551class VkDeviceGroupCommandBufferBeginInfoKHX {
3552 VkStructureType sType
3553 const void* pNext
3554 u32 deviceMask
3555}
3556
3557@extension("VK_KHX_device_group") // 61
3558class VkDeviceGroupSubmitInfoKHX {
3559 VkStructureType sType
3560 const void* pNext
3561 u32 waitSemaphoreCount
3562 const u32* pWaitSemaphoreDeviceIndices
3563 u32 commandBufferCount
3564 const u32* pCommandBufferDeviceMasks
3565 u32 signalSemaphoreCount
3566 const u32* pSignalSemaphoreDeviceIndices
3567}
3568
3569@extension("VK_KHX_device_group") // 61
3570class VkDeviceGroupBindSparseInfoKHX {
3571 VkStructureType sType
3572 const void* pNext
3573 u32 resourceDeviceIndex
3574 u32 memoryDeviceIndex
3575}
3576
3577@extension("VK_KHX_device_group") // 61
3578class VkDeviceGroupPresentCapabilitiesKHX {
3579 VkStructureType sType
3580 const void* pNext
3581 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3582 VkDeviceGroupPresentModeFlagsKHX modes
3583}
3584
3585@extension("VK_KHX_device_group") // 61
3586class VkImageSwapchainCreateInfoKHX {
3587 VkStructureType sType
3588 const void* pNext
3589 VkSwapchainKHR swapchain
3590}
3591
3592@extension("VK_KHX_device_group") // 61
3593class VkBindImageMemorySwapchainInfoKHX {
3594 VkStructureType sType
3595 const void* pNext
3596 VkSwapchainKHR swapchain
3597 u32 imageIndex
3598}
3599
3600@extension("VK_KHX_device_group") // 61
3601class VkAcquireNextImageInfoKHX {
3602 VkStructureType sType
3603 const void* pNext
3604 VkSwapchainKHR swapchain
3605 u64 timeout
3606 VkSemaphore semaphore
3607 VkFence fence
3608 u32 deviceMask
3609}
3610
3611@extension("VK_KHX_device_group") // 61
3612class VkDeviceGroupPresentInfoKHX {
3613 VkStructureType sType
3614 const void* pNext
3615 u32 swapchainCount
3616 const u32* pDeviceMasks
3617 VkDeviceGroupPresentModeFlagBitsKHX mode
3618}
3619
3620@extension("VK_KHX_device_group") // 61
3621class VkDeviceGroupSwapchainCreateInfoKHX {
3622 VkStructureType sType
3623 const void* pNext
3624 VkDeviceGroupPresentModeFlagsKHX modes
3625}
3626
3627@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08003628class VkValidationFlagsEXT {
3629 VkStructureType sType
3630 const void* pNext
3631 u32 disabledValidationCheckCount
3632 VkValidationCheckEXT* pDisabledValidationChecks
3633}
3634
Jesse Halld0599582017-03-10 18:35:38 -08003635@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08003636class VkViSurfaceCreateInfoNN {
3637 VkStructureType sType
3638 const void* pNext
3639 VkViSurfaceCreateFlagsNN flags
3640 void* window
3641}
3642
Jesse Halld0599582017-03-10 18:35:38 -08003643@extension("VK_KHX_device_group_creation") // 71
3644class VkPhysicalDeviceGroupPropertiesKHX {
3645 VkStructureType sType
3646 const void* pNext
3647 u32 physicalDeviceCount
3648 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3649 VkBool32 subsetAllocation
3650}
3651
3652@extension("VK_KHX_device_group_creation") // 71
3653class VkDeviceGroupDeviceCreateInfoKHX {
3654 VkStructureType sType
3655 const void* pNext
3656 u32 physicalDeviceCount
3657 const VkPhysicalDevice* pPhysicalDevices
3658}
3659
3660@extension("VK_KHX_external_memory_capabilities") // 72
3661class VkExternalMemoryPropertiesKHX {
3662 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3663 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3664 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3665}
3666
3667@extension("VK_KHX_external_memory_capabilities") // 72
3668class VkPhysicalDeviceExternalImageFormatInfoKHX {
3669 VkStructureType sType
3670 const void* pNext
3671 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3672}
3673
3674@extension("VK_KHX_external_memory_capabilities") // 72
3675class VkExternalImageFormatPropertiesKHX {
3676 VkStructureType sType
3677 void* pNext
3678 VkExternalMemoryPropertiesKHX externalMemoryProperties
3679}
3680
3681@extension("VK_KHX_external_memory_capabilities") // 72
3682class VkPhysicalDeviceExternalBufferInfoKHX {
3683 VkStructureType sType
3684 const void* pNext
3685 VkBufferCreateFlags flags
3686 VkBufferUsageFlags usage
3687 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3688}
3689
3690@extension("VK_KHX_external_memory_capabilities") // 72
3691class VkExternalBufferPropertiesKHX {
3692 VkStructureType sType
3693 void* pNext
3694 VkExternalMemoryPropertiesKHX externalMemoryProperties
3695}
3696
3697@extension("VK_KHX_external_memory_capabilities") // 72
3698class VkPhysicalDeviceIDPropertiesKHX {
3699 VkStructureType sType
3700 void* pNext
3701 u8[VK_UUID_SIZE] deviceUUID
3702 u8[VK_UUID_SIZE] driverUUID
3703 u8[VK_LUID_SIZE_KHX] deviceLUID
3704 VkBool32 deviceLUIDValid
3705}
3706
3707@extension("VK_KHX_external_memory_capabilities") // 72
3708class VkPhysicalDeviceProperties2KHX {
3709 VkStructureType sType
3710 void* pNext
3711 VkPhysicalDeviceProperties properties
3712}
3713
3714@extension("VK_KHX_external_memory_capabilities") // 72
3715class VkImageFormatProperties2KHX {
3716 VkStructureType sType
3717 void* pNext
3718 VkImageFormatProperties imageFormatProperties
3719}
3720
3721@extension("VK_KHX_external_memory_capabilities") // 72
3722class VkPhysicalDeviceImageFormatInfo2KHX {
3723 VkStructureType sType
3724 const void* pNext
3725 VkFormat format
3726 VkImageType type
3727 VkImageTiling tiling
3728 VkImageUsageFlags usage
3729 VkImageCreateFlags flags
3730}
3731
3732@extension("VK_KHX_external_memory") // 73
3733class VkExternalMemoryImageCreateInfoKHX {
3734 VkStructureType sType
3735 const void* pNext
3736 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3737}
3738
3739@extension("VK_KHX_external_memory") // 73
3740class VkExternalMemoryBufferCreateInfoKHX {
3741 VkStructureType sType
3742 const void* pNext
3743 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3744}
3745
3746@extension("VK_KHX_external_memory") // 73
3747class VkExportMemoryAllocateInfoKHX {
3748 VkStructureType sType
3749 const void* pNext
3750 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3751}
3752
3753@extension("VK_KHX_external_memory_win32") // 74
3754class VkImportMemoryWin32HandleInfoKHX {
3755 VkStructureType sType
3756 const void* pNext
3757 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3758 platform.HANDLE handle
3759}
3760
3761@extension("VK_KHX_external_memory_win32") // 74
3762class VkExportMemoryWin32HandleInfoKHX {
3763 VkStructureType sType
3764 const void* pNext
3765 const platform.SECURITY_ATTRIBUTES* pAttributes
3766 platform.DWORD dwAccess
3767 platform.LPCWSTR name
3768}
3769
3770@extension("VK_KHX_external_memory_win32") // 74
3771class VkMemoryWin32HandlePropertiesKHX {
3772 VkStructureType sType
3773 void* pNext
3774 u32 memoryTypeBits
3775}
3776
3777@extension("VK_KHX_external_memory_fd") // 75
3778class VkImportMemoryFdInfoKHX {
3779 VkStructureType sType
3780 const void* pNext
3781 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3782 int fd
3783}
3784
3785@extension("VK_KHX_external_memory_fd") // 75
3786class VkMemoryFdPropertiesKHX {
3787 VkStructureType sType
3788 void* pNext
3789 u32 memoryTypeBits
3790}
3791
3792@extension("VK_KHX_win32_keyed_mutex") // 76
3793class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3794 VkStructureType sType
3795 const void* pNext
3796 u32 acquireCount
3797 const VkDeviceMemory* pAcquireSyncs
3798 const u64* pAcquireKeys
3799 const u32* pAcquireTimeouts
3800 u32 releaseCount
3801 const VkDeviceMemory* pReleaseSyncs
3802 const u64* pReleaseKeys
3803}
3804
3805@extension("VK_KHX_external_semaphore_capabilities") // 77
3806class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3807 VkStructureType sType
3808 const void* pNext
3809 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3810}
3811
3812@extension("VK_KHX_external_semaphore_capabilities") // 77
3813class VkExternalSemaphorePropertiesKHX {
3814 VkStructureType sType
3815 void* pNext
3816 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3817 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3818 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3819}
3820
3821@extension("VK_KHX_external_semaphore") // 78
3822class VkExportSemaphoreCreateInfoKHX {
3823 VkStructureType sType
3824 const void* pNext
3825 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3826}
3827
3828@extension("VK_KHX_external_semaphore_win32") // 79
3829class VkImportSemaphoreWin32HandleInfoKHX {
3830 VkStructureType sType
3831 const void* pNext
3832 VkSemaphore semaphore
3833 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3834 platform.HANDLE handle
3835}
3836
3837@extension("VK_KHX_external_semaphore_win32") // 79
3838class VkExportSemaphoreWin32HandleInfoKHX {
3839 VkStructureType sType
3840 const void* pNext
3841 const platform.SECURITY_ATTRIBUTES* pAttributes
3842 platform.DWORD dwAccess
3843 platform.LPCWSTR name
3844}
3845
3846@extension("VK_KHX_external_semaphore_win32") // 79
3847class VkD3D12FenceSubmitInfoKHX {
3848 VkStructureType sType
3849 const void* pNext
3850 u32 waitSemaphoreValuesCount
3851 const u64* pWaitSemaphoreValues
3852 u32 signalSemaphoreValuesCount
3853 const u64* pSignalSemaphoreValues
3854}
3855
3856@extension("VK_KHX_external_semaphore_fd") // 80
3857class VkImportSemaphoreFdInfoKHX {
3858 VkStructureType sType
3859 const void* pNext
3860 VkSemaphore semaphore
3861 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3862 s32 fd
3863}
3864
3865@extension("VK_KHR_push_descriptor") // 81
3866class VkPhysicalDevicePushDescriptorPropertiesKHR {
3867 VkStructureType sType
3868 void* pNext
3869 u32 maxPushDescriptors
3870}
3871
3872@extension("VK_KHR_descriptor_update_template") // 86
3873class VkDescriptorUpdateTemplateEntryKHR {
3874 u32 dstBinding
3875 u32 dstArrayElement
3876 u32 descriptorCount
3877 VkDescriptorType descriptorType
3878 platform.size_t offset
3879 platform.size_t stride
3880}
3881
3882@extension("VK_KHR_descriptor_update_template") // 86
3883class VkDescriptorUpdateTemplateCreateInfoKHR {
3884 VkStructureType sType
3885 void* pNext
3886 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3887 u32 descriptorUpdateEntryCount
3888 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3889 VkDescriptorUpdateTemplateTypeKHR templateType
3890 VkDescriptorSetLayout descriptorSetLayout
3891 VkPipelineBindPoint pipelineBindPoint
3892 VkPipelineLayout pipelineLayout
3893 u32 set
3894}
3895
3896@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003897class VkDeviceGeneratedCommandsFeaturesNVX {
3898 VkStructureType sType
3899 const void* pNext
3900 VkBool32 computeBindingPointSupport
3901}
3902
Jesse Halld0599582017-03-10 18:35:38 -08003903@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003904class VkDeviceGeneratedCommandsLimitsNVX {
3905 VkStructureType sType
3906 const void* pNext
3907 u32 maxIndirectCommandsLayoutTokenCount
3908 u32 maxObjectEntryCounts
3909 u32 minSequenceCountBufferOffsetAlignment
3910 u32 minSequenceIndexBufferOffsetAlignment
3911 u32 minCommandsTokenBufferOffsetAlignment
3912}
3913
Jesse Halld0599582017-03-10 18:35:38 -08003914@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003915class VkIndirectCommandsTokenNVX {
3916 VkIndirectCommandsTokenTypeNVX tokenType
3917 VkBuffer buffer
3918 VkDeviceSize offset
3919}
3920
Jesse Halld0599582017-03-10 18:35:38 -08003921@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003922class VkIndirectCommandsLayoutTokenNVX {
3923 VkIndirectCommandsTokenTypeNVX tokenType
3924 u32 bindingUnit
3925 u32 dynamicCount
3926 u32 divisor
3927}
3928
Jesse Halld0599582017-03-10 18:35:38 -08003929@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003930class VkIndirectCommandsLayoutCreateInfoNVX {
3931 VkStructureType sType
3932 const void* pNext
3933 VkPipelineBindPoint pipelineBindPoint
3934 VkIndirectCommandsLayoutUsageFlagsNVX flags
3935 u32 tokenCount
3936 const VkIndirectCommandsLayoutTokenNVX* pTokens
3937}
3938
Jesse Halld0599582017-03-10 18:35:38 -08003939@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003940class VkCmdProcessCommandsInfoNVX {
3941 VkStructureType sType
3942 const void* pNext
3943 VkObjectTableNVX objectTable
3944 VkIndirectCommandsLayoutNVX indirectCommandsLayout
3945 u32 indirectCommandsTokenCount
3946 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
3947 u32 maxSequencesCount
3948 VkCommandBuffer targetCommandBuffer
3949 VkBuffer sequencesCountBuffer
3950 VkDeviceSize sequencesCountOffset
3951 VkBuffer sequencesIndexBuffer
3952 VkDeviceSize sequencesIndexOffset
3953}
3954
Jesse Halld0599582017-03-10 18:35:38 -08003955@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003956class VkCmdReserveSpaceForCommandsInfoNVX {
3957 VkStructureType sType
3958 const void* pNext
3959 VkObjectTableNVX objectTable
3960 VkIndirectCommandsLayoutNVX indirectCommandsLayout
3961 u32 maxSequencesCount
3962}
3963
Jesse Halld0599582017-03-10 18:35:38 -08003964@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003965class VkObjectTableCreateInfoNVX {
3966 VkStructureType sType
3967 const void* pNext
3968 u32 objectCount
3969 const VkObjectEntryTypeNVX* pObjectEntryTypes
3970 const u32* pObjectEntryCounts
3971 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
3972 u32 maxUniformBuffersPerDescriptor
3973 u32 maxStorageBuffersPerDescriptor
3974 u32 maxStorageImagesPerDescriptor
3975 u32 maxSampledImagesPerDescriptor
3976 u32 maxPipelineLayouts
3977}
3978
Jesse Halld0599582017-03-10 18:35:38 -08003979@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003980class VkObjectTableEntryNVX {
3981 VkObjectEntryTypeNVX type
3982 VkObjectEntryUsageFlagsNVX flags
3983}
3984
Jesse Halld0599582017-03-10 18:35:38 -08003985@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003986class VkObjectTablePipelineEntryNVX {
3987 VkObjectEntryTypeNVX type
3988 VkObjectEntryUsageFlagsNVX flags
3989 VkPipeline pipeline
3990}
3991
Jesse Halld0599582017-03-10 18:35:38 -08003992@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003993class VkObjectTableDescriptorSetEntryNVX {
3994 VkObjectEntryTypeNVX type
3995 VkObjectEntryUsageFlagsNVX flags
3996 VkPipelineLayout pipelineLayout
3997 VkDescriptorSet descriptorSet
3998}
3999
Jesse Halld0599582017-03-10 18:35:38 -08004000@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004001class VkObjectTableVertexBufferEntryNVX {
4002 VkObjectEntryTypeNVX type
4003 VkObjectEntryUsageFlagsNVX flags
4004 VkBuffer buffer
4005}
4006
Jesse Halld0599582017-03-10 18:35:38 -08004007@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004008class VkObjectTableIndexBufferEntryNVX {
4009 VkObjectEntryTypeNVX type
4010 VkObjectEntryUsageFlagsNVX flags
4011 VkBuffer buffer
Jesse Hall08e2f482017-03-06 15:22:17 -08004012 VkIndexType indexType
Jesse Halleb02c472017-02-24 15:13:45 -08004013}
4014
Jesse Halld0599582017-03-10 18:35:38 -08004015@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004016class VkObjectTablePushConstantEntryNVX {
4017 VkObjectEntryTypeNVX type
4018 VkObjectEntryUsageFlagsNVX flags
4019 VkPipelineLayout pipelineLayout
4020 VkShaderStageFlags stageFlags
4021}
4022
Jesse Halld0599582017-03-10 18:35:38 -08004023@extension("VK_NV_clip_space_w_scaling") // 88
4024class VkViewportWScalingNV {
4025 f32 xcoeff
4026 f32 ycoeff
4027}
4028
4029@extension("VK_NV_clip_space_w_scaling") // 88
4030class VkPipelineViewportWScalingStateCreateInfoNV {
4031 VkStructureType sType
4032 const void* pNext
4033 VkBool32 viewportWScalingEnable
4034 u32 viewportCount
4035 const VkViewportWScalingNV* pViewportWScalings
4036}
4037
4038@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08004039class VkSurfaceCapabilities2EXT {
4040 VkStructureType sType
4041 void* pNext
4042 u32 minImageCount
4043 u32 maxImageCount
4044 VkExtent2D currentExtent
4045 VkExtent2D minImageExtent
4046 VkExtent2D maxImageExtent
4047 u32 maxImageArrayLayers
4048 VkSurfaceTransformFlagsKHR supportedTransforms
4049 VkSurfaceTransformFlagBitsKHR currentTransform
4050 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4051 VkImageUsageFlags supportedUsageFlags
4052 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4053}
4054
Jesse Halld0599582017-03-10 18:35:38 -08004055@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004056class VkDisplayPowerInfoEXT {
4057 VkStructureType sType
4058 const void* pNext
4059 VkDisplayPowerStateEXT powerState
4060}
4061
Jesse Halld0599582017-03-10 18:35:38 -08004062@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004063class VkDeviceEventInfoEXT {
4064 VkStructureType sType
4065 const void* pNext
4066 VkDeviceEventTypeEXT deviceEvent
4067}
4068
Jesse Halld0599582017-03-10 18:35:38 -08004069@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004070class VkDisplayEventInfoEXT {
4071 VkStructureType sType
4072 const void* pNext
4073 VkDisplayEventTypeEXT displayEvent
4074}
4075
Jesse Halld0599582017-03-10 18:35:38 -08004076@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004077class VkSwapchainCounterCreateInfoEXT {
4078 VkStructureType sType
4079 const void* pNext
4080 VkSurfaceCounterFlagsEXT surfaceCounters
4081}
Jesse Hall1356b0d2015-11-23 17:24:58 -08004082
Jesse Halld0599582017-03-10 18:35:38 -08004083@extension("VK_NVX_multiview_per_view_attributes") // 98
4084class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4085 VkStructureType sType
4086 void* pNext
4087 VkBool32 perViewPositionAllComponents
4088}
4089
4090@extension("VK_NV_viewport_swizzle") // 99
4091class VkViewportSwizzleNV {
4092 VkViewportCoordinateSwizzleNV x
4093 VkViewportCoordinateSwizzleNV y
4094 VkViewportCoordinateSwizzleNV z
4095 VkViewportCoordinateSwizzleNV w
4096}
4097
4098@extension("VK_NV_viewport_swizzle") // 99
4099class VkPipelineViewportSwizzleStateCreateInfoNV {
4100 VkStructureType sType
4101 const void* pNext
4102 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4103 u32 viewportCount
4104 const VkViewportSwizzleNV* pViewportSwizzles
4105}
4106
4107@extension("VK_EXT_discard_rectangles") // 100
4108class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4109 VkStructureType sType
4110 const void* pNext
4111 u32 maxDiscardRectangles
4112}
4113
4114@extension("VK_EXT_discard_rectangles") // 100
4115class VkPipelineDiscardRectangleStateCreateInfoEXT {
4116 VkStructureType sType
4117 const void* pNext
4118 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4119 VkDiscardRectangleModeEXT discardRectangleMode
4120 u32 discardRectangleCount
4121 const VkRect2D* pDiscardRectangles
4122}
4123
4124@extension("VK_MVK_ios_surface") // 123
4125class VkIOSSurfaceCreateInfoMVK {
4126 VkStructureType sType
4127 const void* pNext
4128 VkIOSSurfaceCreateFlagsMVK flags
4129 const void* pView
4130}
4131
4132@extension("VK_MVK_macos_surface") // 124
4133class VkMacOSSurfaceCreateInfoMVK {
4134 VkStructureType sType
4135 const void* pNext
4136 VkMacOSSurfaceCreateFlagsMVK flags
4137 const void* pView
4138}
4139
Jesse Halld27f6aa2015-08-15 17:58:48 -07004140////////////////
4141// Commands //
4142////////////////
4143
4144// Function pointers. TODO: add support for function pointers.
4145
4146@external type void* PFN_vkVoidFunction
4147@pfn cmd void vkVoidFunction() {
4148}
4149
Jesse Hall3fbc8562015-11-29 22:10:52 -08004150@external type void* PFN_vkAllocationFunction
4151@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004152 void* pUserData,
4153 platform.size_t size,
4154 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004155 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004156 return ?
4157}
4158
Jesse Hall3fbc8562015-11-29 22:10:52 -08004159@external type void* PFN_vkReallocationFunction
4160@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004161 void* pUserData,
4162 void* pOriginal,
4163 platform.size_t size,
4164 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004165 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004166 return ?
4167}
4168
4169@external type void* PFN_vkFreeFunction
4170@pfn cmd void vkFreeFunction(
4171 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004172 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004173}
4174
Jesse Hall3fbc8562015-11-29 22:10:52 -08004175@external type void* PFN_vkInternalAllocationNotification
4176@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004177 void* pUserData,
4178 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004179 VkInternalAllocationType allocationType,
4180 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004181}
4182
4183@external type void* PFN_vkInternalFreeNotification
4184@pfn cmd void vkInternalFreeNotification(
4185 void* pUserData,
4186 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004187 VkInternalAllocationType allocationType,
4188 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004189}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004190
4191// Global functions
4192
4193@threadSafety("system")
4194cmd VkResult vkCreateInstance(
4195 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004196 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004197 VkInstance* pInstance) {
4198 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4199
4200 instance := ?
4201 pInstance[0] = instance
4202 State.Instances[instance] = new!InstanceObject()
4203
Jesse Hall3dd678a2016-01-08 21:52:01 -08004204 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4205 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004206
4207 return ?
4208}
4209
4210@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004211cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004212 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004213 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004214 instanceObject := GetInstance(instance)
4215
4216 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004217}
4218
4219@threadSafety("system")
4220cmd VkResult vkEnumeratePhysicalDevices(
4221 VkInstance instance,
4222 u32* pPhysicalDeviceCount,
4223 VkPhysicalDevice* pPhysicalDevices) {
4224 instanceObject := GetInstance(instance)
4225
4226 physicalDeviceCount := as!u32(?)
4227 pPhysicalDeviceCount[0] = physicalDeviceCount
4228 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4229
4230 for i in (0 .. physicalDeviceCount) {
4231 physicalDevice := ?
4232 physicalDevices[i] = physicalDevice
4233 if !(physicalDevice in State.PhysicalDevices) {
4234 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4235 }
4236 }
4237
4238 return ?
4239}
4240
4241cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4242 VkDevice device,
4243 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004244 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004245 device := GetDevice(device)
4246 }
4247
4248 return ?
4249}
4250
4251cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4252 VkInstance instance,
4253 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004254 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004255 instanceObject := GetInstance(instance)
4256 }
4257
4258 return ?
4259}
4260
Jesse Hall606a54e2015-11-19 22:17:28 -08004261cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004262 VkPhysicalDevice physicalDevice,
4263 VkPhysicalDeviceProperties* pProperties) {
4264 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4265
4266 properties := ?
4267 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004268}
4269
Jesse Hall606a54e2015-11-19 22:17:28 -08004270cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004271 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004272 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004273 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004274 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004275 // TODO: Figure out how to express fetch-count-or-properties
4276 // This version fails 'apic validate' with 'fence not allowed in
4277 // *semantic.Branch'. Other attempts have failed with the same or other
4278 // errors.
4279 // if pQueueFamilyProperties != null {
4280 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4281 // for i in (0 .. pCount[0]) {
4282 // queueProperties := as!VkQueueFamilyProperties(?)
4283 // queuesProperties[i] = queueProperties
4284 // }
4285 // } else {
4286 // count := ?
4287 // pCount[0] = count
4288 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004289}
4290
Jesse Hall606a54e2015-11-19 22:17:28 -08004291cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004292 VkPhysicalDevice physicalDevice,
4293 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4294 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4295
4296 memoryProperties := ?
4297 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004298}
4299
Jesse Hall606a54e2015-11-19 22:17:28 -08004300cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004301 VkPhysicalDevice physicalDevice,
4302 VkPhysicalDeviceFeatures* pFeatures) {
4303 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4304
4305 features := ?
4306 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004307}
4308
Jesse Hall606a54e2015-11-19 22:17:28 -08004309cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004310 VkPhysicalDevice physicalDevice,
4311 VkFormat format,
4312 VkFormatProperties* pFormatProperties) {
4313 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4314
4315 formatProperties := ?
4316 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004317}
4318
Jesse Halla9e57032015-11-30 01:03:10 -08004319cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004320 VkPhysicalDevice physicalDevice,
4321 VkFormat format,
4322 VkImageType type,
4323 VkImageTiling tiling,
4324 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004325 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004326 VkImageFormatProperties* pImageFormatProperties) {
4327 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4328
4329 imageFormatProperties := ?
4330 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004331
4332 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004333}
4334
Jesse Halld27f6aa2015-08-15 17:58:48 -07004335
4336// Device functions
4337
4338@threadSafety("system")
4339cmd VkResult vkCreateDevice(
4340 VkPhysicalDevice physicalDevice,
4341 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004342 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004343 VkDevice* pDevice) {
4344 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4345 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4346
4347 device := ?
4348 pDevice[0] = device
4349 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4350
4351 return ?
4352}
4353
4354@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004355cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004356 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004357 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004358 deviceObject := GetDevice(device)
4359
4360 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004361}
4362
4363
4364// Extension discovery functions
4365
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004366cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004367 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004368 VkLayerProperties* pProperties) {
4369 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004370 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004371
4372 properties := pProperties[0:count]
4373 for i in (0 .. count) {
4374 property := ?
4375 properties[i] = property
4376 }
4377
4378 return ?
4379}
4380
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004381cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004382 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004383 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004384 VkExtensionProperties* pProperties) {
4385 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004386 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004387
4388 properties := pProperties[0:count]
4389 for i in (0 .. count) {
4390 property := ?
4391 properties[i] = property
4392 }
4393
4394 return ?
4395}
4396
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004397cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004398 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004399 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004400 VkLayerProperties* pProperties) {
4401 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4402 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004403 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004404
4405 properties := pProperties[0:count]
4406 for i in (0 .. count) {
4407 property := ?
4408 properties[i] = property
4409 }
4410
4411 return ?
4412}
4413
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004414cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004415 VkPhysicalDevice physicalDevice,
4416 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004417 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004418 VkExtensionProperties* pProperties) {
4419 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4420
4421 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004422 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004423
4424 properties := pProperties[0:count]
4425 for i in (0 .. count) {
4426 property := ?
4427 properties[i] = property
4428 }
4429
4430 return ?
4431}
4432
4433
4434// Queue functions
4435
4436@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004437cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004438 VkDevice device,
4439 u32 queueFamilyIndex,
4440 u32 queueIndex,
4441 VkQueue* pQueue) {
4442 deviceObject := GetDevice(device)
4443
4444 queue := ?
4445 pQueue[0] = queue
4446
4447 if !(queue in State.Queues) {
4448 State.Queues[queue] = new!QueueObject(device: device)
4449 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004450}
4451
4452@threadSafety("app")
4453cmd VkResult vkQueueSubmit(
4454 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004455 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004456 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004457 VkFence fence) {
4458 queueObject := GetQueue(queue)
4459
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004460 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004461 fenceObject := GetFence(fence)
4462 assert(fenceObject.device == queueObject.device)
4463 }
4464
Jesse Hall3fbc8562015-11-29 22:10:52 -08004465 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4466 // for i in (0 .. commandBufferCount) {
4467 // commandBuffer := commandBuffers[i]
4468 // commandBufferObject := GetCommandBuffer(commandBuffer)
4469 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004470 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004471 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4472 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004473 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004474
4475 return ?
4476}
4477
4478@threadSafety("system")
4479cmd VkResult vkQueueWaitIdle(
4480 VkQueue queue) {
4481 queueObject := GetQueue(queue)
4482
4483 return ?
4484}
4485
4486@threadSafety("system")
4487cmd VkResult vkDeviceWaitIdle(
4488 VkDevice device) {
4489 deviceObject := GetDevice(device)
4490
4491 return ?
4492}
4493
4494
4495// Memory functions
4496
4497@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004498cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004499 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004500 const VkMemoryAllocateInfo* pAllocateInfo,
4501 const VkAllocationCallbacks* pAllocator,
4502 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004503 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004504 deviceObject := GetDevice(device)
4505
Jesse Hall3fbc8562015-11-29 22:10:52 -08004506 memory := ?
4507 pMemory[0] = memory
4508 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004509 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004510 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004511
4512 return ?
4513}
4514
4515@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004516cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004517 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004518 VkDeviceMemory memory,
4519 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004520 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004521 memoryObject := GetDeviceMemory(memory)
4522 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004523
4524 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004525 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004526 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004527 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4528 "vkFreeMemory: commandBuffers still bound")
4529 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004530}
4531
4532@threadSafety("app")
4533cmd VkResult vkMapMemory(
4534 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004535 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004536 VkDeviceSize offset,
4537 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004538 VkMemoryMapFlags flags,
4539 void** ppData) {
4540 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004541 memoryObject := GetDeviceMemory(memory)
4542 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004543
4544 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004545 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004546
4547 return ?
4548}
4549
4550@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004551cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004552 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004553 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004554 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004555 memoryObject := GetDeviceMemory(memory)
4556 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004557}
4558
4559cmd VkResult vkFlushMappedMemoryRanges(
4560 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004561 u32 memoryRangeCount
4562 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004563 deviceObject := GetDevice(device)
4564
Jesse Hall3fbc8562015-11-29 22:10:52 -08004565 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4566 for i in (0 .. memoryRangeCount) {
4567 memoryRange := memoryRanges[i]
4568 memoryObject := GetDeviceMemory(memoryRange.memory)
4569 assert(memoryObject.device == device)
4570 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004571 }
4572
4573 return ?
4574}
4575
4576cmd VkResult vkInvalidateMappedMemoryRanges(
4577 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004578 u32 memoryRangeCount,
4579 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004580 deviceObject := GetDevice(device)
4581
Jesse Hall3fbc8562015-11-29 22:10:52 -08004582 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4583 for i in (0 .. memoryRangeCount) {
4584 memoryRange := memoryRanges[i]
4585 memoryObject := GetDeviceMemory(memoryRange.memory)
4586 assert(memoryObject.device == device)
4587 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004588 }
4589
4590 return ?
4591}
4592
4593
4594// Memory management API functions
4595
Jesse Hall606a54e2015-11-19 22:17:28 -08004596cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004597 VkDevice device,
4598 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004599 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004600 deviceObject := GetDevice(device)
4601
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004602 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004603 memoryObject := GetDeviceMemory(memory)
4604 assert(memoryObject.device == device)
4605 }
4606
4607 committedMemoryInBytes := ?
4608 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004609}
4610
Jesse Hall606a54e2015-11-19 22:17:28 -08004611cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004612 VkDevice device,
4613 VkBuffer buffer,
4614 VkMemoryRequirements* pMemoryRequirements) {
4615 deviceObject := GetDevice(device)
4616 bufferObject := GetBuffer(buffer)
4617 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004618}
4619
4620cmd VkResult vkBindBufferMemory(
4621 VkDevice device,
4622 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004623 VkDeviceMemory memory,
4624 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004625 deviceObject := GetDevice(device)
4626 bufferObject := GetBuffer(buffer)
4627 assert(bufferObject.device == device)
4628
4629 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004630 if bufferObject.memory != NULL_HANDLE {
4631 memoryObject := GetDeviceMemory(bufferObject.memory)
4632 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004633 }
4634
4635 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004636 if memory != NULL_HANDLE {
4637 memoryObject := GetDeviceMemory(memory)
4638 assert(memoryObject.device == device)
4639 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004640 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004641 bufferObject.memory = memory
4642 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004643
4644 return ?
4645}
4646
Jesse Hall606a54e2015-11-19 22:17:28 -08004647cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004648 VkDevice device,
4649 VkImage image,
4650 VkMemoryRequirements* pMemoryRequirements) {
4651 deviceObject := GetDevice(device)
4652 imageObject := GetImage(image)
4653 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004654}
4655
4656cmd VkResult vkBindImageMemory(
4657 VkDevice device,
4658 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004659 VkDeviceMemory memory,
4660 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004661 deviceObject := GetDevice(device)
4662 imageObject := GetImage(image)
4663 assert(imageObject.device == device)
4664
4665 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004666 if imageObject.memory != NULL_HANDLE {
4667 memoryObject := GetDeviceMemory(imageObject.memory)
4668 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004669 }
4670
4671 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004672 if memory != NULL_HANDLE {
4673 memoryObject := GetDeviceMemory(memory)
4674 assert(memoryObject.device == device)
4675 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004676 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004677 imageObject.memory = memory
4678 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004679
4680 return ?
4681}
4682
Jesse Hall606a54e2015-11-19 22:17:28 -08004683cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004684 VkDevice device,
4685 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004686 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004687 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4688 deviceObject := GetDevice(device)
4689 imageObject := GetImage(image)
4690 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004691}
4692
Jesse Hall606a54e2015-11-19 22:17:28 -08004693cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004694 VkPhysicalDevice physicalDevice,
4695 VkFormat format,
4696 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004697 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004698 VkImageUsageFlags usage,
4699 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004700 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004701 VkSparseImageFormatProperties* pProperties) {
4702 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004703}
4704
Jesse Halla6429252015-11-29 18:59:42 -08004705cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004706 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004707 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004708 const VkBindSparseInfo* pBindInfo,
4709 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004710 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004711
4712 return ?
4713}
4714
4715
4716// Fence functions
4717
4718@threadSafety("system")
4719cmd VkResult vkCreateFence(
4720 VkDevice device,
4721 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004722 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004723 VkFence* pFence) {
4724 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4725 deviceObject := GetDevice(device)
4726
4727 fence := ?
4728 pFence[0] = fence
4729 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004730 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004731
4732 return ?
4733}
4734
4735@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004736cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004737 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004738 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004739 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004740 deviceObject := GetDevice(device)
4741 fenceObject := GetFence(fence)
4742 assert(fenceObject.device == device)
4743
4744 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004745}
4746
4747@threadSafety("system")
4748cmd VkResult vkResetFences(
4749 VkDevice device,
4750 u32 fenceCount,
4751 const VkFence* pFences) {
4752 deviceObject := GetDevice(device)
4753
4754 fences := pFences[0:fenceCount]
4755 for i in (0 .. fenceCount) {
4756 fence := fences[i]
4757 fenceObject := GetFence(fence)
4758 assert(fenceObject.device == device)
4759 fenceObject.signaled = false
4760 }
4761
4762 return ?
4763}
4764
4765@threadSafety("system")
4766cmd VkResult vkGetFenceStatus(
4767 VkDevice device,
4768 VkFence fence) {
4769 deviceObject := GetDevice(device)
4770 fenceObject := GetFence(fence)
4771 assert(fenceObject.device == device)
4772
4773 return ?
4774}
4775
4776@threadSafety("system")
4777cmd VkResult vkWaitForFences(
4778 VkDevice device,
4779 u32 fenceCount,
4780 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004781 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004782 u64 timeout) { /// timeout in nanoseconds
4783 deviceObject := GetDevice(device)
4784
4785 fences := pFences[0:fenceCount]
4786 for i in (0 .. fenceCount) {
4787 fence := fences[i]
4788 fenceObject := GetFence(fence)
4789 assert(fenceObject.device == device)
4790 }
4791
4792 return ?
4793}
4794
4795
4796// Queue semaphore functions
4797
4798@threadSafety("system")
4799cmd VkResult vkCreateSemaphore(
4800 VkDevice device,
4801 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004802 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004803 VkSemaphore* pSemaphore) {
4804 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4805 deviceObject := GetDevice(device)
4806
4807 semaphore := ?
4808 pSemaphore[0] = semaphore
4809 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4810
4811 return ?
4812}
4813
4814@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004815cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004816 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004817 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004818 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004819 deviceObject := GetDevice(device)
4820 semaphoreObject := GetSemaphore(semaphore)
4821 assert(semaphoreObject.device == device)
4822
4823 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004824}
4825
Jesse Halld27f6aa2015-08-15 17:58:48 -07004826
4827// Event functions
4828
4829@threadSafety("system")
4830cmd VkResult vkCreateEvent(
4831 VkDevice device,
4832 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004833 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004834 VkEvent* pEvent) {
4835 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
4836 deviceObject := GetDevice(device)
4837
4838 event := ?
4839 pEvent[0] = event
4840 State.Events[event] = new!EventObject(device: device)
4841
4842 return ?
4843}
4844
4845@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004846cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004847 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004848 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004849 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004850 deviceObject := GetDevice(device)
4851 eventObject := GetEvent(event)
4852 assert(eventObject.device == device)
4853
4854 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004855}
4856
4857@threadSafety("system")
4858cmd VkResult vkGetEventStatus(
4859 VkDevice device,
4860 VkEvent event) {
4861 deviceObject := GetDevice(device)
4862 eventObject := GetEvent(event)
4863 assert(eventObject.device == device)
4864
4865 return ?
4866}
4867
4868@threadSafety("system")
4869cmd VkResult vkSetEvent(
4870 VkDevice device,
4871 VkEvent event) {
4872 deviceObject := GetDevice(device)
4873 eventObject := GetEvent(event)
4874 assert(eventObject.device == device)
4875
4876 return ?
4877}
4878
4879@threadSafety("system")
4880cmd VkResult vkResetEvent(
4881 VkDevice device,
4882 VkEvent event) {
4883 deviceObject := GetDevice(device)
4884 eventObject := GetEvent(event)
4885 assert(eventObject.device == device)
4886
4887 return ?
4888}
4889
4890
4891// Query functions
4892
4893@threadSafety("system")
4894cmd VkResult vkCreateQueryPool(
4895 VkDevice device,
4896 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004897 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004898 VkQueryPool* pQueryPool) {
4899 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
4900 deviceObject := GetDevice(device)
4901
4902 queryPool := ?
4903 pQueryPool[0] = queryPool
4904 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
4905
4906 return ?
4907}
4908
4909@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004910cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004911 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004912 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004913 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004914 deviceObject := GetDevice(device)
4915 queryPoolObject := GetQueryPool(queryPool)
4916 assert(queryPoolObject.device == device)
4917
4918 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004919}
4920
4921@threadSafety("system")
4922cmd VkResult vkGetQueryPoolResults(
4923 VkDevice device,
4924 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004925 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004926 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08004927 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004928 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08004929 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004930 VkQueryResultFlags flags) {
4931 deviceObject := GetDevice(device)
4932 queryPoolObject := GetQueryPool(queryPool)
4933 assert(queryPoolObject.device == device)
4934
Jesse Halld27f6aa2015-08-15 17:58:48 -07004935 data := pData[0:dataSize]
4936
4937 return ?
4938}
4939
4940// Buffer functions
4941
4942@threadSafety("system")
4943cmd VkResult vkCreateBuffer(
4944 VkDevice device,
4945 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004946 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004947 VkBuffer* pBuffer) {
4948 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
4949 deviceObject := GetDevice(device)
4950
4951 buffer := ?
4952 pBuffer[0] = buffer
4953 State.Buffers[buffer] = new!BufferObject(device: device)
4954
4955 return ?
4956}
4957
4958@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004959cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004960 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004961 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004962 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004963 deviceObject := GetDevice(device)
4964 bufferObject := GetBuffer(buffer)
4965 assert(bufferObject.device == device)
4966
Jesse Hall3fbc8562015-11-29 22:10:52 -08004967 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004968 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004969}
4970
4971
4972// Buffer view functions
4973
4974@threadSafety("system")
4975cmd VkResult vkCreateBufferView(
4976 VkDevice device,
4977 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004978 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004979 VkBufferView* pView) {
4980 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
4981 deviceObject := GetDevice(device)
4982
4983 bufferObject := GetBuffer(pCreateInfo.buffer)
4984 assert(bufferObject.device == device)
4985
4986 view := ?
4987 pView[0] = view
4988 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
4989
4990 return ?
4991}
4992
4993@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004994cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004995 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004996 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004997 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004998 deviceObject := GetDevice(device)
4999 bufferViewObject := GetBufferView(bufferView)
5000 assert(bufferViewObject.device == device)
5001
5002 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005003}
5004
5005
5006// Image functions
5007
5008@threadSafety("system")
5009cmd VkResult vkCreateImage(
5010 VkDevice device,
5011 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005012 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005013 VkImage* pImage) {
5014 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5015 deviceObject := GetDevice(device)
5016
5017 image := ?
5018 pImage[0] = image
5019 State.Images[image] = new!ImageObject(device: device)
5020
5021 return ?
5022}
5023
5024@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005025cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005026 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005027 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005028 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005029 deviceObject := GetDevice(device)
5030 imageObject := GetImage(image)
5031 assert(imageObject.device == device)
5032
Jesse Hall3fbc8562015-11-29 22:10:52 -08005033 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005034 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005035}
5036
Jesse Hall606a54e2015-11-19 22:17:28 -08005037cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005038 VkDevice device,
5039 VkImage image,
5040 const VkImageSubresource* pSubresource,
5041 VkSubresourceLayout* pLayout) {
5042 deviceObject := GetDevice(device)
5043 imageObject := GetImage(image)
5044 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005045}
5046
5047
5048// Image view functions
5049
5050@threadSafety("system")
5051cmd VkResult vkCreateImageView(
5052 VkDevice device,
5053 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005054 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005055 VkImageView* pView) {
5056 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5057 deviceObject := GetDevice(device)
5058
5059 imageObject := GetImage(pCreateInfo.image)
5060 assert(imageObject.device == device)
5061
5062 view := ?
5063 pView[0] = view
5064 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5065
5066 return ?
5067}
5068
5069@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005070cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005071 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005072 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005073 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005074 deviceObject := GetDevice(device)
5075 imageViewObject := GetImageView(imageView)
5076 assert(imageViewObject.device == device)
5077
5078 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005079}
5080
5081
5082// Shader functions
5083
5084cmd VkResult vkCreateShaderModule(
5085 VkDevice device,
5086 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005087 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005088 VkShaderModule* pShaderModule) {
5089 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5090 deviceObject := GetDevice(device)
5091
5092 shaderModule := ?
5093 pShaderModule[0] = shaderModule
5094 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5095
5096 return ?
5097}
5098
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005099cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005100 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005101 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005102 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005103 deviceObject := GetDevice(device)
5104 shaderModuleObject := GetShaderModule(shaderModule)
5105 assert(shaderModuleObject.device == device)
5106
5107 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005108}
5109
Jesse Halld27f6aa2015-08-15 17:58:48 -07005110
5111// Pipeline functions
5112
5113cmd VkResult vkCreatePipelineCache(
5114 VkDevice device,
5115 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005116 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005117 VkPipelineCache* pPipelineCache) {
5118 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5119 deviceObject := GetDevice(device)
5120
5121 pipelineCache := ?
5122 pPipelineCache[0] = pipelineCache
5123 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5124
5125 return ?
5126}
5127
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005128cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005129 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005130 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005131 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005132 deviceObject := GetDevice(device)
5133 pipelineCacheObject := GetPipelineCache(pipelineCache)
5134 assert(pipelineCacheObject.device == device)
5135
5136 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005137}
5138
Jesse Halld27f6aa2015-08-15 17:58:48 -07005139cmd VkResult vkGetPipelineCacheData(
5140 VkDevice device,
5141 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005142 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005143 void* pData) {
5144 deviceObject := GetDevice(device)
5145 pipelineCacheObject := GetPipelineCache(pipelineCache)
5146 assert(pipelineCacheObject.device == device)
5147
5148 return ?
5149}
5150
5151cmd VkResult vkMergePipelineCaches(
5152 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005153 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005154 u32 srcCacheCount,
5155 const VkPipelineCache* pSrcCaches) {
5156 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005157 dstCacheObject := GetPipelineCache(dstCache)
5158 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005159
5160 srcCaches := pSrcCaches[0:srcCacheCount]
5161 for i in (0 .. srcCacheCount) {
5162 srcCache := srcCaches[i]
5163 srcCacheObject := GetPipelineCache(srcCache)
5164 assert(srcCacheObject.device == device)
5165 }
5166
5167 return ?
5168}
5169
5170cmd VkResult vkCreateGraphicsPipelines(
5171 VkDevice device,
5172 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005173 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005174 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005175 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005176 VkPipeline* pPipelines) {
5177 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005178 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005179 pipelineCacheObject := GetPipelineCache(pipelineCache)
5180 assert(pipelineCacheObject.device == device)
5181 }
5182
Jesse Hall03b6fe12015-11-24 12:44:21 -08005183 createInfos := pCreateInfos[0:createInfoCount]
5184 pipelines := pPipelines[0:createInfoCount]
5185 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005186 pipeline := ?
5187 pipelines[i] = pipeline
5188 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5189 }
5190
5191 return ?
5192}
5193
5194cmd VkResult vkCreateComputePipelines(
5195 VkDevice device,
5196 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005197 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005198 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005199 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005200 VkPipeline* pPipelines) {
5201 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005202 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005203 pipelineCacheObject := GetPipelineCache(pipelineCache)
5204 assert(pipelineCacheObject.device == device)
5205 }
5206
Jesse Hall03b6fe12015-11-24 12:44:21 -08005207 createInfos := pCreateInfos[0:createInfoCount]
5208 pipelines := pPipelines[0:createInfoCount]
5209 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005210 pipeline := ?
5211 pipelines[i] = pipeline
5212 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5213 }
5214
5215 return ?
5216}
5217
5218@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005219cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005220 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005221 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005222 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005223 deviceObject := GetDevice(device)
5224 pipelineObjects := GetPipeline(pipeline)
5225 assert(pipelineObjects.device == device)
5226
5227 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005228}
5229
5230
5231// Pipeline layout functions
5232
5233@threadSafety("system")
5234cmd VkResult vkCreatePipelineLayout(
5235 VkDevice device,
5236 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005237 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005238 VkPipelineLayout* pPipelineLayout) {
5239 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5240 deviceObject := GetDevice(device)
5241
5242 pipelineLayout := ?
5243 pPipelineLayout[0] = pipelineLayout
5244 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5245
5246 return ?
5247}
5248
5249@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005250cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005251 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005252 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005253 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005254 deviceObject := GetDevice(device)
5255 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5256 assert(pipelineLayoutObjects.device == device)
5257
5258 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005259}
5260
5261
5262// Sampler functions
5263
5264@threadSafety("system")
5265cmd VkResult vkCreateSampler(
5266 VkDevice device,
5267 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005268 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005269 VkSampler* pSampler) {
5270 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5271 deviceObject := GetDevice(device)
5272
5273 sampler := ?
5274 pSampler[0] = sampler
5275 State.Samplers[sampler] = new!SamplerObject(device: device)
5276
5277 return ?
5278}
5279
5280@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005281cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005282 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005283 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005284 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005285 deviceObject := GetDevice(device)
5286 samplerObject := GetSampler(sampler)
5287 assert(samplerObject.device == device)
5288
5289 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005290}
5291
5292
5293// Descriptor set functions
5294
5295@threadSafety("system")
5296cmd VkResult vkCreateDescriptorSetLayout(
5297 VkDevice device,
5298 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005299 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005300 VkDescriptorSetLayout* pSetLayout) {
5301 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5302 deviceObject := GetDevice(device)
5303
5304 setLayout := ?
5305 pSetLayout[0] = setLayout
5306 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5307
5308 return ?
5309}
5310
5311@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005312cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005313 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005314 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005315 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005316 deviceObject := GetDevice(device)
5317 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5318 assert(descriptorSetLayoutObject.device == device)
5319
5320 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005321}
5322
5323@threadSafety("system")
5324cmd VkResult vkCreateDescriptorPool(
5325 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005326 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005327 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005328 VkDescriptorPool* pDescriptorPool) {
5329 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5330 deviceObject := GetDevice(device)
5331
5332 descriptorPool := ?
5333 pDescriptorPool[0] = descriptorPool
5334 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5335
5336 return ?
5337}
5338
5339@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005340cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005341 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005342 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005343 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005344 deviceObject := GetDevice(device)
5345 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5346 assert(descriptorPoolObject.device == device)
5347
5348 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005349}
5350
5351@threadSafety("app")
5352cmd VkResult vkResetDescriptorPool(
5353 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005354 VkDescriptorPool descriptorPool,
5355 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005356 deviceObject := GetDevice(device)
5357 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5358 assert(descriptorPoolObject.device == device)
5359
5360 return ?
5361}
5362
5363@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005364cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005365 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005366 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005367 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005368 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005369 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005370 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005371
Jesse Hall03b6fe12015-11-24 12:44:21 -08005372 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5373 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005374 setLayout := setLayouts[i]
5375 setLayoutObject := GetDescriptorSetLayout(setLayout)
5376 assert(setLayoutObject.device == device)
5377 }
5378
Jesse Hall03b6fe12015-11-24 12:44:21 -08005379 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5380 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005381 descriptorSet := ?
5382 descriptorSets[i] = descriptorSet
5383 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5384 }
5385
5386 return ?
5387}
5388
Jesse Hallf09c6b12015-08-15 19:54:28 -07005389cmd VkResult vkFreeDescriptorSets(
5390 VkDevice device,
5391 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005392 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005393 const VkDescriptorSet* pDescriptorSets) {
5394 deviceObject := GetDevice(device)
5395 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5396
Jesse Hall03b6fe12015-11-24 12:44:21 -08005397 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5398 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005399 descriptorSet := descriptorSets[i]
5400 descriptorSetObject := GetDescriptorSet(descriptorSet)
5401 assert(descriptorSetObject.device == device)
5402 State.DescriptorSets[descriptorSet] = null
5403 }
5404
5405 return ?
5406}
5407
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005408cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005409 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005410 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005411 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005412 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005413 const VkCopyDescriptorSet* pDescriptorCopies) {
5414 deviceObject := GetDevice(device)
5415
Jesse Hallb00daad2015-11-29 19:46:20 -08005416 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5417 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005418 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005419 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005420 assert(descriptorWriteObject.device == device)
5421 }
5422
Jesse Hallb00daad2015-11-29 19:46:20 -08005423 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5424 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005425 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005426 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005427 assert(descriptorCopyObject.device == device)
5428 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005429}
5430
5431
5432// Framebuffer functions
5433
5434@threadSafety("system")
5435cmd VkResult vkCreateFramebuffer(
5436 VkDevice device,
5437 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005438 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005439 VkFramebuffer* pFramebuffer) {
5440 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5441 deviceObject := GetDevice(device)
5442
5443 framebuffer := ?
5444 pFramebuffer[0] = framebuffer
5445 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5446
5447 return ?
5448}
5449
5450@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005451cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005452 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005453 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005454 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005455 deviceObject := GetDevice(device)
5456 framebufferObject := GetFramebuffer(framebuffer)
5457 assert(framebufferObject.device == device)
5458
5459 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005460}
5461
5462
5463// Renderpass functions
5464
5465@threadSafety("system")
5466cmd VkResult vkCreateRenderPass(
5467 VkDevice device,
5468 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005469 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005470 VkRenderPass* pRenderPass) {
5471 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5472 deviceObject := GetDevice(device)
5473
5474 renderpass := ?
5475 pRenderPass[0] = renderpass
5476 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5477
5478 return ?
5479}
5480
5481@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005482cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005483 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005484 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005485 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005486 deviceObject := GetDevice(device)
5487 renderPassObject := GetRenderPass(renderPass)
5488 assert(renderPassObject.device == device)
5489
5490 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005491}
5492
Jesse Hall606a54e2015-11-19 22:17:28 -08005493cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005494 VkDevice device,
5495 VkRenderPass renderPass,
5496 VkExtent2D* pGranularity) {
5497 deviceObject := GetDevice(device)
5498 renderPassObject := GetRenderPass(renderPass)
5499
5500 granularity := ?
5501 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005502}
5503
5504// Command pool functions
5505
5506cmd VkResult vkCreateCommandPool(
5507 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005508 const VkCommandPoolCreateInfo* pCreateInfo,
5509 const VkAllocationCallbacks* pAllocator,
5510 VkCommandPool* pCommandPool) {
5511 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005512 deviceObject := GetDevice(device)
5513
Jesse Hall3fbc8562015-11-29 22:10:52 -08005514 commandPool := ?
5515 pCommandPool[0] = commandPool
5516 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005517
5518 return ?
5519}
5520
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005521cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005522 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005523 VkCommandPool commandPool,
5524 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005525 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005526 commandPoolObject := GetCommandPool(commandPool)
5527 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005528
Jesse Hall3fbc8562015-11-29 22:10:52 -08005529 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005530}
5531
5532cmd VkResult vkResetCommandPool(
5533 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005534 VkCommandPool commandPool,
5535 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005536 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005537 commandPoolObject := GetCommandPool(commandPool)
5538 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005539
5540 return ?
5541}
5542
5543// Command buffer functions
5544
Jesse Hall3fbc8562015-11-29 22:10:52 -08005545macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5546 memoryObject := GetDeviceMemory(memory)
5547 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005548
Jesse Hall3fbc8562015-11-29 22:10:52 -08005549 commandBufferObject := GetCommandBuffer(commandBuffer)
5550 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005551}
5552
Jesse Hall3fbc8562015-11-29 22:10:52 -08005553macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5554 memoryObject := GetDeviceMemory(memory)
5555 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005556
Jesse Hall3fbc8562015-11-29 22:10:52 -08005557 commandBufferObject := GetCommandBuffer(commandBuffer)
5558 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005559}
5560
5561@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005562cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005563 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005564 const VkCommandBufferAllocateInfo* pAllocateInfo,
5565 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005566 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005567
Jesse Hall3dd678a2016-01-08 21:52:01 -08005568 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005569 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005570 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005571 commandBuffer := ?
5572 commandBuffers[i] = commandBuffer
5573 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005574 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005575
5576 return ?
5577}
5578
5579@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005580cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005581 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005582 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005583 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005584 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005585 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005586
Jesse Hall3fbc8562015-11-29 22:10:52 -08005587 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005588 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005589 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5590 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005591 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005592 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005593 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005594}
5595
5596@threadSafety("app")
5597cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005598 VkCommandBuffer commandBuffer,
5599 const VkCommandBufferBeginInfo* pBeginInfo) {
5600 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5601 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005602
5603 // TODO: iterate over boundObjects and clear memory bindings
5604
5605 return ?
5606}
5607
5608@threadSafety("app")
5609cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005610 VkCommandBuffer commandBuffer) {
5611 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005612
5613 return ?
5614}
5615
5616@threadSafety("app")
5617cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005618 VkCommandBuffer commandBuffer,
5619 VkCommandBufferResetFlags flags) {
5620 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005621
5622 // TODO: iterate over boundObjects and clear memory bindings
5623
5624 return ?
5625}
5626
5627
5628// Command buffer building functions
5629
5630@threadSafety("app")
5631cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005632 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005633 VkPipelineBindPoint pipelineBindPoint,
5634 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005635 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005636 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005637 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005638
Jesse Halld8bade02015-11-24 10:24:18 -08005639 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005640 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5641 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5642 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005643 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005644}
5645
5646@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005647cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005648 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005649 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005650 u32 viewportCount,
5651 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005652 commandBufferObject := GetCommandBuffer(commandBuffer)
5653 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005654}
5655
5656@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005657cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005658 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005659 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005660 u32 scissorCount,
5661 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005662 commandBufferObject := GetCommandBuffer(commandBuffer)
5663 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005664}
5665
5666@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005667cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005668 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005669 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005670 commandBufferObject := GetCommandBuffer(commandBuffer)
5671 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005672}
5673
5674@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005675cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005676 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005677 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005678 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005679 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005680 commandBufferObject := GetCommandBuffer(commandBuffer)
5681 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005682}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005683
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005684@threadSafety("app")
5685cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005686 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005687 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5688 // an annotation as a quick hack to pass this to the template without
5689 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005690 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005691 commandBufferObject := GetCommandBuffer(commandBuffer)
5692 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005693}
5694
5695@threadSafety("app")
5696cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005697 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005698 f32 minDepthBounds,
5699 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005700 commandBufferObject := GetCommandBuffer(commandBuffer)
5701 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005702}
5703
5704@threadSafety("app")
5705cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005706 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005707 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005708 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005709 commandBufferObject := GetCommandBuffer(commandBuffer)
5710 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005711}
5712
5713@threadSafety("app")
5714cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005715 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005716 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005717 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005718 commandBufferObject := GetCommandBuffer(commandBuffer)
5719 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005720}
5721
5722@threadSafety("app")
5723cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005724 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005725 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005726 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005727 commandBufferObject := GetCommandBuffer(commandBuffer)
5728 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005729}
5730
5731@threadSafety("app")
5732cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005733 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005734 VkPipelineBindPoint pipelineBindPoint,
5735 VkPipelineLayout layout,
5736 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005737 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005738 const VkDescriptorSet* pDescriptorSets,
5739 u32 dynamicOffsetCount,
5740 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005741 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005742
Jesse Hall03b6fe12015-11-24 12:44:21 -08005743 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5744 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005745 descriptorSet := descriptorSets[i]
5746 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005747 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005748 }
5749
5750 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5751 for i in (0 .. dynamicOffsetCount) {
5752 dynamicOffset := dynamicOffsets[i]
5753 }
5754
Jesse Halld8bade02015-11-24 10:24:18 -08005755 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005756 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5757 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5758 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005759 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005760}
5761
5762@threadSafety("app")
5763cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005764 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005765 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005766 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005767 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005768 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005769 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005770 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005771
Jesse Hall3fbc8562015-11-29 22:10:52 -08005772 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005773
Jesse Hall3fbc8562015-11-29 22:10:52 -08005774 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005775}
5776
5777@threadSafety("app")
5778cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005779 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005780 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005781 u32 bindingCount,
5782 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005783 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005784 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005785
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005786 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005787 buffers := pBuffers[0:bindingCount]
5788 offsets := pOffsets[0:bindingCount]
5789 for i in (0 .. bindingCount) {
5790 buffer := buffers[i]
5791 offset := offsets[i]
5792 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005793 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005794
Jesse Hall3fbc8562015-11-29 22:10:52 -08005795 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005796 }
5797
Jesse Hall3fbc8562015-11-29 22:10:52 -08005798 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005799}
5800
5801@threadSafety("app")
5802cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005803 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005804 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005805 u32 instanceCount,
5806 u32 firstVertex,
5807 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005808 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005809
Jesse Hall3fbc8562015-11-29 22:10:52 -08005810 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005811}
5812
5813@threadSafety("app")
5814cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005815 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005816 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005817 u32 instanceCount,
5818 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005819 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005820 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005821 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005822
Jesse Hall3fbc8562015-11-29 22:10:52 -08005823 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005824}
5825
5826@threadSafety("app")
5827cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005828 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005829 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005830 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005831 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005832 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005833 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005834 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005835 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005836
Jesse Hall3fbc8562015-11-29 22:10:52 -08005837 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005838
Jesse Hall3fbc8562015-11-29 22:10:52 -08005839 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005840}
5841
5842@threadSafety("app")
5843cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005844 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005845 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005846 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005847 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005848 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005849 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005850 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005851 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005852
Jesse Hall3fbc8562015-11-29 22:10:52 -08005853 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005854
Jesse Hall3fbc8562015-11-29 22:10:52 -08005855 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005856}
5857
5858@threadSafety("app")
5859cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005860 VkCommandBuffer commandBuffer,
Jesse Halld0599582017-03-10 18:35:38 -08005861 u32 groupCountX,
5862 u32 groupCountY,
5863 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005864 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005865
Jesse Hall3fbc8562015-11-29 22:10:52 -08005866 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005867}
5868
5869@threadSafety("app")
5870cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005871 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005872 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005873 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005874 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005875 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005876 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005877
Jesse Hall3fbc8562015-11-29 22:10:52 -08005878 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005879
Jesse Hall3fbc8562015-11-29 22:10:52 -08005880 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005881}
5882
5883@threadSafety("app")
5884cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005885 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005886 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005887 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005888 u32 regionCount,
5889 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005890 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005891 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005892 dstBufferObject := GetBuffer(dstBuffer)
5893 assert(commandBufferObject.device == srcBufferObject.device)
5894 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005895
5896 regions := pRegions[0:regionCount]
5897 for i in (0 .. regionCount) {
5898 region := regions[i]
5899 }
5900
Jesse Hall3fbc8562015-11-29 22:10:52 -08005901 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
5902 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005903
Jesse Hall65ab5522015-11-30 00:07:16 -08005904 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005905}
5906
5907@threadSafety("app")
5908cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005909 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005910 VkImage srcImage,
5911 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005912 VkImage dstImage,
5913 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005914 u32 regionCount,
5915 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005916 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005917 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005918 dstImageObject := GetImage(dstImage)
5919 assert(commandBufferObject.device == srcImageObject.device)
5920 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005921
5922 regions := pRegions[0:regionCount]
5923 for i in (0 .. regionCount) {
5924 region := regions[i]
5925 }
5926
Jesse Hall3fbc8562015-11-29 22:10:52 -08005927 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
5928 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005929
Jesse Hall65ab5522015-11-30 00:07:16 -08005930 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005931}
5932
5933@threadSafety("app")
5934cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005935 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005936 VkImage srcImage,
5937 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005938 VkImage dstImage,
5939 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005940 u32 regionCount,
5941 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08005942 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005943 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005944 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005945 dstImageObject := GetImage(dstImage)
5946 assert(commandBufferObject.device == srcImageObject.device)
5947 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005948
5949 regions := pRegions[0:regionCount]
5950 for i in (0 .. regionCount) {
5951 region := regions[i]
5952 }
5953
Jesse Hall3fbc8562015-11-29 22:10:52 -08005954 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
5955 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005956
Jesse Hall3fbc8562015-11-29 22:10:52 -08005957 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005958}
5959
5960@threadSafety("app")
5961cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005962 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005963 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005964 VkImage dstImage,
5965 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005966 u32 regionCount,
5967 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005968 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005969 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005970 dstImageObject := GetImage(dstImage)
5971 assert(commandBufferObject.device == srcBufferObject.device)
5972 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005973
5974 regions := pRegions[0:regionCount]
5975 for i in (0 .. regionCount) {
5976 region := regions[i]
5977 }
5978
Jesse Hall3fbc8562015-11-29 22:10:52 -08005979 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
5980 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005981
Jesse Hall65ab5522015-11-30 00:07:16 -08005982 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005983}
5984
5985@threadSafety("app")
5986cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005987 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005988 VkImage srcImage,
5989 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005990 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005991 u32 regionCount,
5992 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005993 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005994 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005995 dstBufferObject := GetBuffer(dstBuffer)
5996 assert(commandBufferObject.device == srcImageObject.device)
5997 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005998
5999 regions := pRegions[0:regionCount]
6000 for i in (0 .. regionCount) {
6001 region := regions[i]
6002 }
6003
Jesse Hall3fbc8562015-11-29 22:10:52 -08006004 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6005 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006006
Jesse Hall65ab5522015-11-30 00:07:16 -08006007 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006008}
6009
6010@threadSafety("app")
6011cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006012 VkCommandBuffer commandBuffer,
6013 VkBuffer dstBuffer,
6014 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006015 VkDeviceSize dataSize,
Jesse Hall3f5499b2016-07-26 15:20:40 -07006016 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006017 commandBufferObject := GetCommandBuffer(commandBuffer)
6018 dstBufferObject := GetBuffer(dstBuffer)
6019 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006020
6021 data := pData[0:dataSize]
6022
Jesse Hall3fbc8562015-11-29 22:10:52 -08006023 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006024
Jesse Hall65ab5522015-11-30 00:07:16 -08006025 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006026}
6027
6028@threadSafety("app")
6029cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006030 VkCommandBuffer commandBuffer,
6031 VkBuffer dstBuffer,
6032 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006033 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006034 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006035 commandBufferObject := GetCommandBuffer(commandBuffer)
6036 dstBufferObject := GetBuffer(dstBuffer)
6037 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006038
Jesse Hall65ab5522015-11-30 00:07:16 -08006039 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006040}
6041
6042@threadSafety("app")
6043cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006044 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045 VkImage image,
6046 VkImageLayout imageLayout,
6047 const VkClearColorValue* pColor,
6048 u32 rangeCount,
6049 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006050 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006051 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006052 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006053
6054 ranges := pRanges[0:rangeCount]
6055 for i in (0 .. rangeCount) {
6056 range := ranges[i]
6057 }
6058
Jesse Hall3fbc8562015-11-29 22:10:52 -08006059 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006060
Jesse Hall3fbc8562015-11-29 22:10:52 -08006061 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006062}
6063
6064@threadSafety("app")
6065cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006066 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006067 VkImage image,
6068 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006069 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006070 u32 rangeCount,
6071 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006072 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006073 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006074 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006075
6076 ranges := pRanges[0:rangeCount]
6077 for i in (0 .. rangeCount) {
6078 range := ranges[i]
6079 }
6080
Jesse Hall3fbc8562015-11-29 22:10:52 -08006081 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006082
Jesse Hall3fbc8562015-11-29 22:10:52 -08006083 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006084}
6085
6086@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006087cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006088 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006089 u32 attachmentCount,
6090 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006091 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006092 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006093 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006094
6095 rects := pRects[0:rectCount]
6096 for i in (0 .. rectCount) {
6097 rect := rects[i]
6098 }
6099
Jesse Hall3fbc8562015-11-29 22:10:52 -08006100 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006101}
6102
6103@threadSafety("app")
6104cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006105 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006106 VkImage srcImage,
6107 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006108 VkImage dstImage,
6109 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006110 u32 regionCount,
6111 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006112 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006113 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006114 dstImageObject := GetImage(dstImage)
6115 assert(commandBufferObject.device == srcImageObject.device)
6116 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006117
6118 regions := pRegions[0:regionCount]
6119 for i in (0 .. regionCount) {
6120 region := regions[i]
6121 }
6122
Jesse Hall3fbc8562015-11-29 22:10:52 -08006123 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6124 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006125
Jesse Hall3fbc8562015-11-29 22:10:52 -08006126 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006127}
6128
6129@threadSafety("app")
6130cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006131 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006132 VkEvent event,
6133 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006134 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006135 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006136 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006137}
6138
6139@threadSafety("app")
6140cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006141 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006142 VkEvent event,
6143 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006144 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006145 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006146 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006147}
6148
6149@threadSafety("app")
6150cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006151 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006152 u32 eventCount,
6153 const VkEvent* pEvents,
6154 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006155 VkPipelineStageFlags dstStageMask,
6156 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006157 const VkMemoryBarrier* pMemoryBarriers,
6158 u32 bufferMemoryBarrierCount,
6159 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6160 u32 imageMemoryBarrierCount,
6161 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006162 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006163
6164 events := pEvents[0:eventCount]
6165 for i in (0 .. eventCount) {
6166 event := events[i]
6167 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006168 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006169 }
6170
Jesse Hall3dd678a2016-01-08 21:52:01 -08006171 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006172 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006173 memoryBarrier := memoryBarriers[i]
6174 }
6175 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6176 for i in (0 .. bufferMemoryBarrierCount) {
6177 bufferMemoryBarrier := bufferMemoryBarriers[i]
6178 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6179 assert(bufferObject.device == commandBufferObject.device)
6180 }
6181 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6182 for i in (0 .. imageMemoryBarrierCount) {
6183 imageMemoryBarrier := imageMemoryBarriers[i]
6184 imageObject := GetImage(imageMemoryBarrier.image)
6185 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006186 }
6187}
6188
6189@threadSafety("app")
6190cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006191 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006192 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006193 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006194 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006195 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006196 const VkMemoryBarrier* pMemoryBarriers,
6197 u32 bufferMemoryBarrierCount,
6198 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6199 u32 imageMemoryBarrierCount,
6200 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006201 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006202
Jesse Hall3dd678a2016-01-08 21:52:01 -08006203 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006204 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006205 memoryBarrier := memoryBarriers[i]
6206 }
6207 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6208 for i in (0 .. bufferMemoryBarrierCount) {
6209 bufferMemoryBarrier := bufferMemoryBarriers[i]
6210 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6211 assert(bufferObject.device == commandBufferObject.device)
6212 }
6213 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6214 for i in (0 .. imageMemoryBarrierCount) {
6215 imageMemoryBarrier := imageMemoryBarriers[i]
6216 imageObject := GetImage(imageMemoryBarrier.image)
6217 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006218 }
6219}
6220
6221@threadSafety("app")
6222cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006223 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006224 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006225 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006226 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006227 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006228 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006229 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006230}
6231
6232@threadSafety("app")
6233cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006234 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006235 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006236 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006237 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006238 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006239 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006240}
6241
6242@threadSafety("app")
6243cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006244 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006245 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006246 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006247 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006248 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006249 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006250 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006251}
6252
6253@threadSafety("app")
6254cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006255 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006256 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006257 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006258 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006259 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006260 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006261 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006262}
6263
6264@threadSafety("app")
6265cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006266 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006267 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006268 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006269 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006270 VkBuffer dstBuffer,
6271 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006272 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006273 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006274 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006275 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006276 dstBufferObject := GetBuffer(dstBuffer)
6277 assert(commandBufferObject.device == queryPoolObject.device)
6278 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006279}
6280
6281cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006282 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006283 VkPipelineLayout layout,
6284 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006285 u32 offset,
6286 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006287 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006288 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006289 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006290 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006291}
6292
6293@threadSafety("app")
6294cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006295 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006296 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006297 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006298 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006299 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6300 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006301 assert(commandBufferObject.device == renderPassObject.device)
6302 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006303
Jesse Hall3fbc8562015-11-29 22:10:52 -08006304 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006305}
6306
6307cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006308 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006309 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006310 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006311}
6312
6313@threadSafety("app")
6314cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006315 VkCommandBuffer commandBuffer) {
6316 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006317
Jesse Hall3fbc8562015-11-29 22:10:52 -08006318 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006319}
6320
6321cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006322 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006323 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006324 const VkCommandBuffer* pCommandBuffers) {
6325 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006326
Jesse Hall3dd678a2016-01-08 21:52:01 -08006327 commandBuffers := pCommandBuffers[0:commandBufferCount]
6328 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006329 secondaryCommandBuffer := commandBuffers[i]
6330 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6331 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006332 }
6333}
6334
Jesse Halld0599582017-03-10 18:35:38 -08006335@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006336cmd void vkDestroySurfaceKHR(
6337 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006338 VkSurfaceKHR surface,
6339 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006340 instanceObject := GetInstance(instance)
6341 surfaceObject := GetSurface(surface)
6342 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006343
Jesse Hall1356b0d2015-11-23 17:24:58 -08006344 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006345}
6346
Jesse Halld0599582017-03-10 18:35:38 -08006347@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006348cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006349 VkPhysicalDevice physicalDevice,
6350 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006351 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006352 VkBool32* pSupported) {
6353 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006354
6355 return ?
6356}
6357
Jesse Halld0599582017-03-10 18:35:38 -08006358@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006359cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6360 VkPhysicalDevice physicalDevice,
6361 VkSurfaceKHR surface,
6362 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6363 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6364
6365 surfaceCapabilities := ?
6366 pSurfaceCapabilities[0] = surfaceCapabilities
6367
6368 return ?
6369}
6370
Jesse Halld0599582017-03-10 18:35:38 -08006371@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006372cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6373 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006374 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006375 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006376 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006377 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006378
6379 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006380 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006381 surfaceFormats := pSurfaceFormats[0:count]
6382
6383 for i in (0 .. count) {
6384 surfaceFormat := ?
6385 surfaceFormats[i] = surfaceFormat
6386 }
6387
6388 return ?
6389}
6390
Jesse Halld0599582017-03-10 18:35:38 -08006391@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006392cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6393 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006394 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006395 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006396 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006397 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006398
6399 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006400 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006401 presentModes := pPresentModes[0:count]
6402
6403 for i in (0 .. count) {
6404 presentMode := ?
6405 presentModes[i] = presentMode
6406 }
6407
6408 return ?
6409}
6410
Jesse Halld0599582017-03-10 18:35:38 -08006411@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006412cmd VkResult vkCreateSwapchainKHR(
6413 VkDevice device,
6414 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006415 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006416 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006417 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006418 deviceObject := GetDevice(device)
6419
6420 swapchain := ?
6421 pSwapchain[0] = swapchain
6422 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6423
6424 return ?
6425}
6426
Jesse Halld0599582017-03-10 18:35:38 -08006427@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006428cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006429 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006430 VkSwapchainKHR swapchain,
6431 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006432 deviceObject := GetDevice(device)
6433 swapchainObject := GetSwapchain(swapchain)
6434 assert(swapchainObject.device == device)
6435
6436 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006437}
6438
Jesse Halld0599582017-03-10 18:35:38 -08006439@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006440cmd VkResult vkGetSwapchainImagesKHR(
6441 VkDevice device,
6442 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006443 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006444 VkImage* pSwapchainImages) {
6445 deviceObject := GetDevice(device)
6446
6447 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006448 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006449 swapchainImages := pSwapchainImages[0:count]
6450
6451 for i in (0 .. count) {
6452 swapchainImage := ?
6453 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006454 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006455 }
6456
6457 return ?
6458}
6459
Jesse Halld0599582017-03-10 18:35:38 -08006460@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006461cmd VkResult vkAcquireNextImageKHR(
6462 VkDevice device,
6463 VkSwapchainKHR swapchain,
6464 u64 timeout,
6465 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006466 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006467 u32* pImageIndex) {
6468 deviceObject := GetDevice(device)
6469 swapchainObject := GetSwapchain(swapchain)
6470
6471 imageIndex := ?
6472 pImageIndex[0] = imageIndex
6473
6474 return ?
6475}
6476
Jesse Halld0599582017-03-10 18:35:38 -08006477@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006478cmd VkResult vkQueuePresentKHR(
6479 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006480 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006481 queueObject := GetQueue(queue)
6482
6483 presentInfo := ?
6484 pPresentInfo[0] = presentInfo
6485
6486 return ?
6487}
6488
Jesse Halld0599582017-03-10 18:35:38 -08006489@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006490cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6491 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006492 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006493 VkDisplayPropertiesKHR* pProperties) {
6494 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6495 return ?
6496}
6497
Jesse Halld0599582017-03-10 18:35:38 -08006498@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006499cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6500 VkPhysicalDevice physicalDevice,
6501 u32* pPropertyCount,
6502 VkDisplayPlanePropertiesKHR* pProperties) {
6503 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6504 return ?
6505}
6506
Jesse Halld0599582017-03-10 18:35:38 -08006507@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006508cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6509 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006510 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006511 u32* pDisplayCount,
6512 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006513 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6514 return ?
6515}
6516
Jesse Halld0599582017-03-10 18:35:38 -08006517@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006518cmd VkResult vkGetDisplayModePropertiesKHR(
6519 VkPhysicalDevice physicalDevice,
6520 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006521 u32* pPropertyCount,
6522 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006523 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6524 return ?
6525}
6526
Jesse Halld0599582017-03-10 18:35:38 -08006527@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006528cmd VkResult vkCreateDisplayModeKHR(
6529 VkPhysicalDevice physicalDevice,
6530 VkDisplayKHR display,
6531 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006532 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006533 VkDisplayModeKHR* pMode) {
6534 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6535 return ?
6536}
6537
Jesse Halld0599582017-03-10 18:35:38 -08006538@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006539cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006540 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006541 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006542 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006543 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006544 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6545 return ?
6546}
6547
Jesse Halld0599582017-03-10 18:35:38 -08006548@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006549cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6550 VkInstance instance,
6551 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006552 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006553 VkSurfaceKHR* pSurface) {
6554 return ?
6555}
6556
Jesse Halld0599582017-03-10 18:35:38 -08006557@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006558cmd VkResult vkCreateSharedSwapchainsKHR(
6559 VkDevice device,
6560 u32 swapchainCount,
6561 const VkSwapchainCreateInfoKHR* pCreateInfos,
6562 const VkAllocationCallbacks* pAllocator,
6563 VkSwapchainKHR* pSwapchains) {
6564 return ?
6565}
6566
Jesse Halld0599582017-03-10 18:35:38 -08006567@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006568cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006569 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006570 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006571 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006572 VkSurfaceKHR* pSurface) {
6573 instanceObject := GetInstance(instance)
6574 return ?
6575}
6576
Jesse Halld0599582017-03-10 18:35:38 -08006577@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006578cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6579 VkPhysicalDevice physicalDevice,
6580 u32 queueFamilyIndex,
6581 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006582 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006583 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6584 return ?
6585}
6586
Jesse Halld0599582017-03-10 18:35:38 -08006587@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006588cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006589 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006590 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006591 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006592 VkSurfaceKHR* pSurface) {
6593 instanceObject := GetInstance(instance)
6594 return ?
6595}
6596
Jesse Halld0599582017-03-10 18:35:38 -08006597@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006598cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6599 VkPhysicalDevice physicalDevice,
6600 u32 queueFamilyIndex,
6601 platform.xcb_connection_t* connection,
6602 platform.xcb_visualid_t visual_id) {
6603 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6604 return ?
6605}
6606
Jesse Halld0599582017-03-10 18:35:38 -08006607@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006608cmd VkResult vkCreateWaylandSurfaceKHR(
6609 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006610 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006611 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006612 VkSurfaceKHR* pSurface) {
6613 instanceObject := GetInstance(instance)
6614 return ?
6615}
6616
Jesse Halld0599582017-03-10 18:35:38 -08006617@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006618cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6619 VkPhysicalDevice physicalDevice,
6620 u32 queueFamilyIndex,
6621 platform.wl_display* display) {
6622 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6623 return ?
6624}
6625
Jesse Halld0599582017-03-10 18:35:38 -08006626@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006627cmd VkResult vkCreateMirSurfaceKHR(
6628 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006629 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006630 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006631 VkSurfaceKHR* pSurface) {
6632 instanceObject := GetInstance(instance)
6633 return ?
6634}
6635
Jesse Halld0599582017-03-10 18:35:38 -08006636@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006637cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6638 VkPhysicalDevice physicalDevice,
6639 u32 queueFamilyIndex,
6640 platform.MirConnection* connection) {
6641 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6642 return ?
6643}
6644
Jesse Halld0599582017-03-10 18:35:38 -08006645@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006646cmd VkResult vkCreateAndroidSurfaceKHR(
6647 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006648 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006649 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006650 VkSurfaceKHR* pSurface) {
6651 instanceObject := GetInstance(instance)
6652 return ?
6653}
6654
Jesse Halld0599582017-03-10 18:35:38 -08006655@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006656cmd VkResult vkCreateWin32SurfaceKHR(
6657 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006658 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006659 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006660 VkSurfaceKHR* pSurface) {
6661 instanceObject := GetInstance(instance)
6662 return ?
6663}
6664
Jesse Halld0599582017-03-10 18:35:38 -08006665@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006666cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6667 VkPhysicalDevice physicalDevice,
6668 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006669 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006670 return ?
6671}
6672
Jesse Halld0599582017-03-10 18:35:38 -08006673@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006674cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6675 VkDevice device,
6676 VkFormat format,
6677 VkImageUsageFlags imageUsage,
6678 int* grallocUsage) {
6679 return ?
6680}
6681
Jesse Halld0599582017-03-10 18:35:38 -08006682@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006683cmd VkResult vkAcquireImageANDROID(
6684 VkDevice device,
6685 VkImage image,
6686 int nativeFenceFd,
6687 VkSemaphore semaphore,
6688 VkFence fence) {
6689 return ?
6690}
6691
Jesse Halld0599582017-03-10 18:35:38 -08006692@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006693cmd VkResult vkQueueSignalReleaseImageANDROID(
6694 VkQueue queue,
6695 u32 waitSemaphoreCount,
6696 const VkSemaphore* pWaitSemaphores,
6697 VkImage image,
6698 int* pNativeFenceFd) {
6699 return ?
6700}
6701
Jesse Halld0599582017-03-10 18:35:38 -08006702@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006703@external type void* PFN_vkDebugReportCallbackEXT
Jesse Halld0599582017-03-10 18:35:38 -08006704@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006705@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6706 VkDebugReportFlagsEXT flags,
6707 VkDebugReportObjectTypeEXT objectType,
6708 u64 object,
6709 platform.size_t location,
6710 s32 messageCode,
6711 const char* pLayerPrefix,
6712 const char* pMessage,
6713 void* pUserData) {
6714 return ?
6715}
6716
Jesse Halld0599582017-03-10 18:35:38 -08006717@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006718cmd VkResult vkCreateDebugReportCallbackEXT(
6719 VkInstance instance,
6720 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6721 const VkAllocationCallbacks* pAllocator,
6722 VkDebugReportCallbackEXT* pCallback) {
6723 return ?
6724}
6725
Jesse Halld0599582017-03-10 18:35:38 -08006726@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006727cmd void vkDestroyDebugReportCallbackEXT(
6728 VkInstance instance,
6729 VkDebugReportCallbackEXT callback,
6730 const VkAllocationCallbacks* pAllocator) {
6731}
6732
Jesse Halld0599582017-03-10 18:35:38 -08006733@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006734cmd void vkDebugReportMessageEXT(
6735 VkInstance instance,
6736 VkDebugReportFlagsEXT flags,
6737 VkDebugReportObjectTypeEXT objectType,
6738 u64 object,
6739 platform.size_t location,
6740 s32 messageCode,
6741 const char* pLayerPrefix,
6742 const char* pMessage) {
6743}
6744
Jesse Halld0599582017-03-10 18:35:38 -08006745@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006746cmd VkResult vkDebugMarkerSetObjectTagEXT(
6747 VkDevice device,
6748 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6749 return ?
6750}
6751
Jesse Halld0599582017-03-10 18:35:38 -08006752@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006753cmd VkResult vkDebugMarkerSetObjectNameEXT(
6754 VkDevice device,
6755 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6756 return ?
6757}
6758
Jesse Halld0599582017-03-10 18:35:38 -08006759@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006760cmd void vkCmdDebugMarkerBeginEXT(
6761 VkCommandBuffer commandBuffer,
6762 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6763}
6764
Jesse Halld0599582017-03-10 18:35:38 -08006765@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006766cmd void vkCmdDebugMarkerEndEXT(
6767 VkCommandBuffer commandBuffer) {
6768}
6769
Jesse Halld0599582017-03-10 18:35:38 -08006770@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006771cmd void vkCmdDebugMarkerInsertEXT(
6772 VkCommandBuffer commandBuffer,
6773 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6774}
6775
Jesse Halld0599582017-03-10 18:35:38 -08006776@extension("VK_AMD_draw_indirect_count") // 34
Jesse Halleb02c472017-02-24 15:13:45 -08006777cmd void vkCmdDrawIndirectCountAMD(
6778 VkCommandBuffer commandBuffer,
6779 VkBuffer buffer,
6780 VkDeviceSize offset,
6781 VkBuffer countBuffer,
6782 VkDeviceSize countBufferOffset,
6783 u32 maxDrawCount,
6784 u32 stride) {
6785}
6786
Jesse Halld0599582017-03-10 18:35:38 -08006787@extension("VK_AMD_draw_indirect_count") // 34
Jesse Halleb02c472017-02-24 15:13:45 -08006788cmd void vkCmdDrawIndexedIndirectCountAMD(
6789 VkCommandBuffer commandBuffer,
6790 VkBuffer buffer,
6791 VkDeviceSize offset,
6792 VkBuffer countBuffer,
6793 VkDeviceSize countBufferOffset,
6794 u32 maxDrawCount,
6795 u32 stride) {
6796}
6797
Jesse Halld0599582017-03-10 18:35:38 -08006798@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08006799cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6800 VkPhysicalDevice physicalDevice,
6801 VkFormat format,
6802 VkImageType type,
6803 VkImageTiling tiling,
6804 VkImageUsageFlags usage,
6805 VkImageCreateFlags flags,
6806 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6807 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6808 return ?
6809}
6810
Jesse Halld0599582017-03-10 18:35:38 -08006811@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08006812cmd VkResult vkGetMemoryWin32HandleNV(
6813 VkDevice device,
6814 VkDeviceMemory memory,
6815 VkExternalMemoryHandleTypeFlagsNV handleType,
6816 platform.HANDLE* pHandle) {
6817 return ?
6818}
6819
Jesse Halld0599582017-03-10 18:35:38 -08006820@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006821cmd void vkGetPhysicalDeviceFeatures2KHR(
6822 VkPhysicalDevice physicalDevice,
6823 VkPhysicalDeviceFeatures2KHR* pFeatures) {
6824}
6825
Jesse Halld0599582017-03-10 18:35:38 -08006826@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006827cmd void vkGetPhysicalDeviceProperties2KHR(
6828 VkPhysicalDevice physicalDevice,
6829 VkPhysicalDeviceProperties2KHR* pProperties) {
6830}
6831
Jesse Halld0599582017-03-10 18:35:38 -08006832@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006833cmd void vkGetPhysicalDeviceFormatProperties2KHR(
6834 VkPhysicalDevice physicalDevice,
6835 VkFormat format,
6836 VkFormatProperties2KHR* pFormatProperties) {
6837}
6838
Jesse Halld0599582017-03-10 18:35:38 -08006839@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006840cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
6841 VkPhysicalDevice physicalDevice,
6842 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
6843 VkImageFormatProperties2KHR* pImageFormatProperties) {
6844 return ?
6845}
6846
Jesse Halld0599582017-03-10 18:35:38 -08006847@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006848cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
6849 VkPhysicalDevice physicalDevice,
6850 u32* pQueueFamilyPropertyCount,
6851 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
6852}
6853
Jesse Halld0599582017-03-10 18:35:38 -08006854@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006855cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
6856 VkPhysicalDevice physicalDevice,
6857 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
6858}
6859
Jesse Halld0599582017-03-10 18:35:38 -08006860@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006861cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
6862 VkPhysicalDevice physicalDevice,
6863 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
6864 u32* pPropertyCount,
6865 VkSparseImageFormatProperties2KHR* pProperties) {
6866}
6867
Jesse Halld0599582017-03-10 18:35:38 -08006868@extension("VK_KHX_device_group") // 61
6869cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
6870 VkDevice device,
6871 u32 heapIndex,
6872 u32 localDeviceIndex,
6873 u32 remoteDeviceIndex,
6874 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
6875}
6876
6877@extension("VK_KHX_device_group") // 61
6878cmd VkResult vkBindBufferMemory2KHX(
6879 VkDevice device,
6880 u32 bindInfoCount,
6881 const VkBindBufferMemoryInfoKHX* pBindInfos) {
6882 return ?
6883}
6884
6885@extension("VK_KHX_device_group") // 61
6886cmd VkResult vkBindImageMemory2KHX(
6887 VkDevice device,
6888 u32 bindInfoCount,
6889 const VkBindImageMemoryInfoKHX* pBindInfos) {
6890 return ?
6891}
6892
6893@extension("VK_KHX_device_group") // 61
6894cmd void vkCmdSetDeviceMaskKHX(
6895 VkCommandBuffer commandBuffer,
6896 u32 deviceMask) {
6897}
6898
6899@extension("VK_KHX_device_group") // 61
6900cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
6901 VkDevice device,
6902 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
6903 return ?
6904}
6905
6906@extension("VK_KHX_device_group") // 61
6907cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
6908 VkDevice device,
6909 VkSurfaceKHR surface,
6910 VkDeviceGroupPresentModeFlagsKHX* pModes) {
6911 return ?
6912}
6913
6914@extension("VK_KHX_device_group") // 61
6915cmd VkResult vkAcquireNextImage2KHX(
6916 VkDevice device,
6917 const VkAcquireNextImageInfoKHX* pAcquireInfo,
6918 u32* pImageIndex) {
6919 return ?
6920}
6921
6922@extension("VK_KHX_device_group") // 61
6923cmd void vkCmdDispatchBaseKHX(
6924 VkCommandBuffer commandBuffer,
6925 u32 baseGroupX,
6926 u32 baseGroupY,
6927 u32 baseGroupZ,
6928 u32 groupCountX,
6929 u32 groupCountY,
6930 u32 groupCountZ) {
6931}
6932
6933@extension("VK_KHX_device_group") // 61
6934cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
6935 VkPhysicalDevice physicalDevice,
6936 VkSurfaceKHR surface,
6937 u32* pRectCount,
6938 VkRect2D* pRects) {
6939 return ?
6940}
6941
6942@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08006943cmd VkResult vkCreateViSurfaceNN(
6944 VkInstance instance,
6945 const VkViSurfaceCreateInfoNN* pCreateInfo,
6946 const VkAllocationCallbacks* pAllocator,
6947 VkSurfaceKHR* pSurface) {
6948 return ?
6949}
6950
Jesse Halld0599582017-03-10 18:35:38 -08006951@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08006952cmd void vkTrimCommandPoolKHR(
6953 VkDevice device,
6954 VkCommandPool commandPool,
6955 VkCommandPoolTrimFlagsKHR flags) {
6956}
6957
Jesse Halld0599582017-03-10 18:35:38 -08006958@extension("VK_KHX_device_group_creation") // 71
6959cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
6960 VkInstance instance,
6961 u32* pPhysicalDeviceGroupCount,
6962 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
6963 return ?
6964}
6965
6966@extension("VK_KHX_external_memory_capabilities") // 72
6967cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
6968 VkPhysicalDevice physicalDevice,
6969 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
6970 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
6971}
6972
6973@extension("VK_KHX_external_memory_capabilities") // 72
6974cmd void vkGetPhysicalDeviceProperties2KHX(
6975 VkPhysicalDevice physicalDevice,
6976 VkPhysicalDeviceProperties2KHX* pProperties) {
6977}
6978
6979@extension("VK_KHX_external_memory_capabilities") // 72
6980cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHX(
6981 VkPhysicalDevice physicalDevice,
6982 const VkPhysicalDeviceImageFormatInfo2KHX* pImageFormatInfo,
6983 VkImageFormatProperties2KHX* pImageFormatProperties) {
6984 return ?
6985}
6986
6987@extension("VK_KHX_external_memory_win32") // 74
6988cmd VkResult vkGetMemoryWin32HandleKHX(
6989 VkDevice device,
6990 VkDeviceMemory memory,
6991 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
6992 platform.HANDLE* pHandle) {
6993 return ?
6994}
6995
6996@extension("VK_KHX_external_memory_win32") // 74
6997cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
6998 VkDevice device,
6999 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7000 platform.HANDLE handle,
7001 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7002 return ?
7003}
7004
7005@extension("VK_KHX_external_memory_fd") // 75
7006cmd VkResult vkGetMemoryFdKHX(
7007 VkDevice device,
7008 VkDeviceMemory memory,
7009 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7010 s32* pFd) {
7011 return ?
7012}
7013
7014@extension("VK_KHX_external_memory_fd") // 75
7015cmd VkResult vkGetMemoryFdPropertiesKHX(
7016 VkDevice device,
7017 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7018 s32 fd,
7019 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7020 return ?
7021}
7022
7023@extension("VK_KHX_external_semaphore_capabilities") // 77
7024cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7025 VkPhysicalDevice physicalDevice,
7026 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7027 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7028}
7029
7030@extension("VK_KHX_external_semaphore_win32") // 79
7031cmd VkResult vkImportSemaphoreWin32HandleKHX(
7032 VkDevice device,
7033 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7034 return ?
7035}
7036
7037@extension("VK_KHX_external_semaphore_win32") // 79
7038cmd VkResult vkGetSemaphoreWin32HandleKHX(
7039 VkDevice device,
7040 VkSemaphore semaphore,
7041 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7042 platform.HANDLE* pHandle) {
7043 return ?
7044}
7045
7046@extension("VK_KHX_external_semaphore_fd") // 80
7047cmd VkResult vkImportSemaphoreFdKHX(
7048 VkDevice device,
7049 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7050 return ?
7051}
7052
7053@extension("VK_KHX_external_semaphore_fd") // 80
7054cmd VkResult vkGetSemaphoreFdKHX(
7055 VkDevice device,
7056 VkSemaphore semaphore,
7057 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7058 s32* pFd) {
7059 return ?
7060}
7061
7062@extension("VK_KHR_push_descriptor") // 81
7063cmd void vkCmdPushDescriptorSetKHR(
7064 VkCommandBuffer commandBuffer,
7065 VkPipelineBindPoint pipelineBindPoint,
7066 VkPipelineLayout layout,
7067 u32 set,
7068 u32 descriptorWriteCount,
7069 const VkWriteDescriptorSet* pDescriptorWrites) {
7070}
7071
7072@extension("VK_KHR_descriptor_update_template") // 86
7073cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7074 VkDevice device,
7075 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7076 const VkAllocationCallbacks* pAllocator,
7077 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7078 return ?
7079}
7080
7081@extension("VK_KHR_descriptor_update_template") // 86
7082cmd void vkDestroyDescriptorUpdateTemplateKHR(
7083 VkDevice device,
7084 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7085 const VkAllocationCallbacks* pAllocator) {
7086}
7087
7088@extension("VK_KHR_descriptor_update_template") // 86
7089cmd void vkUpdateDescriptorSetWithTemplateKHR(
7090 VkDevice device,
7091 VkDescriptorSet descriptorSet,
7092 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7093 const void* pData) {
7094}
7095
7096@extension("VK_KHR_descriptor_update_template") // 86
7097cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7098 VkCommandBuffer commandBuffer,
7099 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7100 VkPipelineLayout layout,
7101 u32 set,
7102 const void* pData) {
7103}
7104
7105@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007106cmd void vkCmdProcessCommandsNVX(
7107 VkCommandBuffer commandBuffer,
7108 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7109}
7110
Jesse Halld0599582017-03-10 18:35:38 -08007111@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007112cmd void vkCmdReserveSpaceForCommandsNVX(
7113 VkCommandBuffer commandBuffer,
7114 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7115}
7116
Jesse Halld0599582017-03-10 18:35:38 -08007117@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007118cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7119 VkDevice device,
7120 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7121 const VkAllocationCallbacks* pAllocator,
7122 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7123 return ?
7124}
7125
Jesse Halld0599582017-03-10 18:35:38 -08007126@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007127cmd void vkDestroyIndirectCommandsLayoutNVX(
7128 VkDevice device,
7129 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7130 const VkAllocationCallbacks* pAllocator) {
7131}
7132
Jesse Halld0599582017-03-10 18:35:38 -08007133@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007134cmd VkResult vkCreateObjectTableNVX(
7135 VkDevice device,
7136 const VkObjectTableCreateInfoNVX* pCreateInfo,
7137 const VkAllocationCallbacks* pAllocator,
7138 VkObjectTableNVX* pObjectTable) {
7139 return ?
7140}
7141
Jesse Halld0599582017-03-10 18:35:38 -08007142@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007143cmd void vkDestroyObjectTableNVX(
7144 VkDevice device,
7145 VkObjectTableNVX objectTable,
7146 const VkAllocationCallbacks* pAllocator) {
7147}
7148
Jesse Halld0599582017-03-10 18:35:38 -08007149@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007150cmd VkResult vkRegisterObjectsNVX(
7151 VkDevice device,
7152 VkObjectTableNVX objectTable,
7153 u32 objectCount,
7154 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7155 const u32* pObjectIndices) {
7156 return ?
7157}
7158
Jesse Halld0599582017-03-10 18:35:38 -08007159@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007160cmd VkResult vkUnregisterObjectsNVX(
7161 VkDevice device,
7162 VkObjectTableNVX objectTable,
7163 u32 objectCount,
7164 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7165 const u32* pObjectIndices) {
7166 return ?
7167}
7168
Jesse Halld0599582017-03-10 18:35:38 -08007169@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007170cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7171 VkPhysicalDevice physicalDevice,
7172 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7173 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7174}
Jesse Halld27f6aa2015-08-15 17:58:48 -07007175
Jesse Halld0599582017-03-10 18:35:38 -08007176@extension("VK_NV_clip_space_w_scaling") // 88
7177cmd void vkCmdSetViewportWScalingNV(
7178 VkCommandBuffer commandBuffer,
7179 u32 firstViewport,
7180 u32 viewportCount,
7181 const VkViewportWScalingNV* pViewportWScalings) {
7182}
7183
7184@extension("VK_EXT_direct_mode_display") // 89
Jesse Hall08e2f482017-03-06 15:22:17 -08007185cmd VkResult vkReleaseDisplayEXT(
7186 VkPhysicalDevice physicalDevice,
7187 VkDisplayKHR display) {
7188 return ?
7189}
7190
Jesse Halld0599582017-03-10 18:35:38 -08007191@extension("VK_EXT_acquire_xlib_display") // 90
Jesse Hall08e2f482017-03-06 15:22:17 -08007192cmd VkResult vkAcquireXlibDisplayEXT(
7193 VkPhysicalDevice physicalDevice,
7194 platform.Display* dpy,
7195 VkDisplayKHR display) {
7196 return ?
7197}
7198
Jesse Halld0599582017-03-10 18:35:38 -08007199@extension("VK_EXT_acquire_xlib_display") // 90
Jesse Hall08e2f482017-03-06 15:22:17 -08007200cmd VkResult vkGetRandROutputDisplayEXT(
7201 VkPhysicalDevice physicalDevice,
7202 platform.Display* dpy,
7203 platform.RROutput rrOutput,
7204 VkDisplayKHR* pDisplay) {
7205 return ?
7206}
7207
Jesse Halld0599582017-03-10 18:35:38 -08007208@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08007209cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7210 VkPhysicalDevice physicalDevice,
7211 VkSurfaceKHR surface,
7212 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7213 return ?
7214}
7215
Jesse Halld0599582017-03-10 18:35:38 -08007216@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007217cmd VkResult vkDisplayPowerControlEXT(
7218 VkDevice device,
7219 VkDisplayKHR display,
7220 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7221 return ?
7222}
7223
Jesse Halld0599582017-03-10 18:35:38 -08007224@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007225cmd VkResult vkRegisterDeviceEventEXT(
7226 VkDevice device,
7227 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7228 const VkAllocationCallbacks* pAllocator,
7229 VkFence* pFence) {
7230 return ?
7231}
7232
Jesse Halld0599582017-03-10 18:35:38 -08007233@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007234cmd VkResult vkRegisterDisplayEventEXT(
7235 VkDevice device,
7236 VkDisplayKHR display,
7237 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7238 const VkAllocationCallbacks* pAllocator,
7239 VkFence* pFence) {
7240 return ?
7241}
7242
Jesse Halld0599582017-03-10 18:35:38 -08007243@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007244cmd VkResult vkGetSwapchainCounterEXT(
7245 VkDevice device,
7246 VkSwapchainKHR swapchain,
7247 VkSurfaceCounterFlagBitsEXT counter,
7248 u64* pCounterValue) {
7249 return ?
7250}
7251
Jesse Halld0599582017-03-10 18:35:38 -08007252@extension("VK_EXT_discard_rectangles") // 100
7253cmd void vkCmdSetDiscardRectangleEXT(
7254 VkCommandBuffer commandBuffer,
7255 u32 firstDiscardRectangle,
7256 u32 discardRectangleCount,
7257 const VkRect2D* pDiscardRectangles) {
7258}
7259
7260@extension("VK_MVK_ios_surface") // 123
7261cmd VkResult vkCreateIOSSurfaceMVK(
7262 VkInstance instance,
7263 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7264 const VkAllocationCallbacks* pAllocator,
7265 VkSurfaceKHR* pSurface) {
7266 return ?
7267}
7268
7269@extension("VK_MVK_macos_surface") // 124
7270cmd VkResult vkCreateMacOSSurfaceMVK(
7271 VkInstance instance,
7272 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7273 const VkAllocationCallbacks* pAllocator,
7274 VkSurfaceKHR* pSurface) {
7275 return ?
7276}
7277
Jesse Halld27f6aa2015-08-15 17:58:48 -07007278////////////////
7279// Validation //
7280////////////////
7281
7282extern void validate(string layerName, bool condition, string message)
7283
7284
7285/////////////////////////////
7286// Internal State Tracking //
7287/////////////////////////////
7288
7289StateObject State
7290
7291@internal class StateObject {
7292 // Dispatchable objects.
7293 map!(VkInstance, ref!InstanceObject) Instances
7294 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7295 map!(VkDevice, ref!DeviceObject) Devices
7296 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007297 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007298
7299 // Non-dispatchable objects.
7300 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7301 map!(VkBuffer, ref!BufferObject) Buffers
7302 map!(VkBufferView, ref!BufferViewObject) BufferViews
7303 map!(VkImage, ref!ImageObject) Images
7304 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007305 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007306 map!(VkPipeline, ref!PipelineObject) Pipelines
7307 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7308 map!(VkSampler, ref!SamplerObject) Samplers
7309 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7310 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7311 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007312 map!(VkFence, ref!FenceObject) Fences
7313 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7314 map!(VkEvent, ref!EventObject) Events
7315 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7316 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7317 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7318 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007319 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007320 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007321 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007322}
7323
7324@internal class InstanceObject {
7325}
7326
7327@internal class PhysicalDeviceObject {
7328 VkInstance instance
7329}
7330
7331@internal class DeviceObject {
7332 VkPhysicalDevice physicalDevice
7333}
7334
7335@internal class QueueObject {
7336 VkDevice device
7337 VkQueueFlags flags
7338}
7339
Jesse Hall3fbc8562015-11-29 22:10:52 -08007340@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007341 VkDevice device
7342 map!(u64, VkDeviceMemory) boundObjects
7343 VkQueueFlags queueFlags
7344}
7345
7346@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007347 VkDevice device
7348 VkDeviceSize allocationSize
7349 map!(u64, VkDeviceSize) boundObjects
7350 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007351}
7352
7353@internal class BufferObject {
7354 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007355 VkDeviceMemory memory
7356 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007357}
7358
7359@internal class BufferViewObject {
7360 VkDevice device
7361 VkBuffer buffer
7362}
7363
7364@internal class ImageObject {
7365 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007366 VkDeviceMemory memory
7367 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007368}
7369
7370@internal class ImageViewObject {
7371 VkDevice device
7372 VkImage image
7373}
7374
Jesse Halld27f6aa2015-08-15 17:58:48 -07007375@internal class ShaderObject {
7376 VkDevice device
7377}
7378
7379@internal class ShaderModuleObject {
7380 VkDevice device
7381}
7382
7383@internal class PipelineObject {
7384 VkDevice device
7385}
7386
7387@internal class PipelineLayoutObject {
7388 VkDevice device
7389}
7390
7391@internal class SamplerObject {
7392 VkDevice device
7393}
7394
7395@internal class DescriptorSetObject {
7396 VkDevice device
7397}
7398
7399@internal class DescriptorSetLayoutObject {
7400 VkDevice device
7401}
7402
7403@internal class DescriptorPoolObject {
7404 VkDevice device
7405}
7406
Jesse Halld27f6aa2015-08-15 17:58:48 -07007407@internal class FenceObject {
7408 VkDevice device
7409 bool signaled
7410}
7411
7412@internal class SemaphoreObject {
7413 VkDevice device
7414}
7415
7416@internal class EventObject {
7417 VkDevice device
7418}
7419
7420@internal class QueryPoolObject {
7421 VkDevice device
7422}
7423
7424@internal class FramebufferObject {
7425 VkDevice device
7426}
7427
7428@internal class RenderPassObject {
7429 VkDevice device
7430}
7431
7432@internal class PipelineCacheObject {
7433 VkDevice device
7434}
7435
Jesse Hall3fbc8562015-11-29 22:10:52 -08007436@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007437 VkDevice device
7438}
7439
Jesse Hall1356b0d2015-11-23 17:24:58 -08007440@internal class SurfaceObject {
7441 VkInstance instance
7442}
7443
Michael Lentine88594d72015-11-12 12:49:45 -08007444@internal class SwapchainObject {
7445 VkDevice device
7446}
7447
Jesse Halld27f6aa2015-08-15 17:58:48 -07007448macro ref!InstanceObject GetInstance(VkInstance instance) {
7449 assert(instance in State.Instances)
7450 return State.Instances[instance]
7451}
7452
7453macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7454 assert(physicalDevice in State.PhysicalDevices)
7455 return State.PhysicalDevices[physicalDevice]
7456}
7457
7458macro ref!DeviceObject GetDevice(VkDevice device) {
7459 assert(device in State.Devices)
7460 return State.Devices[device]
7461}
7462
7463macro ref!QueueObject GetQueue(VkQueue queue) {
7464 assert(queue in State.Queues)
7465 return State.Queues[queue]
7466}
7467
Jesse Hall3fbc8562015-11-29 22:10:52 -08007468macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7469 assert(commandBuffer in State.CommandBuffers)
7470 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007471}
7472
Jesse Hall3fbc8562015-11-29 22:10:52 -08007473macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7474 assert(memory in State.DeviceMemories)
7475 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007476}
7477
7478macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7479 assert(buffer in State.Buffers)
7480 return State.Buffers[buffer]
7481}
7482
7483macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7484 assert(bufferView in State.BufferViews)
7485 return State.BufferViews[bufferView]
7486}
7487
7488macro ref!ImageObject GetImage(VkImage image) {
7489 assert(image in State.Images)
7490 return State.Images[image]
7491}
7492
7493macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7494 assert(imageView in State.ImageViews)
7495 return State.ImageViews[imageView]
7496}
7497
Jesse Halld27f6aa2015-08-15 17:58:48 -07007498macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7499 assert(shaderModule in State.ShaderModules)
7500 return State.ShaderModules[shaderModule]
7501}
7502
7503macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7504 assert(pipeline in State.Pipelines)
7505 return State.Pipelines[pipeline]
7506}
7507
7508macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7509 assert(pipelineLayout in State.PipelineLayouts)
7510 return State.PipelineLayouts[pipelineLayout]
7511}
7512
7513macro ref!SamplerObject GetSampler(VkSampler sampler) {
7514 assert(sampler in State.Samplers)
7515 return State.Samplers[sampler]
7516}
7517
7518macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7519 assert(descriptorSet in State.DescriptorSets)
7520 return State.DescriptorSets[descriptorSet]
7521}
7522
7523macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7524 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7525 return State.DescriptorSetLayouts[descriptorSetLayout]
7526}
7527
7528macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7529 assert(descriptorPool in State.DescriptorPools)
7530 return State.DescriptorPools[descriptorPool]
7531}
7532
Jesse Halld27f6aa2015-08-15 17:58:48 -07007533macro ref!FenceObject GetFence(VkFence fence) {
7534 assert(fence in State.Fences)
7535 return State.Fences[fence]
7536}
7537
7538macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7539 assert(semaphore in State.Semaphores)
7540 return State.Semaphores[semaphore]
7541}
7542
7543macro ref!EventObject GetEvent(VkEvent event) {
7544 assert(event in State.Events)
7545 return State.Events[event]
7546}
7547
7548macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7549 assert(queryPool in State.QueryPools)
7550 return State.QueryPools[queryPool]
7551}
7552
7553macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7554 assert(framebuffer in State.Framebuffers)
7555 return State.Framebuffers[framebuffer]
7556}
7557
7558macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7559 assert(renderPass in State.RenderPasses)
7560 return State.RenderPasses[renderPass]
7561}
7562
7563macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7564 assert(pipelineCache in State.PipelineCaches)
7565 return State.PipelineCaches[pipelineCache]
7566}
7567
Jesse Hall3fbc8562015-11-29 22:10:52 -08007568macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7569 assert(commandPool in State.CommandPools)
7570 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007571}
Michael Lentine88594d72015-11-12 12:49:45 -08007572
Jesse Hall1356b0d2015-11-23 17:24:58 -08007573macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7574 assert(surface in State.Surfaces)
7575 return State.Surfaces[surface]
7576}
7577
Michael Lentine88594d72015-11-12 12:49:45 -08007578macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7579 assert(swapchain in State.Swapchains)
7580 return State.Swapchains[swapchain]
7581}
Jesse Halld8bade02015-11-24 10:24:18 -08007582
7583macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7584 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7585}