blob: 088d0012a23d8d7f78f64745465eee85aa620d5d [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 Halle8ec6a22017-03-10 21:01:57 -080031define VERSION_PATCH 43
Jesse Halld27f6aa2015-08-15 17:58:48 -070032
33// API limits
Jesse Hall65ab5522015-11-30 00:07:16 -080034define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
35define VK_UUID_SIZE 16
36define VK_MAX_EXTENSION_NAME_SIZE 256
37define VK_MAX_DESCRIPTION_SIZE 256
38define VK_MAX_MEMORY_TYPES 32
39define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types.
Jesse 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 Halle8ec6a22017-03-10 21:01:57 -080076@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080077@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080078
Jesse Halleb02c472017-02-24 15:13:45 -080079// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080080@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080081@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080082
Jesse Halleb02c472017-02-24 15:13:45 -080083// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080084@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080085@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080086
Jesse Halleb02c472017-02-24 15:13:45 -080087// 10
Jesse Hall543a7ff2016-01-08 16:38:30 -080088@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080089@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080090
Jesse Halleb02c472017-02-24 15:13:45 -080091// 11
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 Halle8ec6a22017-03-10 21:01:57 -0800279// 93
280@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
281@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
282
Jesse Halld0599582017-03-10 18:35:38 -0800283// 95
284@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
285@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
286
287// 96
288@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
289@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
290
291// 97
292@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
293@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
294
295// 98
296@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
297@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
298
299// 99
300@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
301@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
302
303// 100
304@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
305@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
306
Jesse Halle8ec6a22017-03-10 21:01:57 -0800307// 106
308@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
309@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
310
Jesse Halld0599582017-03-10 18:35:38 -0800311// 123
312@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
313@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
314
315// 124
316@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
317@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
318
Jesse Halld27f6aa2015-08-15 17:58:48 -0700319/////////////
320// Types //
321/////////////
322
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700323type u32 VkBool32
324type u32 VkFlags
325type u64 VkDeviceSize
326type u32 VkSampleMask
327
Jesse Halld27f6aa2015-08-15 17:58:48 -0700328/// Dispatchable handle types.
329@dispatchHandle type u64 VkInstance
330@dispatchHandle type u64 VkPhysicalDevice
331@dispatchHandle type u64 VkDevice
332@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800333@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700334
335/// Non dispatchable handle types.
336@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800337@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700338@nonDispatchHandle type u64 VkBuffer
339@nonDispatchHandle type u64 VkBufferView
340@nonDispatchHandle type u64 VkImage
341@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700342@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700343@nonDispatchHandle type u64 VkPipeline
344@nonDispatchHandle type u64 VkPipelineLayout
345@nonDispatchHandle type u64 VkSampler
346@nonDispatchHandle type u64 VkDescriptorSet
347@nonDispatchHandle type u64 VkDescriptorSetLayout
348@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700349@nonDispatchHandle type u64 VkFence
350@nonDispatchHandle type u64 VkSemaphore
351@nonDispatchHandle type u64 VkEvent
352@nonDispatchHandle type u64 VkQueryPool
353@nonDispatchHandle type u64 VkFramebuffer
354@nonDispatchHandle type u64 VkRenderPass
355@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800356
Jesse Halld0599582017-03-10 18:35:38 -0800357// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800358@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800359
Jesse Halld0599582017-03-10 18:35:38 -0800360// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800361@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800362
Jesse Halld0599582017-03-10 18:35:38 -0800363// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800364@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
365@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700366
Jesse Halld0599582017-03-10 18:35:38 -0800367// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800368@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
369
Jesse Halld0599582017-03-10 18:35:38 -0800370// 86
371@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
372
373// 87
Jesse Halleb02c472017-02-24 15:13:45 -0800374@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
375@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
376
Jesse Halld27f6aa2015-08-15 17:58:48 -0700377
378/////////////
379// Enums //
380/////////////
381
382enum VkImageLayout {
383 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
384 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
385 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
386 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
387 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
388 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 -0800389 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
390 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 -0700391 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800392
Jesse Halld0599582017-03-10 18:35:38 -0800393 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800394 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700395}
396
397enum VkAttachmentLoadOp {
398 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
399 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
400 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
401}
402
403enum VkAttachmentStoreOp {
404 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
405 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
406}
407
408enum VkImageType {
409 VK_IMAGE_TYPE_1D = 0x00000000,
410 VK_IMAGE_TYPE_2D = 0x00000001,
411 VK_IMAGE_TYPE_3D = 0x00000002,
412}
413
414enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800415 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
416 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700417}
418
419enum VkImageViewType {
420 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
421 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
422 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
423 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
424 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
425 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
426 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
427}
428
Jesse Hall3fbc8562015-11-29 22:10:52 -0800429enum VkCommandBufferLevel {
430 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
431 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700432}
433
Jesse Hall65ab5522015-11-30 00:07:16 -0800434enum VkComponentSwizzle {
435 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
436 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
437 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
438 VK_COMPONENT_SWIZZLE_R = 0x00000003,
439 VK_COMPONENT_SWIZZLE_G = 0x00000004,
440 VK_COMPONENT_SWIZZLE_B = 0x00000005,
441 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700442}
443
444enum VkDescriptorType {
445 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
446 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
447 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
448 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
449 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
450 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
451 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
452 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
453 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
454 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
455 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
456}
457
Jesse Halld27f6aa2015-08-15 17:58:48 -0700458enum VkQueryType {
459 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
460 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800461 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700462}
463
Jesse Halld27f6aa2015-08-15 17:58:48 -0700464enum VkBorderColor {
465 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
466 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
467 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
468 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
469 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
470 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
471}
472
473enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800474 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
475 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700476}
477
478enum VkPrimitiveTopology {
479 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
480 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
481 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
482 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
483 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
484 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800485 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
486 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
487 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
488 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800489 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700490}
491
492enum VkSharingMode {
493 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
494 VK_SHARING_MODE_CONCURRENT = 0x00000001,
495}
496
497enum VkIndexType {
498 VK_INDEX_TYPE_UINT16 = 0x00000000,
499 VK_INDEX_TYPE_UINT32 = 0x00000001,
500}
501
Jesse Hall23ff73f2015-11-29 14:36:39 -0800502enum VkFilter {
503 VK_FILTER_NEAREST = 0x00000000,
504 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700505
Jesse Halld0599582017-03-10 18:35:38 -0800506 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700507 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700508}
509
Jesse Hall23ff73f2015-11-29 14:36:39 -0800510enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800511 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
512 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700513}
514
Jesse Hall23ff73f2015-11-29 14:36:39 -0800515enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800516 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
517 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
518 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
519 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
520 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700521}
522
523enum VkCompareOp {
524 VK_COMPARE_OP_NEVER = 0x00000000,
525 VK_COMPARE_OP_LESS = 0x00000001,
526 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800527 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700528 VK_COMPARE_OP_GREATER = 0x00000004,
529 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800530 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700531 VK_COMPARE_OP_ALWAYS = 0x00000007,
532}
533
Jesse Hall65ab5522015-11-30 00:07:16 -0800534enum VkPolygonMode {
535 VK_POLYGON_MODE_FILL = 0x00000000,
536 VK_POLYGON_MODE_LINE = 0x00000001,
537 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700538}
539
540enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800541 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
542 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700543}
544
Jesse Hall65ab5522015-11-30 00:07:16 -0800545enum VkBlendFactor {
546 VK_BLEND_FACTOR_ZERO = 0x00000000,
547 VK_BLEND_FACTOR_ONE = 0x00000001,
548 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
549 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
550 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
551 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
552 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
553 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
554 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
555 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
556 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
557 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
558 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
559 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
560 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
561 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
562 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
563 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
564 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700565}
566
567enum VkBlendOp {
568 VK_BLEND_OP_ADD = 0x00000000,
569 VK_BLEND_OP_SUBTRACT = 0x00000001,
570 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
571 VK_BLEND_OP_MIN = 0x00000003,
572 VK_BLEND_OP_MAX = 0x00000004,
573}
574
575enum VkStencilOp {
576 VK_STENCIL_OP_KEEP = 0x00000000,
577 VK_STENCIL_OP_ZERO = 0x00000001,
578 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800579 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
580 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700581 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800582 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
583 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700584}
585
586enum VkLogicOp {
587 VK_LOGIC_OP_CLEAR = 0x00000000,
588 VK_LOGIC_OP_AND = 0x00000001,
589 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
590 VK_LOGIC_OP_COPY = 0x00000003,
591 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800592 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700593 VK_LOGIC_OP_XOR = 0x00000006,
594 VK_LOGIC_OP_OR = 0x00000007,
595 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800596 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700597 VK_LOGIC_OP_INVERT = 0x0000000a,
598 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
599 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
600 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
601 VK_LOGIC_OP_NAND = 0x0000000e,
602 VK_LOGIC_OP_SET = 0x0000000f,
603}
604
Jesse Hall3fbc8562015-11-29 22:10:52 -0800605enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800606 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800607 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
608 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
609 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
610 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800611}
612
Jesse Hall3fbc8562015-11-29 22:10:52 -0800613enum VkInternalAllocationType {
614 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700615}
616
617enum VkPhysicalDeviceType {
618 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
619 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
620 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
621 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
622 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
623}
624
Jesse Hall65ab5522015-11-30 00:07:16 -0800625enum VkVertexInputRate {
626 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
627 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700628}
629
630/// Vulkan format definitions
631enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800632 VK_FORMAT_UNDEFINED = 0,
633 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
634 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
635 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
636 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
637 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
638 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
639 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
640 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
641 VK_FORMAT_R8_UNORM = 9,
642 VK_FORMAT_R8_SNORM = 10,
643 VK_FORMAT_R8_USCALED = 11,
644 VK_FORMAT_R8_SSCALED = 12,
645 VK_FORMAT_R8_UINT = 13,
646 VK_FORMAT_R8_SINT = 14,
647 VK_FORMAT_R8_SRGB = 15,
648 VK_FORMAT_R8G8_UNORM = 16,
649 VK_FORMAT_R8G8_SNORM = 17,
650 VK_FORMAT_R8G8_USCALED = 18,
651 VK_FORMAT_R8G8_SSCALED = 19,
652 VK_FORMAT_R8G8_UINT = 20,
653 VK_FORMAT_R8G8_SINT = 21,
654 VK_FORMAT_R8G8_SRGB = 22,
655 VK_FORMAT_R8G8B8_UNORM = 23,
656 VK_FORMAT_R8G8B8_SNORM = 24,
657 VK_FORMAT_R8G8B8_USCALED = 25,
658 VK_FORMAT_R8G8B8_SSCALED = 26,
659 VK_FORMAT_R8G8B8_UINT = 27,
660 VK_FORMAT_R8G8B8_SINT = 28,
661 VK_FORMAT_R8G8B8_SRGB = 29,
662 VK_FORMAT_B8G8R8_UNORM = 30,
663 VK_FORMAT_B8G8R8_SNORM = 31,
664 VK_FORMAT_B8G8R8_USCALED = 32,
665 VK_FORMAT_B8G8R8_SSCALED = 33,
666 VK_FORMAT_B8G8R8_UINT = 34,
667 VK_FORMAT_B8G8R8_SINT = 35,
668 VK_FORMAT_B8G8R8_SRGB = 36,
669 VK_FORMAT_R8G8B8A8_UNORM = 37,
670 VK_FORMAT_R8G8B8A8_SNORM = 38,
671 VK_FORMAT_R8G8B8A8_USCALED = 39,
672 VK_FORMAT_R8G8B8A8_SSCALED = 40,
673 VK_FORMAT_R8G8B8A8_UINT = 41,
674 VK_FORMAT_R8G8B8A8_SINT = 42,
675 VK_FORMAT_R8G8B8A8_SRGB = 43,
676 VK_FORMAT_B8G8R8A8_UNORM = 44,
677 VK_FORMAT_B8G8R8A8_SNORM = 45,
678 VK_FORMAT_B8G8R8A8_USCALED = 46,
679 VK_FORMAT_B8G8R8A8_SSCALED = 47,
680 VK_FORMAT_B8G8R8A8_UINT = 48,
681 VK_FORMAT_B8G8R8A8_SINT = 49,
682 VK_FORMAT_B8G8R8A8_SRGB = 50,
683 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
684 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
685 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
686 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
687 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
688 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
689 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
690 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
691 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
692 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
693 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
694 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
695 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
696 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
697 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
698 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
699 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
700 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
701 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
702 VK_FORMAT_R16_UNORM = 70,
703 VK_FORMAT_R16_SNORM = 71,
704 VK_FORMAT_R16_USCALED = 72,
705 VK_FORMAT_R16_SSCALED = 73,
706 VK_FORMAT_R16_UINT = 74,
707 VK_FORMAT_R16_SINT = 75,
708 VK_FORMAT_R16_SFLOAT = 76,
709 VK_FORMAT_R16G16_UNORM = 77,
710 VK_FORMAT_R16G16_SNORM = 78,
711 VK_FORMAT_R16G16_USCALED = 79,
712 VK_FORMAT_R16G16_SSCALED = 80,
713 VK_FORMAT_R16G16_UINT = 81,
714 VK_FORMAT_R16G16_SINT = 82,
715 VK_FORMAT_R16G16_SFLOAT = 83,
716 VK_FORMAT_R16G16B16_UNORM = 84,
717 VK_FORMAT_R16G16B16_SNORM = 85,
718 VK_FORMAT_R16G16B16_USCALED = 86,
719 VK_FORMAT_R16G16B16_SSCALED = 87,
720 VK_FORMAT_R16G16B16_UINT = 88,
721 VK_FORMAT_R16G16B16_SINT = 89,
722 VK_FORMAT_R16G16B16_SFLOAT = 90,
723 VK_FORMAT_R16G16B16A16_UNORM = 91,
724 VK_FORMAT_R16G16B16A16_SNORM = 92,
725 VK_FORMAT_R16G16B16A16_USCALED = 93,
726 VK_FORMAT_R16G16B16A16_SSCALED = 94,
727 VK_FORMAT_R16G16B16A16_UINT = 95,
728 VK_FORMAT_R16G16B16A16_SINT = 96,
729 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
730 VK_FORMAT_R32_UINT = 98,
731 VK_FORMAT_R32_SINT = 99,
732 VK_FORMAT_R32_SFLOAT = 100,
733 VK_FORMAT_R32G32_UINT = 101,
734 VK_FORMAT_R32G32_SINT = 102,
735 VK_FORMAT_R32G32_SFLOAT = 103,
736 VK_FORMAT_R32G32B32_UINT = 104,
737 VK_FORMAT_R32G32B32_SINT = 105,
738 VK_FORMAT_R32G32B32_SFLOAT = 106,
739 VK_FORMAT_R32G32B32A32_UINT = 107,
740 VK_FORMAT_R32G32B32A32_SINT = 108,
741 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
742 VK_FORMAT_R64_UINT = 110,
743 VK_FORMAT_R64_SINT = 111,
744 VK_FORMAT_R64_SFLOAT = 112,
745 VK_FORMAT_R64G64_UINT = 113,
746 VK_FORMAT_R64G64_SINT = 114,
747 VK_FORMAT_R64G64_SFLOAT = 115,
748 VK_FORMAT_R64G64B64_UINT = 116,
749 VK_FORMAT_R64G64B64_SINT = 117,
750 VK_FORMAT_R64G64B64_SFLOAT = 118,
751 VK_FORMAT_R64G64B64A64_UINT = 119,
752 VK_FORMAT_R64G64B64A64_SINT = 120,
753 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
754 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
755 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
756 VK_FORMAT_D16_UNORM = 124,
757 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
758 VK_FORMAT_D32_SFLOAT = 126,
759 VK_FORMAT_S8_UINT = 127,
760 VK_FORMAT_D16_UNORM_S8_UINT = 128,
761 VK_FORMAT_D24_UNORM_S8_UINT = 129,
762 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
763 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
764 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
765 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
766 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
767 VK_FORMAT_BC2_UNORM_BLOCK = 135,
768 VK_FORMAT_BC2_SRGB_BLOCK = 136,
769 VK_FORMAT_BC3_UNORM_BLOCK = 137,
770 VK_FORMAT_BC3_SRGB_BLOCK = 138,
771 VK_FORMAT_BC4_UNORM_BLOCK = 139,
772 VK_FORMAT_BC4_SNORM_BLOCK = 140,
773 VK_FORMAT_BC5_UNORM_BLOCK = 141,
774 VK_FORMAT_BC5_SNORM_BLOCK = 142,
775 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
776 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
777 VK_FORMAT_BC7_UNORM_BLOCK = 145,
778 VK_FORMAT_BC7_SRGB_BLOCK = 146,
779 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
780 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
781 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
782 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
783 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
784 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
785 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
786 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
787 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
788 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
789 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
790 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
791 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
792 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
793 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
794 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
795 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
796 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
797 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
798 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
799 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
800 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
801 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
802 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
803 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
804 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
805 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
806 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
807 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
808 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
809 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
810 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
811 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
812 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
813 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
814 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
815 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
816 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Jesse Halleb02c472017-02-24 15:13:45 -0800817
Jesse Halld0599582017-03-10 18:35:38 -0800818 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -0800819 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
820 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
821 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
822 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
823 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
824 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
825 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
826 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700827}
828
Jesse Halld27f6aa2015-08-15 17:58:48 -0700829/// Structure type enumerant
830enum VkStructureType {
831 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -0800832 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
833 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
834 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
835 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800836 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -0800837 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
838 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
839 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
840 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700841 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -0800842 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
843 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
844 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
845 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
846 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
847 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800848 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
849 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
850 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
851 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
852 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
853 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
854 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
855 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
856 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
857 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
858 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
859 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
860 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
861 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
862 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
863 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
864 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800865 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800866 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
867 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
868 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
869 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
870 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800871 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -0800872 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
873 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
874 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
875 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
876 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
877 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
878 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
879 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800880
Jesse Halld0599582017-03-10 18:35:38 -0800881 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800882 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
883 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800884
Jesse Halld0599582017-03-10 18:35:38 -0800885 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -0800886 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
887 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800888
Jesse Halld0599582017-03-10 18:35:38 -0800889 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -0800890 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800891
Jesse Halld0599582017-03-10 18:35:38 -0800892 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800893 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
894
Jesse Halld0599582017-03-10 18:35:38 -0800895 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800896 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
897
Jesse Halld0599582017-03-10 18:35:38 -0800898 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800899 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
900
Jesse Halld0599582017-03-10 18:35:38 -0800901 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800902 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
903
Jesse Halld0599582017-03-10 18:35:38 -0800904 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800905 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
906
Jesse Halld0599582017-03-10 18:35:38 -0800907 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800908 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -0800909
Jesse Halld0599582017-03-10 18:35:38 -0800910 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +0800911 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
912
Jesse Halld0599582017-03-10 18:35:38 -0800913 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -0700914 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
915
Jesse Halld0599582017-03-10 18:35:38 -0800916 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -0700917 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
918
Jesse Halld0599582017-03-10 18:35:38 -0800919 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -0700920 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -0700921 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -0700922 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700923
Jesse Halld0599582017-03-10 18:35:38 -0800924 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -0700925 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700926 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700927 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Jesse Halleb02c472017-02-24 15:13:45 -0800928
Jesse Halld0599582017-03-10 18:35:38 -0800929 //@extension("VK_KHX_multiview") // 54
930 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
931 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
932 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
933
934 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -0800935 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
936 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
937
Jesse Halld0599582017-03-10 18:35:38 -0800938 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -0800939 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
940 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
941
Jesse Halld0599582017-03-10 18:35:38 -0800942 //@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -0800943 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
944
Jesse Halld0599582017-03-10 18:35:38 -0800945 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -0800946 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
947 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
948 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
949 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
950 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
951 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
952 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
953 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
954 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
955
Jesse Halld0599582017-03-10 18:35:38 -0800956 //@extension("VK_KHX_device_group") // 61
957 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
958 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
959 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
960 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
961 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
962 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
963 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
964 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
965 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
966 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
967 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
968 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
969 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
970
971 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -0800972 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
973
Jesse Halld0599582017-03-10 18:35:38 -0800974 //@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -0800975 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
976
Jesse Halld0599582017-03-10 18:35:38 -0800977 //@extension("VK_KHX_device_group_creation") // 71
978 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
979 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
980
981 //@extension("VK_KHX_external_memory_capabilities") // 72
982 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000,
983 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001,
984 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002,
985 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003,
986 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004,
987 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005,
988 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006,
989 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007,
990
991 //@extension("VK_KHX_external_memory") // 73
992 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
993 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
994 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
995
996 //@extension("VK_KHX_external_memory_win32") // 74
997 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
998 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
999 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
1000
1001 //@extension("VK_KHX_external_memory_fd") // 75
1002 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
1003 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
1004
1005 //@extension("VK_KHX_win32_keyed_mutex") // 76
1006 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
1007
1008 //@extension("VK_KHX_external_semaphore_capabilities") // 77
1009 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
1010 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
1011
1012 //@extension("VK_KHX_external_semaphore") // 78
1013 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
1014
1015 //@extension("VK_KHX_external_semaphore_win32") // 79
1016 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
1017 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
1018 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
1019
1020 //@extension("VK_KHX_external_semaphore_fd") // 80
1021 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
1022
1023 //@extension("VK_KHR_push_descriptor") // 81
1024 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1025
1026 //@extension("VK_KHR_descriptor_update_template") // 86
1027 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1028
1029 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001030 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1031 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1032 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1033 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1034 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1035 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall08e2f482017-03-06 15:22:17 -08001036
Jesse Halld0599582017-03-10 18:35:38 -08001037 //@extension("VK_NV_clip_space_w_scaling") // 88
1038 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1039
1040 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001041 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1042
Jesse Halld0599582017-03-10 18:35:38 -08001043 //@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001044 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1045 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1046 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1047 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Halld0599582017-03-10 18:35:38 -08001048
Jesse Halle8ec6a22017-03-10 21:01:57 -08001049 //@extension("VK_GOOGLE_display_timing") // 93
1050 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1051
Jesse Halld0599582017-03-10 18:35:38 -08001052 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1053 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1054
1055 //@extension("VK_NV_viewport_swizzle") // 99
1056 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1057
1058 //@extension("VK_EXT_discard_rectangles") // 100
1059 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1060 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1061
Jesse Halle8ec6a22017-03-10 21:01:57 -08001062 //@extension("VK_EXT_hdr_metadata") // 106
1063 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1064
Jesse Halld0599582017-03-10 18:35:38 -08001065 //@extension("VK_MVK_ios_surface") // 123
1066 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1067
1068 //@extension("VK_MVK_macos_surface") // 124
1069 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001070}
1071
Jesse Hall65ab5522015-11-30 00:07:16 -08001072enum VkSubpassContents {
1073 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1074 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001075}
1076
Jesse Hall543a7ff2016-01-08 16:38:30 -08001077enum VkPipelineCacheHeaderVersion {
1078 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1079}
1080
Jesse Hallbd888842015-11-30 21:44:14 -08001081@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001082/// Error and return codes
1083enum VkResult {
1084 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001085 VK_SUCCESS = 0,
1086 VK_NOT_READY = 1,
1087 VK_TIMEOUT = 2,
1088 VK_EVENT_SET = 3,
1089 VK_EVENT_RESET = 4,
1090 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001091
Jesse Halld0599582017-03-10 18:35:38 -08001092 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001093 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001094
Jesse Halld27f6aa2015-08-15 17:58:48 -07001095 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001096 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1097 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1098 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1099 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1100 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1101 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1102 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1103 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1104 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1105 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1106 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall3f5499b2016-07-26 15:20:40 -07001107 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001108
Jesse Halld0599582017-03-10 18:35:38 -08001109 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001110 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Halld0599582017-03-10 18:35:38 -08001111 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001112
Jesse Halld0599582017-03-10 18:35:38 -08001113 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001114 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001115
Jesse Halld0599582017-03-10 18:35:38 -08001116 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001117 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001118
Jesse Halld0599582017-03-10 18:35:38 -08001119 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001120 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001121
Jesse Halld0599582017-03-10 18:35:38 -08001122 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001123 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall08e2f482017-03-06 15:22:17 -08001124
Jesse Halld0599582017-03-10 18:35:38 -08001125 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001126 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Halld0599582017-03-10 18:35:38 -08001127
1128 //@extension("VK_KHX_external_memory") // 73
1129 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001130}
1131
1132enum VkDynamicState {
1133 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1134 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1135 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1136 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1137 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1138 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1139 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1140 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1141 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Halld0599582017-03-10 18:35:38 -08001142
1143 //@extension("VK_NV_clip_space_w_scaling") // 88
1144 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1145
1146 //@extension("VK_EXT_discard_rectangles") // 100
1147 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001148}
1149
Jesse Halld0599582017-03-10 18:35:38 -08001150@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001151enum VkPresentModeKHR {
1152 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1153 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1154 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001155 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Michael Lentine88594d72015-11-12 12:49:45 -08001156}
1157
Jesse Halld0599582017-03-10 18:35:38 -08001158@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001159enum VkColorSpaceKHR {
1160 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
1161}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001162
Jesse Halld0599582017-03-10 18:35:38 -08001163@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001164enum VkDebugReportObjectTypeEXT {
1165 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1166 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1167 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1168 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1169 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1170 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1171 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1172 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1173 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1174 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1175 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1176 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1177 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1178 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1179 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1180 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1181 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1182 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1183 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1184 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1185 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1186 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1187 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1188 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1189 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1190 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1191 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1192 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1193 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Jesse Halleb02c472017-02-24 15:13:45 -08001194 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1195 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1196 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1197 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hall715b86a2016-01-16 16:34:29 -08001198}
1199
Jesse Halld0599582017-03-10 18:35:38 -08001200@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001201enum VkDebugReportErrorEXT {
1202 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1203 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1204}
1205
Jesse Halld0599582017-03-10 18:35:38 -08001206@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001207enum VkRasterizationOrderAMD {
1208 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1209 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1210}
1211
Jesse Halld0599582017-03-10 18:35:38 -08001212@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08001213enum VkValidationCheckEXT {
1214 VK_VALIDATION_CHECK_ALL_EXT = 0,
1215}
1216
Jesse Halld0599582017-03-10 18:35:38 -08001217@extension("VK_KHR_descriptor_update_template") // 86
1218enum VkDescriptorUpdateTemplateTypeKHR {
1219 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1220 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1221}
1222
1223@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001224enum VkIndirectCommandsTokenTypeNVX {
1225 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1226 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1227 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1228 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1229 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1230 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1231 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1232 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
1233}
1234
Jesse Halld0599582017-03-10 18:35:38 -08001235@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001236enum VkObjectEntryTypeNVX {
1237 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1238 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1239 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1240 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1241 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
1242}
Jesse Hall715b86a2016-01-16 16:34:29 -08001243
Jesse Halld0599582017-03-10 18:35:38 -08001244@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001245enum VkDisplayPowerStateEXT {
1246 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1247 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1248 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1249}
1250
Jesse Halld0599582017-03-10 18:35:38 -08001251@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001252enum VkDeviceEventTypeEXT {
1253 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1254}
1255
Jesse Halld0599582017-03-10 18:35:38 -08001256@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001257enum VkDisplayEventTypeEXT {
1258 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1259}
1260
Jesse Halld0599582017-03-10 18:35:38 -08001261@extension("VK_NV_viewport_swizzle") // 99
1262enum VkViewportCoordinateSwizzleNV {
1263 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1264 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1265 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1266 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1267 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1268 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1269 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1270 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1271}
1272
1273@extension("VK_EXT_discard_rectangles") // 100
1274enum VkDiscardRectangleModeEXT {
1275 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1276 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1277}
1278
Jesse Halld27f6aa2015-08-15 17:58:48 -07001279/////////////////
1280// Bitfields //
1281/////////////////
1282
Jesse Halld27f6aa2015-08-15 17:58:48 -07001283/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001284type VkFlags VkQueueFlags
1285bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001286 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1287 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001288 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001289 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001290}
1291
1292/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001293type VkFlags VkMemoryPropertyFlags
1294bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001295 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1296 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1297 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1298 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1299 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001300}
1301
1302/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001303type VkFlags VkMemoryHeapFlags
1304bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001305 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Halld0599582017-03-10 18:35:38 -08001306
1307 //@extension("VK_KHX_device_group_creation") // 71
1308 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001309}
1310
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001311/// Access flags
1312type VkFlags VkAccessFlags
1313bitfield VkAccessFlagBits {
1314 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1315 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1316 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1317 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1318 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1319 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1320 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1321 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1322 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1323 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1324 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1325 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1326 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1327 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1328 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1329 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1330 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Jesse Halleb02c472017-02-24 15:13:45 -08001331
Jesse Halld0599582017-03-10 18:35:38 -08001332 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001333 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
1334 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001335}
1336
1337/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001338type VkFlags VkBufferUsageFlags
1339bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001340 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1341 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001342 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1343 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1344 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1345 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1346 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1347 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1348 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1349}
1350
1351/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001352type VkFlags VkBufferCreateFlags
1353bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001354 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001355 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1356 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1357}
1358
1359/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001360type VkFlags VkShaderStageFlags
1361bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001362 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001363 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1364 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001365 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1366 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1367 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001368 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001369
1370 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1371}
1372
Jesse Hallfbf97b02015-11-20 14:17:03 -08001373/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001374type VkFlags VkDescriptorPoolCreateFlags
1375bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001376 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1377}
1378
1379/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001380type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001381//bitfield VkDescriptorPoolResetFlagBits {
1382//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001383
Jesse Halld27f6aa2015-08-15 17:58:48 -07001384/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001385type VkFlags VkImageUsageFlags
1386bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001387 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1388 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001389 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1390 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1391 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001392 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001393 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1394 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1395}
1396
1397/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001398type VkFlags VkImageCreateFlags
1399bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001400 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001401 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1402 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 -07001403 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1404 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 -08001405
Jesse Halld0599582017-03-10 18:35:38 -08001406 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001407 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Halld0599582017-03-10 18:35:38 -08001408
1409 //@extension("VK_KHX_device_group") // 61
1410 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001411}
1412
Jesse Hallb00daad2015-11-29 19:46:20 -08001413/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001414type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001415//bitfield VkImageViewCreateFlagBits {
1416//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001417
1418/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001419type VkFlags VkPipelineCreateFlags
1420bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001421 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1422 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1423 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Halld0599582017-03-10 18:35:38 -08001424
1425 //@extension("VK_KHX_device_group") // 61
1426 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1427 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001428}
1429
Jesse Hall65ab5522015-11-30 00:07:16 -08001430/// Color component flags
1431type VkFlags VkColorComponentFlags
1432bitfield VkColorComponentFlagBits {
1433 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1434 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1435 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1436 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001437}
1438
1439/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001440type VkFlags VkFenceCreateFlags
1441bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001442 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1443}
1444
1445/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001446type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001447//bitfield VkSemaphoreCreateFlagBits {
1448//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001449
1450/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001451type VkFlags VkFormatFeatureFlags
1452bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001453 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1454 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1455 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1456 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1457 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1458 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1459 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1460 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1461 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1462 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001463 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1464 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 -08001465 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001466
Jesse Halld0599582017-03-10 18:35:38 -08001467 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001468 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall08e2f482017-03-06 15:22:17 -08001469
Jesse Halld0599582017-03-10 18:35:38 -08001470 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001471 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1472 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001473}
1474
1475/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001476type VkFlags VkQueryControlFlags
1477bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001478 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001479}
1480
1481/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001482type VkFlags VkQueryResultFlags
1483bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001484 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1485 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1486 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1487 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1488}
1489
1490/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001491type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001492//bitfield VkShaderModuleCreateFlagBits {
1493//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001494
Jesse Halld27f6aa2015-08-15 17:58:48 -07001495/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001496type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001497//bitfield VkEventCreateFlagBits {
1498//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001499
Jesse Halla15a4bf2015-11-19 22:48:02 -08001500/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001501type VkFlags VkCommandBufferUsageFlags
1502bitfield VkCommandBufferUsageFlagBits {
1503 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1504 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1505 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001506}
1507
1508/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001509type VkFlags VkQueryPipelineStatisticFlags
1510bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001511 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1512 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1513 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1514 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1515 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1516 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1517 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1518 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1519 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1520 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1521 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001522}
1523
1524/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001525type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001526//bitfield VkMemoryMapFlagBits {
1527//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001528
1529/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001530type VkFlags VkImageAspectFlags
1531bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001532 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1533 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1534 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1535 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1536}
1537
1538/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001539type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001540bitfield VkSparseMemoryBindFlagBits {
1541 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1542}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001543
1544/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001545type VkFlags VkSparseImageFormatFlags
1546bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001547 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1548 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.
1549 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001550}
1551
1552/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001553type VkFlags VkPipelineStageFlags
1554bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001555 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1556 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1557 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1558 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001559 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1560 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001561 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1562 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1563 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1564 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1565 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1566 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1567 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001568 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1569 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001570
Jesse Hall543a7ff2016-01-08 16:38:30 -08001571 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1572 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Jesse Halleb02c472017-02-24 15:13:45 -08001573
Jesse Halld0599582017-03-10 18:35:38 -08001574 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001575 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001576}
1577
1578/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001579type VkFlags VkAttachmentDescriptionFlags
1580bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001581 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 -07001582}
1583
1584/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001585type VkFlags VkSubpassDescriptionFlags
1586bitfield VkSubpassDescriptionFlagBits {
Jesse Halld0599582017-03-10 18:35:38 -08001587 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1588 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1589 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001590}
1591
1592/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001593type VkFlags VkCommandPoolCreateFlags
1594bitfield VkCommandPoolCreateFlagBits {
1595 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1596 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001597}
1598
1599/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001600type VkFlags VkCommandPoolResetFlags
1601bitfield VkCommandPoolResetFlagBits {
1602 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001603}
1604
Jesse Hall3fbc8562015-11-29 22:10:52 -08001605type VkFlags VkCommandBufferResetFlags
1606bitfield VkCommandBufferResetFlagBits {
1607 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001608}
1609
Jesse Halld8bade02015-11-24 10:24:18 -08001610type VkFlags VkSampleCountFlags
1611bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001612 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1613 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1614 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1615 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1616 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1617 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1618 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1619}
1620
Jesse Halld8bade02015-11-24 10:24:18 -08001621type VkFlags VkStencilFaceFlags
1622bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001623 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1624 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001625 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001626}
1627
Jesse Halla6429252015-11-29 18:59:42 -08001628/// Instance creation flags
1629type VkFlags VkInstanceCreateFlags
1630//bitfield VkInstanceCreateFlagBits {
1631//}
1632
1633/// Device creation flags
1634type VkFlags VkDeviceCreateFlags
1635//bitfield VkDeviceCreateFlagBits {
1636//}
1637
1638/// Device queue creation flags
1639type VkFlags VkDeviceQueueCreateFlags
1640//bitfield VkDeviceQueueCreateFlagBits {
1641//}
1642
1643/// Query pool creation flags
1644type VkFlags VkQueryPoolCreateFlags
1645//bitfield VkQueryPoolCreateFlagBits {
1646//}
1647
1648/// Buffer view creation flags
1649type VkFlags VkBufferViewCreateFlags
1650//bitfield VkBufferViewCreateFlagBits {
1651//}
1652
1653/// Pipeline cache creation flags
1654type VkFlags VkPipelineCacheCreateFlags
1655//bitfield VkPipelineCacheCreateFlagBits {
1656//}
1657
1658/// Pipeline shader stage creation flags
1659type VkFlags VkPipelineShaderStageCreateFlags
1660//bitfield VkPipelineShaderStageCreateFlagBits {
1661//}
1662
1663/// Descriptor set layout creation flags
1664type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Halld0599582017-03-10 18:35:38 -08001665bitfield VkDescriptorSetLayoutCreateFlagBits {
1666 //@extension("VK_KHR_push_descriptor") // 81
1667 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1668}
Jesse Halla6429252015-11-29 18:59:42 -08001669
1670/// Pipeline vertex input state creation flags
1671type VkFlags VkPipelineVertexInputStateCreateFlags
1672//bitfield VkPipelineVertexInputStateCreateFlagBits {
1673//}
1674
1675/// Pipeline input assembly state creation flags
1676type VkFlags VkPipelineInputAssemblyStateCreateFlags
1677//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1678//}
1679
1680/// Tessellation state creation flags
1681type VkFlags VkPipelineTessellationStateCreateFlags
1682//bitfield VkPipelineTessellationStateCreateFlagBits {
1683//}
1684
1685/// Viewport state creation flags
1686type VkFlags VkPipelineViewportStateCreateFlags
1687//bitfield VkPipelineViewportStateCreateFlagBits {
1688//}
1689
Jesse Hall3fbc8562015-11-29 22:10:52 -08001690/// Rasterization state creation flags
1691type VkFlags VkPipelineRasterizationStateCreateFlags
1692//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001693//}
1694
1695/// Multisample state creation flags
1696type VkFlags VkPipelineMultisampleStateCreateFlags
1697//bitfield VkPipelineMultisampleStateCreateFlagBits {
1698//}
1699
1700/// Color blend state creation flags
1701type VkFlags VkPipelineColorBlendStateCreateFlags
1702//bitfield VkPipelineColorBlendStateCreateFlagBits {
1703//}
1704
1705/// Depth/stencil state creation flags
1706type VkFlags VkPipelineDepthStencilStateCreateFlags
1707//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1708//}
1709
1710/// Dynamic state creation flags
1711type VkFlags VkPipelineDynamicStateCreateFlags
1712//bitfield VkPipelineDynamicStateCreateFlagBits {
1713//}
1714
1715/// Pipeline layout creation flags
1716type VkFlags VkPipelineLayoutCreateFlags
1717//bitfield VkPipelineLayoutCreateFlagBits {
1718//}
1719
1720/// Sampler creation flags
1721type VkFlags VkSamplerCreateFlags
1722//bitfield VkSamplerCreateFlagBits {
1723//}
1724
1725/// Render pass creation flags
1726type VkFlags VkRenderPassCreateFlags
1727//bitfield VkRenderPassCreateFlagBits {
1728//}
1729
1730/// Framebuffer creation flags
1731type VkFlags VkFramebufferCreateFlags
1732//bitfield VkFramebufferCreateFlagBits {
1733//}
1734
Jesse Halldc6d36c2015-11-29 19:12:15 -08001735/// Dependency flags
1736type VkFlags VkDependencyFlags
1737bitfield VkDependencyFlagBits {
1738 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Halld0599582017-03-10 18:35:38 -08001739
1740 //@extension("VK_KHX_multiview") // 54
1741 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1742
1743 //@extension("VK_KHX_device_group") // 61
1744 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001745}
1746
Jesse Hallc7467b72015-11-29 21:05:26 -08001747/// Cull mode flags
1748type VkFlags VkCullModeFlags
1749bitfield VkCullModeFlagBits {
1750 VK_CULL_MODE_NONE = 0x00000000,
1751 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1752 VK_CULL_MODE_BACK_BIT = 0x00000002,
1753 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1754}
1755
Jesse Halld0599582017-03-10 18:35:38 -08001756@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001757type VkFlags VkSurfaceTransformFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001758@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001759bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001760 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001761 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1762 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1763 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1764 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1765 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1766 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1767 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1768 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001769}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001770
Jesse Halld0599582017-03-10 18:35:38 -08001771@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001772type VkFlags VkCompositeAlphaFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001773@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001774bitfield VkCompositeAlphaFlagBitsKHR {
1775 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1776 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1777 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1778 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1779}
1780
Jesse Halld0599582017-03-10 18:35:38 -08001781@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001782type VkFlags VkSwapchainCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001783@extension("VK_KHR_swapchain") // 2
1784bitfield VkSwapchainCreateFlagBitsKHR {
1785 //@extension("VK_KHX_device_group") // 61
1786 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1787}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001788
Jesse Halld0599582017-03-10 18:35:38 -08001789@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001790type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001791@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001792bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001793 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1794 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1795 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1796 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001797}
1798
Jesse Halld0599582017-03-10 18:35:38 -08001799@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001800type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001801//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001802//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1803//}
1804
Jesse Halld0599582017-03-10 18:35:38 -08001805@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001806type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001807//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001808//bitfield VkDisplayModeCreateFlagBitsKHR {
1809//}
1810
Jesse Halld0599582017-03-10 18:35:38 -08001811@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001812type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001813//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001814//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1815//}
1816
Jesse Halld0599582017-03-10 18:35:38 -08001817@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001818type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001819//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001820//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1821//}
1822
Jesse Halld0599582017-03-10 18:35:38 -08001823@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001824type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001825//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001826//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1827//}
1828
Jesse Halld0599582017-03-10 18:35:38 -08001829@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001830type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001831//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001832//bitfield VkMirSurfaceCreateFlagBitsKHR {
1833//}
1834
Jesse Halld0599582017-03-10 18:35:38 -08001835@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001836type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001837//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001838//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1839//}
1840
Jesse Halld0599582017-03-10 18:35:38 -08001841@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001842type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001843//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001844//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1845//}
1846
Jesse Halld0599582017-03-10 18:35:38 -08001847@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001848type VkFlags VkDebugReportFlagsEXT
Jesse Halld0599582017-03-10 18:35:38 -08001849@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001850bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001851 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1852 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1853 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001854 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1855 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1856}
1857
Jesse Halld0599582017-03-10 18:35:38 -08001858@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001859type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Halld0599582017-03-10 18:35:38 -08001860@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001861bitfield VkExternalMemoryHandleTypeFlagBitsNV {
1862 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1863 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1864 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1865 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
1866}
1867
Jesse Halld0599582017-03-10 18:35:38 -08001868@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001869type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Halld0599582017-03-10 18:35:38 -08001870@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001871bitfield VkExternalMemoryFeatureFlagBitsNV {
1872 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1873 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1874 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
1875}
1876
Jesse Halld0599582017-03-10 18:35:38 -08001877@extension("VK_KHX_device_group") // 61
1878type VkFlags VkPeerMemoryFeatureFlagsKHX
1879@extension("VK_KHX_device_group") // 61
1880bitfield VkPeerMemoryFeatureFlagBitsKHX {
1881 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1882 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1883 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1884 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1885}
1886
1887@extension("VK_KHX_device_group") // 61
1888type VkFlags VkMemoryAllocateFlagsKHX
1889@extension("VK_KHX_device_group") // 61
1890bitfield VkMemoryAllocateFlagBitsKHX {
1891 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1892}
1893
1894@extension("VK_KHX_device_group") // 61
1895type VkFlags VkDeviceGroupPresentModeFlagsKHX
1896@extension("VK_KHX_device_group") // 61
1897bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1898 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1899 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1900 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1901 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1902}
1903
1904@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08001905type VkFlags VkViSurfaceCreateFlagsNN
Jesse Halld0599582017-03-10 18:35:38 -08001906//@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08001907//bitfield VkViSurfaceCreateFlagBitsNN {
1908//}
1909
Jesse Halld0599582017-03-10 18:35:38 -08001910@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001911type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001912//@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001913//bitfield VkCommandPoolTrimFlagBitsKHR {
1914//}
1915
Jesse Halld0599582017-03-10 18:35:38 -08001916@extension("VK_KHX_external_memory_capabilities") // 72
1917type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1918@extension("VK_KHX_external_memory_capabilities") // 72
1919bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1920 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1921 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1922 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1923 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1924 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1925 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1926 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1927}
1928
1929@extension("VK_KHX_external_memory_capabilities") // 72
1930type VkFlags VkExternalMemoryFeatureFlagsKHX
1931@extension("VK_KHX_external_memory_capabilities") // 72
1932bitfield VkExternalMemoryFeatureFlagBitsKHX {
1933 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1934 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1935 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1936}
1937
1938@extension("VK_KHX_external_semaphore_capabilities") // 77
1939type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
1940@extension("VK_KHX_external_semaphore_capabilities") // 77
1941bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
1942 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
1943 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
1944 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
1945 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
1946 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
1947}
1948
1949@extension("VK_KHX_external_semaphore_capabilities") // 77
1950type VkFlags VkExternalSemaphoreFeatureFlagsKHX
1951@extension("VK_KHX_external_semaphore_capabilities") // 77
1952bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
1953 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
1954 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
1955}
1956
1957@extension("VK_KHR_descriptor_update_template") // 86
1958type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
1959//@extension("VK_KHR_descriptor_update_template") // 86
1960//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
1961//}
1962
1963@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001964type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Halld0599582017-03-10 18:35:38 -08001965@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001966bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
1967 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
1968 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
1969 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
1970 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
1971}
1972
Jesse Halld0599582017-03-10 18:35:38 -08001973@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001974type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Halld0599582017-03-10 18:35:38 -08001975@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001976bitfield VkObjectEntryUsageFlagBitsNVX {
1977 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
1978 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
1979}
1980
Jesse Halld0599582017-03-10 18:35:38 -08001981@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001982type VkFlags VkSurfaceCounterFlagsEXT
Jesse Halld0599582017-03-10 18:35:38 -08001983@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001984bitfield VkSurfaceCounterFlagBitsEXT {
1985 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
1986}
Jesse Hall1356b0d2015-11-23 17:24:58 -08001987
Jesse Halld0599582017-03-10 18:35:38 -08001988@extension("VK_NV_viewport_swizzle") // 99
1989type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
1990//@extension("VK_NV_viewport_swizzle") // 99
1991//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
1992//}
1993
1994@extension("VK_EXT_discard_rectangles") // 100
1995type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
1996//@extension("VK_EXT_discard_rectangles") // 100
1997//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
1998//}
1999
2000@extension("VK_MVK_ios_surface") // 123
2001type VkFlags VkIOSSurfaceCreateFlagsMVK
2002//@extension("VK_MVK_ios_surface") // 123
2003//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2004//}
2005
2006@extension("VK_MVK_macos_surface") // 124
2007type VkFlags VkMacOSSurfaceCreateFlagsMVK
2008//@extension("VK_MVK_macos_surface") // 124
2009//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2010//}
2011
Jesse Halld27f6aa2015-08-15 17:58:48 -07002012//////////////////
2013// Structures //
2014//////////////////
2015
2016class VkOffset2D {
2017 s32 x
2018 s32 y
2019}
2020
2021class VkOffset3D {
2022 s32 x
2023 s32 y
2024 s32 z
2025}
2026
2027class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002028 u32 width
2029 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002030}
2031
2032class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002033 u32 width
2034 u32 height
2035 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002036}
2037
2038class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002039 f32 x
2040 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002041 f32 width
2042 f32 height
2043 f32 minDepth
2044 f32 maxDepth
2045}
2046
2047class VkRect2D {
2048 VkOffset2D offset
2049 VkExtent2D extent
2050}
2051
Jesse Halla15a4bf2015-11-19 22:48:02 -08002052class VkClearRect {
2053 VkRect2D rect
2054 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002055 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002056}
2057
Jesse Hall65ab5522015-11-30 00:07:16 -08002058class VkComponentMapping {
2059 VkComponentSwizzle r
2060 VkComponentSwizzle g
2061 VkComponentSwizzle b
2062 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002063}
2064
2065class VkPhysicalDeviceProperties {
2066 u32 apiVersion
2067 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002068 u32 vendorID
2069 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002070 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002071 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2072 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002073 VkPhysicalDeviceLimits limits
2074 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002075}
2076
2077class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002078 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002079 u32 specVersion /// version of the extension specification implemented
2080}
2081
2082class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002083 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002084 u32 specVersion /// version of the layer specification implemented
2085 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002086 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002087}
2088
Jesse Halla366a512015-11-19 22:30:07 -08002089class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002090 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2091 const void* pNext /// Next structure in chain
2092 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002093 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002094 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002095 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002096 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002097 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002098 const VkSemaphore* pSignalSemaphores
2099}
2100
Jesse Halld27f6aa2015-08-15 17:58:48 -07002101class VkApplicationInfo {
2102 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2103 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002104 const char* pApplicationName
2105 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002106 const char* pEngineName
2107 u32 engineVersion
2108 u32 apiVersion
2109}
2110
Jesse Hall3fbc8562015-11-29 22:10:52 -08002111class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002112 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002113 PFN_vkAllocationFunction pfnAllocation
2114 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002115 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002116 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002117 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002118}
2119
2120class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002121 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2122 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002123 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002124 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002125 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002126 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002127}
2128
2129class VkDeviceCreateInfo {
2130 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2131 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002132 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002133 u32 queueCreateInfoCount
2134 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002135 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002136 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002137 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002138 const char* const* ppEnabledExtensionNames
2139 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002140}
2141
2142class VkInstanceCreateInfo {
2143 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2144 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002145 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002146 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002147 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002148 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002149 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002150 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2151}
2152
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002153class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002154 VkQueueFlags queueFlags /// Queue flags
2155 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002156 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002157 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002158}
2159
2160class VkPhysicalDeviceMemoryProperties {
2161 u32 memoryTypeCount
2162 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2163 u32 memoryHeapCount
2164 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2165}
2166
Jesse Hall3fbc8562015-11-29 22:10:52 -08002167class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002168 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002169 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002170 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002171 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2172}
2173
2174class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002175 VkDeviceSize size /// Specified in bytes
2176 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002177 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2178}
2179
2180class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002181 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002182 VkExtent3D imageGranularity
2183 VkSparseImageFormatFlags flags
2184}
2185
2186class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002187 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002188 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002189 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2190 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2191 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002192}
2193
2194class VkMemoryType {
2195 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2196 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2197}
2198
2199class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002200 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002201 VkMemoryHeapFlags flags /// Flags for the heap
2202}
2203
2204class VkMappedMemoryRange {
2205 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2206 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002207 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002208 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2209 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002210}
2211
2212class VkFormatProperties {
2213 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2214 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002215 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002216}
2217
2218class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002219 VkExtent3D maxExtent /// max image dimensions for this resource type
2220 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002221 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002222 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2223 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2224}
2225
Jesse Halla15a4bf2015-11-19 22:48:02 -08002226class VkDescriptorImageInfo {
2227 VkSampler sampler
2228 VkImageView imageView
2229 VkImageLayout imageLayout
2230}
2231
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002232class VkDescriptorBufferInfo {
2233 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2234 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2235 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002236}
2237
Jesse Halld27f6aa2015-08-15 17:58:48 -07002238class VkWriteDescriptorSet {
2239 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2240 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002241 VkDescriptorSet dstSet /// Destination descriptor set
2242 u32 dstBinding /// Binding within the destination descriptor set to write
2243 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002244 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002245 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 -08002246 const VkDescriptorImageInfo* pImageInfo
2247 const VkDescriptorBufferInfo* pBufferInfo
2248 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002249}
2250
2251class VkCopyDescriptorSet {
2252 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2253 const void* pNext /// Pointer to next structure
2254 VkDescriptorSet srcSet /// Source descriptor set
2255 u32 srcBinding /// Binding within the source descriptor set to copy from
2256 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002257 VkDescriptorSet dstSet /// Destination descriptor set
2258 u32 dstBinding /// Binding within the destination descriptor set to copy to
2259 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002260 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002261}
2262
2263class VkBufferCreateInfo {
2264 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2265 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002266 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002267 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002268 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002269 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002270 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002271 const u32* pQueueFamilyIndices
2272}
2273
2274class VkBufferViewCreateInfo {
2275 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2276 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002277 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002278 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002279 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002280 VkDeviceSize offset /// Specified in bytes
2281 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002282}
2283
2284class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002285 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002286 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002287 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002288}
2289
2290class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002291 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002292 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002293 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002294 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002295 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002296}
2297
2298class VkMemoryBarrier {
2299 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2300 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002301 VkAccessFlags srcAccessMask
2302 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002303}
2304
2305class VkBufferMemoryBarrier {
2306 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2307 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002308 VkAccessFlags srcAccessMask
2309 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002310 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 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002313 VkDeviceSize offset /// Offset within the buffer to sync
2314 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002315}
2316
2317class VkImageMemoryBarrier {
2318 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2319 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002320 VkAccessFlags srcAccessMask
2321 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002322 VkImageLayout oldLayout /// Current layout of the image
2323 VkImageLayout newLayout /// New layout to transition the image to
2324 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002325 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002326 VkImage image /// Image to sync
2327 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2328}
2329
2330class VkImageCreateInfo {
2331 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2332 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002333 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002334 VkImageType imageType
2335 VkFormat format
2336 VkExtent3D extent
2337 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002338 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002339 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002340 VkImageTiling tiling
2341 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002342 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002343 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002344 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002345 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002346}
2347
2348class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002349 VkDeviceSize offset /// Specified in bytes
2350 VkDeviceSize size /// Specified in bytes
2351 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002352 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002353 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002354}
2355
2356class VkImageViewCreateInfo {
2357 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2358 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002359 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002360 VkImage image
2361 VkImageViewType viewType
2362 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002363 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002364 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002365}
2366
2367class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002368 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002369 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002370 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002371}
2372
Jesse Halla6429252015-11-29 18:59:42 -08002373class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002374 VkDeviceSize resourceOffset /// Specified in bytes
2375 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002376 VkDeviceMemory memory
2377 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002378 VkSparseMemoryBindFlags flags
2379}
2380
Jesse Halla6429252015-11-29 18:59:42 -08002381class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002382 VkImageSubresource subresource
2383 VkOffset3D offset
2384 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002385 VkDeviceMemory memory
2386 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002387 VkSparseMemoryBindFlags flags
2388}
2389
Jesse Halla6429252015-11-29 18:59:42 -08002390class VkSparseBufferMemoryBindInfo {
2391 VkBuffer buffer
2392 u32 bindCount
2393 const VkSparseMemoryBind* pBinds
2394}
2395
2396class VkSparseImageOpaqueMemoryBindInfo {
2397 VkImage image
2398 u32 bindCount
2399 const VkSparseMemoryBind* pBinds
2400}
2401
2402class VkSparseImageMemoryBindInfo {
2403 VkImage image
2404 u32 bindCount
2405 const VkSparseMemoryBind* pBinds
2406}
2407
2408class VkBindSparseInfo {
2409 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2410 const void* pNext
2411 u32 waitSemaphoreCount
2412 const VkSemaphore* pWaitSemaphores
2413 u32 numBufferBinds
2414 const VkSparseBufferMemoryBindInfo* pBufferBinds
2415 u32 numImageOpaqueBinds
2416 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2417 u32 numImageBinds
2418 const VkSparseImageMemoryBindInfo* pImageBinds
2419 u32 signalSemaphoreCount
2420 const VkSemaphore* pSignalSemaphores
2421}
2422
Jesse Hall65ab5522015-11-30 00:07:16 -08002423class VkImageSubresourceLayers {
2424 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002425 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002426 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002427 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002428}
2429
Jesse Halld27f6aa2015-08-15 17:58:48 -07002430class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002431 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002432 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002433 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002434 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002435 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2436}
2437
2438class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002439 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002440 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002441 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002442 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002443}
2444
2445class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002446 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002447 u32 bufferRowLength /// Specified in texels
2448 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002449 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002450 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2451 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2452}
2453
2454class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002455 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002456 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002457 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002458 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002459 VkExtent3D extent
2460}
2461
2462class VkShaderModuleCreateInfo {
2463 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2464 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002465 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002466 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002467 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002468}
2469
Jesse Halld27f6aa2015-08-15 17:58:48 -07002470class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002471 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002472 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002473 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002474 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2475 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2476}
2477
2478class VkDescriptorSetLayoutCreateInfo {
2479 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2480 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002481 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002482 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002483 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002484}
2485
Jesse Hall65ab5522015-11-30 00:07:16 -08002486class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002487 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002488 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002489}
2490
2491class VkDescriptorPoolCreateInfo {
2492 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2493 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002494 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002495 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002496 u32 poolSizeCount
2497 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002498}
2499
Jesse Hall3fbc8562015-11-29 22:10:52 -08002500class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002501 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002502 const void* pNext /// Pointer to next structure
2503 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002504 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002505 const VkDescriptorSetLayout* pSetLayouts
2506}
2507
Jesse Halld27f6aa2015-08-15 17:58:48 -07002508class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002509 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002510 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002511 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002512}
2513
2514class VkSpecializationInfo {
2515 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002516 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002517 platform.size_t dataSize /// Size in bytes of pData
2518 const void* pData /// Pointer to SpecConstant data
2519}
2520
2521class VkPipelineShaderStageCreateInfo {
2522 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2523 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002524 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002525 VkShaderStageFlagBits stage
2526 VkShaderModule module
2527 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002528 const VkSpecializationInfo* pSpecializationInfo
2529}
2530
2531class VkComputePipelineCreateInfo {
2532 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2533 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002534 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002535 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002536 VkPipelineLayout layout /// Interface layout of the pipeline
2537 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
2538 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
2539}
2540
2541class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002542 u32 binding /// Vertex buffer binding id
2543 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002544 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002545}
2546
2547class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002548 u32 location /// location of the shader vertex attrib
2549 u32 binding /// Vertex buffer binding id
2550 VkFormat format /// format of source data
2551 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002552}
2553
2554class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002555 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2556 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002557 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002558 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002559 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002560 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002561 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2562}
2563
2564class VkPipelineInputAssemblyStateCreateInfo {
2565 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2566 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002567 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002568 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002569 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002570}
2571
2572class VkPipelineTessellationStateCreateInfo {
2573 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2574 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002575 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002576 u32 patchControlPoints
2577}
2578
2579class VkPipelineViewportStateCreateInfo {
2580 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2581 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002582 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002583 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002584 const VkViewport* pViewports
2585 u32 scissorCount
2586 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002587}
2588
Jesse Hall3fbc8562015-11-29 22:10:52 -08002589class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002590 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002591 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002592 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002593 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002594 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002595 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002596 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002597 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002598 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002599 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002600 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002601 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002602 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002603}
2604
2605class VkPipelineMultisampleStateCreateInfo {
2606 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2607 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002608 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002609 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002610 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002611 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002612 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002613 VkBool32 alphaToCoverageEnable
2614 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002615}
2616
2617class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002618 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002619 VkBlendFactor srcColorBlendFactor
2620 VkBlendFactor dstColorBlendFactor
2621 VkBlendOp colorBlendOp
2622 VkBlendFactor srcAlphaBlendFactor
2623 VkBlendFactor dstAlphaBlendFactor
2624 VkBlendOp alphaBlendOp
2625 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002626}
2627
2628class VkPipelineColorBlendStateCreateInfo {
2629 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2630 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002631 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002632 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002633 VkLogicOp logicOp
2634 u32 attachmentCount /// # of pAttachments
2635 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002636 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002637}
2638
2639class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002640 VkStencilOp failOp
2641 VkStencilOp passOp
2642 VkStencilOp depthFailOp
2643 VkCompareOp compareOp
2644 u32 compareMask
2645 u32 writeMask
2646 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002647}
2648
2649class VkPipelineDepthStencilStateCreateInfo {
2650 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2651 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002652 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002653 VkBool32 depthTestEnable
2654 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002655 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002656 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2657 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002658 VkStencilOpState front
2659 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002660 f32 minDepthBounds
2661 f32 maxDepthBounds
2662}
2663
2664class VkPipelineDynamicStateCreateInfo {
2665 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2666 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002667 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002668 u32 dynamicStateCount
2669 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002670}
2671
2672class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002673 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2674 const void* pNext /// Pointer to next structure
2675 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002676 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002677 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002678 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2679 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2680 const VkPipelineTessellationStateCreateInfo* pTessellationState
2681 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002682 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002683 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2684 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2685 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002686 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002687 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002688 VkRenderPass renderPass
2689 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002690 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
2691 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 -07002692}
2693
2694class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002695 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2696 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002697 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002698 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2699 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002700}
2701
2702class VkPushConstantRange {
2703 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002704 u32 offset /// Start of the range, in bytes
2705 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002706}
2707
2708class VkPipelineLayoutCreateInfo {
2709 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2710 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002711 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002712 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002713 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2714 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2715 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2716}
2717
2718class VkSamplerCreateInfo {
2719 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2720 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002721 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002722 VkFilter magFilter /// Filter mode for magnification
2723 VkFilter minFilter /// Filter mode for minifiation
2724 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2725 VkSamplerAddressMode addressModeU
2726 VkSamplerAddressMode addressModeV
2727 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002728 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002729 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002730 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002731 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002732 VkCompareOp compareOp
2733 f32 minLod
2734 f32 maxLod
2735 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002736 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002737}
2738
Jesse Hall3fbc8562015-11-29 22:10:52 -08002739class VkCommandPoolCreateInfo {
2740 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002741 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002742 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002743 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002744}
2745
Jesse Hall3fbc8562015-11-29 22:10:52 -08002746class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002747 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002748 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002749 VkCommandPool commandPool
2750 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002751 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002752}
2753
Jesse Hall3dd678a2016-01-08 21:52:01 -08002754class VkCommandBufferInheritanceInfo {
2755 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002756 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002757 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002758 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002759 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002760 VkBool32 occlusionQueryEnable
2761 VkQueryControlFlags queryFlags
2762 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002763}
2764
Jesse Hall3dd678a2016-01-08 21:52:01 -08002765class VkCommandBufferBeginInfo {
2766 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2767 const void* pNext /// Pointer to next structure
2768 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2769 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2770}
2771
Jesse Halld27f6aa2015-08-15 17:58:48 -07002772class VkRenderPassBeginInfo {
2773 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2774 const void* pNext /// Pointer to next structure
2775 VkRenderPass renderPass
2776 VkFramebuffer framebuffer
2777 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002778 u32 clearValueCount
2779 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002780}
2781
2782@union
2783/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2784class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002785 f32[4] float32
2786 s32[4] int32
2787 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002788}
2789
2790class VkClearDepthStencilValue {
2791 f32 depth
2792 u32 stencil
2793}
2794
2795@union
2796/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2797class VkClearValue {
2798 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002799 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002800}
2801
Jesse Hallae38f732015-11-19 21:32:50 -08002802class VkClearAttachment {
2803 VkImageAspectFlags aspectMask
2804 u32 colorAttachment
2805 VkClearValue clearValue
2806}
2807
Jesse Halld27f6aa2015-08-15 17:58:48 -07002808class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002809 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002810 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002811 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002812 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2813 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2814 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2815 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2816 VkImageLayout initialLayout
2817 VkImageLayout finalLayout
2818}
2819
2820class VkAttachmentReference {
2821 u32 attachment
2822 VkImageLayout layout
2823}
2824
2825class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002826 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002827 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002828 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002829 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002830 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002831 const VkAttachmentReference* pColorAttachments
2832 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002833 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002834 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002835 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002836}
2837
2838class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002839 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002840 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002841 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002842 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002843 VkAccessFlags srcAccessMask
2844 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002845 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002846}
2847
2848class VkRenderPassCreateInfo {
2849 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2850 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002851 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002852 u32 attachmentCount
2853 const VkAttachmentDescription* pAttachments
2854 u32 subpassCount
2855 const VkSubpassDescription* pSubpasses
2856 u32 dependencyCount
2857 const VkSubpassDependency* pDependencies
2858}
2859
2860class VkEventCreateInfo {
2861 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2862 const void* pNext /// Pointer to next structure
2863 VkEventCreateFlags flags /// Event creation flags
2864}
2865
2866class VkFenceCreateInfo {
2867 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2868 const void* pNext /// Pointer to next structure
2869 VkFenceCreateFlags flags /// Fence creation flags
2870}
2871
2872class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002873 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2874 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2875 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2876 VkBool32 independentBlend /// blending operations are controlled per-attachment
2877 VkBool32 geometryShader /// geometry stage
2878 VkBool32 tessellationShader /// tessellation control and evaluation stage
2879 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002880 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002881 VkBool32 logicOp /// logic operations
2882 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002883 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002884 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002885 VkBool32 depthBiasClamp /// depth bias clamping
2886 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2887 VkBool32 depthBounds /// depth bounds test
2888 VkBool32 wideLines /// lines with width greater than 1
2889 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002890 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2891 VkBool32 multiViewport
2892 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002893 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2894 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2895 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002896 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002897 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002898 VkBool32 vertexPipelineStoresAndAtomics
2899 VkBool32 fragmentStoresAndAtomics
2900 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002901 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2902 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2903 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002904 VkBool32 shaderStorageImageReadWithoutFormat
2905 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002906 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2907 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2908 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2909 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2910 VkBool32 shaderClipDistance /// clip distance in shaders
2911 VkBool32 shaderCullDistance /// cull distance in shaders
2912 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2913 VkBool32 shaderInt64 /// 64-bit integers in shaders
2914 VkBool32 shaderInt16 /// 16-bit integers in shaders
2915 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002916 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002917 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2918 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2919 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2920 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2921 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2922 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2923 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2924 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2925 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002926 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002927 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002928}
2929
2930class VkPhysicalDeviceLimits {
2931 /// resource maximum sizes
2932 u32 maxImageDimension1D /// max 1D image dimension
2933 u32 maxImageDimension2D /// max 2D image dimension
2934 u32 maxImageDimension3D /// max 3D image dimension
2935 u32 maxImageDimensionCube /// max cubemap image dimension
2936 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002937 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002938 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
2939 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002940 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
2941 /// memory limits
2942 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08002943 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002944 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
2945 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002946 /// descriptor set limits
2947 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002948 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
2949 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
2950 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
2951 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
2952 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002953 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08002954 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002955 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
2956 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002957 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07002958 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002959 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07002960 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
2961 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002962 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002963 /// vertex stage limits
2964 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002965 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07002966 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
2967 u32 maxVertexInputBindingStride /// max vertex input binding stride
2968 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
2969 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08002970 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08002971 u32 maxTessellationPatchSize /// max patch size (vertices)
2972 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
2973 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
2974 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
2975 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
2976 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
2977 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07002978 /// geometry stage limits
2979 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
2980 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
2981 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
2982 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
2983 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
2984 /// fragment stage limits
2985 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08002986 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08002987 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07002988 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
2989 /// compute stage limits
2990 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
2991 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
2992 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
2993 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
2994
2995 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
2996 u32 subTexelPrecisionBits /// num bits of subtexel precision
2997 u32 mipmapPrecisionBits /// num bits of mipmap precision
2998
2999 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003000 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003001
3002 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3003 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3004
3005 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003006 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3007 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3008 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3009
Jesse Halldc6d36c2015-11-29 19:12:15 -08003010 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3011 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3012 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3013 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003014
Jesse Hallfbf97b02015-11-20 14:17:03 -08003015 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003016 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003017 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003018 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3019 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3020 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3021 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3022
3023 u32 maxFramebufferWidth /// max width for a framebuffer
3024 u32 maxFramebufferHeight /// max height for a framebuffer
3025 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003026 VkSampleCountFlags framebufferColorSampleCounts
3027 VkSampleCountFlags framebufferDepthSampleCounts
3028 VkSampleCountFlags framebufferStencilSampleCounts
3029 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003030 u32 maxColorAttachments /// max num of framebuffer color attachments
3031
Jesse Hall091ed9e2015-11-30 00:55:29 -08003032 VkSampleCountFlags sampledImageColorSampleCounts
3033 VkSampleCountFlags sampledImageIntegerSampleCounts
3034 VkSampleCountFlags sampledImageDepthSampleCounts
3035 VkSampleCountFlags sampledImageStencilSampleCounts
3036 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003037 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003038 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003039
Jesse Halla9bb62b2015-11-21 19:31:56 -08003040 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003041
3042 u32 maxClipDistances /// max number of clip distances
3043 u32 maxCullDistances /// max number of cull distances
3044 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3045
Jesse Hallfbf97b02015-11-20 14:17:03 -08003046 u32 discreteQueuePriorities
3047
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003048 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3049 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003050 f32 pointSizeGranularity /// granularity of supported point sizes
3051 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003052 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003053 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003054
Jesse Hall65ab5522015-11-30 00:07:16 -08003055 VkDeviceSize optimalBufferCopyOffsetAlignment
3056 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003057 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003058}
3059
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003060class VkPhysicalDeviceSparseProperties {
3061 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 -08003062 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 -07003063 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3064 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 -07003065 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
3066}
3067
Jesse Halld27f6aa2015-08-15 17:58:48 -07003068class VkSemaphoreCreateInfo {
3069 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3070 const void* pNext /// Pointer to next structure
3071 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3072}
3073
3074class VkQueryPoolCreateInfo {
3075 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3076 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003077 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003078 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003079 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003080 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3081}
3082
3083class VkFramebufferCreateInfo {
3084 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3085 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003086 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003087 VkRenderPass renderPass
3088 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003089 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003090 u32 width
3091 u32 height
3092 u32 layers
3093}
3094
Jesse Hall3fbc8562015-11-29 22:10:52 -08003095class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003096 u32 vertexCount
3097 u32 instanceCount
3098 u32 firstVertex
3099 u32 firstInstance
3100}
3101
Jesse Hall3fbc8562015-11-29 22:10:52 -08003102class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003103 u32 indexCount
3104 u32 instanceCount
3105 u32 firstIndex
3106 s32 vertexOffset
3107 u32 firstInstance
3108}
3109
Jesse Hall3fbc8562015-11-29 22:10:52 -08003110class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003111 u32 x
3112 u32 y
3113 u32 z
3114}
3115
Jesse Halld0599582017-03-10 18:35:38 -08003116@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003117class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003118 u32 minImageCount
3119 u32 maxImageCount
3120 VkExtent2D currentExtent
3121 VkExtent2D minImageExtent
3122 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003123 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003124 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003125 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003126 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003127 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003128}
3129
Jesse Halld0599582017-03-10 18:35:38 -08003130@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003131class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003132 VkFormat format
3133 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003134}
3135
Jesse Halld0599582017-03-10 18:35:38 -08003136@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003137class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003138 VkStructureType sType
3139 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003140 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003141 VkSurfaceKHR surface
3142 u32 minImageCount
3143 VkFormat imageFormat
3144 VkColorSpaceKHR imageColorSpace
3145 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003146 u32 imageArrayLayers
3147 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003148 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003149 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003150 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003151 VkSurfaceTransformFlagBitsKHR preTransform
3152 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003153 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003154 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003155 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003156}
3157
Jesse Halld0599582017-03-10 18:35:38 -08003158@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003159class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003160 VkStructureType sType
3161 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003162 u32 waitSemaphoreCount
3163 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003164 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003165 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003166 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003167 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003168}
3169
Jesse Halld0599582017-03-10 18:35:38 -08003170@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003171class VkDisplayPropertiesKHR {
3172 VkDisplayKHR display
3173 const char* displayName
3174 VkExtent2D physicalDimensions
3175 VkExtent2D physicalResolution
3176 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003177 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003178 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003179}
3180
Jesse Halld0599582017-03-10 18:35:38 -08003181@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003182class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003183 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003184 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003185}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003186
Jesse Halld0599582017-03-10 18:35:38 -08003187@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003188class VkDisplayModePropertiesKHR {
3189 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003190 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003191}
3192
Jesse Halld0599582017-03-10 18:35:38 -08003193@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003194class VkDisplayModeCreateInfoKHR {
3195 VkStructureType sType
3196 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003197 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003198 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003199}
3200
Jesse Halld0599582017-03-10 18:35:38 -08003201@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003202class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003203 VkDisplayKHR currentDisplay
3204 u32 currentStackIndex
3205}
3206
Jesse Halld0599582017-03-10 18:35:38 -08003207@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003208class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003209 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3210 VkOffset2D minSrcPosition
3211 VkOffset2D maxSrcPosition
3212 VkExtent2D minSrcExtent
3213 VkExtent2D maxSrcExtent
3214 VkOffset2D minDstPosition
3215 VkOffset2D maxDstPosition
3216 VkExtent2D minDstExtent
3217 VkExtent2D maxDstExtent
3218}
3219
Jesse Halld0599582017-03-10 18:35:38 -08003220@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003221class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003222 VkStructureType sType
3223 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003224 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003225 VkDisplayModeKHR displayMode
3226 u32 planeIndex
3227 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003228 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003229 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003230 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3231 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003232}
3233
Jesse Halld0599582017-03-10 18:35:38 -08003234@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003235class VkDisplayPresentInfoKHR {
3236 VkStructureType sType
3237 const void* pNext
3238 VkRect2D srcRect
3239 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003240 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003241}
3242
Jesse Halld0599582017-03-10 18:35:38 -08003243@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003244class VkXlibSurfaceCreateInfoKHR {
3245 VkStructureType sType
3246 const void* pNext
3247 VkXlibSurfaceCreateFlagsKHR flags
3248 platform.Display* dpy
3249 platform.Window window
3250}
3251
Jesse Halld0599582017-03-10 18:35:38 -08003252@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003253class VkXcbSurfaceCreateInfoKHR {
3254 VkStructureType sType
3255 const void* pNext
3256 VkXcbSurfaceCreateFlagsKHR flags
3257 platform.xcb_connection_t* connection
3258 platform.xcb_window_t window
3259}
3260
Jesse Halld0599582017-03-10 18:35:38 -08003261@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003262class VkWaylandSurfaceCreateInfoKHR {
3263 VkStructureType sType
3264 const void* pNext
3265 VkWaylandSurfaceCreateFlagsKHR flags
3266 platform.wl_display* display
3267 platform.wl_surface* surface
3268}
3269
Jesse Halld0599582017-03-10 18:35:38 -08003270@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003271class VkMirSurfaceCreateInfoKHR {
3272 VkStructureType sType
3273 const void* pNext
3274 VkMirSurfaceCreateFlagsKHR flags
3275 platform.MirConnection* connection
3276 platform.MirSurface* mirSurface
3277}
3278
Jesse Halld0599582017-03-10 18:35:38 -08003279@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003280class VkAndroidSurfaceCreateInfoKHR {
3281 VkStructureType sType
3282 const void* pNext
3283 VkAndroidSurfaceCreateFlagsKHR flags
3284 platform.ANativeWindow* window
3285}
3286
Jesse Halld0599582017-03-10 18:35:38 -08003287@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003288class VkWin32SurfaceCreateInfoKHR {
3289 VkStructureType sType
3290 const void* pNext
3291 VkWin32SurfaceCreateFlagsKHR flags
3292 platform.HINSTANCE hinstance
3293 platform.HWND hwnd
3294}
3295
Jesse Halld0599582017-03-10 18:35:38 -08003296@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003297class VkNativeBufferANDROID {
3298 VkStructureType sType
3299 const void* pNext
3300 platform.buffer_handle_t handle
3301 int stride
3302 int format
3303 int usage
3304}
3305
Jesse Halld0599582017-03-10 18:35:38 -08003306@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003307class VkDebugReportCallbackCreateInfoEXT {
3308 VkStructureType sType
3309 const void* pNext
3310 VkDebugReportFlagsEXT flags
3311 PFN_vkDebugReportCallbackEXT pfnCallback
3312 void* pUserData
3313}
3314
Jesse Halld0599582017-03-10 18:35:38 -08003315@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003316class VkPipelineRasterizationStateRasterizationOrderAMD {
3317 VkStructureType sType
3318 const void* pNext
3319 VkRasterizationOrderAMD rasterizationOrder
3320}
3321
Jesse Halld0599582017-03-10 18:35:38 -08003322@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003323class VkDebugMarkerObjectNameInfoEXT {
3324 VkStructureType sType
3325 const void* pNext
3326 VkDebugReportObjectTypeEXT objectType
3327 u64 object
3328 const char* pObjectName
3329}
3330
Jesse Halld0599582017-03-10 18:35:38 -08003331@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003332class VkDebugMarkerObjectTagInfoEXT {
3333 VkStructureType sType
3334 const void* pNext
3335 VkDebugReportObjectTypeEXT objectType
3336 u64 object
3337 u64 tagName
3338 platform.size_t tagSize
3339 const void* pTag
3340}
3341
Jesse Halld0599582017-03-10 18:35:38 -08003342@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003343class VkDebugMarkerMarkerInfoEXT {
3344 VkStructureType sType
3345 const void* pNext
3346 const char* pMarkerName
3347 f32[4] color
3348}
3349
Jesse Halld0599582017-03-10 18:35:38 -08003350@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003351class VkDedicatedAllocationImageCreateInfoNV {
3352 VkStructureType sType
3353 const void* pNext
3354 VkBool32 dedicatedAllocation
3355}
3356
Jesse Halld0599582017-03-10 18:35:38 -08003357@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003358class VkDedicatedAllocationBufferCreateInfoNV {
3359 VkStructureType sType
3360 const void* pNext
3361 VkBool32 dedicatedAllocation
3362}
3363
Jesse Halld0599582017-03-10 18:35:38 -08003364@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003365class VkDedicatedAllocationMemoryAllocateInfoNV {
3366 VkStructureType sType
3367 const void* pNext
3368 VkImage image
3369 VkBuffer buffer
3370}
3371
Jesse Halld0599582017-03-10 18:35:38 -08003372@extension("VK_KHX_multiview") // 54
3373class VkRenderPassMultiviewCreateInfoKHX {
3374 VkStructureType sType
3375 const void* pNext
3376 u32 subpassCount
3377 const u32* pViewMasks
3378 u32 dependencyCount
3379 const s32* pViewOffsets
3380 u32 correlationMaskCount
3381 const u32* pCorrelationMasks
3382}
3383
3384@extension("VK_KHX_multiview") // 54
3385class VkPhysicalDeviceMultiviewFeaturesKHX {
3386 VkStructureType sType
3387 void* pNext
3388 VkBool32 multiview
3389 VkBool32 multiviewGeometryShader
3390 VkBool32 multiviewTessellationShader
3391}
3392
3393@extension("VK_KHX_multiview") // 54
3394class VkPhysicalDeviceMultiviewPropertiesKHX {
3395 VkStructureType sType
3396 void* pNext
3397 u32 maxMultiviewViewCount
3398 u32 maxMultiviewInstanceIndex
3399}
3400
3401@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003402class VkExternalImageFormatPropertiesNV {
3403 VkImageFormatProperties imageFormatProperties
3404 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3405 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3406 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3407}
3408
Jesse Halld0599582017-03-10 18:35:38 -08003409@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003410class VkExternalMemoryImageCreateInfoNV {
3411 VkStructureType sType
3412 const void* pNext
3413 VkExternalMemoryHandleTypeFlagsNV handleTypes
3414}
3415
Jesse Halld0599582017-03-10 18:35:38 -08003416@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003417class VkExportMemoryAllocateInfoNV {
3418 VkStructureType sType
3419 const void* pNext
3420 VkExternalMemoryHandleTypeFlagsNV handleTypes
3421}
3422
Jesse Halld0599582017-03-10 18:35:38 -08003423@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003424class VkImportMemoryWin32HandleInfoNV {
3425 VkStructureType sType
3426 const void* pNext
3427 VkExternalMemoryHandleTypeFlagsNV handleType
3428 platform.HANDLE handle
3429}
3430
Jesse Halld0599582017-03-10 18:35:38 -08003431@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003432class VkExportMemoryWin32HandleInfoNV {
3433 VkStructureType sType
3434 const void* pNext
3435 const platform.SECURITY_ATTRIBUTES* pAttributes
3436 platform.DWORD dwAccess
3437}
3438
Jesse Halld0599582017-03-10 18:35:38 -08003439@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003440class VkWin32KeyedMutexAcquireReleaseInfoNV {
3441 VkStructureType sType
3442 const void* pNext
3443 u32 acquireCount
3444 const VkDeviceMemory* pAcquireSyncs
3445 const u64* pAcquireKeys
3446 const u32* pAcquireTimeoutMilliseconds
3447 u32 releaseCount
3448 const VkDeviceMemory* pReleaseSyncs
3449 const u64* pReleaseKeys
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 VkPhysicalDeviceFeatures2KHR {
3454 VkStructureType sType
3455 void* pNext
3456 VkPhysicalDeviceFeatures features
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 VkPhysicalDeviceProperties2KHR {
3461 VkStructureType sType
3462 void* pNext
3463 VkPhysicalDeviceProperties properties
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 VkFormatProperties2KHR {
3468 VkStructureType sType
3469 void* pNext
3470 VkFormatProperties formatProperties
3471}
3472
Jesse Halld0599582017-03-10 18:35:38 -08003473@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003474class VkImageFormatProperties2KHR {
3475 VkStructureType sType
3476 void* pNext
3477 VkImageFormatProperties imageFormatProperties
3478}
3479
Jesse Halld0599582017-03-10 18:35:38 -08003480@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003481class VkPhysicalDeviceImageFormatInfo2KHR {
3482 VkStructureType sType
3483 const void* pNext
3484 VkFormat format
3485 VkImageType type
3486 VkImageTiling tiling
3487 VkImageUsageFlags usage
3488 VkImageCreateFlags flags
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 VkQueueFamilyProperties2KHR {
3493 VkStructureType sType
3494 void* pNext
3495 VkQueueFamilyProperties queueFamilyProperties
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 VkPhysicalDeviceMemoryProperties2KHR {
3500 VkStructureType sType
3501 void* pNext
3502 VkPhysicalDeviceMemoryProperties memoryProperties
3503}
3504
Jesse Halld0599582017-03-10 18:35:38 -08003505@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003506class VkSparseImageFormatProperties2KHR {
3507 VkStructureType sType
3508 void* pNext
3509 VkSparseImageFormatProperties properties
3510}
3511
Jesse Halld0599582017-03-10 18:35:38 -08003512@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003513class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3514 VkStructureType sType
3515 const void* pNext
3516 VkFormat format
3517 VkImageType type
3518 VkSampleCountFlagBits samples
3519 VkImageUsageFlags usage
3520 VkImageTiling tiling
3521}
3522
Jesse Halld0599582017-03-10 18:35:38 -08003523@extension("VK_KHX_device_group") // 61
3524class VkMemoryAllocateFlagsInfoKHX {
3525 VkStructureType sType
3526 const void* pNext
3527 VkMemoryAllocateFlagsKHX flags
3528 u32 deviceMask
3529}
3530
3531@extension("VK_KHX_device_group") // 61
3532class VkBindBufferMemoryInfoKHX {
3533 VkStructureType sType
3534 const void* pNext
3535 VkBuffer buffer
3536 VkDeviceMemory memory
3537 VkDeviceSize memoryOffset
3538 u32 deviceIndexCount
3539 const u32* pDeviceIndices
3540}
3541
3542@extension("VK_KHX_device_group") // 61
3543class VkBindImageMemoryInfoKHX {
3544 VkStructureType sType
3545 const void* pNext
3546 VkImage image
3547 VkDeviceMemory memory
3548 VkDeviceSize memoryOffset
3549 u32 deviceIndexCount
3550 const u32* pDeviceIndices
3551 u32 SFRRectCount
3552 const VkRect2D* pSFRRects
3553}
3554
3555@extension("VK_KHX_device_group") // 61
3556class VkDeviceGroupRenderPassBeginInfoKHX {
3557 VkStructureType sType
3558 const void* pNext
3559 u32 deviceMask
3560 u32 deviceRenderAreaCount
3561 const VkRect2D* pDeviceRenderAreas
3562}
3563
3564@extension("VK_KHX_device_group") // 61
3565class VkDeviceGroupCommandBufferBeginInfoKHX {
3566 VkStructureType sType
3567 const void* pNext
3568 u32 deviceMask
3569}
3570
3571@extension("VK_KHX_device_group") // 61
3572class VkDeviceGroupSubmitInfoKHX {
3573 VkStructureType sType
3574 const void* pNext
3575 u32 waitSemaphoreCount
3576 const u32* pWaitSemaphoreDeviceIndices
3577 u32 commandBufferCount
3578 const u32* pCommandBufferDeviceMasks
3579 u32 signalSemaphoreCount
3580 const u32* pSignalSemaphoreDeviceIndices
3581}
3582
3583@extension("VK_KHX_device_group") // 61
3584class VkDeviceGroupBindSparseInfoKHX {
3585 VkStructureType sType
3586 const void* pNext
3587 u32 resourceDeviceIndex
3588 u32 memoryDeviceIndex
3589}
3590
3591@extension("VK_KHX_device_group") // 61
3592class VkDeviceGroupPresentCapabilitiesKHX {
3593 VkStructureType sType
3594 const void* pNext
3595 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3596 VkDeviceGroupPresentModeFlagsKHX modes
3597}
3598
3599@extension("VK_KHX_device_group") // 61
3600class VkImageSwapchainCreateInfoKHX {
3601 VkStructureType sType
3602 const void* pNext
3603 VkSwapchainKHR swapchain
3604}
3605
3606@extension("VK_KHX_device_group") // 61
3607class VkBindImageMemorySwapchainInfoKHX {
3608 VkStructureType sType
3609 const void* pNext
3610 VkSwapchainKHR swapchain
3611 u32 imageIndex
3612}
3613
3614@extension("VK_KHX_device_group") // 61
3615class VkAcquireNextImageInfoKHX {
3616 VkStructureType sType
3617 const void* pNext
3618 VkSwapchainKHR swapchain
3619 u64 timeout
3620 VkSemaphore semaphore
3621 VkFence fence
3622 u32 deviceMask
3623}
3624
3625@extension("VK_KHX_device_group") // 61
3626class VkDeviceGroupPresentInfoKHX {
3627 VkStructureType sType
3628 const void* pNext
3629 u32 swapchainCount
3630 const u32* pDeviceMasks
3631 VkDeviceGroupPresentModeFlagBitsKHX mode
3632}
3633
3634@extension("VK_KHX_device_group") // 61
3635class VkDeviceGroupSwapchainCreateInfoKHX {
3636 VkStructureType sType
3637 const void* pNext
3638 VkDeviceGroupPresentModeFlagsKHX modes
3639}
3640
3641@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08003642class VkValidationFlagsEXT {
3643 VkStructureType sType
3644 const void* pNext
3645 u32 disabledValidationCheckCount
3646 VkValidationCheckEXT* pDisabledValidationChecks
3647}
3648
Jesse Halld0599582017-03-10 18:35:38 -08003649@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08003650class VkViSurfaceCreateInfoNN {
3651 VkStructureType sType
3652 const void* pNext
3653 VkViSurfaceCreateFlagsNN flags
3654 void* window
3655}
3656
Jesse Halld0599582017-03-10 18:35:38 -08003657@extension("VK_KHX_device_group_creation") // 71
3658class VkPhysicalDeviceGroupPropertiesKHX {
3659 VkStructureType sType
3660 const void* pNext
3661 u32 physicalDeviceCount
3662 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3663 VkBool32 subsetAllocation
3664}
3665
3666@extension("VK_KHX_device_group_creation") // 71
3667class VkDeviceGroupDeviceCreateInfoKHX {
3668 VkStructureType sType
3669 const void* pNext
3670 u32 physicalDeviceCount
3671 const VkPhysicalDevice* pPhysicalDevices
3672}
3673
3674@extension("VK_KHX_external_memory_capabilities") // 72
3675class VkExternalMemoryPropertiesKHX {
3676 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3677 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3678 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3679}
3680
3681@extension("VK_KHX_external_memory_capabilities") // 72
3682class VkPhysicalDeviceExternalImageFormatInfoKHX {
3683 VkStructureType sType
3684 const void* pNext
3685 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3686}
3687
3688@extension("VK_KHX_external_memory_capabilities") // 72
3689class VkExternalImageFormatPropertiesKHX {
3690 VkStructureType sType
3691 void* pNext
3692 VkExternalMemoryPropertiesKHX externalMemoryProperties
3693}
3694
3695@extension("VK_KHX_external_memory_capabilities") // 72
3696class VkPhysicalDeviceExternalBufferInfoKHX {
3697 VkStructureType sType
3698 const void* pNext
3699 VkBufferCreateFlags flags
3700 VkBufferUsageFlags usage
3701 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3702}
3703
3704@extension("VK_KHX_external_memory_capabilities") // 72
3705class VkExternalBufferPropertiesKHX {
3706 VkStructureType sType
3707 void* pNext
3708 VkExternalMemoryPropertiesKHX externalMemoryProperties
3709}
3710
3711@extension("VK_KHX_external_memory_capabilities") // 72
3712class VkPhysicalDeviceIDPropertiesKHX {
3713 VkStructureType sType
3714 void* pNext
3715 u8[VK_UUID_SIZE] deviceUUID
3716 u8[VK_UUID_SIZE] driverUUID
3717 u8[VK_LUID_SIZE_KHX] deviceLUID
3718 VkBool32 deviceLUIDValid
3719}
3720
Jesse Halld0599582017-03-10 18:35:38 -08003721@extension("VK_KHX_external_memory") // 73
3722class VkExternalMemoryImageCreateInfoKHX {
3723 VkStructureType sType
3724 const void* pNext
3725 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3726}
3727
3728@extension("VK_KHX_external_memory") // 73
3729class VkExternalMemoryBufferCreateInfoKHX {
3730 VkStructureType sType
3731 const void* pNext
3732 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3733}
3734
3735@extension("VK_KHX_external_memory") // 73
3736class VkExportMemoryAllocateInfoKHX {
3737 VkStructureType sType
3738 const void* pNext
3739 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3740}
3741
3742@extension("VK_KHX_external_memory_win32") // 74
3743class VkImportMemoryWin32HandleInfoKHX {
3744 VkStructureType sType
3745 const void* pNext
3746 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3747 platform.HANDLE handle
3748}
3749
3750@extension("VK_KHX_external_memory_win32") // 74
3751class VkExportMemoryWin32HandleInfoKHX {
3752 VkStructureType sType
3753 const void* pNext
3754 const platform.SECURITY_ATTRIBUTES* pAttributes
3755 platform.DWORD dwAccess
3756 platform.LPCWSTR name
3757}
3758
3759@extension("VK_KHX_external_memory_win32") // 74
3760class VkMemoryWin32HandlePropertiesKHX {
3761 VkStructureType sType
3762 void* pNext
3763 u32 memoryTypeBits
3764}
3765
3766@extension("VK_KHX_external_memory_fd") // 75
3767class VkImportMemoryFdInfoKHX {
3768 VkStructureType sType
3769 const void* pNext
3770 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3771 int fd
3772}
3773
3774@extension("VK_KHX_external_memory_fd") // 75
3775class VkMemoryFdPropertiesKHX {
3776 VkStructureType sType
3777 void* pNext
3778 u32 memoryTypeBits
3779}
3780
3781@extension("VK_KHX_win32_keyed_mutex") // 76
3782class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3783 VkStructureType sType
3784 const void* pNext
3785 u32 acquireCount
3786 const VkDeviceMemory* pAcquireSyncs
3787 const u64* pAcquireKeys
3788 const u32* pAcquireTimeouts
3789 u32 releaseCount
3790 const VkDeviceMemory* pReleaseSyncs
3791 const u64* pReleaseKeys
3792}
3793
3794@extension("VK_KHX_external_semaphore_capabilities") // 77
3795class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3796 VkStructureType sType
3797 const void* pNext
3798 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3799}
3800
3801@extension("VK_KHX_external_semaphore_capabilities") // 77
3802class VkExternalSemaphorePropertiesKHX {
3803 VkStructureType sType
3804 void* pNext
3805 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3806 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3807 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3808}
3809
3810@extension("VK_KHX_external_semaphore") // 78
3811class VkExportSemaphoreCreateInfoKHX {
3812 VkStructureType sType
3813 const void* pNext
3814 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3815}
3816
3817@extension("VK_KHX_external_semaphore_win32") // 79
3818class VkImportSemaphoreWin32HandleInfoKHX {
3819 VkStructureType sType
3820 const void* pNext
3821 VkSemaphore semaphore
3822 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3823 platform.HANDLE handle
3824}
3825
3826@extension("VK_KHX_external_semaphore_win32") // 79
3827class VkExportSemaphoreWin32HandleInfoKHX {
3828 VkStructureType sType
3829 const void* pNext
3830 const platform.SECURITY_ATTRIBUTES* pAttributes
3831 platform.DWORD dwAccess
3832 platform.LPCWSTR name
3833}
3834
3835@extension("VK_KHX_external_semaphore_win32") // 79
3836class VkD3D12FenceSubmitInfoKHX {
3837 VkStructureType sType
3838 const void* pNext
3839 u32 waitSemaphoreValuesCount
3840 const u64* pWaitSemaphoreValues
3841 u32 signalSemaphoreValuesCount
3842 const u64* pSignalSemaphoreValues
3843}
3844
3845@extension("VK_KHX_external_semaphore_fd") // 80
3846class VkImportSemaphoreFdInfoKHX {
3847 VkStructureType sType
3848 const void* pNext
3849 VkSemaphore semaphore
3850 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3851 s32 fd
3852}
3853
3854@extension("VK_KHR_push_descriptor") // 81
3855class VkPhysicalDevicePushDescriptorPropertiesKHR {
3856 VkStructureType sType
3857 void* pNext
3858 u32 maxPushDescriptors
3859}
3860
3861@extension("VK_KHR_descriptor_update_template") // 86
3862class VkDescriptorUpdateTemplateEntryKHR {
3863 u32 dstBinding
3864 u32 dstArrayElement
3865 u32 descriptorCount
3866 VkDescriptorType descriptorType
3867 platform.size_t offset
3868 platform.size_t stride
3869}
3870
3871@extension("VK_KHR_descriptor_update_template") // 86
3872class VkDescriptorUpdateTemplateCreateInfoKHR {
3873 VkStructureType sType
3874 void* pNext
3875 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3876 u32 descriptorUpdateEntryCount
3877 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3878 VkDescriptorUpdateTemplateTypeKHR templateType
3879 VkDescriptorSetLayout descriptorSetLayout
3880 VkPipelineBindPoint pipelineBindPoint
3881 VkPipelineLayout pipelineLayout
3882 u32 set
3883}
3884
3885@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003886class VkDeviceGeneratedCommandsFeaturesNVX {
3887 VkStructureType sType
3888 const void* pNext
3889 VkBool32 computeBindingPointSupport
3890}
3891
Jesse Halld0599582017-03-10 18:35:38 -08003892@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003893class VkDeviceGeneratedCommandsLimitsNVX {
3894 VkStructureType sType
3895 const void* pNext
3896 u32 maxIndirectCommandsLayoutTokenCount
3897 u32 maxObjectEntryCounts
3898 u32 minSequenceCountBufferOffsetAlignment
3899 u32 minSequenceIndexBufferOffsetAlignment
3900 u32 minCommandsTokenBufferOffsetAlignment
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 VkIndirectCommandsTokenNVX {
3905 VkIndirectCommandsTokenTypeNVX tokenType
3906 VkBuffer buffer
3907 VkDeviceSize offset
3908}
3909
Jesse Halld0599582017-03-10 18:35:38 -08003910@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003911class VkIndirectCommandsLayoutTokenNVX {
3912 VkIndirectCommandsTokenTypeNVX tokenType
3913 u32 bindingUnit
3914 u32 dynamicCount
3915 u32 divisor
3916}
3917
Jesse Halld0599582017-03-10 18:35:38 -08003918@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003919class VkIndirectCommandsLayoutCreateInfoNVX {
3920 VkStructureType sType
3921 const void* pNext
3922 VkPipelineBindPoint pipelineBindPoint
3923 VkIndirectCommandsLayoutUsageFlagsNVX flags
3924 u32 tokenCount
3925 const VkIndirectCommandsLayoutTokenNVX* pTokens
3926}
3927
Jesse Halld0599582017-03-10 18:35:38 -08003928@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003929class VkCmdProcessCommandsInfoNVX {
3930 VkStructureType sType
3931 const void* pNext
3932 VkObjectTableNVX objectTable
3933 VkIndirectCommandsLayoutNVX indirectCommandsLayout
3934 u32 indirectCommandsTokenCount
3935 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
3936 u32 maxSequencesCount
3937 VkCommandBuffer targetCommandBuffer
3938 VkBuffer sequencesCountBuffer
3939 VkDeviceSize sequencesCountOffset
3940 VkBuffer sequencesIndexBuffer
3941 VkDeviceSize sequencesIndexOffset
3942}
3943
Jesse Halld0599582017-03-10 18:35:38 -08003944@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003945class VkCmdReserveSpaceForCommandsInfoNVX {
3946 VkStructureType sType
3947 const void* pNext
3948 VkObjectTableNVX objectTable
3949 VkIndirectCommandsLayoutNVX indirectCommandsLayout
3950 u32 maxSequencesCount
3951}
3952
Jesse Halld0599582017-03-10 18:35:38 -08003953@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003954class VkObjectTableCreateInfoNVX {
3955 VkStructureType sType
3956 const void* pNext
3957 u32 objectCount
3958 const VkObjectEntryTypeNVX* pObjectEntryTypes
3959 const u32* pObjectEntryCounts
3960 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
3961 u32 maxUniformBuffersPerDescriptor
3962 u32 maxStorageBuffersPerDescriptor
3963 u32 maxStorageImagesPerDescriptor
3964 u32 maxSampledImagesPerDescriptor
3965 u32 maxPipelineLayouts
3966}
3967
Jesse Halld0599582017-03-10 18:35:38 -08003968@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003969class VkObjectTableEntryNVX {
3970 VkObjectEntryTypeNVX type
3971 VkObjectEntryUsageFlagsNVX flags
3972}
3973
Jesse Halld0599582017-03-10 18:35:38 -08003974@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003975class VkObjectTablePipelineEntryNVX {
3976 VkObjectEntryTypeNVX type
3977 VkObjectEntryUsageFlagsNVX flags
3978 VkPipeline pipeline
3979}
3980
Jesse Halld0599582017-03-10 18:35:38 -08003981@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003982class VkObjectTableDescriptorSetEntryNVX {
3983 VkObjectEntryTypeNVX type
3984 VkObjectEntryUsageFlagsNVX flags
3985 VkPipelineLayout pipelineLayout
3986 VkDescriptorSet descriptorSet
3987}
3988
Jesse Halld0599582017-03-10 18:35:38 -08003989@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003990class VkObjectTableVertexBufferEntryNVX {
3991 VkObjectEntryTypeNVX type
3992 VkObjectEntryUsageFlagsNVX flags
3993 VkBuffer buffer
3994}
3995
Jesse Halld0599582017-03-10 18:35:38 -08003996@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003997class VkObjectTableIndexBufferEntryNVX {
3998 VkObjectEntryTypeNVX type
3999 VkObjectEntryUsageFlagsNVX flags
4000 VkBuffer buffer
Jesse Hall08e2f482017-03-06 15:22:17 -08004001 VkIndexType indexType
Jesse Halleb02c472017-02-24 15:13:45 -08004002}
4003
Jesse Halld0599582017-03-10 18:35:38 -08004004@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004005class VkObjectTablePushConstantEntryNVX {
4006 VkObjectEntryTypeNVX type
4007 VkObjectEntryUsageFlagsNVX flags
4008 VkPipelineLayout pipelineLayout
4009 VkShaderStageFlags stageFlags
4010}
4011
Jesse Halld0599582017-03-10 18:35:38 -08004012@extension("VK_NV_clip_space_w_scaling") // 88
4013class VkViewportWScalingNV {
4014 f32 xcoeff
4015 f32 ycoeff
4016}
4017
4018@extension("VK_NV_clip_space_w_scaling") // 88
4019class VkPipelineViewportWScalingStateCreateInfoNV {
4020 VkStructureType sType
4021 const void* pNext
4022 VkBool32 viewportWScalingEnable
4023 u32 viewportCount
4024 const VkViewportWScalingNV* pViewportWScalings
4025}
4026
4027@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08004028class VkSurfaceCapabilities2EXT {
4029 VkStructureType sType
4030 void* pNext
4031 u32 minImageCount
4032 u32 maxImageCount
4033 VkExtent2D currentExtent
4034 VkExtent2D minImageExtent
4035 VkExtent2D maxImageExtent
4036 u32 maxImageArrayLayers
4037 VkSurfaceTransformFlagsKHR supportedTransforms
4038 VkSurfaceTransformFlagBitsKHR currentTransform
4039 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4040 VkImageUsageFlags supportedUsageFlags
4041 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4042}
4043
Jesse Halld0599582017-03-10 18:35:38 -08004044@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004045class VkDisplayPowerInfoEXT {
4046 VkStructureType sType
4047 const void* pNext
4048 VkDisplayPowerStateEXT powerState
4049}
4050
Jesse Halld0599582017-03-10 18:35:38 -08004051@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004052class VkDeviceEventInfoEXT {
4053 VkStructureType sType
4054 const void* pNext
4055 VkDeviceEventTypeEXT deviceEvent
4056}
4057
Jesse Halld0599582017-03-10 18:35:38 -08004058@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004059class VkDisplayEventInfoEXT {
4060 VkStructureType sType
4061 const void* pNext
4062 VkDisplayEventTypeEXT displayEvent
4063}
4064
Jesse Halld0599582017-03-10 18:35:38 -08004065@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004066class VkSwapchainCounterCreateInfoEXT {
4067 VkStructureType sType
4068 const void* pNext
4069 VkSurfaceCounterFlagsEXT surfaceCounters
4070}
Jesse Hall1356b0d2015-11-23 17:24:58 -08004071
Jesse Halle8ec6a22017-03-10 21:01:57 -08004072@extension("VK_GOOGLE_display_timing") // 93
4073class VkRefreshCycleDurationGOOGLE {
4074 u64 refreshDuration
4075}
4076
4077@extension("VK_GOOGLE_display_timing") // 93
4078class VkPastPresentationTimingGOOGLE {
4079 u32 presentID
4080 u64 desiredPresentTime
4081 u64 actualPresentTime
4082 u64 earliestPresentTime
4083 u64 presentMargin
4084}
4085
4086@extension("VK_GOOGLE_display_timing") // 93
4087class VkPresentTimeGOOGLE {
4088 u32 presentID
4089 u64 desiredPresentTime
4090}
4091
4092@extension("VK_GOOGLE_display_timing") // 93
4093class VkPresentTimesInfoGOOGLE {
4094 VkStructureType sType
4095 const void* pNext
4096 u32 swapchainCount
4097 const VkPresentTimeGOOGLE* pTimes
4098}
4099
Jesse Halld0599582017-03-10 18:35:38 -08004100@extension("VK_NVX_multiview_per_view_attributes") // 98
4101class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4102 VkStructureType sType
4103 void* pNext
4104 VkBool32 perViewPositionAllComponents
4105}
4106
4107@extension("VK_NV_viewport_swizzle") // 99
4108class VkViewportSwizzleNV {
4109 VkViewportCoordinateSwizzleNV x
4110 VkViewportCoordinateSwizzleNV y
4111 VkViewportCoordinateSwizzleNV z
4112 VkViewportCoordinateSwizzleNV w
4113}
4114
4115@extension("VK_NV_viewport_swizzle") // 99
4116class VkPipelineViewportSwizzleStateCreateInfoNV {
4117 VkStructureType sType
4118 const void* pNext
4119 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4120 u32 viewportCount
4121 const VkViewportSwizzleNV* pViewportSwizzles
4122}
4123
4124@extension("VK_EXT_discard_rectangles") // 100
4125class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4126 VkStructureType sType
4127 const void* pNext
4128 u32 maxDiscardRectangles
4129}
4130
4131@extension("VK_EXT_discard_rectangles") // 100
4132class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Halle8ec6a22017-03-10 21:01:57 -08004133 VkStructureType sType
4134 const void* pNext
4135 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4136 VkDiscardRectangleModeEXT discardRectangleMode
4137 u32 discardRectangleCount
4138 const VkRect2D* pDiscardRectangles
4139}
4140
4141@extension("VK_EXT_hdr_metadata") // 106
4142class VkXYColorEXT {
4143 f32 x
4144 f32 y
4145}
4146
4147@extension("VK_EXT_hdr_metadata") // 106
4148class VkHdrMetadataEXT {
4149 VkStructureType sType
4150 const void* pNext
4151 VkXYColorEXT displayPrimaryRed
4152 VkXYColorEXT displayPrimaryGreen
4153 VkXYColorEXT displayPrimaryBlue
4154 VkXYColorEXT whitePoint
4155 f32 maxLuminance
4156 f32 minLuminance
4157 f32 maxContentLightLevel
4158 f32 maxFrameAverageLightLevel
Jesse Halld0599582017-03-10 18:35:38 -08004159}
4160
4161@extension("VK_MVK_ios_surface") // 123
4162class VkIOSSurfaceCreateInfoMVK {
4163 VkStructureType sType
4164 const void* pNext
4165 VkIOSSurfaceCreateFlagsMVK flags
4166 const void* pView
4167}
4168
4169@extension("VK_MVK_macos_surface") // 124
4170class VkMacOSSurfaceCreateInfoMVK {
4171 VkStructureType sType
4172 const void* pNext
4173 VkMacOSSurfaceCreateFlagsMVK flags
4174 const void* pView
4175}
4176
Jesse Halld27f6aa2015-08-15 17:58:48 -07004177////////////////
4178// Commands //
4179////////////////
4180
4181// Function pointers. TODO: add support for function pointers.
4182
4183@external type void* PFN_vkVoidFunction
4184@pfn cmd void vkVoidFunction() {
4185}
4186
Jesse Hall3fbc8562015-11-29 22:10:52 -08004187@external type void* PFN_vkAllocationFunction
4188@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004189 void* pUserData,
4190 platform.size_t size,
4191 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004192 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004193 return ?
4194}
4195
Jesse Hall3fbc8562015-11-29 22:10:52 -08004196@external type void* PFN_vkReallocationFunction
4197@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004198 void* pUserData,
4199 void* pOriginal,
4200 platform.size_t size,
4201 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004202 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004203 return ?
4204}
4205
4206@external type void* PFN_vkFreeFunction
4207@pfn cmd void vkFreeFunction(
4208 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004209 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004210}
4211
Jesse Hall3fbc8562015-11-29 22:10:52 -08004212@external type void* PFN_vkInternalAllocationNotification
4213@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004214 void* pUserData,
4215 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004216 VkInternalAllocationType allocationType,
4217 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004218}
4219
4220@external type void* PFN_vkInternalFreeNotification
4221@pfn cmd void vkInternalFreeNotification(
4222 void* pUserData,
4223 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004224 VkInternalAllocationType allocationType,
4225 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004226}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004227
4228// Global functions
4229
4230@threadSafety("system")
4231cmd VkResult vkCreateInstance(
4232 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004233 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004234 VkInstance* pInstance) {
4235 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4236
4237 instance := ?
4238 pInstance[0] = instance
4239 State.Instances[instance] = new!InstanceObject()
4240
Jesse Hall3dd678a2016-01-08 21:52:01 -08004241 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4242 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004243
4244 return ?
4245}
4246
4247@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004248cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004249 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004250 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004251 instanceObject := GetInstance(instance)
4252
4253 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004254}
4255
4256@threadSafety("system")
4257cmd VkResult vkEnumeratePhysicalDevices(
4258 VkInstance instance,
4259 u32* pPhysicalDeviceCount,
4260 VkPhysicalDevice* pPhysicalDevices) {
4261 instanceObject := GetInstance(instance)
4262
4263 physicalDeviceCount := as!u32(?)
4264 pPhysicalDeviceCount[0] = physicalDeviceCount
4265 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4266
4267 for i in (0 .. physicalDeviceCount) {
4268 physicalDevice := ?
4269 physicalDevices[i] = physicalDevice
4270 if !(physicalDevice in State.PhysicalDevices) {
4271 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4272 }
4273 }
4274
4275 return ?
4276}
4277
4278cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4279 VkDevice device,
4280 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004281 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004282 device := GetDevice(device)
4283 }
4284
4285 return ?
4286}
4287
4288cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4289 VkInstance instance,
4290 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004291 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004292 instanceObject := GetInstance(instance)
4293 }
4294
4295 return ?
4296}
4297
Jesse Hall606a54e2015-11-19 22:17:28 -08004298cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004299 VkPhysicalDevice physicalDevice,
4300 VkPhysicalDeviceProperties* pProperties) {
4301 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4302
4303 properties := ?
4304 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004305}
4306
Jesse Hall606a54e2015-11-19 22:17:28 -08004307cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004308 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004309 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004310 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004311 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004312 // TODO: Figure out how to express fetch-count-or-properties
4313 // This version fails 'apic validate' with 'fence not allowed in
4314 // *semantic.Branch'. Other attempts have failed with the same or other
4315 // errors.
4316 // if pQueueFamilyProperties != null {
4317 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4318 // for i in (0 .. pCount[0]) {
4319 // queueProperties := as!VkQueueFamilyProperties(?)
4320 // queuesProperties[i] = queueProperties
4321 // }
4322 // } else {
4323 // count := ?
4324 // pCount[0] = count
4325 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004326}
4327
Jesse Hall606a54e2015-11-19 22:17:28 -08004328cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004329 VkPhysicalDevice physicalDevice,
4330 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4331 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4332
4333 memoryProperties := ?
4334 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004335}
4336
Jesse Hall606a54e2015-11-19 22:17:28 -08004337cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004338 VkPhysicalDevice physicalDevice,
4339 VkPhysicalDeviceFeatures* pFeatures) {
4340 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4341
4342 features := ?
4343 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004344}
4345
Jesse Hall606a54e2015-11-19 22:17:28 -08004346cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004347 VkPhysicalDevice physicalDevice,
4348 VkFormat format,
4349 VkFormatProperties* pFormatProperties) {
4350 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4351
4352 formatProperties := ?
4353 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004354}
4355
Jesse Halla9e57032015-11-30 01:03:10 -08004356cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004357 VkPhysicalDevice physicalDevice,
4358 VkFormat format,
4359 VkImageType type,
4360 VkImageTiling tiling,
4361 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004362 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004363 VkImageFormatProperties* pImageFormatProperties) {
4364 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4365
4366 imageFormatProperties := ?
4367 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004368
4369 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004370}
4371
Jesse Halld27f6aa2015-08-15 17:58:48 -07004372
4373// Device functions
4374
4375@threadSafety("system")
4376cmd VkResult vkCreateDevice(
4377 VkPhysicalDevice physicalDevice,
4378 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004379 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004380 VkDevice* pDevice) {
4381 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4382 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4383
4384 device := ?
4385 pDevice[0] = device
4386 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4387
4388 return ?
4389}
4390
4391@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004392cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004393 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004394 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004395 deviceObject := GetDevice(device)
4396
4397 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004398}
4399
4400
4401// Extension discovery functions
4402
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004403cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004404 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004405 VkLayerProperties* pProperties) {
4406 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004407 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004408
4409 properties := pProperties[0:count]
4410 for i in (0 .. count) {
4411 property := ?
4412 properties[i] = property
4413 }
4414
4415 return ?
4416}
4417
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004418cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004419 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004420 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004421 VkExtensionProperties* pProperties) {
4422 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004423 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004424
4425 properties := pProperties[0:count]
4426 for i in (0 .. count) {
4427 property := ?
4428 properties[i] = property
4429 }
4430
4431 return ?
4432}
4433
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004434cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004435 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004436 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004437 VkLayerProperties* pProperties) {
4438 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4439 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004440 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004441
4442 properties := pProperties[0:count]
4443 for i in (0 .. count) {
4444 property := ?
4445 properties[i] = property
4446 }
4447
4448 return ?
4449}
4450
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004451cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004452 VkPhysicalDevice physicalDevice,
4453 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004454 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004455 VkExtensionProperties* pProperties) {
4456 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4457
4458 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004459 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004460
4461 properties := pProperties[0:count]
4462 for i in (0 .. count) {
4463 property := ?
4464 properties[i] = property
4465 }
4466
4467 return ?
4468}
4469
4470
4471// Queue functions
4472
4473@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004474cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004475 VkDevice device,
4476 u32 queueFamilyIndex,
4477 u32 queueIndex,
4478 VkQueue* pQueue) {
4479 deviceObject := GetDevice(device)
4480
4481 queue := ?
4482 pQueue[0] = queue
4483
4484 if !(queue in State.Queues) {
4485 State.Queues[queue] = new!QueueObject(device: device)
4486 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004487}
4488
4489@threadSafety("app")
4490cmd VkResult vkQueueSubmit(
4491 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004492 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004493 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004494 VkFence fence) {
4495 queueObject := GetQueue(queue)
4496
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004497 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004498 fenceObject := GetFence(fence)
4499 assert(fenceObject.device == queueObject.device)
4500 }
4501
Jesse Hall3fbc8562015-11-29 22:10:52 -08004502 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4503 // for i in (0 .. commandBufferCount) {
4504 // commandBuffer := commandBuffers[i]
4505 // commandBufferObject := GetCommandBuffer(commandBuffer)
4506 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004507 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004508 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4509 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004510 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004511
4512 return ?
4513}
4514
4515@threadSafety("system")
4516cmd VkResult vkQueueWaitIdle(
4517 VkQueue queue) {
4518 queueObject := GetQueue(queue)
4519
4520 return ?
4521}
4522
4523@threadSafety("system")
4524cmd VkResult vkDeviceWaitIdle(
4525 VkDevice device) {
4526 deviceObject := GetDevice(device)
4527
4528 return ?
4529}
4530
4531
4532// Memory functions
4533
4534@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004535cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004536 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004537 const VkMemoryAllocateInfo* pAllocateInfo,
4538 const VkAllocationCallbacks* pAllocator,
4539 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004540 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004541 deviceObject := GetDevice(device)
4542
Jesse Hall3fbc8562015-11-29 22:10:52 -08004543 memory := ?
4544 pMemory[0] = memory
4545 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004546 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004547 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004548
4549 return ?
4550}
4551
4552@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004553cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004554 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004555 VkDeviceMemory memory,
4556 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004557 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004558 memoryObject := GetDeviceMemory(memory)
4559 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004560
4561 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004562 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004563 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004564 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4565 "vkFreeMemory: commandBuffers still bound")
4566 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004567}
4568
4569@threadSafety("app")
4570cmd VkResult vkMapMemory(
4571 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004572 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004573 VkDeviceSize offset,
4574 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004575 VkMemoryMapFlags flags,
4576 void** ppData) {
4577 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004578 memoryObject := GetDeviceMemory(memory)
4579 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004580
4581 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004582 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004583
4584 return ?
4585}
4586
4587@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004588cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004589 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004590 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004591 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004592 memoryObject := GetDeviceMemory(memory)
4593 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004594}
4595
4596cmd VkResult vkFlushMappedMemoryRanges(
4597 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004598 u32 memoryRangeCount
4599 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004600 deviceObject := GetDevice(device)
4601
Jesse Hall3fbc8562015-11-29 22:10:52 -08004602 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4603 for i in (0 .. memoryRangeCount) {
4604 memoryRange := memoryRanges[i]
4605 memoryObject := GetDeviceMemory(memoryRange.memory)
4606 assert(memoryObject.device == device)
4607 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004608 }
4609
4610 return ?
4611}
4612
4613cmd VkResult vkInvalidateMappedMemoryRanges(
4614 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004615 u32 memoryRangeCount,
4616 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004617 deviceObject := GetDevice(device)
4618
Jesse Hall3fbc8562015-11-29 22:10:52 -08004619 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4620 for i in (0 .. memoryRangeCount) {
4621 memoryRange := memoryRanges[i]
4622 memoryObject := GetDeviceMemory(memoryRange.memory)
4623 assert(memoryObject.device == device)
4624 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004625 }
4626
4627 return ?
4628}
4629
4630
4631// Memory management API functions
4632
Jesse Hall606a54e2015-11-19 22:17:28 -08004633cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004634 VkDevice device,
4635 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004636 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004637 deviceObject := GetDevice(device)
4638
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004639 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004640 memoryObject := GetDeviceMemory(memory)
4641 assert(memoryObject.device == device)
4642 }
4643
4644 committedMemoryInBytes := ?
4645 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004646}
4647
Jesse Hall606a54e2015-11-19 22:17:28 -08004648cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004649 VkDevice device,
4650 VkBuffer buffer,
4651 VkMemoryRequirements* pMemoryRequirements) {
4652 deviceObject := GetDevice(device)
4653 bufferObject := GetBuffer(buffer)
4654 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004655}
4656
4657cmd VkResult vkBindBufferMemory(
4658 VkDevice device,
4659 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004660 VkDeviceMemory memory,
4661 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004662 deviceObject := GetDevice(device)
4663 bufferObject := GetBuffer(buffer)
4664 assert(bufferObject.device == device)
4665
4666 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004667 if bufferObject.memory != NULL_HANDLE {
4668 memoryObject := GetDeviceMemory(bufferObject.memory)
4669 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004670 }
4671
4672 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004673 if memory != NULL_HANDLE {
4674 memoryObject := GetDeviceMemory(memory)
4675 assert(memoryObject.device == device)
4676 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004677 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004678 bufferObject.memory = memory
4679 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004680
4681 return ?
4682}
4683
Jesse Hall606a54e2015-11-19 22:17:28 -08004684cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004685 VkDevice device,
4686 VkImage image,
4687 VkMemoryRequirements* pMemoryRequirements) {
4688 deviceObject := GetDevice(device)
4689 imageObject := GetImage(image)
4690 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004691}
4692
4693cmd VkResult vkBindImageMemory(
4694 VkDevice device,
4695 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004696 VkDeviceMemory memory,
4697 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004698 deviceObject := GetDevice(device)
4699 imageObject := GetImage(image)
4700 assert(imageObject.device == device)
4701
4702 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004703 if imageObject.memory != NULL_HANDLE {
4704 memoryObject := GetDeviceMemory(imageObject.memory)
4705 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004706 }
4707
4708 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004709 if memory != NULL_HANDLE {
4710 memoryObject := GetDeviceMemory(memory)
4711 assert(memoryObject.device == device)
4712 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004713 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004714 imageObject.memory = memory
4715 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004716
4717 return ?
4718}
4719
Jesse Hall606a54e2015-11-19 22:17:28 -08004720cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004721 VkDevice device,
4722 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004723 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004724 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4725 deviceObject := GetDevice(device)
4726 imageObject := GetImage(image)
4727 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004728}
4729
Jesse Hall606a54e2015-11-19 22:17:28 -08004730cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004731 VkPhysicalDevice physicalDevice,
4732 VkFormat format,
4733 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004734 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004735 VkImageUsageFlags usage,
4736 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004737 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004738 VkSparseImageFormatProperties* pProperties) {
4739 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004740}
4741
Jesse Halla6429252015-11-29 18:59:42 -08004742cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004743 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004744 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004745 const VkBindSparseInfo* pBindInfo,
4746 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004747 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004748
4749 return ?
4750}
4751
4752
4753// Fence functions
4754
4755@threadSafety("system")
4756cmd VkResult vkCreateFence(
4757 VkDevice device,
4758 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004759 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004760 VkFence* pFence) {
4761 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4762 deviceObject := GetDevice(device)
4763
4764 fence := ?
4765 pFence[0] = fence
4766 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004767 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004768
4769 return ?
4770}
4771
4772@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004773cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004774 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004775 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004776 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004777 deviceObject := GetDevice(device)
4778 fenceObject := GetFence(fence)
4779 assert(fenceObject.device == device)
4780
4781 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004782}
4783
4784@threadSafety("system")
4785cmd VkResult vkResetFences(
4786 VkDevice device,
4787 u32 fenceCount,
4788 const VkFence* pFences) {
4789 deviceObject := GetDevice(device)
4790
4791 fences := pFences[0:fenceCount]
4792 for i in (0 .. fenceCount) {
4793 fence := fences[i]
4794 fenceObject := GetFence(fence)
4795 assert(fenceObject.device == device)
4796 fenceObject.signaled = false
4797 }
4798
4799 return ?
4800}
4801
4802@threadSafety("system")
4803cmd VkResult vkGetFenceStatus(
4804 VkDevice device,
4805 VkFence fence) {
4806 deviceObject := GetDevice(device)
4807 fenceObject := GetFence(fence)
4808 assert(fenceObject.device == device)
4809
4810 return ?
4811}
4812
4813@threadSafety("system")
4814cmd VkResult vkWaitForFences(
4815 VkDevice device,
4816 u32 fenceCount,
4817 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004818 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004819 u64 timeout) { /// timeout in nanoseconds
4820 deviceObject := GetDevice(device)
4821
4822 fences := pFences[0:fenceCount]
4823 for i in (0 .. fenceCount) {
4824 fence := fences[i]
4825 fenceObject := GetFence(fence)
4826 assert(fenceObject.device == device)
4827 }
4828
4829 return ?
4830}
4831
4832
4833// Queue semaphore functions
4834
4835@threadSafety("system")
4836cmd VkResult vkCreateSemaphore(
4837 VkDevice device,
4838 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004839 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004840 VkSemaphore* pSemaphore) {
4841 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4842 deviceObject := GetDevice(device)
4843
4844 semaphore := ?
4845 pSemaphore[0] = semaphore
4846 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4847
4848 return ?
4849}
4850
4851@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004852cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004853 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004854 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004855 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004856 deviceObject := GetDevice(device)
4857 semaphoreObject := GetSemaphore(semaphore)
4858 assert(semaphoreObject.device == device)
4859
4860 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004861}
4862
Jesse Halld27f6aa2015-08-15 17:58:48 -07004863
4864// Event functions
4865
4866@threadSafety("system")
4867cmd VkResult vkCreateEvent(
4868 VkDevice device,
4869 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004870 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004871 VkEvent* pEvent) {
4872 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
4873 deviceObject := GetDevice(device)
4874
4875 event := ?
4876 pEvent[0] = event
4877 State.Events[event] = new!EventObject(device: device)
4878
4879 return ?
4880}
4881
4882@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004883cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004884 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004885 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004886 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004887 deviceObject := GetDevice(device)
4888 eventObject := GetEvent(event)
4889 assert(eventObject.device == device)
4890
4891 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004892}
4893
4894@threadSafety("system")
4895cmd VkResult vkGetEventStatus(
4896 VkDevice device,
4897 VkEvent event) {
4898 deviceObject := GetDevice(device)
4899 eventObject := GetEvent(event)
4900 assert(eventObject.device == device)
4901
4902 return ?
4903}
4904
4905@threadSafety("system")
4906cmd VkResult vkSetEvent(
4907 VkDevice device,
4908 VkEvent event) {
4909 deviceObject := GetDevice(device)
4910 eventObject := GetEvent(event)
4911 assert(eventObject.device == device)
4912
4913 return ?
4914}
4915
4916@threadSafety("system")
4917cmd VkResult vkResetEvent(
4918 VkDevice device,
4919 VkEvent event) {
4920 deviceObject := GetDevice(device)
4921 eventObject := GetEvent(event)
4922 assert(eventObject.device == device)
4923
4924 return ?
4925}
4926
4927
4928// Query functions
4929
4930@threadSafety("system")
4931cmd VkResult vkCreateQueryPool(
4932 VkDevice device,
4933 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004934 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004935 VkQueryPool* pQueryPool) {
4936 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
4937 deviceObject := GetDevice(device)
4938
4939 queryPool := ?
4940 pQueryPool[0] = queryPool
4941 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
4942
4943 return ?
4944}
4945
4946@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004947cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004948 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004949 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004950 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004951 deviceObject := GetDevice(device)
4952 queryPoolObject := GetQueryPool(queryPool)
4953 assert(queryPoolObject.device == device)
4954
4955 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004956}
4957
4958@threadSafety("system")
4959cmd VkResult vkGetQueryPoolResults(
4960 VkDevice device,
4961 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004962 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004963 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08004964 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004965 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08004966 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004967 VkQueryResultFlags flags) {
4968 deviceObject := GetDevice(device)
4969 queryPoolObject := GetQueryPool(queryPool)
4970 assert(queryPoolObject.device == device)
4971
Jesse Halld27f6aa2015-08-15 17:58:48 -07004972 data := pData[0:dataSize]
4973
4974 return ?
4975}
4976
4977// Buffer functions
4978
4979@threadSafety("system")
4980cmd VkResult vkCreateBuffer(
4981 VkDevice device,
4982 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004983 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004984 VkBuffer* pBuffer) {
4985 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
4986 deviceObject := GetDevice(device)
4987
4988 buffer := ?
4989 pBuffer[0] = buffer
4990 State.Buffers[buffer] = new!BufferObject(device: device)
4991
4992 return ?
4993}
4994
4995@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004996cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004997 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004998 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004999 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005000 deviceObject := GetDevice(device)
5001 bufferObject := GetBuffer(buffer)
5002 assert(bufferObject.device == device)
5003
Jesse Hall3fbc8562015-11-29 22:10:52 -08005004 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005005 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005006}
5007
5008
5009// Buffer view functions
5010
5011@threadSafety("system")
5012cmd VkResult vkCreateBufferView(
5013 VkDevice device,
5014 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005015 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005016 VkBufferView* pView) {
5017 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5018 deviceObject := GetDevice(device)
5019
5020 bufferObject := GetBuffer(pCreateInfo.buffer)
5021 assert(bufferObject.device == device)
5022
5023 view := ?
5024 pView[0] = view
5025 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5026
5027 return ?
5028}
5029
5030@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005031cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005032 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005033 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005034 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005035 deviceObject := GetDevice(device)
5036 bufferViewObject := GetBufferView(bufferView)
5037 assert(bufferViewObject.device == device)
5038
5039 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005040}
5041
5042
5043// Image functions
5044
5045@threadSafety("system")
5046cmd VkResult vkCreateImage(
5047 VkDevice device,
5048 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005049 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005050 VkImage* pImage) {
5051 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5052 deviceObject := GetDevice(device)
5053
5054 image := ?
5055 pImage[0] = image
5056 State.Images[image] = new!ImageObject(device: device)
5057
5058 return ?
5059}
5060
5061@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005062cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005063 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005064 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005065 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005066 deviceObject := GetDevice(device)
5067 imageObject := GetImage(image)
5068 assert(imageObject.device == device)
5069
Jesse Hall3fbc8562015-11-29 22:10:52 -08005070 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005071 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005072}
5073
Jesse Hall606a54e2015-11-19 22:17:28 -08005074cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005075 VkDevice device,
5076 VkImage image,
5077 const VkImageSubresource* pSubresource,
5078 VkSubresourceLayout* pLayout) {
5079 deviceObject := GetDevice(device)
5080 imageObject := GetImage(image)
5081 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005082}
5083
5084
5085// Image view functions
5086
5087@threadSafety("system")
5088cmd VkResult vkCreateImageView(
5089 VkDevice device,
5090 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005091 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005092 VkImageView* pView) {
5093 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5094 deviceObject := GetDevice(device)
5095
5096 imageObject := GetImage(pCreateInfo.image)
5097 assert(imageObject.device == device)
5098
5099 view := ?
5100 pView[0] = view
5101 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5102
5103 return ?
5104}
5105
5106@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005107cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005108 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005109 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005110 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005111 deviceObject := GetDevice(device)
5112 imageViewObject := GetImageView(imageView)
5113 assert(imageViewObject.device == device)
5114
5115 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005116}
5117
5118
5119// Shader functions
5120
5121cmd VkResult vkCreateShaderModule(
5122 VkDevice device,
5123 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005124 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005125 VkShaderModule* pShaderModule) {
5126 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5127 deviceObject := GetDevice(device)
5128
5129 shaderModule := ?
5130 pShaderModule[0] = shaderModule
5131 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5132
5133 return ?
5134}
5135
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005136cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005137 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005138 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005139 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005140 deviceObject := GetDevice(device)
5141 shaderModuleObject := GetShaderModule(shaderModule)
5142 assert(shaderModuleObject.device == device)
5143
5144 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005145}
5146
Jesse Halld27f6aa2015-08-15 17:58:48 -07005147
5148// Pipeline functions
5149
5150cmd VkResult vkCreatePipelineCache(
5151 VkDevice device,
5152 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005153 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005154 VkPipelineCache* pPipelineCache) {
5155 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5156 deviceObject := GetDevice(device)
5157
5158 pipelineCache := ?
5159 pPipelineCache[0] = pipelineCache
5160 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5161
5162 return ?
5163}
5164
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005165cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005166 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005167 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005168 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005169 deviceObject := GetDevice(device)
5170 pipelineCacheObject := GetPipelineCache(pipelineCache)
5171 assert(pipelineCacheObject.device == device)
5172
5173 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005174}
5175
Jesse Halld27f6aa2015-08-15 17:58:48 -07005176cmd VkResult vkGetPipelineCacheData(
5177 VkDevice device,
5178 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005179 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005180 void* pData) {
5181 deviceObject := GetDevice(device)
5182 pipelineCacheObject := GetPipelineCache(pipelineCache)
5183 assert(pipelineCacheObject.device == device)
5184
5185 return ?
5186}
5187
5188cmd VkResult vkMergePipelineCaches(
5189 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005190 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005191 u32 srcCacheCount,
5192 const VkPipelineCache* pSrcCaches) {
5193 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005194 dstCacheObject := GetPipelineCache(dstCache)
5195 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005196
5197 srcCaches := pSrcCaches[0:srcCacheCount]
5198 for i in (0 .. srcCacheCount) {
5199 srcCache := srcCaches[i]
5200 srcCacheObject := GetPipelineCache(srcCache)
5201 assert(srcCacheObject.device == device)
5202 }
5203
5204 return ?
5205}
5206
5207cmd VkResult vkCreateGraphicsPipelines(
5208 VkDevice device,
5209 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005210 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005211 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005212 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005213 VkPipeline* pPipelines) {
5214 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005215 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005216 pipelineCacheObject := GetPipelineCache(pipelineCache)
5217 assert(pipelineCacheObject.device == device)
5218 }
5219
Jesse Hall03b6fe12015-11-24 12:44:21 -08005220 createInfos := pCreateInfos[0:createInfoCount]
5221 pipelines := pPipelines[0:createInfoCount]
5222 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005223 pipeline := ?
5224 pipelines[i] = pipeline
5225 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5226 }
5227
5228 return ?
5229}
5230
5231cmd VkResult vkCreateComputePipelines(
5232 VkDevice device,
5233 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005234 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005235 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005236 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005237 VkPipeline* pPipelines) {
5238 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005239 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005240 pipelineCacheObject := GetPipelineCache(pipelineCache)
5241 assert(pipelineCacheObject.device == device)
5242 }
5243
Jesse Hall03b6fe12015-11-24 12:44:21 -08005244 createInfos := pCreateInfos[0:createInfoCount]
5245 pipelines := pPipelines[0:createInfoCount]
5246 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005247 pipeline := ?
5248 pipelines[i] = pipeline
5249 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5250 }
5251
5252 return ?
5253}
5254
5255@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005256cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005257 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005258 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005259 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005260 deviceObject := GetDevice(device)
5261 pipelineObjects := GetPipeline(pipeline)
5262 assert(pipelineObjects.device == device)
5263
5264 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005265}
5266
5267
5268// Pipeline layout functions
5269
5270@threadSafety("system")
5271cmd VkResult vkCreatePipelineLayout(
5272 VkDevice device,
5273 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005274 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005275 VkPipelineLayout* pPipelineLayout) {
5276 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5277 deviceObject := GetDevice(device)
5278
5279 pipelineLayout := ?
5280 pPipelineLayout[0] = pipelineLayout
5281 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5282
5283 return ?
5284}
5285
5286@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005287cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005288 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005289 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005290 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005291 deviceObject := GetDevice(device)
5292 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5293 assert(pipelineLayoutObjects.device == device)
5294
5295 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005296}
5297
5298
5299// Sampler functions
5300
5301@threadSafety("system")
5302cmd VkResult vkCreateSampler(
5303 VkDevice device,
5304 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005305 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005306 VkSampler* pSampler) {
5307 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5308 deviceObject := GetDevice(device)
5309
5310 sampler := ?
5311 pSampler[0] = sampler
5312 State.Samplers[sampler] = new!SamplerObject(device: device)
5313
5314 return ?
5315}
5316
5317@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005318cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005319 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005320 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005321 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005322 deviceObject := GetDevice(device)
5323 samplerObject := GetSampler(sampler)
5324 assert(samplerObject.device == device)
5325
5326 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005327}
5328
5329
5330// Descriptor set functions
5331
5332@threadSafety("system")
5333cmd VkResult vkCreateDescriptorSetLayout(
5334 VkDevice device,
5335 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005336 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005337 VkDescriptorSetLayout* pSetLayout) {
5338 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5339 deviceObject := GetDevice(device)
5340
5341 setLayout := ?
5342 pSetLayout[0] = setLayout
5343 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5344
5345 return ?
5346}
5347
5348@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005349cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005350 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005351 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005352 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005353 deviceObject := GetDevice(device)
5354 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5355 assert(descriptorSetLayoutObject.device == device)
5356
5357 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005358}
5359
5360@threadSafety("system")
5361cmd VkResult vkCreateDescriptorPool(
5362 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005363 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005364 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005365 VkDescriptorPool* pDescriptorPool) {
5366 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5367 deviceObject := GetDevice(device)
5368
5369 descriptorPool := ?
5370 pDescriptorPool[0] = descriptorPool
5371 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5372
5373 return ?
5374}
5375
5376@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005377cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005378 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005379 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005380 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005381 deviceObject := GetDevice(device)
5382 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5383 assert(descriptorPoolObject.device == device)
5384
5385 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005386}
5387
5388@threadSafety("app")
5389cmd VkResult vkResetDescriptorPool(
5390 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005391 VkDescriptorPool descriptorPool,
5392 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005393 deviceObject := GetDevice(device)
5394 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5395 assert(descriptorPoolObject.device == device)
5396
5397 return ?
5398}
5399
5400@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005401cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005402 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005403 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005404 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005405 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005406 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005407 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005408
Jesse Hall03b6fe12015-11-24 12:44:21 -08005409 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5410 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005411 setLayout := setLayouts[i]
5412 setLayoutObject := GetDescriptorSetLayout(setLayout)
5413 assert(setLayoutObject.device == device)
5414 }
5415
Jesse Hall03b6fe12015-11-24 12:44:21 -08005416 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5417 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005418 descriptorSet := ?
5419 descriptorSets[i] = descriptorSet
5420 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5421 }
5422
5423 return ?
5424}
5425
Jesse Hallf09c6b12015-08-15 19:54:28 -07005426cmd VkResult vkFreeDescriptorSets(
5427 VkDevice device,
5428 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005429 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005430 const VkDescriptorSet* pDescriptorSets) {
5431 deviceObject := GetDevice(device)
5432 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5433
Jesse Hall03b6fe12015-11-24 12:44:21 -08005434 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5435 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005436 descriptorSet := descriptorSets[i]
5437 descriptorSetObject := GetDescriptorSet(descriptorSet)
5438 assert(descriptorSetObject.device == device)
5439 State.DescriptorSets[descriptorSet] = null
5440 }
5441
5442 return ?
5443}
5444
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005445cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005446 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005447 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005448 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005449 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005450 const VkCopyDescriptorSet* pDescriptorCopies) {
5451 deviceObject := GetDevice(device)
5452
Jesse Hallb00daad2015-11-29 19:46:20 -08005453 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5454 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005455 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005456 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005457 assert(descriptorWriteObject.device == device)
5458 }
5459
Jesse Hallb00daad2015-11-29 19:46:20 -08005460 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5461 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005462 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005463 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005464 assert(descriptorCopyObject.device == device)
5465 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005466}
5467
5468
5469// Framebuffer functions
5470
5471@threadSafety("system")
5472cmd VkResult vkCreateFramebuffer(
5473 VkDevice device,
5474 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005475 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005476 VkFramebuffer* pFramebuffer) {
5477 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5478 deviceObject := GetDevice(device)
5479
5480 framebuffer := ?
5481 pFramebuffer[0] = framebuffer
5482 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5483
5484 return ?
5485}
5486
5487@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005488cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005489 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005490 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005491 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005492 deviceObject := GetDevice(device)
5493 framebufferObject := GetFramebuffer(framebuffer)
5494 assert(framebufferObject.device == device)
5495
5496 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005497}
5498
5499
5500// Renderpass functions
5501
5502@threadSafety("system")
5503cmd VkResult vkCreateRenderPass(
5504 VkDevice device,
5505 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005506 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005507 VkRenderPass* pRenderPass) {
5508 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5509 deviceObject := GetDevice(device)
5510
5511 renderpass := ?
5512 pRenderPass[0] = renderpass
5513 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5514
5515 return ?
5516}
5517
5518@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005519cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005520 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005521 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005522 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005523 deviceObject := GetDevice(device)
5524 renderPassObject := GetRenderPass(renderPass)
5525 assert(renderPassObject.device == device)
5526
5527 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005528}
5529
Jesse Hall606a54e2015-11-19 22:17:28 -08005530cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005531 VkDevice device,
5532 VkRenderPass renderPass,
5533 VkExtent2D* pGranularity) {
5534 deviceObject := GetDevice(device)
5535 renderPassObject := GetRenderPass(renderPass)
5536
5537 granularity := ?
5538 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005539}
5540
5541// Command pool functions
5542
5543cmd VkResult vkCreateCommandPool(
5544 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005545 const VkCommandPoolCreateInfo* pCreateInfo,
5546 const VkAllocationCallbacks* pAllocator,
5547 VkCommandPool* pCommandPool) {
5548 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005549 deviceObject := GetDevice(device)
5550
Jesse Hall3fbc8562015-11-29 22:10:52 -08005551 commandPool := ?
5552 pCommandPool[0] = commandPool
5553 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005554
5555 return ?
5556}
5557
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005558cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005559 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005560 VkCommandPool commandPool,
5561 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005562 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005563 commandPoolObject := GetCommandPool(commandPool)
5564 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005565
Jesse Hall3fbc8562015-11-29 22:10:52 -08005566 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005567}
5568
5569cmd VkResult vkResetCommandPool(
5570 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005571 VkCommandPool commandPool,
5572 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005573 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005574 commandPoolObject := GetCommandPool(commandPool)
5575 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005576
5577 return ?
5578}
5579
5580// Command buffer functions
5581
Jesse Hall3fbc8562015-11-29 22:10:52 -08005582macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5583 memoryObject := GetDeviceMemory(memory)
5584 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005585
Jesse Hall3fbc8562015-11-29 22:10:52 -08005586 commandBufferObject := GetCommandBuffer(commandBuffer)
5587 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005588}
5589
Jesse Hall3fbc8562015-11-29 22:10:52 -08005590macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5591 memoryObject := GetDeviceMemory(memory)
5592 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005593
Jesse Hall3fbc8562015-11-29 22:10:52 -08005594 commandBufferObject := GetCommandBuffer(commandBuffer)
5595 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005596}
5597
5598@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005599cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005600 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005601 const VkCommandBufferAllocateInfo* pAllocateInfo,
5602 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005603 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005604
Jesse Hall3dd678a2016-01-08 21:52:01 -08005605 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005606 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005607 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005608 commandBuffer := ?
5609 commandBuffers[i] = commandBuffer
5610 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005611 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005612
5613 return ?
5614}
5615
5616@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005617cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005618 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005619 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005620 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005621 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005622 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005623
Jesse Hall3fbc8562015-11-29 22:10:52 -08005624 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005625 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005626 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5627 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005628 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005629 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005630 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005631}
5632
5633@threadSafety("app")
5634cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005635 VkCommandBuffer commandBuffer,
5636 const VkCommandBufferBeginInfo* pBeginInfo) {
5637 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5638 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005639
5640 // TODO: iterate over boundObjects and clear memory bindings
5641
5642 return ?
5643}
5644
5645@threadSafety("app")
5646cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005647 VkCommandBuffer commandBuffer) {
5648 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005649
5650 return ?
5651}
5652
5653@threadSafety("app")
5654cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005655 VkCommandBuffer commandBuffer,
5656 VkCommandBufferResetFlags flags) {
5657 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005658
5659 // TODO: iterate over boundObjects and clear memory bindings
5660
5661 return ?
5662}
5663
5664
5665// Command buffer building functions
5666
5667@threadSafety("app")
5668cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005669 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005670 VkPipelineBindPoint pipelineBindPoint,
5671 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005672 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005673 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005674 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005675
Jesse Halld8bade02015-11-24 10:24:18 -08005676 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005677 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5678 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5679 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005680 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005681}
5682
5683@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005684cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005685 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005686 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005687 u32 viewportCount,
5688 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005689 commandBufferObject := GetCommandBuffer(commandBuffer)
5690 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005691}
5692
5693@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005694cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005695 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005696 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005697 u32 scissorCount,
5698 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005699 commandBufferObject := GetCommandBuffer(commandBuffer)
5700 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005701}
5702
5703@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005704cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005705 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005706 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005707 commandBufferObject := GetCommandBuffer(commandBuffer)
5708 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005709}
5710
5711@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005712cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005713 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005714 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005715 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005716 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005717 commandBufferObject := GetCommandBuffer(commandBuffer)
5718 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005719}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005720
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005721@threadSafety("app")
5722cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005723 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005724 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5725 // an annotation as a quick hack to pass this to the template without
5726 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005727 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005728 commandBufferObject := GetCommandBuffer(commandBuffer)
5729 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005730}
5731
5732@threadSafety("app")
5733cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005734 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005735 f32 minDepthBounds,
5736 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005737 commandBufferObject := GetCommandBuffer(commandBuffer)
5738 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005739}
5740
5741@threadSafety("app")
5742cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005743 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005744 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005745 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005746 commandBufferObject := GetCommandBuffer(commandBuffer)
5747 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005748}
5749
5750@threadSafety("app")
5751cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005752 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005753 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005754 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005755 commandBufferObject := GetCommandBuffer(commandBuffer)
5756 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005757}
5758
5759@threadSafety("app")
5760cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005761 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005762 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005763 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005764 commandBufferObject := GetCommandBuffer(commandBuffer)
5765 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005766}
5767
5768@threadSafety("app")
5769cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005770 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005771 VkPipelineBindPoint pipelineBindPoint,
5772 VkPipelineLayout layout,
5773 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005774 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005775 const VkDescriptorSet* pDescriptorSets,
5776 u32 dynamicOffsetCount,
5777 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005778 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005779
Jesse Hall03b6fe12015-11-24 12:44:21 -08005780 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5781 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005782 descriptorSet := descriptorSets[i]
5783 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005784 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005785 }
5786
5787 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5788 for i in (0 .. dynamicOffsetCount) {
5789 dynamicOffset := dynamicOffsets[i]
5790 }
5791
Jesse Halld8bade02015-11-24 10:24:18 -08005792 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005793 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5794 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5795 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005796 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005797}
5798
5799@threadSafety("app")
5800cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005801 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005802 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005803 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005804 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005805 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005806 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005807 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005808
Jesse Hall3fbc8562015-11-29 22:10:52 -08005809 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005810
Jesse Hall3fbc8562015-11-29 22:10:52 -08005811 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005812}
5813
5814@threadSafety("app")
5815cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005816 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005817 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005818 u32 bindingCount,
5819 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005820 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005821 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005822
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005823 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005824 buffers := pBuffers[0:bindingCount]
5825 offsets := pOffsets[0:bindingCount]
5826 for i in (0 .. bindingCount) {
5827 buffer := buffers[i]
5828 offset := offsets[i]
5829 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005830 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005831
Jesse Hall3fbc8562015-11-29 22:10:52 -08005832 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005833 }
5834
Jesse Hall3fbc8562015-11-29 22:10:52 -08005835 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005836}
5837
5838@threadSafety("app")
5839cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005840 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005841 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005842 u32 instanceCount,
5843 u32 firstVertex,
5844 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005845 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005846
Jesse Hall3fbc8562015-11-29 22:10:52 -08005847 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005848}
5849
5850@threadSafety("app")
5851cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005852 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005853 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005854 u32 instanceCount,
5855 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005856 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005857 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005858 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005859
Jesse Hall3fbc8562015-11-29 22:10:52 -08005860 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005861}
5862
5863@threadSafety("app")
5864cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005865 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005866 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005867 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005868 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005869 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005870 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005871 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005872 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005873
Jesse Hall3fbc8562015-11-29 22:10:52 -08005874 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005875
Jesse Hall3fbc8562015-11-29 22:10:52 -08005876 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005877}
5878
5879@threadSafety("app")
5880cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005881 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005882 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005883 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005884 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005885 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005886 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005887 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005888 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005889
Jesse Hall3fbc8562015-11-29 22:10:52 -08005890 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005891
Jesse Hall3fbc8562015-11-29 22:10:52 -08005892 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005893}
5894
5895@threadSafety("app")
5896cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005897 VkCommandBuffer commandBuffer,
Jesse Halld0599582017-03-10 18:35:38 -08005898 u32 groupCountX,
5899 u32 groupCountY,
5900 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005901 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005902
Jesse Hall3fbc8562015-11-29 22:10:52 -08005903 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005904}
5905
5906@threadSafety("app")
5907cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005908 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005909 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005910 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005911 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005912 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005913 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005914
Jesse Hall3fbc8562015-11-29 22:10:52 -08005915 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005916
Jesse Hall3fbc8562015-11-29 22:10:52 -08005917 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005918}
5919
5920@threadSafety("app")
5921cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005922 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005923 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005924 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005925 u32 regionCount,
5926 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005927 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005928 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005929 dstBufferObject := GetBuffer(dstBuffer)
5930 assert(commandBufferObject.device == srcBufferObject.device)
5931 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005932
5933 regions := pRegions[0:regionCount]
5934 for i in (0 .. regionCount) {
5935 region := regions[i]
5936 }
5937
Jesse Hall3fbc8562015-11-29 22:10:52 -08005938 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
5939 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005940
Jesse Hall65ab5522015-11-30 00:07:16 -08005941 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005942}
5943
5944@threadSafety("app")
5945cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005946 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005947 VkImage srcImage,
5948 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005949 VkImage dstImage,
5950 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005951 u32 regionCount,
5952 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005953 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005954 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005955 dstImageObject := GetImage(dstImage)
5956 assert(commandBufferObject.device == srcImageObject.device)
5957 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005958
5959 regions := pRegions[0:regionCount]
5960 for i in (0 .. regionCount) {
5961 region := regions[i]
5962 }
5963
Jesse Hall3fbc8562015-11-29 22:10:52 -08005964 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
5965 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005966
Jesse Hall65ab5522015-11-30 00:07:16 -08005967 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005968}
5969
5970@threadSafety("app")
5971cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005972 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005973 VkImage srcImage,
5974 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005975 VkImage dstImage,
5976 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005977 u32 regionCount,
5978 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08005979 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005980 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005981 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005982 dstImageObject := GetImage(dstImage)
5983 assert(commandBufferObject.device == srcImageObject.device)
5984 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005985
5986 regions := pRegions[0:regionCount]
5987 for i in (0 .. regionCount) {
5988 region := regions[i]
5989 }
5990
Jesse Hall3fbc8562015-11-29 22:10:52 -08005991 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
5992 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005993
Jesse Hall3fbc8562015-11-29 22:10:52 -08005994 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005995}
5996
5997@threadSafety("app")
5998cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005999 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006000 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006001 VkImage dstImage,
6002 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006003 u32 regionCount,
6004 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006005 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006006 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006007 dstImageObject := GetImage(dstImage)
6008 assert(commandBufferObject.device == srcBufferObject.device)
6009 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006010
6011 regions := pRegions[0:regionCount]
6012 for i in (0 .. regionCount) {
6013 region := regions[i]
6014 }
6015
Jesse Hall3fbc8562015-11-29 22:10:52 -08006016 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6017 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006018
Jesse Hall65ab5522015-11-30 00:07:16 -08006019 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006020}
6021
6022@threadSafety("app")
6023cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006024 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006025 VkImage srcImage,
6026 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006027 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006028 u32 regionCount,
6029 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006030 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006031 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006032 dstBufferObject := GetBuffer(dstBuffer)
6033 assert(commandBufferObject.device == srcImageObject.device)
6034 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006035
6036 regions := pRegions[0:regionCount]
6037 for i in (0 .. regionCount) {
6038 region := regions[i]
6039 }
6040
Jesse Hall3fbc8562015-11-29 22:10:52 -08006041 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6042 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006043
Jesse Hall65ab5522015-11-30 00:07:16 -08006044 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045}
6046
6047@threadSafety("app")
6048cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006049 VkCommandBuffer commandBuffer,
6050 VkBuffer dstBuffer,
6051 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006052 VkDeviceSize dataSize,
Jesse Hall3f5499b2016-07-26 15:20:40 -07006053 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006054 commandBufferObject := GetCommandBuffer(commandBuffer)
6055 dstBufferObject := GetBuffer(dstBuffer)
6056 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006057
6058 data := pData[0:dataSize]
6059
Jesse Hall3fbc8562015-11-29 22:10:52 -08006060 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006061
Jesse Hall65ab5522015-11-30 00:07:16 -08006062 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006063}
6064
6065@threadSafety("app")
6066cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006067 VkCommandBuffer commandBuffer,
6068 VkBuffer dstBuffer,
6069 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006070 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006071 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006072 commandBufferObject := GetCommandBuffer(commandBuffer)
6073 dstBufferObject := GetBuffer(dstBuffer)
6074 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006075
Jesse Hall65ab5522015-11-30 00:07:16 -08006076 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006077}
6078
6079@threadSafety("app")
6080cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006081 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006082 VkImage image,
6083 VkImageLayout imageLayout,
6084 const VkClearColorValue* pColor,
6085 u32 rangeCount,
6086 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006087 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006088 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006089 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006090
6091 ranges := pRanges[0:rangeCount]
6092 for i in (0 .. rangeCount) {
6093 range := ranges[i]
6094 }
6095
Jesse Hall3fbc8562015-11-29 22:10:52 -08006096 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006097
Jesse Hall3fbc8562015-11-29 22:10:52 -08006098 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006099}
6100
6101@threadSafety("app")
6102cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006103 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006104 VkImage image,
6105 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006106 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006107 u32 rangeCount,
6108 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006109 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006110 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006111 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006112
6113 ranges := pRanges[0:rangeCount]
6114 for i in (0 .. rangeCount) {
6115 range := ranges[i]
6116 }
6117
Jesse Hall3fbc8562015-11-29 22:10:52 -08006118 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006119
Jesse Hall3fbc8562015-11-29 22:10:52 -08006120 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006121}
6122
6123@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006124cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006125 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006126 u32 attachmentCount,
6127 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006128 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006129 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006130 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006131
6132 rects := pRects[0:rectCount]
6133 for i in (0 .. rectCount) {
6134 rect := rects[i]
6135 }
6136
Jesse Hall3fbc8562015-11-29 22:10:52 -08006137 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006138}
6139
6140@threadSafety("app")
6141cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006142 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006143 VkImage srcImage,
6144 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006145 VkImage dstImage,
6146 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006147 u32 regionCount,
6148 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006149 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006150 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006151 dstImageObject := GetImage(dstImage)
6152 assert(commandBufferObject.device == srcImageObject.device)
6153 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006154
6155 regions := pRegions[0:regionCount]
6156 for i in (0 .. regionCount) {
6157 region := regions[i]
6158 }
6159
Jesse Hall3fbc8562015-11-29 22:10:52 -08006160 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6161 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006162
Jesse Hall3fbc8562015-11-29 22:10:52 -08006163 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006164}
6165
6166@threadSafety("app")
6167cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006168 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006169 VkEvent event,
6170 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006171 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006172 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006173 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006174}
6175
6176@threadSafety("app")
6177cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006178 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006179 VkEvent event,
6180 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006181 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006182 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006183 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006184}
6185
6186@threadSafety("app")
6187cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006188 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006189 u32 eventCount,
6190 const VkEvent* pEvents,
6191 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006192 VkPipelineStageFlags dstStageMask,
6193 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006194 const VkMemoryBarrier* pMemoryBarriers,
6195 u32 bufferMemoryBarrierCount,
6196 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6197 u32 imageMemoryBarrierCount,
6198 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006199 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006200
6201 events := pEvents[0:eventCount]
6202 for i in (0 .. eventCount) {
6203 event := events[i]
6204 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006205 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006206 }
6207
Jesse Hall3dd678a2016-01-08 21:52:01 -08006208 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006209 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006210 memoryBarrier := memoryBarriers[i]
6211 }
6212 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6213 for i in (0 .. bufferMemoryBarrierCount) {
6214 bufferMemoryBarrier := bufferMemoryBarriers[i]
6215 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6216 assert(bufferObject.device == commandBufferObject.device)
6217 }
6218 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6219 for i in (0 .. imageMemoryBarrierCount) {
6220 imageMemoryBarrier := imageMemoryBarriers[i]
6221 imageObject := GetImage(imageMemoryBarrier.image)
6222 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006223 }
6224}
6225
6226@threadSafety("app")
6227cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006228 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006229 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006230 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006231 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006232 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006233 const VkMemoryBarrier* pMemoryBarriers,
6234 u32 bufferMemoryBarrierCount,
6235 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6236 u32 imageMemoryBarrierCount,
6237 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006238 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006239
Jesse Hall3dd678a2016-01-08 21:52:01 -08006240 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006241 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006242 memoryBarrier := memoryBarriers[i]
6243 }
6244 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6245 for i in (0 .. bufferMemoryBarrierCount) {
6246 bufferMemoryBarrier := bufferMemoryBarriers[i]
6247 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6248 assert(bufferObject.device == commandBufferObject.device)
6249 }
6250 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6251 for i in (0 .. imageMemoryBarrierCount) {
6252 imageMemoryBarrier := imageMemoryBarriers[i]
6253 imageObject := GetImage(imageMemoryBarrier.image)
6254 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006255 }
6256}
6257
6258@threadSafety("app")
6259cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006260 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006261 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006262 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006263 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006264 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006265 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006266 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006267}
6268
6269@threadSafety("app")
6270cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006271 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006272 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006273 u32 query) {
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 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006277}
6278
6279@threadSafety("app")
6280cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006281 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006282 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006283 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006284 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006285 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006286 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006287 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006288}
6289
6290@threadSafety("app")
6291cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006292 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006293 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006294 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006295 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006296 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006297 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006298 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006299}
6300
6301@threadSafety("app")
6302cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006303 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006304 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006305 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006306 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006307 VkBuffer dstBuffer,
6308 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006309 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006310 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006311 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006312 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006313 dstBufferObject := GetBuffer(dstBuffer)
6314 assert(commandBufferObject.device == queryPoolObject.device)
6315 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006316}
6317
6318cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006319 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006320 VkPipelineLayout layout,
6321 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006322 u32 offset,
6323 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006324 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006325 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006326 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006327 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006328}
6329
6330@threadSafety("app")
6331cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006332 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006333 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006334 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006335 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006336 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6337 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006338 assert(commandBufferObject.device == renderPassObject.device)
6339 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006340
Jesse Hall3fbc8562015-11-29 22:10:52 -08006341 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006342}
6343
6344cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006345 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006346 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006347 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006348}
6349
6350@threadSafety("app")
6351cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006352 VkCommandBuffer commandBuffer) {
6353 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006354
Jesse Hall3fbc8562015-11-29 22:10:52 -08006355 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006356}
6357
6358cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006359 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006360 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006361 const VkCommandBuffer* pCommandBuffers) {
6362 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006363
Jesse Hall3dd678a2016-01-08 21:52:01 -08006364 commandBuffers := pCommandBuffers[0:commandBufferCount]
6365 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006366 secondaryCommandBuffer := commandBuffers[i]
6367 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6368 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006369 }
6370}
6371
Jesse Halld0599582017-03-10 18:35:38 -08006372@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006373cmd void vkDestroySurfaceKHR(
6374 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006375 VkSurfaceKHR surface,
6376 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006377 instanceObject := GetInstance(instance)
6378 surfaceObject := GetSurface(surface)
6379 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006380
Jesse Hall1356b0d2015-11-23 17:24:58 -08006381 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006382}
6383
Jesse Halld0599582017-03-10 18:35:38 -08006384@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006385cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006386 VkPhysicalDevice physicalDevice,
6387 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006388 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006389 VkBool32* pSupported) {
6390 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006391
6392 return ?
6393}
6394
Jesse Halld0599582017-03-10 18:35:38 -08006395@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006396cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6397 VkPhysicalDevice physicalDevice,
6398 VkSurfaceKHR surface,
6399 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6400 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6401
6402 surfaceCapabilities := ?
6403 pSurfaceCapabilities[0] = surfaceCapabilities
6404
6405 return ?
6406}
6407
Jesse Halld0599582017-03-10 18:35:38 -08006408@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006409cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6410 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006411 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006412 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006413 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006414 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006415
6416 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006417 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006418 surfaceFormats := pSurfaceFormats[0:count]
6419
6420 for i in (0 .. count) {
6421 surfaceFormat := ?
6422 surfaceFormats[i] = surfaceFormat
6423 }
6424
6425 return ?
6426}
6427
Jesse Halld0599582017-03-10 18:35:38 -08006428@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006429cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6430 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006431 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006432 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006433 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006434 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006435
6436 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006437 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006438 presentModes := pPresentModes[0:count]
6439
6440 for i in (0 .. count) {
6441 presentMode := ?
6442 presentModes[i] = presentMode
6443 }
6444
6445 return ?
6446}
6447
Jesse Halld0599582017-03-10 18:35:38 -08006448@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006449cmd VkResult vkCreateSwapchainKHR(
6450 VkDevice device,
6451 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006452 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006453 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006454 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006455 deviceObject := GetDevice(device)
6456
6457 swapchain := ?
6458 pSwapchain[0] = swapchain
6459 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6460
6461 return ?
6462}
6463
Jesse Halld0599582017-03-10 18:35:38 -08006464@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006465cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006466 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006467 VkSwapchainKHR swapchain,
6468 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006469 deviceObject := GetDevice(device)
6470 swapchainObject := GetSwapchain(swapchain)
6471 assert(swapchainObject.device == device)
6472
6473 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006474}
6475
Jesse Halld0599582017-03-10 18:35:38 -08006476@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006477cmd VkResult vkGetSwapchainImagesKHR(
6478 VkDevice device,
6479 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006480 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006481 VkImage* pSwapchainImages) {
6482 deviceObject := GetDevice(device)
6483
6484 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006485 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006486 swapchainImages := pSwapchainImages[0:count]
6487
6488 for i in (0 .. count) {
6489 swapchainImage := ?
6490 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006491 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006492 }
6493
6494 return ?
6495}
6496
Jesse Halld0599582017-03-10 18:35:38 -08006497@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006498cmd VkResult vkAcquireNextImageKHR(
6499 VkDevice device,
6500 VkSwapchainKHR swapchain,
6501 u64 timeout,
6502 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006503 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006504 u32* pImageIndex) {
6505 deviceObject := GetDevice(device)
6506 swapchainObject := GetSwapchain(swapchain)
6507
6508 imageIndex := ?
6509 pImageIndex[0] = imageIndex
6510
6511 return ?
6512}
6513
Jesse Halld0599582017-03-10 18:35:38 -08006514@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006515cmd VkResult vkQueuePresentKHR(
6516 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006517 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006518 queueObject := GetQueue(queue)
6519
6520 presentInfo := ?
6521 pPresentInfo[0] = presentInfo
6522
6523 return ?
6524}
6525
Jesse Halld0599582017-03-10 18:35:38 -08006526@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006527cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6528 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006529 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006530 VkDisplayPropertiesKHR* pProperties) {
6531 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6532 return ?
6533}
6534
Jesse Halld0599582017-03-10 18:35:38 -08006535@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006536cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6537 VkPhysicalDevice physicalDevice,
6538 u32* pPropertyCount,
6539 VkDisplayPlanePropertiesKHR* pProperties) {
6540 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6541 return ?
6542}
6543
Jesse Halld0599582017-03-10 18:35:38 -08006544@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006545cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6546 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006547 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006548 u32* pDisplayCount,
6549 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006550 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6551 return ?
6552}
6553
Jesse Halld0599582017-03-10 18:35:38 -08006554@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006555cmd VkResult vkGetDisplayModePropertiesKHR(
6556 VkPhysicalDevice physicalDevice,
6557 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006558 u32* pPropertyCount,
6559 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006560 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6561 return ?
6562}
6563
Jesse Halld0599582017-03-10 18:35:38 -08006564@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006565cmd VkResult vkCreateDisplayModeKHR(
6566 VkPhysicalDevice physicalDevice,
6567 VkDisplayKHR display,
6568 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006569 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006570 VkDisplayModeKHR* pMode) {
6571 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6572 return ?
6573}
6574
Jesse Halld0599582017-03-10 18:35:38 -08006575@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006576cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006577 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006578 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006579 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006580 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006581 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6582 return ?
6583}
6584
Jesse Halld0599582017-03-10 18:35:38 -08006585@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006586cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6587 VkInstance instance,
6588 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006589 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006590 VkSurfaceKHR* pSurface) {
6591 return ?
6592}
6593
Jesse Halld0599582017-03-10 18:35:38 -08006594@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006595cmd VkResult vkCreateSharedSwapchainsKHR(
6596 VkDevice device,
6597 u32 swapchainCount,
6598 const VkSwapchainCreateInfoKHR* pCreateInfos,
6599 const VkAllocationCallbacks* pAllocator,
6600 VkSwapchainKHR* pSwapchains) {
6601 return ?
6602}
6603
Jesse Halld0599582017-03-10 18:35:38 -08006604@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006605cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006606 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006607 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006608 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006609 VkSurfaceKHR* pSurface) {
6610 instanceObject := GetInstance(instance)
6611 return ?
6612}
6613
Jesse Halld0599582017-03-10 18:35:38 -08006614@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006615cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6616 VkPhysicalDevice physicalDevice,
6617 u32 queueFamilyIndex,
6618 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006619 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006620 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6621 return ?
6622}
6623
Jesse Halld0599582017-03-10 18:35:38 -08006624@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006625cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006626 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006627 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006628 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006629 VkSurfaceKHR* pSurface) {
6630 instanceObject := GetInstance(instance)
6631 return ?
6632}
6633
Jesse Halld0599582017-03-10 18:35:38 -08006634@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006635cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6636 VkPhysicalDevice physicalDevice,
6637 u32 queueFamilyIndex,
6638 platform.xcb_connection_t* connection,
6639 platform.xcb_visualid_t visual_id) {
6640 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6641 return ?
6642}
6643
Jesse Halld0599582017-03-10 18:35:38 -08006644@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006645cmd VkResult vkCreateWaylandSurfaceKHR(
6646 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006647 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006648 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006649 VkSurfaceKHR* pSurface) {
6650 instanceObject := GetInstance(instance)
6651 return ?
6652}
6653
Jesse Halld0599582017-03-10 18:35:38 -08006654@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006655cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6656 VkPhysicalDevice physicalDevice,
6657 u32 queueFamilyIndex,
6658 platform.wl_display* display) {
6659 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6660 return ?
6661}
6662
Jesse Halld0599582017-03-10 18:35:38 -08006663@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006664cmd VkResult vkCreateMirSurfaceKHR(
6665 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006666 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006667 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006668 VkSurfaceKHR* pSurface) {
6669 instanceObject := GetInstance(instance)
6670 return ?
6671}
6672
Jesse Halld0599582017-03-10 18:35:38 -08006673@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006674cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6675 VkPhysicalDevice physicalDevice,
6676 u32 queueFamilyIndex,
6677 platform.MirConnection* connection) {
6678 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6679 return ?
6680}
6681
Jesse Halld0599582017-03-10 18:35:38 -08006682@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006683cmd VkResult vkCreateAndroidSurfaceKHR(
6684 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006685 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006686 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006687 VkSurfaceKHR* pSurface) {
6688 instanceObject := GetInstance(instance)
6689 return ?
6690}
6691
Jesse Halld0599582017-03-10 18:35:38 -08006692@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006693cmd VkResult vkCreateWin32SurfaceKHR(
6694 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006695 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006696 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006697 VkSurfaceKHR* pSurface) {
6698 instanceObject := GetInstance(instance)
6699 return ?
6700}
6701
Jesse Halld0599582017-03-10 18:35:38 -08006702@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006703cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6704 VkPhysicalDevice physicalDevice,
6705 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006706 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006707 return ?
6708}
6709
Jesse Halld0599582017-03-10 18:35:38 -08006710@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006711cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6712 VkDevice device,
6713 VkFormat format,
6714 VkImageUsageFlags imageUsage,
6715 int* grallocUsage) {
6716 return ?
6717}
6718
Jesse Halld0599582017-03-10 18:35:38 -08006719@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006720cmd VkResult vkAcquireImageANDROID(
6721 VkDevice device,
6722 VkImage image,
6723 int nativeFenceFd,
6724 VkSemaphore semaphore,
6725 VkFence fence) {
6726 return ?
6727}
6728
Jesse Halld0599582017-03-10 18:35:38 -08006729@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006730cmd VkResult vkQueueSignalReleaseImageANDROID(
6731 VkQueue queue,
6732 u32 waitSemaphoreCount,
6733 const VkSemaphore* pWaitSemaphores,
6734 VkImage image,
6735 int* pNativeFenceFd) {
6736 return ?
6737}
6738
Jesse Halld0599582017-03-10 18:35:38 -08006739@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006740@external type void* PFN_vkDebugReportCallbackEXT
Jesse Halld0599582017-03-10 18:35:38 -08006741@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006742@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6743 VkDebugReportFlagsEXT flags,
6744 VkDebugReportObjectTypeEXT objectType,
6745 u64 object,
6746 platform.size_t location,
6747 s32 messageCode,
6748 const char* pLayerPrefix,
6749 const char* pMessage,
6750 void* pUserData) {
6751 return ?
6752}
6753
Jesse Halld0599582017-03-10 18:35:38 -08006754@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006755cmd VkResult vkCreateDebugReportCallbackEXT(
6756 VkInstance instance,
6757 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6758 const VkAllocationCallbacks* pAllocator,
6759 VkDebugReportCallbackEXT* pCallback) {
6760 return ?
6761}
6762
Jesse Halld0599582017-03-10 18:35:38 -08006763@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006764cmd void vkDestroyDebugReportCallbackEXT(
6765 VkInstance instance,
6766 VkDebugReportCallbackEXT callback,
6767 const VkAllocationCallbacks* pAllocator) {
6768}
6769
Jesse Halld0599582017-03-10 18:35:38 -08006770@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006771cmd void vkDebugReportMessageEXT(
6772 VkInstance instance,
6773 VkDebugReportFlagsEXT flags,
6774 VkDebugReportObjectTypeEXT objectType,
6775 u64 object,
6776 platform.size_t location,
6777 s32 messageCode,
6778 const char* pLayerPrefix,
6779 const char* pMessage) {
6780}
6781
Jesse Halld0599582017-03-10 18:35:38 -08006782@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006783cmd VkResult vkDebugMarkerSetObjectTagEXT(
6784 VkDevice device,
6785 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6786 return ?
6787}
6788
Jesse Halld0599582017-03-10 18:35:38 -08006789@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006790cmd VkResult vkDebugMarkerSetObjectNameEXT(
6791 VkDevice device,
6792 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6793 return ?
6794}
6795
Jesse Halld0599582017-03-10 18:35:38 -08006796@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006797cmd void vkCmdDebugMarkerBeginEXT(
6798 VkCommandBuffer commandBuffer,
6799 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6800}
6801
Jesse Halld0599582017-03-10 18:35:38 -08006802@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006803cmd void vkCmdDebugMarkerEndEXT(
6804 VkCommandBuffer commandBuffer) {
6805}
6806
Jesse Halld0599582017-03-10 18:35:38 -08006807@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006808cmd void vkCmdDebugMarkerInsertEXT(
6809 VkCommandBuffer commandBuffer,
6810 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6811}
6812
Jesse Halld0599582017-03-10 18:35:38 -08006813@extension("VK_AMD_draw_indirect_count") // 34
Jesse Halleb02c472017-02-24 15:13:45 -08006814cmd void vkCmdDrawIndirectCountAMD(
6815 VkCommandBuffer commandBuffer,
6816 VkBuffer buffer,
6817 VkDeviceSize offset,
6818 VkBuffer countBuffer,
6819 VkDeviceSize countBufferOffset,
6820 u32 maxDrawCount,
6821 u32 stride) {
6822}
6823
Jesse Halld0599582017-03-10 18:35:38 -08006824@extension("VK_AMD_draw_indirect_count") // 34
Jesse Halleb02c472017-02-24 15:13:45 -08006825cmd void vkCmdDrawIndexedIndirectCountAMD(
6826 VkCommandBuffer commandBuffer,
6827 VkBuffer buffer,
6828 VkDeviceSize offset,
6829 VkBuffer countBuffer,
6830 VkDeviceSize countBufferOffset,
6831 u32 maxDrawCount,
6832 u32 stride) {
6833}
6834
Jesse Halld0599582017-03-10 18:35:38 -08006835@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08006836cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6837 VkPhysicalDevice physicalDevice,
6838 VkFormat format,
6839 VkImageType type,
6840 VkImageTiling tiling,
6841 VkImageUsageFlags usage,
6842 VkImageCreateFlags flags,
6843 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6844 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6845 return ?
6846}
6847
Jesse Halld0599582017-03-10 18:35:38 -08006848@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08006849cmd VkResult vkGetMemoryWin32HandleNV(
6850 VkDevice device,
6851 VkDeviceMemory memory,
6852 VkExternalMemoryHandleTypeFlagsNV handleType,
6853 platform.HANDLE* pHandle) {
6854 return ?
6855}
6856
Jesse Halld0599582017-03-10 18:35:38 -08006857@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006858cmd void vkGetPhysicalDeviceFeatures2KHR(
6859 VkPhysicalDevice physicalDevice,
6860 VkPhysicalDeviceFeatures2KHR* pFeatures) {
6861}
6862
Jesse Halld0599582017-03-10 18:35:38 -08006863@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006864cmd void vkGetPhysicalDeviceProperties2KHR(
6865 VkPhysicalDevice physicalDevice,
6866 VkPhysicalDeviceProperties2KHR* pProperties) {
6867}
6868
Jesse Halld0599582017-03-10 18:35:38 -08006869@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006870cmd void vkGetPhysicalDeviceFormatProperties2KHR(
6871 VkPhysicalDevice physicalDevice,
6872 VkFormat format,
6873 VkFormatProperties2KHR* pFormatProperties) {
6874}
6875
Jesse Halld0599582017-03-10 18:35:38 -08006876@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006877cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
6878 VkPhysicalDevice physicalDevice,
6879 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
6880 VkImageFormatProperties2KHR* pImageFormatProperties) {
6881 return ?
6882}
6883
Jesse Halld0599582017-03-10 18:35:38 -08006884@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006885cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
6886 VkPhysicalDevice physicalDevice,
6887 u32* pQueueFamilyPropertyCount,
6888 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
6889}
6890
Jesse Halld0599582017-03-10 18:35:38 -08006891@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006892cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
6893 VkPhysicalDevice physicalDevice,
6894 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
6895}
6896
Jesse Halld0599582017-03-10 18:35:38 -08006897@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006898cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
6899 VkPhysicalDevice physicalDevice,
6900 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
6901 u32* pPropertyCount,
6902 VkSparseImageFormatProperties2KHR* pProperties) {
6903}
6904
Jesse Halld0599582017-03-10 18:35:38 -08006905@extension("VK_KHX_device_group") // 61
6906cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
6907 VkDevice device,
6908 u32 heapIndex,
6909 u32 localDeviceIndex,
6910 u32 remoteDeviceIndex,
6911 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
6912}
6913
6914@extension("VK_KHX_device_group") // 61
6915cmd VkResult vkBindBufferMemory2KHX(
6916 VkDevice device,
6917 u32 bindInfoCount,
6918 const VkBindBufferMemoryInfoKHX* pBindInfos) {
6919 return ?
6920}
6921
6922@extension("VK_KHX_device_group") // 61
6923cmd VkResult vkBindImageMemory2KHX(
6924 VkDevice device,
6925 u32 bindInfoCount,
6926 const VkBindImageMemoryInfoKHX* pBindInfos) {
6927 return ?
6928}
6929
6930@extension("VK_KHX_device_group") // 61
6931cmd void vkCmdSetDeviceMaskKHX(
6932 VkCommandBuffer commandBuffer,
6933 u32 deviceMask) {
6934}
6935
6936@extension("VK_KHX_device_group") // 61
6937cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
6938 VkDevice device,
6939 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
6940 return ?
6941}
6942
6943@extension("VK_KHX_device_group") // 61
6944cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
6945 VkDevice device,
6946 VkSurfaceKHR surface,
6947 VkDeviceGroupPresentModeFlagsKHX* pModes) {
6948 return ?
6949}
6950
6951@extension("VK_KHX_device_group") // 61
6952cmd VkResult vkAcquireNextImage2KHX(
6953 VkDevice device,
6954 const VkAcquireNextImageInfoKHX* pAcquireInfo,
6955 u32* pImageIndex) {
6956 return ?
6957}
6958
6959@extension("VK_KHX_device_group") // 61
6960cmd void vkCmdDispatchBaseKHX(
6961 VkCommandBuffer commandBuffer,
6962 u32 baseGroupX,
6963 u32 baseGroupY,
6964 u32 baseGroupZ,
6965 u32 groupCountX,
6966 u32 groupCountY,
6967 u32 groupCountZ) {
6968}
6969
6970@extension("VK_KHX_device_group") // 61
6971cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
6972 VkPhysicalDevice physicalDevice,
6973 VkSurfaceKHR surface,
6974 u32* pRectCount,
6975 VkRect2D* pRects) {
6976 return ?
6977}
6978
6979@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08006980cmd VkResult vkCreateViSurfaceNN(
6981 VkInstance instance,
6982 const VkViSurfaceCreateInfoNN* pCreateInfo,
6983 const VkAllocationCallbacks* pAllocator,
6984 VkSurfaceKHR* pSurface) {
6985 return ?
6986}
6987
Jesse Halld0599582017-03-10 18:35:38 -08006988@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08006989cmd void vkTrimCommandPoolKHR(
6990 VkDevice device,
6991 VkCommandPool commandPool,
6992 VkCommandPoolTrimFlagsKHR flags) {
6993}
6994
Jesse Halld0599582017-03-10 18:35:38 -08006995@extension("VK_KHX_device_group_creation") // 71
6996cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
6997 VkInstance instance,
6998 u32* pPhysicalDeviceGroupCount,
6999 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7000 return ?
7001}
7002
7003@extension("VK_KHX_external_memory_capabilities") // 72
7004cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7005 VkPhysicalDevice physicalDevice,
7006 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7007 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7008}
7009
Jesse Halld0599582017-03-10 18:35:38 -08007010@extension("VK_KHX_external_memory_win32") // 74
7011cmd VkResult vkGetMemoryWin32HandleKHX(
7012 VkDevice device,
7013 VkDeviceMemory memory,
7014 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7015 platform.HANDLE* pHandle) {
7016 return ?
7017}
7018
7019@extension("VK_KHX_external_memory_win32") // 74
7020cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7021 VkDevice device,
7022 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7023 platform.HANDLE handle,
7024 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7025 return ?
7026}
7027
7028@extension("VK_KHX_external_memory_fd") // 75
7029cmd VkResult vkGetMemoryFdKHX(
7030 VkDevice device,
7031 VkDeviceMemory memory,
7032 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7033 s32* pFd) {
7034 return ?
7035}
7036
7037@extension("VK_KHX_external_memory_fd") // 75
7038cmd VkResult vkGetMemoryFdPropertiesKHX(
7039 VkDevice device,
7040 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7041 s32 fd,
7042 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7043 return ?
7044}
7045
7046@extension("VK_KHX_external_semaphore_capabilities") // 77
7047cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7048 VkPhysicalDevice physicalDevice,
7049 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7050 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7051}
7052
7053@extension("VK_KHX_external_semaphore_win32") // 79
7054cmd VkResult vkImportSemaphoreWin32HandleKHX(
7055 VkDevice device,
7056 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7057 return ?
7058}
7059
7060@extension("VK_KHX_external_semaphore_win32") // 79
7061cmd VkResult vkGetSemaphoreWin32HandleKHX(
7062 VkDevice device,
7063 VkSemaphore semaphore,
7064 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7065 platform.HANDLE* pHandle) {
7066 return ?
7067}
7068
7069@extension("VK_KHX_external_semaphore_fd") // 80
7070cmd VkResult vkImportSemaphoreFdKHX(
7071 VkDevice device,
7072 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7073 return ?
7074}
7075
7076@extension("VK_KHX_external_semaphore_fd") // 80
7077cmd VkResult vkGetSemaphoreFdKHX(
7078 VkDevice device,
7079 VkSemaphore semaphore,
7080 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7081 s32* pFd) {
7082 return ?
7083}
7084
7085@extension("VK_KHR_push_descriptor") // 81
7086cmd void vkCmdPushDescriptorSetKHR(
7087 VkCommandBuffer commandBuffer,
7088 VkPipelineBindPoint pipelineBindPoint,
7089 VkPipelineLayout layout,
7090 u32 set,
7091 u32 descriptorWriteCount,
7092 const VkWriteDescriptorSet* pDescriptorWrites) {
7093}
7094
7095@extension("VK_KHR_descriptor_update_template") // 86
7096cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7097 VkDevice device,
7098 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7099 const VkAllocationCallbacks* pAllocator,
7100 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7101 return ?
7102}
7103
7104@extension("VK_KHR_descriptor_update_template") // 86
7105cmd void vkDestroyDescriptorUpdateTemplateKHR(
7106 VkDevice device,
7107 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7108 const VkAllocationCallbacks* pAllocator) {
7109}
7110
7111@extension("VK_KHR_descriptor_update_template") // 86
7112cmd void vkUpdateDescriptorSetWithTemplateKHR(
7113 VkDevice device,
7114 VkDescriptorSet descriptorSet,
7115 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7116 const void* pData) {
7117}
7118
7119@extension("VK_KHR_descriptor_update_template") // 86
7120cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7121 VkCommandBuffer commandBuffer,
7122 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7123 VkPipelineLayout layout,
7124 u32 set,
7125 const void* pData) {
7126}
7127
7128@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007129cmd void vkCmdProcessCommandsNVX(
7130 VkCommandBuffer commandBuffer,
7131 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7132}
7133
Jesse Halld0599582017-03-10 18:35:38 -08007134@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007135cmd void vkCmdReserveSpaceForCommandsNVX(
7136 VkCommandBuffer commandBuffer,
7137 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7138}
7139
Jesse Halld0599582017-03-10 18:35:38 -08007140@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007141cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7142 VkDevice device,
7143 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7144 const VkAllocationCallbacks* pAllocator,
7145 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7146 return ?
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 void vkDestroyIndirectCommandsLayoutNVX(
7151 VkDevice device,
7152 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7153 const VkAllocationCallbacks* pAllocator) {
7154}
7155
Jesse Halld0599582017-03-10 18:35:38 -08007156@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007157cmd VkResult vkCreateObjectTableNVX(
7158 VkDevice device,
7159 const VkObjectTableCreateInfoNVX* pCreateInfo,
7160 const VkAllocationCallbacks* pAllocator,
7161 VkObjectTableNVX* pObjectTable) {
7162 return ?
7163}
7164
Jesse Halld0599582017-03-10 18:35:38 -08007165@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007166cmd void vkDestroyObjectTableNVX(
7167 VkDevice device,
7168 VkObjectTableNVX objectTable,
7169 const VkAllocationCallbacks* pAllocator) {
7170}
7171
Jesse Halld0599582017-03-10 18:35:38 -08007172@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007173cmd VkResult vkRegisterObjectsNVX(
7174 VkDevice device,
7175 VkObjectTableNVX objectTable,
7176 u32 objectCount,
7177 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7178 const u32* pObjectIndices) {
7179 return ?
7180}
7181
Jesse Halld0599582017-03-10 18:35:38 -08007182@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007183cmd VkResult vkUnregisterObjectsNVX(
7184 VkDevice device,
7185 VkObjectTableNVX objectTable,
7186 u32 objectCount,
7187 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7188 const u32* pObjectIndices) {
7189 return ?
7190}
7191
Jesse Halld0599582017-03-10 18:35:38 -08007192@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007193cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7194 VkPhysicalDevice physicalDevice,
7195 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7196 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7197}
Jesse Halld27f6aa2015-08-15 17:58:48 -07007198
Jesse Halld0599582017-03-10 18:35:38 -08007199@extension("VK_NV_clip_space_w_scaling") // 88
7200cmd void vkCmdSetViewportWScalingNV(
7201 VkCommandBuffer commandBuffer,
7202 u32 firstViewport,
7203 u32 viewportCount,
7204 const VkViewportWScalingNV* pViewportWScalings) {
7205}
7206
7207@extension("VK_EXT_direct_mode_display") // 89
Jesse Hall08e2f482017-03-06 15:22:17 -08007208cmd VkResult vkReleaseDisplayEXT(
7209 VkPhysicalDevice physicalDevice,
7210 VkDisplayKHR display) {
7211 return ?
7212}
7213
Jesse Halld0599582017-03-10 18:35:38 -08007214@extension("VK_EXT_acquire_xlib_display") // 90
Jesse Hall08e2f482017-03-06 15:22:17 -08007215cmd VkResult vkAcquireXlibDisplayEXT(
7216 VkPhysicalDevice physicalDevice,
7217 platform.Display* dpy,
7218 VkDisplayKHR display) {
7219 return ?
7220}
7221
Jesse Halld0599582017-03-10 18:35:38 -08007222@extension("VK_EXT_acquire_xlib_display") // 90
Jesse Hall08e2f482017-03-06 15:22:17 -08007223cmd VkResult vkGetRandROutputDisplayEXT(
7224 VkPhysicalDevice physicalDevice,
7225 platform.Display* dpy,
7226 platform.RROutput rrOutput,
7227 VkDisplayKHR* pDisplay) {
7228 return ?
7229}
7230
Jesse Halld0599582017-03-10 18:35:38 -08007231@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08007232cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7233 VkPhysicalDevice physicalDevice,
7234 VkSurfaceKHR surface,
7235 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7236 return ?
7237}
7238
Jesse Halld0599582017-03-10 18:35:38 -08007239@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007240cmd VkResult vkDisplayPowerControlEXT(
7241 VkDevice device,
7242 VkDisplayKHR display,
7243 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7244 return ?
7245}
7246
Jesse Halld0599582017-03-10 18:35:38 -08007247@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007248cmd VkResult vkRegisterDeviceEventEXT(
7249 VkDevice device,
7250 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7251 const VkAllocationCallbacks* pAllocator,
7252 VkFence* pFence) {
7253 return ?
7254}
7255
Jesse Halld0599582017-03-10 18:35:38 -08007256@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007257cmd VkResult vkRegisterDisplayEventEXT(
7258 VkDevice device,
7259 VkDisplayKHR display,
7260 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7261 const VkAllocationCallbacks* pAllocator,
7262 VkFence* pFence) {
7263 return ?
7264}
7265
Jesse Halld0599582017-03-10 18:35:38 -08007266@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007267cmd VkResult vkGetSwapchainCounterEXT(
7268 VkDevice device,
7269 VkSwapchainKHR swapchain,
7270 VkSurfaceCounterFlagBitsEXT counter,
7271 u64* pCounterValue) {
7272 return ?
7273}
7274
Jesse Halle8ec6a22017-03-10 21:01:57 -08007275@extension("VK_GOOGLE_display_timing") // 93
7276cmd VkResult vkGetRefreshCycleDurationGOOGLE(
7277 VkDevice device,
7278 VkSwapchainKHR swapchain,
7279 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
7280 return ?
7281}
7282
7283@extension("VK_GOOGLE_display_timing") // 93
7284cmd VkResult vkGetPastPresentationTimingGOOGLE(
7285 VkDevice device,
7286 VkSwapchainKHR swapchain,
7287 u32* pPresentationTimingCount,
7288 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
7289 return ?
7290}
7291
Jesse Halld0599582017-03-10 18:35:38 -08007292@extension("VK_EXT_discard_rectangles") // 100
7293cmd void vkCmdSetDiscardRectangleEXT(
7294 VkCommandBuffer commandBuffer,
7295 u32 firstDiscardRectangle,
7296 u32 discardRectangleCount,
7297 const VkRect2D* pDiscardRectangles) {
7298}
7299
Jesse Halle8ec6a22017-03-10 21:01:57 -08007300@extension("VK_EXT_hdr_metadata") // 106
7301cmd void vkSetHdrMetadataEXT(
7302 VkDevice device,
7303 u32 swapchainCount,
7304 const VkSwapchainKHR* pSwapchains,
7305 const VkHdrMetadataEXT* pMetadata) {
7306}
7307
Jesse Halld0599582017-03-10 18:35:38 -08007308@extension("VK_MVK_ios_surface") // 123
7309cmd VkResult vkCreateIOSSurfaceMVK(
7310 VkInstance instance,
7311 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7312 const VkAllocationCallbacks* pAllocator,
7313 VkSurfaceKHR* pSurface) {
7314 return ?
7315}
7316
7317@extension("VK_MVK_macos_surface") // 124
7318cmd VkResult vkCreateMacOSSurfaceMVK(
7319 VkInstance instance,
7320 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7321 const VkAllocationCallbacks* pAllocator,
7322 VkSurfaceKHR* pSurface) {
7323 return ?
7324}
7325
Jesse Halld27f6aa2015-08-15 17:58:48 -07007326////////////////
7327// Validation //
7328////////////////
7329
7330extern void validate(string layerName, bool condition, string message)
7331
7332
7333/////////////////////////////
7334// Internal State Tracking //
7335/////////////////////////////
7336
7337StateObject State
7338
7339@internal class StateObject {
7340 // Dispatchable objects.
7341 map!(VkInstance, ref!InstanceObject) Instances
7342 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7343 map!(VkDevice, ref!DeviceObject) Devices
7344 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007345 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007346
7347 // Non-dispatchable objects.
7348 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7349 map!(VkBuffer, ref!BufferObject) Buffers
7350 map!(VkBufferView, ref!BufferViewObject) BufferViews
7351 map!(VkImage, ref!ImageObject) Images
7352 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007353 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007354 map!(VkPipeline, ref!PipelineObject) Pipelines
7355 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7356 map!(VkSampler, ref!SamplerObject) Samplers
7357 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7358 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7359 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007360 map!(VkFence, ref!FenceObject) Fences
7361 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7362 map!(VkEvent, ref!EventObject) Events
7363 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7364 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7365 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7366 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007367 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007368 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007369 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007370}
7371
7372@internal class InstanceObject {
7373}
7374
7375@internal class PhysicalDeviceObject {
7376 VkInstance instance
7377}
7378
7379@internal class DeviceObject {
7380 VkPhysicalDevice physicalDevice
7381}
7382
7383@internal class QueueObject {
7384 VkDevice device
7385 VkQueueFlags flags
7386}
7387
Jesse Hall3fbc8562015-11-29 22:10:52 -08007388@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007389 VkDevice device
7390 map!(u64, VkDeviceMemory) boundObjects
7391 VkQueueFlags queueFlags
7392}
7393
7394@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007395 VkDevice device
7396 VkDeviceSize allocationSize
7397 map!(u64, VkDeviceSize) boundObjects
7398 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007399}
7400
7401@internal class BufferObject {
7402 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007403 VkDeviceMemory memory
7404 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007405}
7406
7407@internal class BufferViewObject {
7408 VkDevice device
7409 VkBuffer buffer
7410}
7411
7412@internal class ImageObject {
7413 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007414 VkDeviceMemory memory
7415 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007416}
7417
7418@internal class ImageViewObject {
7419 VkDevice device
7420 VkImage image
7421}
7422
Jesse Halld27f6aa2015-08-15 17:58:48 -07007423@internal class ShaderObject {
7424 VkDevice device
7425}
7426
7427@internal class ShaderModuleObject {
7428 VkDevice device
7429}
7430
7431@internal class PipelineObject {
7432 VkDevice device
7433}
7434
7435@internal class PipelineLayoutObject {
7436 VkDevice device
7437}
7438
7439@internal class SamplerObject {
7440 VkDevice device
7441}
7442
7443@internal class DescriptorSetObject {
7444 VkDevice device
7445}
7446
7447@internal class DescriptorSetLayoutObject {
7448 VkDevice device
7449}
7450
7451@internal class DescriptorPoolObject {
7452 VkDevice device
7453}
7454
Jesse Halld27f6aa2015-08-15 17:58:48 -07007455@internal class FenceObject {
7456 VkDevice device
7457 bool signaled
7458}
7459
7460@internal class SemaphoreObject {
7461 VkDevice device
7462}
7463
7464@internal class EventObject {
7465 VkDevice device
7466}
7467
7468@internal class QueryPoolObject {
7469 VkDevice device
7470}
7471
7472@internal class FramebufferObject {
7473 VkDevice device
7474}
7475
7476@internal class RenderPassObject {
7477 VkDevice device
7478}
7479
7480@internal class PipelineCacheObject {
7481 VkDevice device
7482}
7483
Jesse Hall3fbc8562015-11-29 22:10:52 -08007484@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007485 VkDevice device
7486}
7487
Jesse Hall1356b0d2015-11-23 17:24:58 -08007488@internal class SurfaceObject {
7489 VkInstance instance
7490}
7491
Michael Lentine88594d72015-11-12 12:49:45 -08007492@internal class SwapchainObject {
7493 VkDevice device
7494}
7495
Jesse Halld27f6aa2015-08-15 17:58:48 -07007496macro ref!InstanceObject GetInstance(VkInstance instance) {
7497 assert(instance in State.Instances)
7498 return State.Instances[instance]
7499}
7500
7501macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7502 assert(physicalDevice in State.PhysicalDevices)
7503 return State.PhysicalDevices[physicalDevice]
7504}
7505
7506macro ref!DeviceObject GetDevice(VkDevice device) {
7507 assert(device in State.Devices)
7508 return State.Devices[device]
7509}
7510
7511macro ref!QueueObject GetQueue(VkQueue queue) {
7512 assert(queue in State.Queues)
7513 return State.Queues[queue]
7514}
7515
Jesse Hall3fbc8562015-11-29 22:10:52 -08007516macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7517 assert(commandBuffer in State.CommandBuffers)
7518 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007519}
7520
Jesse Hall3fbc8562015-11-29 22:10:52 -08007521macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7522 assert(memory in State.DeviceMemories)
7523 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007524}
7525
7526macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7527 assert(buffer in State.Buffers)
7528 return State.Buffers[buffer]
7529}
7530
7531macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7532 assert(bufferView in State.BufferViews)
7533 return State.BufferViews[bufferView]
7534}
7535
7536macro ref!ImageObject GetImage(VkImage image) {
7537 assert(image in State.Images)
7538 return State.Images[image]
7539}
7540
7541macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7542 assert(imageView in State.ImageViews)
7543 return State.ImageViews[imageView]
7544}
7545
Jesse Halld27f6aa2015-08-15 17:58:48 -07007546macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7547 assert(shaderModule in State.ShaderModules)
7548 return State.ShaderModules[shaderModule]
7549}
7550
7551macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7552 assert(pipeline in State.Pipelines)
7553 return State.Pipelines[pipeline]
7554}
7555
7556macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7557 assert(pipelineLayout in State.PipelineLayouts)
7558 return State.PipelineLayouts[pipelineLayout]
7559}
7560
7561macro ref!SamplerObject GetSampler(VkSampler sampler) {
7562 assert(sampler in State.Samplers)
7563 return State.Samplers[sampler]
7564}
7565
7566macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7567 assert(descriptorSet in State.DescriptorSets)
7568 return State.DescriptorSets[descriptorSet]
7569}
7570
7571macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7572 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7573 return State.DescriptorSetLayouts[descriptorSetLayout]
7574}
7575
7576macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7577 assert(descriptorPool in State.DescriptorPools)
7578 return State.DescriptorPools[descriptorPool]
7579}
7580
Jesse Halld27f6aa2015-08-15 17:58:48 -07007581macro ref!FenceObject GetFence(VkFence fence) {
7582 assert(fence in State.Fences)
7583 return State.Fences[fence]
7584}
7585
7586macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7587 assert(semaphore in State.Semaphores)
7588 return State.Semaphores[semaphore]
7589}
7590
7591macro ref!EventObject GetEvent(VkEvent event) {
7592 assert(event in State.Events)
7593 return State.Events[event]
7594}
7595
7596macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7597 assert(queryPool in State.QueryPools)
7598 return State.QueryPools[queryPool]
7599}
7600
7601macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7602 assert(framebuffer in State.Framebuffers)
7603 return State.Framebuffers[framebuffer]
7604}
7605
7606macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7607 assert(renderPass in State.RenderPasses)
7608 return State.RenderPasses[renderPass]
7609}
7610
7611macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7612 assert(pipelineCache in State.PipelineCaches)
7613 return State.PipelineCaches[pipelineCache]
7614}
7615
Jesse Hall3fbc8562015-11-29 22:10:52 -08007616macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7617 assert(commandPool in State.CommandPools)
7618 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007619}
Michael Lentine88594d72015-11-12 12:49:45 -08007620
Jesse Hall1356b0d2015-11-23 17:24:58 -08007621macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7622 assert(surface in State.Surfaces)
7623 return State.Surfaces[surface]
7624}
7625
Michael Lentine88594d72015-11-12 12:49:45 -08007626macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7627 assert(swapchain in State.Swapchains)
7628 return State.Swapchains[swapchain]
7629}
Jesse Halld8bade02015-11-24 10:24:18 -08007630
7631macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7632 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7633}