blob: 06167111665aeca33120c2de27c13efa23a4b514 [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 Hall2c677d52017-03-20 13:09:19 -070031define VERSION_PATCH 46
Jesse Halld27f6aa2015-08-15 17:58:48 -070032
33// API limits
Jesse Hall65ab5522015-11-30 00:07:16 -080034define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
35define VK_UUID_SIZE 16
36define VK_MAX_EXTENSION_NAME_SIZE 256
37define VK_MAX_DESCRIPTION_SIZE 256
38define VK_MAX_MEMORY_TYPES 32
39define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types.
Jesse 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 Hall2c677d52017-03-20 13:09:19 -070096@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 6
Jesse Hall715b86a2016-01-16 16:34:29 -080097@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
98
Jesse Halleb02c472017-02-24 15:13:45 -080099// 13
Jesse Hall26763382016-05-20 07:13:52 -0700100@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
101@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
102
Jesse Halleb02c472017-02-24 15:13:45 -0800103// 15
Jesse Hall26763382016-05-20 07:13:52 -0700104@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
105@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
106
Jesse Halleb02c472017-02-24 15:13:45 -0800107// 16
Jesse Hall26763382016-05-20 07:13:52 -0700108@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
109@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
110
Jesse Halleb02c472017-02-24 15:13:45 -0800111// 19
Jesse Hall26763382016-05-20 07:13:52 -0700112@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
113@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
114
Jesse Halleb02c472017-02-24 15:13:45 -0800115// 21
Jesse 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
Jesse Hall2c677d52017-03-20 13:09:19 -0700251// 85
252@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
253@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
254
Jesse Halld0599582017-03-10 18:35:38 -0800255// 86
256@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
257@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
258
Jesse Halleb02c472017-02-24 15:13:45 -0800259// 87
260@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
261@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
262
Jesse Halld0599582017-03-10 18:35:38 -0800263// 88
264@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
265@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
266
Jesse Hall08e2f482017-03-06 15:22:17 -0800267// 89
268@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
269@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
270
271// 90
272@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
273@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
274
275// 91
276@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
277@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
278
279// 92
280@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
281@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
282
Jesse Halle8ec6a22017-03-10 21:01:57 -0800283// 93
284@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
285@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
286
Jesse Halld0599582017-03-10 18:35:38 -0800287// 95
288@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
289@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
290
291// 96
292@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
293@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
294
295// 97
296@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
297@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
298
299// 98
300@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
301@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
302
303// 99
304@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
305@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
306
307// 100
308@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
309@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
310
Jesse Hall2c677d52017-03-20 13:09:19 -0700311// 105
312@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 2
313@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
314
Jesse Halle8ec6a22017-03-10 21:01:57 -0800315// 106
316@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
317@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
318
Jesse Halld0599582017-03-10 18:35:38 -0800319// 123
320@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
321@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
322
323// 124
324@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
325@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
326
Jesse Halld27f6aa2015-08-15 17:58:48 -0700327/////////////
328// Types //
329/////////////
330
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700331type u32 VkBool32
332type u32 VkFlags
333type u64 VkDeviceSize
334type u32 VkSampleMask
335
Jesse Halld27f6aa2015-08-15 17:58:48 -0700336/// Dispatchable handle types.
337@dispatchHandle type u64 VkInstance
338@dispatchHandle type u64 VkPhysicalDevice
339@dispatchHandle type u64 VkDevice
340@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800341@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700342
343/// Non dispatchable handle types.
344@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800345@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700346@nonDispatchHandle type u64 VkBuffer
347@nonDispatchHandle type u64 VkBufferView
348@nonDispatchHandle type u64 VkImage
349@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700350@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700351@nonDispatchHandle type u64 VkPipeline
352@nonDispatchHandle type u64 VkPipelineLayout
353@nonDispatchHandle type u64 VkSampler
354@nonDispatchHandle type u64 VkDescriptorSet
355@nonDispatchHandle type u64 VkDescriptorSetLayout
356@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700357@nonDispatchHandle type u64 VkFence
358@nonDispatchHandle type u64 VkSemaphore
359@nonDispatchHandle type u64 VkEvent
360@nonDispatchHandle type u64 VkQueryPool
361@nonDispatchHandle type u64 VkFramebuffer
362@nonDispatchHandle type u64 VkRenderPass
363@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800364
Jesse Halld0599582017-03-10 18:35:38 -0800365// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800366@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800367
Jesse Halld0599582017-03-10 18:35:38 -0800368// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800369@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800370
Jesse Halld0599582017-03-10 18:35:38 -0800371// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800372@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
373@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700374
Jesse Halld0599582017-03-10 18:35:38 -0800375// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800376@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
377
Jesse Halld0599582017-03-10 18:35:38 -0800378// 86
379@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
380
381// 87
Jesse Halleb02c472017-02-24 15:13:45 -0800382@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
383@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
384
Jesse Halld27f6aa2015-08-15 17:58:48 -0700385
386/////////////
387// Enums //
388/////////////
389
390enum VkImageLayout {
391 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
392 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
393 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
394 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
395 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
396 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 -0800397 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
398 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 -0700399 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800400
Jesse Halld0599582017-03-10 18:35:38 -0800401 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800402 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700403}
404
405enum VkAttachmentLoadOp {
406 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
407 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
408 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
409}
410
411enum VkAttachmentStoreOp {
412 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
413 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
414}
415
416enum VkImageType {
417 VK_IMAGE_TYPE_1D = 0x00000000,
418 VK_IMAGE_TYPE_2D = 0x00000001,
419 VK_IMAGE_TYPE_3D = 0x00000002,
420}
421
422enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800423 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
424 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700425}
426
427enum VkImageViewType {
428 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
429 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
430 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
431 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
432 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
433 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
434 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
435}
436
Jesse Hall3fbc8562015-11-29 22:10:52 -0800437enum VkCommandBufferLevel {
438 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
439 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700440}
441
Jesse Hall65ab5522015-11-30 00:07:16 -0800442enum VkComponentSwizzle {
443 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
444 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
445 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
446 VK_COMPONENT_SWIZZLE_R = 0x00000003,
447 VK_COMPONENT_SWIZZLE_G = 0x00000004,
448 VK_COMPONENT_SWIZZLE_B = 0x00000005,
449 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700450}
451
452enum VkDescriptorType {
453 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
454 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
455 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
456 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
457 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
458 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
459 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
460 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
461 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
462 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
463 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
464}
465
Jesse Halld27f6aa2015-08-15 17:58:48 -0700466enum VkQueryType {
467 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
468 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800469 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700470}
471
Jesse Halld27f6aa2015-08-15 17:58:48 -0700472enum VkBorderColor {
473 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
474 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
475 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
476 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
477 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
478 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
479}
480
481enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800482 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
483 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700484}
485
486enum VkPrimitiveTopology {
487 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
488 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
489 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
490 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
491 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
492 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800493 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
494 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
495 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
496 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800497 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700498}
499
500enum VkSharingMode {
501 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
502 VK_SHARING_MODE_CONCURRENT = 0x00000001,
503}
504
505enum VkIndexType {
506 VK_INDEX_TYPE_UINT16 = 0x00000000,
507 VK_INDEX_TYPE_UINT32 = 0x00000001,
508}
509
Jesse Hall23ff73f2015-11-29 14:36:39 -0800510enum VkFilter {
511 VK_FILTER_NEAREST = 0x00000000,
512 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700513
Jesse Halld0599582017-03-10 18:35:38 -0800514 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700515 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700516}
517
Jesse Hall23ff73f2015-11-29 14:36:39 -0800518enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800519 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
520 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700521}
522
Jesse Hall23ff73f2015-11-29 14:36:39 -0800523enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800524 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
525 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
526 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
527 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
528 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700529}
530
531enum VkCompareOp {
532 VK_COMPARE_OP_NEVER = 0x00000000,
533 VK_COMPARE_OP_LESS = 0x00000001,
534 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800535 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700536 VK_COMPARE_OP_GREATER = 0x00000004,
537 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800538 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700539 VK_COMPARE_OP_ALWAYS = 0x00000007,
540}
541
Jesse Hall65ab5522015-11-30 00:07:16 -0800542enum VkPolygonMode {
543 VK_POLYGON_MODE_FILL = 0x00000000,
544 VK_POLYGON_MODE_LINE = 0x00000001,
545 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700546}
547
548enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800549 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
550 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700551}
552
Jesse Hall65ab5522015-11-30 00:07:16 -0800553enum VkBlendFactor {
554 VK_BLEND_FACTOR_ZERO = 0x00000000,
555 VK_BLEND_FACTOR_ONE = 0x00000001,
556 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
557 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
558 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
559 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
560 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
561 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
562 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
563 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
564 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
565 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
566 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
567 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
568 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
569 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
570 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
571 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
572 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700573}
574
575enum VkBlendOp {
576 VK_BLEND_OP_ADD = 0x00000000,
577 VK_BLEND_OP_SUBTRACT = 0x00000001,
578 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
579 VK_BLEND_OP_MIN = 0x00000003,
580 VK_BLEND_OP_MAX = 0x00000004,
581}
582
583enum VkStencilOp {
584 VK_STENCIL_OP_KEEP = 0x00000000,
585 VK_STENCIL_OP_ZERO = 0x00000001,
586 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800587 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
588 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700589 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800590 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
591 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700592}
593
594enum VkLogicOp {
595 VK_LOGIC_OP_CLEAR = 0x00000000,
596 VK_LOGIC_OP_AND = 0x00000001,
597 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
598 VK_LOGIC_OP_COPY = 0x00000003,
599 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800600 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700601 VK_LOGIC_OP_XOR = 0x00000006,
602 VK_LOGIC_OP_OR = 0x00000007,
603 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800604 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700605 VK_LOGIC_OP_INVERT = 0x0000000a,
606 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
607 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
608 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
609 VK_LOGIC_OP_NAND = 0x0000000e,
610 VK_LOGIC_OP_SET = 0x0000000f,
611}
612
Jesse Hall3fbc8562015-11-29 22:10:52 -0800613enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800614 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800615 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
616 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
617 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
618 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800619}
620
Jesse Hall3fbc8562015-11-29 22:10:52 -0800621enum VkInternalAllocationType {
622 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700623}
624
625enum VkPhysicalDeviceType {
626 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
627 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
628 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
629 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
630 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
631}
632
Jesse Hall65ab5522015-11-30 00:07:16 -0800633enum VkVertexInputRate {
634 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
635 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700636}
637
638/// Vulkan format definitions
639enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800640 VK_FORMAT_UNDEFINED = 0,
641 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
642 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
643 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
644 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
645 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
646 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
647 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
648 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
649 VK_FORMAT_R8_UNORM = 9,
650 VK_FORMAT_R8_SNORM = 10,
651 VK_FORMAT_R8_USCALED = 11,
652 VK_FORMAT_R8_SSCALED = 12,
653 VK_FORMAT_R8_UINT = 13,
654 VK_FORMAT_R8_SINT = 14,
655 VK_FORMAT_R8_SRGB = 15,
656 VK_FORMAT_R8G8_UNORM = 16,
657 VK_FORMAT_R8G8_SNORM = 17,
658 VK_FORMAT_R8G8_USCALED = 18,
659 VK_FORMAT_R8G8_SSCALED = 19,
660 VK_FORMAT_R8G8_UINT = 20,
661 VK_FORMAT_R8G8_SINT = 21,
662 VK_FORMAT_R8G8_SRGB = 22,
663 VK_FORMAT_R8G8B8_UNORM = 23,
664 VK_FORMAT_R8G8B8_SNORM = 24,
665 VK_FORMAT_R8G8B8_USCALED = 25,
666 VK_FORMAT_R8G8B8_SSCALED = 26,
667 VK_FORMAT_R8G8B8_UINT = 27,
668 VK_FORMAT_R8G8B8_SINT = 28,
669 VK_FORMAT_R8G8B8_SRGB = 29,
670 VK_FORMAT_B8G8R8_UNORM = 30,
671 VK_FORMAT_B8G8R8_SNORM = 31,
672 VK_FORMAT_B8G8R8_USCALED = 32,
673 VK_FORMAT_B8G8R8_SSCALED = 33,
674 VK_FORMAT_B8G8R8_UINT = 34,
675 VK_FORMAT_B8G8R8_SINT = 35,
676 VK_FORMAT_B8G8R8_SRGB = 36,
677 VK_FORMAT_R8G8B8A8_UNORM = 37,
678 VK_FORMAT_R8G8B8A8_SNORM = 38,
679 VK_FORMAT_R8G8B8A8_USCALED = 39,
680 VK_FORMAT_R8G8B8A8_SSCALED = 40,
681 VK_FORMAT_R8G8B8A8_UINT = 41,
682 VK_FORMAT_R8G8B8A8_SINT = 42,
683 VK_FORMAT_R8G8B8A8_SRGB = 43,
684 VK_FORMAT_B8G8R8A8_UNORM = 44,
685 VK_FORMAT_B8G8R8A8_SNORM = 45,
686 VK_FORMAT_B8G8R8A8_USCALED = 46,
687 VK_FORMAT_B8G8R8A8_SSCALED = 47,
688 VK_FORMAT_B8G8R8A8_UINT = 48,
689 VK_FORMAT_B8G8R8A8_SINT = 49,
690 VK_FORMAT_B8G8R8A8_SRGB = 50,
691 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
692 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
693 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
694 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
695 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
696 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
697 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
698 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
699 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
700 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
701 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
702 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
703 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
704 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
705 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
706 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
707 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
708 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
709 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
710 VK_FORMAT_R16_UNORM = 70,
711 VK_FORMAT_R16_SNORM = 71,
712 VK_FORMAT_R16_USCALED = 72,
713 VK_FORMAT_R16_SSCALED = 73,
714 VK_FORMAT_R16_UINT = 74,
715 VK_FORMAT_R16_SINT = 75,
716 VK_FORMAT_R16_SFLOAT = 76,
717 VK_FORMAT_R16G16_UNORM = 77,
718 VK_FORMAT_R16G16_SNORM = 78,
719 VK_FORMAT_R16G16_USCALED = 79,
720 VK_FORMAT_R16G16_SSCALED = 80,
721 VK_FORMAT_R16G16_UINT = 81,
722 VK_FORMAT_R16G16_SINT = 82,
723 VK_FORMAT_R16G16_SFLOAT = 83,
724 VK_FORMAT_R16G16B16_UNORM = 84,
725 VK_FORMAT_R16G16B16_SNORM = 85,
726 VK_FORMAT_R16G16B16_USCALED = 86,
727 VK_FORMAT_R16G16B16_SSCALED = 87,
728 VK_FORMAT_R16G16B16_UINT = 88,
729 VK_FORMAT_R16G16B16_SINT = 89,
730 VK_FORMAT_R16G16B16_SFLOAT = 90,
731 VK_FORMAT_R16G16B16A16_UNORM = 91,
732 VK_FORMAT_R16G16B16A16_SNORM = 92,
733 VK_FORMAT_R16G16B16A16_USCALED = 93,
734 VK_FORMAT_R16G16B16A16_SSCALED = 94,
735 VK_FORMAT_R16G16B16A16_UINT = 95,
736 VK_FORMAT_R16G16B16A16_SINT = 96,
737 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
738 VK_FORMAT_R32_UINT = 98,
739 VK_FORMAT_R32_SINT = 99,
740 VK_FORMAT_R32_SFLOAT = 100,
741 VK_FORMAT_R32G32_UINT = 101,
742 VK_FORMAT_R32G32_SINT = 102,
743 VK_FORMAT_R32G32_SFLOAT = 103,
744 VK_FORMAT_R32G32B32_UINT = 104,
745 VK_FORMAT_R32G32B32_SINT = 105,
746 VK_FORMAT_R32G32B32_SFLOAT = 106,
747 VK_FORMAT_R32G32B32A32_UINT = 107,
748 VK_FORMAT_R32G32B32A32_SINT = 108,
749 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
750 VK_FORMAT_R64_UINT = 110,
751 VK_FORMAT_R64_SINT = 111,
752 VK_FORMAT_R64_SFLOAT = 112,
753 VK_FORMAT_R64G64_UINT = 113,
754 VK_FORMAT_R64G64_SINT = 114,
755 VK_FORMAT_R64G64_SFLOAT = 115,
756 VK_FORMAT_R64G64B64_UINT = 116,
757 VK_FORMAT_R64G64B64_SINT = 117,
758 VK_FORMAT_R64G64B64_SFLOAT = 118,
759 VK_FORMAT_R64G64B64A64_UINT = 119,
760 VK_FORMAT_R64G64B64A64_SINT = 120,
761 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
762 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
763 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
764 VK_FORMAT_D16_UNORM = 124,
765 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
766 VK_FORMAT_D32_SFLOAT = 126,
767 VK_FORMAT_S8_UINT = 127,
768 VK_FORMAT_D16_UNORM_S8_UINT = 128,
769 VK_FORMAT_D24_UNORM_S8_UINT = 129,
770 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
771 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
772 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
773 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
774 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
775 VK_FORMAT_BC2_UNORM_BLOCK = 135,
776 VK_FORMAT_BC2_SRGB_BLOCK = 136,
777 VK_FORMAT_BC3_UNORM_BLOCK = 137,
778 VK_FORMAT_BC3_SRGB_BLOCK = 138,
779 VK_FORMAT_BC4_UNORM_BLOCK = 139,
780 VK_FORMAT_BC4_SNORM_BLOCK = 140,
781 VK_FORMAT_BC5_UNORM_BLOCK = 141,
782 VK_FORMAT_BC5_SNORM_BLOCK = 142,
783 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
784 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
785 VK_FORMAT_BC7_UNORM_BLOCK = 145,
786 VK_FORMAT_BC7_SRGB_BLOCK = 146,
787 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
788 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
789 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
790 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
791 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
792 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
793 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
794 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
795 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
796 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
797 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
798 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
799 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
800 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
801 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
802 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
803 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
804 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
805 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
806 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
807 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
808 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
809 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
810 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
811 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
812 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
813 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
814 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
815 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
816 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
817 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
818 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
819 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
820 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
821 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
822 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
823 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
824 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Jesse Halleb02c472017-02-24 15:13:45 -0800825
Jesse Halld0599582017-03-10 18:35:38 -0800826 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -0800827 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
828 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
829 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
830 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
831 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
832 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
833 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
834 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700835}
836
Jesse Halld27f6aa2015-08-15 17:58:48 -0700837/// Structure type enumerant
838enum VkStructureType {
839 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -0800840 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
841 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
842 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
843 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800844 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -0800845 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
846 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
847 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
848 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700849 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -0800850 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
851 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
852 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
853 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
854 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
855 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800856 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
857 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
858 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
859 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
860 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
861 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
862 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
863 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
864 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
865 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
866 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
867 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
868 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
869 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
870 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
871 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
872 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800873 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800874 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
875 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
876 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
877 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
878 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800879 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -0800880 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
881 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
882 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
883 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
884 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
885 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
886 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
887 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800888
Jesse Halld0599582017-03-10 18:35:38 -0800889 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800890 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
891 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800892
Jesse Halld0599582017-03-10 18:35:38 -0800893 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -0800894 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
895 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -0800896
Jesse Halld0599582017-03-10 18:35:38 -0800897 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -0800898 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800899
Jesse Halld0599582017-03-10 18:35:38 -0800900 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800901 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
902
Jesse Halld0599582017-03-10 18:35:38 -0800903 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800904 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
905
Jesse Halld0599582017-03-10 18:35:38 -0800906 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800907 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
908
Jesse Halld0599582017-03-10 18:35:38 -0800909 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800910 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
911
Jesse Halld0599582017-03-10 18:35:38 -0800912 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800913 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
914
Jesse Halld0599582017-03-10 18:35:38 -0800915 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -0800916 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -0800917
Jesse Halld0599582017-03-10 18:35:38 -0800918 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +0800919 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
920
Jesse Halld0599582017-03-10 18:35:38 -0800921 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -0700922 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
923
Jesse Halld0599582017-03-10 18:35:38 -0800924 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -0700925 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
926
Jesse Halld0599582017-03-10 18:35:38 -0800927 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -0700928 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -0700929 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -0700930 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700931
Jesse Halld0599582017-03-10 18:35:38 -0800932 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -0700933 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700934 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall3f5499b2016-07-26 15:20:40 -0700935 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Jesse Halleb02c472017-02-24 15:13:45 -0800936
Jesse Halld0599582017-03-10 18:35:38 -0800937 //@extension("VK_KHX_multiview") // 54
938 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
939 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
940 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
941
942 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -0800943 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
944 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
945
Jesse Halld0599582017-03-10 18:35:38 -0800946 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -0800947 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
948 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
949
Jesse Halld0599582017-03-10 18:35:38 -0800950 //@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -0800951 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
952
Jesse Halld0599582017-03-10 18:35:38 -0800953 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -0800954 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
955 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
956 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
957 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
958 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
959 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
960 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
961 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
962 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
963
Jesse Halld0599582017-03-10 18:35:38 -0800964 //@extension("VK_KHX_device_group") // 61
965 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
966 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
967 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
968 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
969 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
970 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
971 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
972 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
973 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
974 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
975 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
976 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
977 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
978
979 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -0800980 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
981
Jesse Halld0599582017-03-10 18:35:38 -0800982 //@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -0800983 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
984
Jesse Halld0599582017-03-10 18:35:38 -0800985 //@extension("VK_KHX_device_group_creation") // 71
986 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
987 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
988
989 //@extension("VK_KHX_external_memory_capabilities") // 72
990 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000,
991 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001,
992 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002,
993 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003,
994 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004,
995 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005,
996 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006,
997 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007,
998
999 //@extension("VK_KHX_external_memory") // 73
1000 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
1001 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
1002 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
1003
1004 //@extension("VK_KHX_external_memory_win32") // 74
1005 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
1006 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
1007 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
1008
1009 //@extension("VK_KHX_external_memory_fd") // 75
1010 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
1011 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
1012
1013 //@extension("VK_KHX_win32_keyed_mutex") // 76
1014 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
1015
1016 //@extension("VK_KHX_external_semaphore_capabilities") // 77
1017 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
1018 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
1019
1020 //@extension("VK_KHX_external_semaphore") // 78
1021 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
1022
1023 //@extension("VK_KHX_external_semaphore_win32") // 79
1024 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
1025 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
1026 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
1027
1028 //@extension("VK_KHX_external_semaphore_fd") // 80
1029 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
1030
1031 //@extension("VK_KHR_push_descriptor") // 81
1032 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1033
Jesse Hall2c677d52017-03-20 13:09:19 -07001034 //@extension("VK_KHR_incremental_present") // 85
1035 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
1036
Jesse Halld0599582017-03-10 18:35:38 -08001037 //@extension("VK_KHR_descriptor_update_template") // 86
1038 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1039
1040 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001041 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1042 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1043 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1044 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1045 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1046 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall08e2f482017-03-06 15:22:17 -08001047
Jesse Halld0599582017-03-10 18:35:38 -08001048 //@extension("VK_NV_clip_space_w_scaling") // 88
1049 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1050
1051 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08001052 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
1053
Jesse Halld0599582017-03-10 18:35:38 -08001054 //@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001055 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1056 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1057 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1058 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Halld0599582017-03-10 18:35:38 -08001059
Jesse Halle8ec6a22017-03-10 21:01:57 -08001060 //@extension("VK_GOOGLE_display_timing") // 93
1061 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1062
Jesse Halld0599582017-03-10 18:35:38 -08001063 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1064 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1065
1066 //@extension("VK_NV_viewport_swizzle") // 99
1067 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1068
1069 //@extension("VK_EXT_discard_rectangles") // 100
1070 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1071 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1072
Jesse Halle8ec6a22017-03-10 21:01:57 -08001073 //@extension("VK_EXT_hdr_metadata") // 106
1074 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1075
Jesse Halld0599582017-03-10 18:35:38 -08001076 //@extension("VK_MVK_ios_surface") // 123
1077 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1078
1079 //@extension("VK_MVK_macos_surface") // 124
1080 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001081}
1082
Jesse Hall65ab5522015-11-30 00:07:16 -08001083enum VkSubpassContents {
1084 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1085 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001086}
1087
Jesse Hall543a7ff2016-01-08 16:38:30 -08001088enum VkPipelineCacheHeaderVersion {
1089 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1090}
1091
Jesse Hallbd888842015-11-30 21:44:14 -08001092@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001093/// Error and return codes
1094enum VkResult {
1095 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001096 VK_SUCCESS = 0,
1097 VK_NOT_READY = 1,
1098 VK_TIMEOUT = 2,
1099 VK_EVENT_SET = 3,
1100 VK_EVENT_RESET = 4,
1101 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001102
Jesse Halld0599582017-03-10 18:35:38 -08001103 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001104 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001105
Jesse Halld27f6aa2015-08-15 17:58:48 -07001106 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001107 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1108 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1109 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1110 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1111 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1112 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1113 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1114 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1115 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1116 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1117 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall3f5499b2016-07-26 15:20:40 -07001118 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001119
Jesse Halld0599582017-03-10 18:35:38 -08001120 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001121 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Halld0599582017-03-10 18:35:38 -08001122 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001123
Jesse Halld0599582017-03-10 18:35:38 -08001124 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001125 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001126
Jesse Halld0599582017-03-10 18:35:38 -08001127 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001128 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001129
Jesse Halld0599582017-03-10 18:35:38 -08001130 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001131 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001132
Jesse Halld0599582017-03-10 18:35:38 -08001133 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001134 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall08e2f482017-03-06 15:22:17 -08001135
Jesse Halld0599582017-03-10 18:35:38 -08001136 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001137 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Halld0599582017-03-10 18:35:38 -08001138
1139 //@extension("VK_KHX_external_memory") // 73
1140 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001141}
1142
1143enum VkDynamicState {
1144 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1145 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1146 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1147 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1148 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1149 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1150 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1151 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1152 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Halld0599582017-03-10 18:35:38 -08001153
1154 //@extension("VK_NV_clip_space_w_scaling") // 88
1155 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1156
1157 //@extension("VK_EXT_discard_rectangles") // 100
1158 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001159}
1160
Jesse Halld0599582017-03-10 18:35:38 -08001161@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001162enum VkPresentModeKHR {
1163 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1164 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1165 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001166 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Michael Lentine88594d72015-11-12 12:49:45 -08001167}
1168
Jesse Halld0599582017-03-10 18:35:38 -08001169@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001170enum VkColorSpaceKHR {
1171 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall2c677d52017-03-20 13:09:19 -07001172
1173 //@extension("VK_EXT_swapchain_colorspace") // 105
1174 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
1175 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
1176 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
1177 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
1178 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
1179 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
1180 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
1181 VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
1182 VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
1183 VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
1184 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1185 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
1186 VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
Michael Lentine88594d72015-11-12 12:49:45 -08001187}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001188
Jesse Halld0599582017-03-10 18:35:38 -08001189@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001190enum VkDebugReportObjectTypeEXT {
1191 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1192 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1193 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1194 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1195 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1196 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1197 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1198 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1199 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1200 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1201 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1202 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1203 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1204 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1205 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1206 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1207 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1208 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1209 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1210 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1211 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1212 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1213 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1214 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1215 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1216 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1217 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1218 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
1219 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
Jesse Halleb02c472017-02-24 15:13:45 -08001220 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1221 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1222 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1223 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hall2c677d52017-03-20 13:09:19 -07001224
1225 //extension("VK_KHR_descriptor_update_template") // 86
1226 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001227}
1228
Jesse Halld0599582017-03-10 18:35:38 -08001229@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001230enum VkDebugReportErrorEXT {
1231 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
1232 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
1233}
1234
Jesse Halld0599582017-03-10 18:35:38 -08001235@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001236enum VkRasterizationOrderAMD {
1237 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1238 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1239}
1240
Jesse Halld0599582017-03-10 18:35:38 -08001241@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08001242enum VkValidationCheckEXT {
1243 VK_VALIDATION_CHECK_ALL_EXT = 0,
1244}
1245
Jesse Halld0599582017-03-10 18:35:38 -08001246@extension("VK_KHR_descriptor_update_template") // 86
1247enum VkDescriptorUpdateTemplateTypeKHR {
1248 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1249 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1250}
1251
1252@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001253enum VkIndirectCommandsTokenTypeNVX {
1254 VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
1255 VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
1256 VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
1257 VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
1258 VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
1259 VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
1260 VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
1261 VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
1262}
1263
Jesse Halld0599582017-03-10 18:35:38 -08001264@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001265enum VkObjectEntryTypeNVX {
1266 VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
1267 VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
1268 VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
1269 VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
1270 VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
1271}
Jesse Hall715b86a2016-01-16 16:34:29 -08001272
Jesse Halld0599582017-03-10 18:35:38 -08001273@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001274enum VkDisplayPowerStateEXT {
1275 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1276 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1277 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1278}
1279
Jesse Halld0599582017-03-10 18:35:38 -08001280@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001281enum VkDeviceEventTypeEXT {
1282 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1283}
1284
Jesse Halld0599582017-03-10 18:35:38 -08001285@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08001286enum VkDisplayEventTypeEXT {
1287 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1288}
1289
Jesse Halld0599582017-03-10 18:35:38 -08001290@extension("VK_NV_viewport_swizzle") // 99
1291enum VkViewportCoordinateSwizzleNV {
1292 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1293 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1294 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1295 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1296 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1297 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1298 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1299 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1300}
1301
1302@extension("VK_EXT_discard_rectangles") // 100
1303enum VkDiscardRectangleModeEXT {
1304 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1305 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1306}
1307
Jesse Halld27f6aa2015-08-15 17:58:48 -07001308/////////////////
1309// Bitfields //
1310/////////////////
1311
Jesse Halld27f6aa2015-08-15 17:58:48 -07001312/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001313type VkFlags VkQueueFlags
1314bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001315 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1316 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001317 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001318 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001319}
1320
1321/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001322type VkFlags VkMemoryPropertyFlags
1323bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001324 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1325 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1326 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1327 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1328 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001329}
1330
1331/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001332type VkFlags VkMemoryHeapFlags
1333bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001334 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Halld0599582017-03-10 18:35:38 -08001335
1336 //@extension("VK_KHX_device_group_creation") // 71
1337 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001338}
1339
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001340/// Access flags
1341type VkFlags VkAccessFlags
1342bitfield VkAccessFlagBits {
1343 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1344 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1345 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1346 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1347 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1348 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1349 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1350 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1351 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1352 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1353 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1354 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1355 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1356 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1357 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1358 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1359 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Jesse Halleb02c472017-02-24 15:13:45 -08001360
Jesse Halld0599582017-03-10 18:35:38 -08001361 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001362 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
1363 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001364}
1365
1366/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001367type VkFlags VkBufferUsageFlags
1368bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001369 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1370 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001371 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1372 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1373 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1374 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1375 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1376 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1377 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1378}
1379
1380/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001381type VkFlags VkBufferCreateFlags
1382bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001383 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001384 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
1385 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
1386}
1387
1388/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001389type VkFlags VkShaderStageFlags
1390bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001391 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08001392 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1393 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001394 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1395 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1396 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08001397 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001398
1399 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
1400}
1401
Jesse Hallfbf97b02015-11-20 14:17:03 -08001402/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08001403type VkFlags VkDescriptorPoolCreateFlags
1404bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08001405 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
1406}
1407
1408/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08001409type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08001410//bitfield VkDescriptorPoolResetFlagBits {
1411//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08001412
Jesse Halld27f6aa2015-08-15 17:58:48 -07001413/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001414type VkFlags VkImageUsageFlags
1415bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001416 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1417 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001418 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1419 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
1420 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001421 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07001422 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
1423 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
1424}
1425
1426/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001427type VkFlags VkImageCreateFlags
1428bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001429 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07001430 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
1431 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 -07001432 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
1433 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 -08001434
Jesse Halld0599582017-03-10 18:35:38 -08001435 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001436 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Halld0599582017-03-10 18:35:38 -08001437
1438 //@extension("VK_KHX_device_group") // 61
1439 VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001440}
1441
Jesse Hallb00daad2015-11-29 19:46:20 -08001442/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001443type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08001444//bitfield VkImageViewCreateFlagBits {
1445//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001446
1447/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001448type VkFlags VkPipelineCreateFlags
1449bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001450 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1451 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1452 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Halld0599582017-03-10 18:35:38 -08001453
1454 //@extension("VK_KHX_device_group") // 61
1455 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
1456 VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001457}
1458
Jesse Hall65ab5522015-11-30 00:07:16 -08001459/// Color component flags
1460type VkFlags VkColorComponentFlags
1461bitfield VkColorComponentFlagBits {
1462 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1463 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1464 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1465 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001466}
1467
1468/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001469type VkFlags VkFenceCreateFlags
1470bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001471 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
1472}
1473
1474/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001475type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001476//bitfield VkSemaphoreCreateFlagBits {
1477//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001478
1479/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08001480type VkFlags VkFormatFeatureFlags
1481bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001482 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
1483 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
1484 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
1485 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
1486 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
1487 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
1488 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
1489 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
1490 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
1491 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08001492 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
1493 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 -08001494 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07001495
Jesse Halld0599582017-03-10 18:35:38 -08001496 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07001497 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall08e2f482017-03-06 15:22:17 -08001498
Jesse Halld0599582017-03-10 18:35:38 -08001499 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001500 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
1501 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001502}
1503
1504/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08001505type VkFlags VkQueryControlFlags
1506bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08001507 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001508}
1509
1510/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08001511type VkFlags VkQueryResultFlags
1512bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001513 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
1514 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
1515 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
1516 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
1517}
1518
1519/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001520type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001521//bitfield VkShaderModuleCreateFlagBits {
1522//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001523
Jesse Halld27f6aa2015-08-15 17:58:48 -07001524/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001525type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08001526//bitfield VkEventCreateFlagBits {
1527//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001528
Jesse Halla15a4bf2015-11-19 22:48:02 -08001529/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001530type VkFlags VkCommandBufferUsageFlags
1531bitfield VkCommandBufferUsageFlagBits {
1532 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1533 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1534 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001535}
1536
1537/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08001538type VkFlags VkQueryPipelineStatisticFlags
1539bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08001540 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
1541 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
1542 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
1543 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
1544 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
1545 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
1546 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
1547 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
1548 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
1549 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
1550 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07001551}
1552
1553/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08001554type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08001555//bitfield VkMemoryMapFlagBits {
1556//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001557
1558/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08001559type VkFlags VkImageAspectFlags
1560bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001561 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1562 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1563 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1564 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
1565}
1566
1567/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08001568type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08001569bitfield VkSparseMemoryBindFlagBits {
1570 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
1571}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001572
1573/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08001574type VkFlags VkSparseImageFormatFlags
1575bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08001576 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
1577 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.
1578 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07001579}
1580
1581/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08001582type VkFlags VkPipelineStageFlags
1583bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001584 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
1585 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
1586 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
1587 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08001588 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
1589 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07001590 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
1591 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
1592 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
1593 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
1594 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
1595 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
1596 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08001597 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1598 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07001599
Jesse Hall543a7ff2016-01-08 16:38:30 -08001600 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
1601 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Jesse Halleb02c472017-02-24 15:13:45 -08001602
Jesse Halld0599582017-03-10 18:35:38 -08001603 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001604 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001605}
1606
1607/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001608type VkFlags VkAttachmentDescriptionFlags
1609bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001610 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 -07001611}
1612
1613/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08001614type VkFlags VkSubpassDescriptionFlags
1615bitfield VkSubpassDescriptionFlagBits {
Jesse Halld0599582017-03-10 18:35:38 -08001616 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1617 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
1618 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001619}
1620
1621/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001622type VkFlags VkCommandPoolCreateFlags
1623bitfield VkCommandPoolCreateFlagBits {
1624 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
1625 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Jesse Halld27f6aa2015-08-15 17:58:48 -07001626}
1627
1628/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08001629type VkFlags VkCommandPoolResetFlags
1630bitfield VkCommandPoolResetFlagBits {
1631 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07001632}
1633
Jesse Hall3fbc8562015-11-29 22:10:52 -08001634type VkFlags VkCommandBufferResetFlags
1635bitfield VkCommandBufferResetFlagBits {
1636 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001637}
1638
Jesse Halld8bade02015-11-24 10:24:18 -08001639type VkFlags VkSampleCountFlags
1640bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001641 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
1642 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
1643 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
1644 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
1645 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
1646 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
1647 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
1648}
1649
Jesse Halld8bade02015-11-24 10:24:18 -08001650type VkFlags VkStencilFaceFlags
1651bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001652 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
1653 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08001654 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001655}
1656
Jesse Halla6429252015-11-29 18:59:42 -08001657/// Instance creation flags
1658type VkFlags VkInstanceCreateFlags
1659//bitfield VkInstanceCreateFlagBits {
1660//}
1661
1662/// Device creation flags
1663type VkFlags VkDeviceCreateFlags
1664//bitfield VkDeviceCreateFlagBits {
1665//}
1666
1667/// Device queue creation flags
1668type VkFlags VkDeviceQueueCreateFlags
1669//bitfield VkDeviceQueueCreateFlagBits {
1670//}
1671
1672/// Query pool creation flags
1673type VkFlags VkQueryPoolCreateFlags
1674//bitfield VkQueryPoolCreateFlagBits {
1675//}
1676
1677/// Buffer view creation flags
1678type VkFlags VkBufferViewCreateFlags
1679//bitfield VkBufferViewCreateFlagBits {
1680//}
1681
1682/// Pipeline cache creation flags
1683type VkFlags VkPipelineCacheCreateFlags
1684//bitfield VkPipelineCacheCreateFlagBits {
1685//}
1686
1687/// Pipeline shader stage creation flags
1688type VkFlags VkPipelineShaderStageCreateFlags
1689//bitfield VkPipelineShaderStageCreateFlagBits {
1690//}
1691
1692/// Descriptor set layout creation flags
1693type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Halld0599582017-03-10 18:35:38 -08001694bitfield VkDescriptorSetLayoutCreateFlagBits {
1695 //@extension("VK_KHR_push_descriptor") // 81
1696 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
1697}
Jesse Halla6429252015-11-29 18:59:42 -08001698
1699/// Pipeline vertex input state creation flags
1700type VkFlags VkPipelineVertexInputStateCreateFlags
1701//bitfield VkPipelineVertexInputStateCreateFlagBits {
1702//}
1703
1704/// Pipeline input assembly state creation flags
1705type VkFlags VkPipelineInputAssemblyStateCreateFlags
1706//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
1707//}
1708
1709/// Tessellation state creation flags
1710type VkFlags VkPipelineTessellationStateCreateFlags
1711//bitfield VkPipelineTessellationStateCreateFlagBits {
1712//}
1713
1714/// Viewport state creation flags
1715type VkFlags VkPipelineViewportStateCreateFlags
1716//bitfield VkPipelineViewportStateCreateFlagBits {
1717//}
1718
Jesse Hall3fbc8562015-11-29 22:10:52 -08001719/// Rasterization state creation flags
1720type VkFlags VkPipelineRasterizationStateCreateFlags
1721//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08001722//}
1723
1724/// Multisample state creation flags
1725type VkFlags VkPipelineMultisampleStateCreateFlags
1726//bitfield VkPipelineMultisampleStateCreateFlagBits {
1727//}
1728
1729/// Color blend state creation flags
1730type VkFlags VkPipelineColorBlendStateCreateFlags
1731//bitfield VkPipelineColorBlendStateCreateFlagBits {
1732//}
1733
1734/// Depth/stencil state creation flags
1735type VkFlags VkPipelineDepthStencilStateCreateFlags
1736//bitfield VkPipelineDepthStencilStateCreateFlagBits {
1737//}
1738
1739/// Dynamic state creation flags
1740type VkFlags VkPipelineDynamicStateCreateFlags
1741//bitfield VkPipelineDynamicStateCreateFlagBits {
1742//}
1743
1744/// Pipeline layout creation flags
1745type VkFlags VkPipelineLayoutCreateFlags
1746//bitfield VkPipelineLayoutCreateFlagBits {
1747//}
1748
1749/// Sampler creation flags
1750type VkFlags VkSamplerCreateFlags
1751//bitfield VkSamplerCreateFlagBits {
1752//}
1753
1754/// Render pass creation flags
1755type VkFlags VkRenderPassCreateFlags
1756//bitfield VkRenderPassCreateFlagBits {
1757//}
1758
1759/// Framebuffer creation flags
1760type VkFlags VkFramebufferCreateFlags
1761//bitfield VkFramebufferCreateFlagBits {
1762//}
1763
Jesse Halldc6d36c2015-11-29 19:12:15 -08001764/// Dependency flags
1765type VkFlags VkDependencyFlags
1766bitfield VkDependencyFlagBits {
1767 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Halld0599582017-03-10 18:35:38 -08001768
1769 //@extension("VK_KHX_multiview") // 54
1770 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
1771
1772 //@extension("VK_KHX_device_group") // 61
1773 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08001774}
1775
Jesse Hallc7467b72015-11-29 21:05:26 -08001776/// Cull mode flags
1777type VkFlags VkCullModeFlags
1778bitfield VkCullModeFlagBits {
1779 VK_CULL_MODE_NONE = 0x00000000,
1780 VK_CULL_MODE_FRONT_BIT = 0x00000001,
1781 VK_CULL_MODE_BACK_BIT = 0x00000002,
1782 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
1783}
1784
Jesse Halld0599582017-03-10 18:35:38 -08001785@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001786type VkFlags VkSurfaceTransformFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001787@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08001788bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001789 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001790 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
1791 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
1792 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
1793 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
1794 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
1795 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
1796 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
1797 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08001798}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001799
Jesse Halld0599582017-03-10 18:35:38 -08001800@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001801type VkFlags VkCompositeAlphaFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001802@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08001803bitfield VkCompositeAlphaFlagBitsKHR {
1804 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1805 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
1806 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
1807 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
1808}
1809
Jesse Halld0599582017-03-10 18:35:38 -08001810@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001811type VkFlags VkSwapchainCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001812@extension("VK_KHR_swapchain") // 2
1813bitfield VkSwapchainCreateFlagBitsKHR {
1814 //@extension("VK_KHX_device_group") // 61
1815 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
1816}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001817
Jesse Halld0599582017-03-10 18:35:38 -08001818@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001819type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001820@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08001821bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001822 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
1823 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
1824 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
1825 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001826}
1827
Jesse Halld0599582017-03-10 18:35:38 -08001828@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001829type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001830//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001831//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
1832//}
1833
Jesse Halld0599582017-03-10 18:35:38 -08001834@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001835type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001836//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08001837//bitfield VkDisplayModeCreateFlagBitsKHR {
1838//}
1839
Jesse Halld0599582017-03-10 18:35:38 -08001840@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001841type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001842//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001843//bitfield VkXlibSurfaceCreateFlagBitsKHR {
1844//}
1845
Jesse Halld0599582017-03-10 18:35:38 -08001846@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001847type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001848//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001849//bitfield VkXcbSurfaceCreateFlagBitsKHR {
1850//}
1851
Jesse Halld0599582017-03-10 18:35:38 -08001852@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001853type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001854//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001855//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
1856//}
1857
Jesse Halld0599582017-03-10 18:35:38 -08001858@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001859type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001860//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001861//bitfield VkMirSurfaceCreateFlagBitsKHR {
1862//}
1863
Jesse Halld0599582017-03-10 18:35:38 -08001864@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001865type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001866//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001867//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
1868//}
1869
Jesse Halld0599582017-03-10 18:35:38 -08001870@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001871type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001872//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001873//bitfield VkWin32SurfaceCreateFlagBitsKHR {
1874//}
1875
Jesse Halld0599582017-03-10 18:35:38 -08001876@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001877type VkFlags VkDebugReportFlagsEXT
Jesse Halld0599582017-03-10 18:35:38 -08001878@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001879bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08001880 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
1881 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
1882 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08001883 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
1884 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
1885}
1886
Jesse Halld0599582017-03-10 18:35:38 -08001887@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001888type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Halld0599582017-03-10 18:35:38 -08001889@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001890bitfield VkExternalMemoryHandleTypeFlagBitsNV {
1891 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
1892 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
1893 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
1894 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
1895}
1896
Jesse Halld0599582017-03-10 18:35:38 -08001897@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001898type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Halld0599582017-03-10 18:35:38 -08001899@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08001900bitfield VkExternalMemoryFeatureFlagBitsNV {
1901 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
1902 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
1903 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
1904}
1905
Jesse Halld0599582017-03-10 18:35:38 -08001906@extension("VK_KHX_device_group") // 61
1907type VkFlags VkPeerMemoryFeatureFlagsKHX
1908@extension("VK_KHX_device_group") // 61
1909bitfield VkPeerMemoryFeatureFlagBitsKHX {
1910 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
1911 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
1912 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
1913 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
1914}
1915
1916@extension("VK_KHX_device_group") // 61
1917type VkFlags VkMemoryAllocateFlagsKHX
1918@extension("VK_KHX_device_group") // 61
1919bitfield VkMemoryAllocateFlagBitsKHX {
1920 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
1921}
1922
1923@extension("VK_KHX_device_group") // 61
1924type VkFlags VkDeviceGroupPresentModeFlagsKHX
1925@extension("VK_KHX_device_group") // 61
1926bitfield VkDeviceGroupPresentModeFlagBitsKHX {
1927 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
1928 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
1929 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
1930 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
1931}
1932
1933@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08001934type VkFlags VkViSurfaceCreateFlagsNN
Jesse Halld0599582017-03-10 18:35:38 -08001935//@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08001936//bitfield VkViSurfaceCreateFlagBitsNN {
1937//}
1938
Jesse Halld0599582017-03-10 18:35:38 -08001939@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001940type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Halld0599582017-03-10 18:35:38 -08001941//@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08001942//bitfield VkCommandPoolTrimFlagBitsKHR {
1943//}
1944
Jesse Halld0599582017-03-10 18:35:38 -08001945@extension("VK_KHX_external_memory_capabilities") // 72
1946type VkFlags VkExternalMemoryHandleTypeFlagsKHX
1947@extension("VK_KHX_external_memory_capabilities") // 72
1948bitfield VkExternalMemoryHandleTypeFlagBitsKHX {
1949 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001,
1950 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002,
1951 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004,
1952 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008,
1953 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010,
1954 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020,
1955 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040,
1956}
1957
1958@extension("VK_KHX_external_memory_capabilities") // 72
1959type VkFlags VkExternalMemoryFeatureFlagsKHX
1960@extension("VK_KHX_external_memory_capabilities") // 72
1961bitfield VkExternalMemoryFeatureFlagBitsKHX {
1962 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001,
1963 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002,
1964 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004,
1965}
1966
1967@extension("VK_KHX_external_semaphore_capabilities") // 77
1968type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX
1969@extension("VK_KHX_external_semaphore_capabilities") // 77
1970bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX {
1971 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001
1972 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002
1973 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004
1974 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008
1975 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010
1976}
1977
1978@extension("VK_KHX_external_semaphore_capabilities") // 77
1979type VkFlags VkExternalSemaphoreFeatureFlagsKHX
1980@extension("VK_KHX_external_semaphore_capabilities") // 77
1981bitfield VkExternalSemaphoreFeatureFlagBitsKHX {
1982 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001,
1983 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002,
1984}
1985
1986@extension("VK_KHR_descriptor_update_template") // 86
1987type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
1988//@extension("VK_KHR_descriptor_update_template") // 86
1989//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
1990//}
1991
1992@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001993type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Halld0599582017-03-10 18:35:38 -08001994@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001995bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
1996 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
1997 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
1998 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
1999 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
2000}
2001
Jesse Halld0599582017-03-10 18:35:38 -08002002@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08002003type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Halld0599582017-03-10 18:35:38 -08002004@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08002005bitfield VkObjectEntryUsageFlagBitsNVX {
2006 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2007 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
2008}
2009
Jesse Halld0599582017-03-10 18:35:38 -08002010@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08002011type VkFlags VkSurfaceCounterFlagsEXT
Jesse Halld0599582017-03-10 18:35:38 -08002012@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08002013bitfield VkSurfaceCounterFlagBitsEXT {
2014 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2015}
Jesse Hall1356b0d2015-11-23 17:24:58 -08002016
Jesse Halld0599582017-03-10 18:35:38 -08002017@extension("VK_NV_viewport_swizzle") // 99
2018type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2019//@extension("VK_NV_viewport_swizzle") // 99
2020//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2021//}
2022
2023@extension("VK_EXT_discard_rectangles") // 100
2024type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2025//@extension("VK_EXT_discard_rectangles") // 100
2026//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2027//}
2028
2029@extension("VK_MVK_ios_surface") // 123
2030type VkFlags VkIOSSurfaceCreateFlagsMVK
2031//@extension("VK_MVK_ios_surface") // 123
2032//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2033//}
2034
2035@extension("VK_MVK_macos_surface") // 124
2036type VkFlags VkMacOSSurfaceCreateFlagsMVK
2037//@extension("VK_MVK_macos_surface") // 124
2038//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2039//}
2040
Jesse Halld27f6aa2015-08-15 17:58:48 -07002041//////////////////
2042// Structures //
2043//////////////////
2044
2045class VkOffset2D {
2046 s32 x
2047 s32 y
2048}
2049
2050class VkOffset3D {
2051 s32 x
2052 s32 y
2053 s32 z
2054}
2055
2056class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002057 u32 width
2058 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002059}
2060
2061class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002062 u32 width
2063 u32 height
2064 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002065}
2066
2067class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002068 f32 x
2069 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002070 f32 width
2071 f32 height
2072 f32 minDepth
2073 f32 maxDepth
2074}
2075
2076class VkRect2D {
2077 VkOffset2D offset
2078 VkExtent2D extent
2079}
2080
Jesse Halla15a4bf2015-11-19 22:48:02 -08002081class VkClearRect {
2082 VkRect2D rect
2083 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002084 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002085}
2086
Jesse Hall65ab5522015-11-30 00:07:16 -08002087class VkComponentMapping {
2088 VkComponentSwizzle r
2089 VkComponentSwizzle g
2090 VkComponentSwizzle b
2091 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002092}
2093
2094class VkPhysicalDeviceProperties {
2095 u32 apiVersion
2096 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002097 u32 vendorID
2098 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002099 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002100 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2101 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002102 VkPhysicalDeviceLimits limits
2103 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002104}
2105
2106class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002107 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002108 u32 specVersion /// version of the extension specification implemented
2109}
2110
2111class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002112 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002113 u32 specVersion /// version of the layer specification implemented
2114 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002115 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002116}
2117
Jesse Halla366a512015-11-19 22:30:07 -08002118class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002119 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2120 const void* pNext /// Next structure in chain
2121 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002122 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002123 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002124 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002125 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002126 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002127 const VkSemaphore* pSignalSemaphores
2128}
2129
Jesse Halld27f6aa2015-08-15 17:58:48 -07002130class VkApplicationInfo {
2131 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2132 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002133 const char* pApplicationName
2134 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002135 const char* pEngineName
2136 u32 engineVersion
2137 u32 apiVersion
2138}
2139
Jesse Hall3fbc8562015-11-29 22:10:52 -08002140class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002141 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002142 PFN_vkAllocationFunction pfnAllocation
2143 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002144 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002145 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002146 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002147}
2148
2149class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002150 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
2151 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002152 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002153 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08002154 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002155 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07002156}
2157
2158class VkDeviceCreateInfo {
2159 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
2160 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002161 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08002162 u32 queueCreateInfoCount
2163 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08002164 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002165 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002166 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002167 const char* const* ppEnabledExtensionNames
2168 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07002169}
2170
2171class VkInstanceCreateInfo {
2172 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
2173 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002174 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002175 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08002176 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002177 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08002178 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002179 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
2180}
2181
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002182class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002183 VkQueueFlags queueFlags /// Queue flags
2184 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08002185 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08002186 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07002187}
2188
2189class VkPhysicalDeviceMemoryProperties {
2190 u32 memoryTypeCount
2191 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
2192 u32 memoryHeapCount
2193 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
2194}
2195
Jesse Hall3fbc8562015-11-29 22:10:52 -08002196class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002197 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002198 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002199 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002200 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
2201}
2202
2203class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002204 VkDeviceSize size /// Specified in bytes
2205 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002206 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
2207}
2208
2209class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002210 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002211 VkExtent3D imageGranularity
2212 VkSparseImageFormatFlags flags
2213}
2214
2215class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08002216 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002217 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002218 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
2219 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
2220 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002221}
2222
2223class VkMemoryType {
2224 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
2225 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
2226}
2227
2228class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002229 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07002230 VkMemoryHeapFlags flags /// Flags for the heap
2231}
2232
2233class VkMappedMemoryRange {
2234 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
2235 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002236 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002237 VkDeviceSize offset /// Offset within the mapped memory the range starts from
2238 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07002239}
2240
2241class VkFormatProperties {
2242 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
2243 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002244 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07002245}
2246
2247class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002248 VkExtent3D maxExtent /// max image dimensions for this resource type
2249 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08002250 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002251 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
2252 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
2253}
2254
Jesse Halla15a4bf2015-11-19 22:48:02 -08002255class VkDescriptorImageInfo {
2256 VkSampler sampler
2257 VkImageView imageView
2258 VkImageLayout imageLayout
2259}
2260
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002261class VkDescriptorBufferInfo {
2262 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
2263 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
2264 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07002265}
2266
Jesse Halld27f6aa2015-08-15 17:58:48 -07002267class VkWriteDescriptorSet {
2268 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
2269 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002270 VkDescriptorSet dstSet /// Destination descriptor set
2271 u32 dstBinding /// Binding within the destination descriptor set to write
2272 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08002273 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002274 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 -08002275 const VkDescriptorImageInfo* pImageInfo
2276 const VkDescriptorBufferInfo* pBufferInfo
2277 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07002278}
2279
2280class VkCopyDescriptorSet {
2281 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
2282 const void* pNext /// Pointer to next structure
2283 VkDescriptorSet srcSet /// Source descriptor set
2284 u32 srcBinding /// Binding within the source descriptor set to copy from
2285 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002286 VkDescriptorSet dstSet /// Destination descriptor set
2287 u32 dstBinding /// Binding within the destination descriptor set to copy to
2288 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08002289 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07002290}
2291
2292class VkBufferCreateInfo {
2293 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
2294 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002295 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002296 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002297 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002298 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002299 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002300 const u32* pQueueFamilyIndices
2301}
2302
2303class VkBufferViewCreateInfo {
2304 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
2305 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002306 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002307 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002308 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002309 VkDeviceSize offset /// Specified in bytes
2310 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002311}
2312
2313class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002314 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002315 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002316 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002317}
2318
2319class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002320 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002321 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08002322 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002323 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002324 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002325}
2326
2327class VkMemoryBarrier {
2328 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
2329 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002330 VkAccessFlags srcAccessMask
2331 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002332}
2333
2334class VkBufferMemoryBarrier {
2335 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
2336 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002337 VkAccessFlags srcAccessMask
2338 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002339 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002340 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002341 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002342 VkDeviceSize offset /// Offset within the buffer to sync
2343 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07002344}
2345
2346class VkImageMemoryBarrier {
2347 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
2348 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002349 VkAccessFlags srcAccessMask
2350 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002351 VkImageLayout oldLayout /// Current layout of the image
2352 VkImageLayout newLayout /// New layout to transition the image to
2353 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08002354 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07002355 VkImage image /// Image to sync
2356 VkImageSubresourceRange subresourceRange /// Subresource range to sync
2357}
2358
2359class VkImageCreateInfo {
2360 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
2361 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08002362 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002363 VkImageType imageType
2364 VkFormat format
2365 VkExtent3D extent
2366 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08002367 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08002368 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002369 VkImageTiling tiling
2370 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002371 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08002372 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07002373 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002374 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002375}
2376
2377class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002378 VkDeviceSize offset /// Specified in bytes
2379 VkDeviceSize size /// Specified in bytes
2380 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08002381 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002382 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002383}
2384
2385class VkImageViewCreateInfo {
2386 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
2387 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002388 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002389 VkImage image
2390 VkImageViewType viewType
2391 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08002392 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07002393 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07002394}
2395
2396class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002397 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002398 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08002399 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002400}
2401
Jesse Halla6429252015-11-29 18:59:42 -08002402class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08002403 VkDeviceSize resourceOffset /// Specified in bytes
2404 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08002405 VkDeviceMemory memory
2406 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002407 VkSparseMemoryBindFlags flags
2408}
2409
Jesse Halla6429252015-11-29 18:59:42 -08002410class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002411 VkImageSubresource subresource
2412 VkOffset3D offset
2413 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08002414 VkDeviceMemory memory
2415 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002416 VkSparseMemoryBindFlags flags
2417}
2418
Jesse Halla6429252015-11-29 18:59:42 -08002419class VkSparseBufferMemoryBindInfo {
2420 VkBuffer buffer
2421 u32 bindCount
2422 const VkSparseMemoryBind* pBinds
2423}
2424
2425class VkSparseImageOpaqueMemoryBindInfo {
2426 VkImage image
2427 u32 bindCount
2428 const VkSparseMemoryBind* pBinds
2429}
2430
2431class VkSparseImageMemoryBindInfo {
2432 VkImage image
2433 u32 bindCount
2434 const VkSparseMemoryBind* pBinds
2435}
2436
2437class VkBindSparseInfo {
2438 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
2439 const void* pNext
2440 u32 waitSemaphoreCount
2441 const VkSemaphore* pWaitSemaphores
2442 u32 numBufferBinds
2443 const VkSparseBufferMemoryBindInfo* pBufferBinds
2444 u32 numImageOpaqueBinds
2445 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
2446 u32 numImageBinds
2447 const VkSparseImageMemoryBindInfo* pImageBinds
2448 u32 signalSemaphoreCount
2449 const VkSemaphore* pSignalSemaphores
2450}
2451
Jesse Hall65ab5522015-11-30 00:07:16 -08002452class VkImageSubresourceLayers {
2453 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002454 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08002455 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002456 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002457}
2458
Jesse Halld27f6aa2015-08-15 17:58:48 -07002459class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08002460 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002461 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08002462 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002463 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07002464 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
2465}
2466
2467class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08002468 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002469 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08002470 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08002471 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07002472}
2473
2474class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002475 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002476 u32 bufferRowLength /// Specified in texels
2477 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08002478 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002479 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
2480 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
2481}
2482
2483class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08002484 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07002485 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08002486 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08002487 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07002488 VkExtent3D extent
2489}
2490
2491class VkShaderModuleCreateInfo {
2492 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
2493 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002494 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07002495 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08002496 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07002497}
2498
Jesse Halld27f6aa2015-08-15 17:58:48 -07002499class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08002500 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002501 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08002502 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07002503 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
2504 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
2505}
2506
2507class VkDescriptorSetLayoutCreateInfo {
2508 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
2509 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002510 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002511 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08002512 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002513}
2514
Jesse Hall65ab5522015-11-30 00:07:16 -08002515class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002516 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08002517 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002518}
2519
2520class VkDescriptorPoolCreateInfo {
2521 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
2522 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08002523 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002524 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08002525 u32 poolSizeCount
2526 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002527}
2528
Jesse Hall3fbc8562015-11-29 22:10:52 -08002529class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002530 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08002531 const void* pNext /// Pointer to next structure
2532 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08002533 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08002534 const VkDescriptorSetLayout* pSetLayouts
2535}
2536
Jesse Halld27f6aa2015-08-15 17:58:48 -07002537class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08002538 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07002539 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08002540 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07002541}
2542
2543class VkSpecializationInfo {
2544 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08002545 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002546 platform.size_t dataSize /// Size in bytes of pData
2547 const void* pData /// Pointer to SpecConstant data
2548}
2549
2550class VkPipelineShaderStageCreateInfo {
2551 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
2552 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002553 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002554 VkShaderStageFlagBits stage
2555 VkShaderModule module
2556 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07002557 const VkSpecializationInfo* pSpecializationInfo
2558}
2559
2560class VkComputePipelineCreateInfo {
2561 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
2562 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002563 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002564 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002565 VkPipelineLayout layout /// Interface layout of the pipeline
2566 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
2567 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
2568}
2569
2570class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002571 u32 binding /// Vertex buffer binding id
2572 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08002573 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07002574}
2575
2576class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08002577 u32 location /// location of the shader vertex attrib
2578 u32 binding /// Vertex buffer binding id
2579 VkFormat format /// format of source data
2580 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002581}
2582
2583class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002584 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
2585 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002586 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08002587 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07002588 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08002589 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002590 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
2591}
2592
2593class VkPipelineInputAssemblyStateCreateInfo {
2594 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
2595 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002596 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002597 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002598 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002599}
2600
2601class VkPipelineTessellationStateCreateInfo {
2602 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
2603 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002604 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002605 u32 patchControlPoints
2606}
2607
2608class VkPipelineViewportStateCreateInfo {
2609 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
2610 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002611 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002612 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002613 const VkViewport* pViewports
2614 u32 scissorCount
2615 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07002616}
2617
Jesse Hall3fbc8562015-11-29 22:10:52 -08002618class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08002619 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002620 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002621 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08002622 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002623 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002624 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08002625 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07002626 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002627 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08002628 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002629 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08002630 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002631 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002632}
2633
2634class VkPipelineMultisampleStateCreateInfo {
2635 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
2636 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002637 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002638 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002639 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002640 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002641 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08002642 VkBool32 alphaToCoverageEnable
2643 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002644}
2645
2646class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002647 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08002648 VkBlendFactor srcColorBlendFactor
2649 VkBlendFactor dstColorBlendFactor
2650 VkBlendOp colorBlendOp
2651 VkBlendFactor srcAlphaBlendFactor
2652 VkBlendFactor dstAlphaBlendFactor
2653 VkBlendOp alphaBlendOp
2654 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07002655}
2656
2657class VkPipelineColorBlendStateCreateInfo {
2658 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
2659 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002660 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002661 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002662 VkLogicOp logicOp
2663 u32 attachmentCount /// # of pAttachments
2664 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08002665 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07002666}
2667
2668class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08002669 VkStencilOp failOp
2670 VkStencilOp passOp
2671 VkStencilOp depthFailOp
2672 VkCompareOp compareOp
2673 u32 compareMask
2674 u32 writeMask
2675 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07002676}
2677
2678class VkPipelineDepthStencilStateCreateInfo {
2679 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
2680 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002681 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002682 VkBool32 depthTestEnable
2683 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002684 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002685 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
2686 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002687 VkStencilOpState front
2688 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002689 f32 minDepthBounds
2690 f32 maxDepthBounds
2691}
2692
2693class VkPipelineDynamicStateCreateInfo {
2694 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
2695 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002696 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002697 u32 dynamicStateCount
2698 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002699}
2700
2701class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08002702 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
2703 const void* pNext /// Pointer to next structure
2704 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002705 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08002706 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07002707 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
2708 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
2709 const VkPipelineTessellationStateCreateInfo* pTessellationState
2710 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08002711 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07002712 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
2713 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
2714 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002715 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08002716 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002717 VkRenderPass renderPass
2718 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08002719 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
2720 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 -07002721}
2722
2723class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08002724 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
2725 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002726 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08002727 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
2728 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07002729}
2730
2731class VkPushConstantRange {
2732 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08002733 u32 offset /// Start of the range, in bytes
2734 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07002735}
2736
2737class VkPipelineLayoutCreateInfo {
2738 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
2739 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002740 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08002741 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002742 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
2743 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
2744 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
2745}
2746
2747class VkSamplerCreateInfo {
2748 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
2749 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002750 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08002751 VkFilter magFilter /// Filter mode for magnification
2752 VkFilter minFilter /// Filter mode for minifiation
2753 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
2754 VkSamplerAddressMode addressModeU
2755 VkSamplerAddressMode addressModeV
2756 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07002757 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002758 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002759 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002760 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07002761 VkCompareOp compareOp
2762 f32 minLod
2763 f32 maxLod
2764 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002765 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07002766}
2767
Jesse Hall3fbc8562015-11-29 22:10:52 -08002768class VkCommandPoolCreateInfo {
2769 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002770 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002771 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08002772 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07002773}
2774
Jesse Hall3fbc8562015-11-29 22:10:52 -08002775class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002776 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002777 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08002778 VkCommandPool commandPool
2779 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08002780 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002781}
2782
Jesse Hall3dd678a2016-01-08 21:52:01 -08002783class VkCommandBufferInheritanceInfo {
2784 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07002785 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07002786 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002787 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002788 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002789 VkBool32 occlusionQueryEnable
2790 VkQueryControlFlags queryFlags
2791 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07002792}
2793
Jesse Hall3dd678a2016-01-08 21:52:01 -08002794class VkCommandBufferBeginInfo {
2795 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
2796 const void* pNext /// Pointer to next structure
2797 VkCommandBufferUsageFlags flags /// Command buffer usage flags
2798 const VkCommandBufferInheritanceInfo* pInheritanceInfo
2799}
2800
Jesse Halld27f6aa2015-08-15 17:58:48 -07002801class VkRenderPassBeginInfo {
2802 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
2803 const void* pNext /// Pointer to next structure
2804 VkRenderPass renderPass
2805 VkFramebuffer framebuffer
2806 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002807 u32 clearValueCount
2808 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07002809}
2810
2811@union
2812/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
2813class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002814 f32[4] float32
2815 s32[4] int32
2816 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07002817}
2818
2819class VkClearDepthStencilValue {
2820 f32 depth
2821 u32 stencil
2822}
2823
2824@union
2825/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
2826class VkClearValue {
2827 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002828 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07002829}
2830
Jesse Hallae38f732015-11-19 21:32:50 -08002831class VkClearAttachment {
2832 VkImageAspectFlags aspectMask
2833 u32 colorAttachment
2834 VkClearValue clearValue
2835}
2836
Jesse Halld27f6aa2015-08-15 17:58:48 -07002837class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08002838 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002839 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08002840 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07002841 VkAttachmentLoadOp loadOp /// Load op for color or depth data
2842 VkAttachmentStoreOp storeOp /// Store op for color or depth data
2843 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
2844 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
2845 VkImageLayout initialLayout
2846 VkImageLayout finalLayout
2847}
2848
2849class VkAttachmentReference {
2850 u32 attachment
2851 VkImageLayout layout
2852}
2853
2854class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002855 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08002856 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08002857 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002858 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08002859 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002860 const VkAttachmentReference* pColorAttachments
2861 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08002862 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08002863 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08002864 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002865}
2866
2867class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002868 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08002869 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07002870 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08002871 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08002872 VkAccessFlags srcAccessMask
2873 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08002874 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002875}
2876
2877class VkRenderPassCreateInfo {
2878 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
2879 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08002880 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07002881 u32 attachmentCount
2882 const VkAttachmentDescription* pAttachments
2883 u32 subpassCount
2884 const VkSubpassDescription* pSubpasses
2885 u32 dependencyCount
2886 const VkSubpassDependency* pDependencies
2887}
2888
2889class VkEventCreateInfo {
2890 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
2891 const void* pNext /// Pointer to next structure
2892 VkEventCreateFlags flags /// Event creation flags
2893}
2894
2895class VkFenceCreateInfo {
2896 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
2897 const void* pNext /// Pointer to next structure
2898 VkFenceCreateFlags flags /// Fence creation flags
2899}
2900
2901class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002902 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
2903 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
2904 VkBool32 imageCubeArray /// image views which are arrays of cube maps
2905 VkBool32 independentBlend /// blending operations are controlled per-attachment
2906 VkBool32 geometryShader /// geometry stage
2907 VkBool32 tessellationShader /// tessellation control and evaluation stage
2908 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08002909 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002910 VkBool32 logicOp /// logic operations
2911 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08002912 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08002913 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002914 VkBool32 depthBiasClamp /// depth bias clamping
2915 VkBool32 fillModeNonSolid /// point and wireframe fill modes
2916 VkBool32 depthBounds /// depth bounds test
2917 VkBool32 wideLines /// lines with width greater than 1
2918 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08002919 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
2920 VkBool32 multiViewport
2921 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002922 VkBool32 textureCompressionETC2 /// ETC texture compression formats
2923 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
2924 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08002925 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002926 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08002927 VkBool32 vertexPipelineStoresAndAtomics
2928 VkBool32 fragmentStoresAndAtomics
2929 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002930 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
2931 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
2932 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08002933 VkBool32 shaderStorageImageReadWithoutFormat
2934 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002935 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
2936 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
2937 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
2938 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
2939 VkBool32 shaderClipDistance /// clip distance in shaders
2940 VkBool32 shaderCullDistance /// cull distance in shaders
2941 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
2942 VkBool32 shaderInt64 /// 64-bit integers in shaders
2943 VkBool32 shaderInt16 /// 16-bit integers in shaders
2944 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08002945 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002946 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
2947 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
2948 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
2949 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
2950 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
2951 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
2952 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
2953 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
2954 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08002955 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002956 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07002957}
2958
2959class VkPhysicalDeviceLimits {
2960 /// resource maximum sizes
2961 u32 maxImageDimension1D /// max 1D image dimension
2962 u32 maxImageDimension2D /// max 2D image dimension
2963 u32 maxImageDimension3D /// max 3D image dimension
2964 u32 maxImageDimensionCube /// max cubemap image dimension
2965 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08002966 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08002967 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
2968 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002969 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
2970 /// memory limits
2971 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08002972 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002973 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
2974 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07002975 /// descriptor set limits
2976 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07002977 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
2978 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
2979 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
2980 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
2981 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002982 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08002983 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07002984 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
2985 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002986 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07002987 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002988 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07002989 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
2990 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08002991 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07002992 /// vertex stage limits
2993 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002994 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07002995 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
2996 u32 maxVertexInputBindingStride /// max vertex input binding stride
2997 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
2998 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08002999 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003000 u32 maxTessellationPatchSize /// max patch size (vertices)
3001 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3002 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3003 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3004 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3005 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3006 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003007 /// geometry stage limits
3008 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3009 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3010 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3011 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3012 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3013 /// fragment stage limits
3014 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003015 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003016 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003017 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3018 /// compute stage limits
3019 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3020 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3021 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3022 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3023
3024 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3025 u32 subTexelPrecisionBits /// num bits of subtexel precision
3026 u32 mipmapPrecisionBits /// num bits of mipmap precision
3027
3028 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003029 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003030
3031 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3032 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3033
3034 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003035 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3036 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3037 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3038
Jesse Halldc6d36c2015-11-29 19:12:15 -08003039 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3040 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3041 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3042 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003043
Jesse Hallfbf97b02015-11-20 14:17:03 -08003044 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003045 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003046 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003047 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3048 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3049 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3050 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3051
3052 u32 maxFramebufferWidth /// max width for a framebuffer
3053 u32 maxFramebufferHeight /// max height for a framebuffer
3054 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003055 VkSampleCountFlags framebufferColorSampleCounts
3056 VkSampleCountFlags framebufferDepthSampleCounts
3057 VkSampleCountFlags framebufferStencilSampleCounts
3058 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003059 u32 maxColorAttachments /// max num of framebuffer color attachments
3060
Jesse Hall091ed9e2015-11-30 00:55:29 -08003061 VkSampleCountFlags sampledImageColorSampleCounts
3062 VkSampleCountFlags sampledImageIntegerSampleCounts
3063 VkSampleCountFlags sampledImageDepthSampleCounts
3064 VkSampleCountFlags sampledImageStencilSampleCounts
3065 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003066 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003067 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003068
Jesse Halla9bb62b2015-11-21 19:31:56 -08003069 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003070
3071 u32 maxClipDistances /// max number of clip distances
3072 u32 maxCullDistances /// max number of cull distances
3073 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3074
Jesse Hallfbf97b02015-11-20 14:17:03 -08003075 u32 discreteQueuePriorities
3076
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003077 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3078 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003079 f32 pointSizeGranularity /// granularity of supported point sizes
3080 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003081 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003082 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003083
Jesse Hall65ab5522015-11-30 00:07:16 -08003084 VkDeviceSize optimalBufferCopyOffsetAlignment
3085 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003086 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003087}
3088
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003089class VkPhysicalDeviceSparseProperties {
3090 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 -08003091 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 -07003092 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3093 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 -07003094 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
3095}
3096
Jesse Halld27f6aa2015-08-15 17:58:48 -07003097class VkSemaphoreCreateInfo {
3098 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3099 const void* pNext /// Pointer to next structure
3100 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3101}
3102
3103class VkQueryPoolCreateInfo {
3104 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3105 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003106 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003107 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003108 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003109 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3110}
3111
3112class VkFramebufferCreateInfo {
3113 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3114 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003115 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003116 VkRenderPass renderPass
3117 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003118 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003119 u32 width
3120 u32 height
3121 u32 layers
3122}
3123
Jesse Hall3fbc8562015-11-29 22:10:52 -08003124class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003125 u32 vertexCount
3126 u32 instanceCount
3127 u32 firstVertex
3128 u32 firstInstance
3129}
3130
Jesse Hall3fbc8562015-11-29 22:10:52 -08003131class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003132 u32 indexCount
3133 u32 instanceCount
3134 u32 firstIndex
3135 s32 vertexOffset
3136 u32 firstInstance
3137}
3138
Jesse Hall3fbc8562015-11-29 22:10:52 -08003139class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003140 u32 x
3141 u32 y
3142 u32 z
3143}
3144
Jesse Halld0599582017-03-10 18:35:38 -08003145@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08003146class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003147 u32 minImageCount
3148 u32 maxImageCount
3149 VkExtent2D currentExtent
3150 VkExtent2D minImageExtent
3151 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003152 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08003153 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003154 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08003155 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003156 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08003157}
3158
Jesse Halld0599582017-03-10 18:35:38 -08003159@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08003160class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003161 VkFormat format
3162 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08003163}
3164
Jesse Halld0599582017-03-10 18:35:38 -08003165@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003166class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003167 VkStructureType sType
3168 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003169 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003170 VkSurfaceKHR surface
3171 u32 minImageCount
3172 VkFormat imageFormat
3173 VkColorSpaceKHR imageColorSpace
3174 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003175 u32 imageArrayLayers
3176 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08003177 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003178 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08003179 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003180 VkSurfaceTransformFlagBitsKHR preTransform
3181 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08003182 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08003183 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003184 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08003185}
3186
Jesse Halld0599582017-03-10 18:35:38 -08003187@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08003188class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003189 VkStructureType sType
3190 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08003191 u32 waitSemaphoreCount
3192 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08003193 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08003194 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003195 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08003196 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08003197}
3198
Jesse Halld0599582017-03-10 18:35:38 -08003199@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003200class VkDisplayPropertiesKHR {
3201 VkDisplayKHR display
3202 const char* displayName
3203 VkExtent2D physicalDimensions
3204 VkExtent2D physicalResolution
3205 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08003206 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08003207 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08003208}
3209
Jesse Halld0599582017-03-10 18:35:38 -08003210@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003211class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003212 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08003213 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08003214}
Jesse Halld27f6aa2015-08-15 17:58:48 -07003215
Jesse Halld0599582017-03-10 18:35:38 -08003216@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003217class VkDisplayModePropertiesKHR {
3218 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08003219 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003220}
3221
Jesse Halld0599582017-03-10 18:35:38 -08003222@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003223class VkDisplayModeCreateInfoKHR {
3224 VkStructureType sType
3225 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08003226 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08003227 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08003228}
3229
Jesse Halld0599582017-03-10 18:35:38 -08003230@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08003231class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08003232 VkDisplayKHR currentDisplay
3233 u32 currentStackIndex
3234}
3235
Jesse Halld0599582017-03-10 18:35:38 -08003236@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003237class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003238 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
3239 VkOffset2D minSrcPosition
3240 VkOffset2D maxSrcPosition
3241 VkExtent2D minSrcExtent
3242 VkExtent2D maxSrcExtent
3243 VkOffset2D minDstPosition
3244 VkOffset2D maxDstPosition
3245 VkExtent2D minDstExtent
3246 VkExtent2D maxDstExtent
3247}
3248
Jesse Halld0599582017-03-10 18:35:38 -08003249@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08003250class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08003251 VkStructureType sType
3252 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003253 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08003254 VkDisplayModeKHR displayMode
3255 u32 planeIndex
3256 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003257 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08003258 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003259 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
3260 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003261}
3262
Jesse Halld0599582017-03-10 18:35:38 -08003263@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08003264class VkDisplayPresentInfoKHR {
3265 VkStructureType sType
3266 const void* pNext
3267 VkRect2D srcRect
3268 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08003269 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08003270}
3271
Jesse Halld0599582017-03-10 18:35:38 -08003272@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003273class VkXlibSurfaceCreateInfoKHR {
3274 VkStructureType sType
3275 const void* pNext
3276 VkXlibSurfaceCreateFlagsKHR flags
3277 platform.Display* dpy
3278 platform.Window window
3279}
3280
Jesse Halld0599582017-03-10 18:35:38 -08003281@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003282class VkXcbSurfaceCreateInfoKHR {
3283 VkStructureType sType
3284 const void* pNext
3285 VkXcbSurfaceCreateFlagsKHR flags
3286 platform.xcb_connection_t* connection
3287 platform.xcb_window_t window
3288}
3289
Jesse Halld0599582017-03-10 18:35:38 -08003290@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003291class VkWaylandSurfaceCreateInfoKHR {
3292 VkStructureType sType
3293 const void* pNext
3294 VkWaylandSurfaceCreateFlagsKHR flags
3295 platform.wl_display* display
3296 platform.wl_surface* surface
3297}
3298
Jesse Halld0599582017-03-10 18:35:38 -08003299@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003300class VkMirSurfaceCreateInfoKHR {
3301 VkStructureType sType
3302 const void* pNext
3303 VkMirSurfaceCreateFlagsKHR flags
3304 platform.MirConnection* connection
3305 platform.MirSurface* mirSurface
3306}
3307
Jesse Halld0599582017-03-10 18:35:38 -08003308@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003309class VkAndroidSurfaceCreateInfoKHR {
3310 VkStructureType sType
3311 const void* pNext
3312 VkAndroidSurfaceCreateFlagsKHR flags
3313 platform.ANativeWindow* window
3314}
3315
Jesse Halld0599582017-03-10 18:35:38 -08003316@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003317class VkWin32SurfaceCreateInfoKHR {
3318 VkStructureType sType
3319 const void* pNext
3320 VkWin32SurfaceCreateFlagsKHR flags
3321 platform.HINSTANCE hinstance
3322 platform.HWND hwnd
3323}
3324
Jesse Halld0599582017-03-10 18:35:38 -08003325@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08003326class VkNativeBufferANDROID {
3327 VkStructureType sType
3328 const void* pNext
3329 platform.buffer_handle_t handle
3330 int stride
3331 int format
3332 int usage
3333}
3334
Jesse Halld0599582017-03-10 18:35:38 -08003335@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08003336class VkDebugReportCallbackCreateInfoEXT {
3337 VkStructureType sType
3338 const void* pNext
3339 VkDebugReportFlagsEXT flags
3340 PFN_vkDebugReportCallbackEXT pfnCallback
3341 void* pUserData
3342}
3343
Jesse Halld0599582017-03-10 18:35:38 -08003344@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07003345class VkPipelineRasterizationStateRasterizationOrderAMD {
3346 VkStructureType sType
3347 const void* pNext
3348 VkRasterizationOrderAMD rasterizationOrder
3349}
3350
Jesse Halld0599582017-03-10 18:35:38 -08003351@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003352class VkDebugMarkerObjectNameInfoEXT {
3353 VkStructureType sType
3354 const void* pNext
3355 VkDebugReportObjectTypeEXT objectType
3356 u64 object
3357 const char* pObjectName
3358}
3359
Jesse Halld0599582017-03-10 18:35:38 -08003360@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003361class VkDebugMarkerObjectTagInfoEXT {
3362 VkStructureType sType
3363 const void* pNext
3364 VkDebugReportObjectTypeEXT objectType
3365 u64 object
3366 u64 tagName
3367 platform.size_t tagSize
3368 const void* pTag
3369}
3370
Jesse Halld0599582017-03-10 18:35:38 -08003371@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07003372class VkDebugMarkerMarkerInfoEXT {
3373 VkStructureType sType
3374 const void* pNext
3375 const char* pMarkerName
3376 f32[4] color
3377}
3378
Jesse Halld0599582017-03-10 18:35:38 -08003379@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003380class VkDedicatedAllocationImageCreateInfoNV {
3381 VkStructureType sType
3382 const void* pNext
3383 VkBool32 dedicatedAllocation
3384}
3385
Jesse Halld0599582017-03-10 18:35:38 -08003386@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003387class VkDedicatedAllocationBufferCreateInfoNV {
3388 VkStructureType sType
3389 const void* pNext
3390 VkBool32 dedicatedAllocation
3391}
3392
Jesse Halld0599582017-03-10 18:35:38 -08003393@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall3f5499b2016-07-26 15:20:40 -07003394class VkDedicatedAllocationMemoryAllocateInfoNV {
3395 VkStructureType sType
3396 const void* pNext
3397 VkImage image
3398 VkBuffer buffer
3399}
3400
Jesse Halld0599582017-03-10 18:35:38 -08003401@extension("VK_KHX_multiview") // 54
3402class VkRenderPassMultiviewCreateInfoKHX {
3403 VkStructureType sType
3404 const void* pNext
3405 u32 subpassCount
3406 const u32* pViewMasks
3407 u32 dependencyCount
3408 const s32* pViewOffsets
3409 u32 correlationMaskCount
3410 const u32* pCorrelationMasks
3411}
3412
3413@extension("VK_KHX_multiview") // 54
3414class VkPhysicalDeviceMultiviewFeaturesKHX {
3415 VkStructureType sType
3416 void* pNext
3417 VkBool32 multiview
3418 VkBool32 multiviewGeometryShader
3419 VkBool32 multiviewTessellationShader
3420}
3421
3422@extension("VK_KHX_multiview") // 54
3423class VkPhysicalDeviceMultiviewPropertiesKHX {
3424 VkStructureType sType
3425 void* pNext
3426 u32 maxMultiviewViewCount
3427 u32 maxMultiviewInstanceIndex
3428}
3429
3430@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08003431class VkExternalImageFormatPropertiesNV {
3432 VkImageFormatProperties imageFormatProperties
3433 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
3434 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
3435 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
3436}
3437
Jesse Halld0599582017-03-10 18:35:38 -08003438@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003439class VkExternalMemoryImageCreateInfoNV {
3440 VkStructureType sType
3441 const void* pNext
3442 VkExternalMemoryHandleTypeFlagsNV handleTypes
3443}
3444
Jesse Halld0599582017-03-10 18:35:38 -08003445@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08003446class VkExportMemoryAllocateInfoNV {
3447 VkStructureType sType
3448 const void* pNext
3449 VkExternalMemoryHandleTypeFlagsNV handleTypes
3450}
3451
Jesse Halld0599582017-03-10 18:35:38 -08003452@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003453class VkImportMemoryWin32HandleInfoNV {
3454 VkStructureType sType
3455 const void* pNext
3456 VkExternalMemoryHandleTypeFlagsNV handleType
3457 platform.HANDLE handle
3458}
3459
Jesse Halld0599582017-03-10 18:35:38 -08003460@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08003461class VkExportMemoryWin32HandleInfoNV {
3462 VkStructureType sType
3463 const void* pNext
3464 const platform.SECURITY_ATTRIBUTES* pAttributes
3465 platform.DWORD dwAccess
3466}
3467
Jesse Halld0599582017-03-10 18:35:38 -08003468@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08003469class VkWin32KeyedMutexAcquireReleaseInfoNV {
3470 VkStructureType sType
3471 const void* pNext
3472 u32 acquireCount
3473 const VkDeviceMemory* pAcquireSyncs
3474 const u64* pAcquireKeys
3475 const u32* pAcquireTimeoutMilliseconds
3476 u32 releaseCount
3477 const VkDeviceMemory* pReleaseSyncs
3478 const u64* pReleaseKeys
3479}
3480
Jesse Halld0599582017-03-10 18:35:38 -08003481@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003482class VkPhysicalDeviceFeatures2KHR {
3483 VkStructureType sType
3484 void* pNext
3485 VkPhysicalDeviceFeatures features
3486}
3487
Jesse Halld0599582017-03-10 18:35:38 -08003488@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003489class VkPhysicalDeviceProperties2KHR {
3490 VkStructureType sType
3491 void* pNext
3492 VkPhysicalDeviceProperties properties
3493}
3494
Jesse Halld0599582017-03-10 18:35:38 -08003495@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003496class VkFormatProperties2KHR {
3497 VkStructureType sType
3498 void* pNext
3499 VkFormatProperties formatProperties
3500}
3501
Jesse Halld0599582017-03-10 18:35:38 -08003502@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003503class VkImageFormatProperties2KHR {
3504 VkStructureType sType
3505 void* pNext
3506 VkImageFormatProperties imageFormatProperties
3507}
3508
Jesse Halld0599582017-03-10 18:35:38 -08003509@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003510class VkPhysicalDeviceImageFormatInfo2KHR {
3511 VkStructureType sType
3512 const void* pNext
3513 VkFormat format
3514 VkImageType type
3515 VkImageTiling tiling
3516 VkImageUsageFlags usage
3517 VkImageCreateFlags flags
3518}
3519
Jesse Halld0599582017-03-10 18:35:38 -08003520@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003521class VkQueueFamilyProperties2KHR {
3522 VkStructureType sType
3523 void* pNext
3524 VkQueueFamilyProperties queueFamilyProperties
3525}
3526
Jesse Halld0599582017-03-10 18:35:38 -08003527@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003528class VkPhysicalDeviceMemoryProperties2KHR {
3529 VkStructureType sType
3530 void* pNext
3531 VkPhysicalDeviceMemoryProperties memoryProperties
3532}
3533
Jesse Halld0599582017-03-10 18:35:38 -08003534@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003535class VkSparseImageFormatProperties2KHR {
3536 VkStructureType sType
3537 void* pNext
3538 VkSparseImageFormatProperties properties
3539}
3540
Jesse Halld0599582017-03-10 18:35:38 -08003541@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08003542class VkPhysicalDeviceSparseImageFormatInfo2KHR {
3543 VkStructureType sType
3544 const void* pNext
3545 VkFormat format
3546 VkImageType type
3547 VkSampleCountFlagBits samples
3548 VkImageUsageFlags usage
3549 VkImageTiling tiling
3550}
3551
Jesse Halld0599582017-03-10 18:35:38 -08003552@extension("VK_KHX_device_group") // 61
3553class VkMemoryAllocateFlagsInfoKHX {
3554 VkStructureType sType
3555 const void* pNext
3556 VkMemoryAllocateFlagsKHX flags
3557 u32 deviceMask
3558}
3559
3560@extension("VK_KHX_device_group") // 61
3561class VkBindBufferMemoryInfoKHX {
3562 VkStructureType sType
3563 const void* pNext
3564 VkBuffer buffer
3565 VkDeviceMemory memory
3566 VkDeviceSize memoryOffset
3567 u32 deviceIndexCount
3568 const u32* pDeviceIndices
3569}
3570
3571@extension("VK_KHX_device_group") // 61
3572class VkBindImageMemoryInfoKHX {
3573 VkStructureType sType
3574 const void* pNext
3575 VkImage image
3576 VkDeviceMemory memory
3577 VkDeviceSize memoryOffset
3578 u32 deviceIndexCount
3579 const u32* pDeviceIndices
3580 u32 SFRRectCount
3581 const VkRect2D* pSFRRects
3582}
3583
3584@extension("VK_KHX_device_group") // 61
3585class VkDeviceGroupRenderPassBeginInfoKHX {
3586 VkStructureType sType
3587 const void* pNext
3588 u32 deviceMask
3589 u32 deviceRenderAreaCount
3590 const VkRect2D* pDeviceRenderAreas
3591}
3592
3593@extension("VK_KHX_device_group") // 61
3594class VkDeviceGroupCommandBufferBeginInfoKHX {
3595 VkStructureType sType
3596 const void* pNext
3597 u32 deviceMask
3598}
3599
3600@extension("VK_KHX_device_group") // 61
3601class VkDeviceGroupSubmitInfoKHX {
3602 VkStructureType sType
3603 const void* pNext
3604 u32 waitSemaphoreCount
3605 const u32* pWaitSemaphoreDeviceIndices
3606 u32 commandBufferCount
3607 const u32* pCommandBufferDeviceMasks
3608 u32 signalSemaphoreCount
3609 const u32* pSignalSemaphoreDeviceIndices
3610}
3611
3612@extension("VK_KHX_device_group") // 61
3613class VkDeviceGroupBindSparseInfoKHX {
3614 VkStructureType sType
3615 const void* pNext
3616 u32 resourceDeviceIndex
3617 u32 memoryDeviceIndex
3618}
3619
3620@extension("VK_KHX_device_group") // 61
3621class VkDeviceGroupPresentCapabilitiesKHX {
3622 VkStructureType sType
3623 const void* pNext
3624 u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask
3625 VkDeviceGroupPresentModeFlagsKHX modes
3626}
3627
3628@extension("VK_KHX_device_group") // 61
3629class VkImageSwapchainCreateInfoKHX {
3630 VkStructureType sType
3631 const void* pNext
3632 VkSwapchainKHR swapchain
3633}
3634
3635@extension("VK_KHX_device_group") // 61
3636class VkBindImageMemorySwapchainInfoKHX {
3637 VkStructureType sType
3638 const void* pNext
3639 VkSwapchainKHR swapchain
3640 u32 imageIndex
3641}
3642
3643@extension("VK_KHX_device_group") // 61
3644class VkAcquireNextImageInfoKHX {
3645 VkStructureType sType
3646 const void* pNext
3647 VkSwapchainKHR swapchain
3648 u64 timeout
3649 VkSemaphore semaphore
3650 VkFence fence
3651 u32 deviceMask
3652}
3653
3654@extension("VK_KHX_device_group") // 61
3655class VkDeviceGroupPresentInfoKHX {
3656 VkStructureType sType
3657 const void* pNext
3658 u32 swapchainCount
3659 const u32* pDeviceMasks
3660 VkDeviceGroupPresentModeFlagBitsKHX mode
3661}
3662
3663@extension("VK_KHX_device_group") // 61
3664class VkDeviceGroupSwapchainCreateInfoKHX {
3665 VkStructureType sType
3666 const void* pNext
3667 VkDeviceGroupPresentModeFlagsKHX modes
3668}
3669
3670@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08003671class VkValidationFlagsEXT {
3672 VkStructureType sType
3673 const void* pNext
3674 u32 disabledValidationCheckCount
3675 VkValidationCheckEXT* pDisabledValidationChecks
3676}
3677
Jesse Halld0599582017-03-10 18:35:38 -08003678@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08003679class VkViSurfaceCreateInfoNN {
3680 VkStructureType sType
3681 const void* pNext
3682 VkViSurfaceCreateFlagsNN flags
3683 void* window
3684}
3685
Jesse Halld0599582017-03-10 18:35:38 -08003686@extension("VK_KHX_device_group_creation") // 71
3687class VkPhysicalDeviceGroupPropertiesKHX {
3688 VkStructureType sType
Jesse Hall2c677d52017-03-20 13:09:19 -07003689 void* pNext
Jesse Halld0599582017-03-10 18:35:38 -08003690 u32 physicalDeviceCount
3691 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices
3692 VkBool32 subsetAllocation
3693}
3694
3695@extension("VK_KHX_device_group_creation") // 71
3696class VkDeviceGroupDeviceCreateInfoKHX {
3697 VkStructureType sType
3698 const void* pNext
3699 u32 physicalDeviceCount
3700 const VkPhysicalDevice* pPhysicalDevices
3701}
3702
3703@extension("VK_KHX_external_memory_capabilities") // 72
3704class VkExternalMemoryPropertiesKHX {
3705 VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures
3706 VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes
3707 VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes
3708}
3709
3710@extension("VK_KHX_external_memory_capabilities") // 72
3711class VkPhysicalDeviceExternalImageFormatInfoKHX {
3712 VkStructureType sType
3713 const void* pNext
3714 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3715}
3716
3717@extension("VK_KHX_external_memory_capabilities") // 72
3718class VkExternalImageFormatPropertiesKHX {
3719 VkStructureType sType
3720 void* pNext
3721 VkExternalMemoryPropertiesKHX externalMemoryProperties
3722}
3723
3724@extension("VK_KHX_external_memory_capabilities") // 72
3725class VkPhysicalDeviceExternalBufferInfoKHX {
3726 VkStructureType sType
3727 const void* pNext
3728 VkBufferCreateFlags flags
3729 VkBufferUsageFlags usage
3730 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3731}
3732
3733@extension("VK_KHX_external_memory_capabilities") // 72
3734class VkExternalBufferPropertiesKHX {
3735 VkStructureType sType
3736 void* pNext
3737 VkExternalMemoryPropertiesKHX externalMemoryProperties
3738}
3739
3740@extension("VK_KHX_external_memory_capabilities") // 72
3741class VkPhysicalDeviceIDPropertiesKHX {
3742 VkStructureType sType
3743 void* pNext
3744 u8[VK_UUID_SIZE] deviceUUID
3745 u8[VK_UUID_SIZE] driverUUID
3746 u8[VK_LUID_SIZE_KHX] deviceLUID
3747 VkBool32 deviceLUIDValid
3748}
3749
Jesse Halld0599582017-03-10 18:35:38 -08003750@extension("VK_KHX_external_memory") // 73
3751class VkExternalMemoryImageCreateInfoKHX {
3752 VkStructureType sType
3753 const void* pNext
3754 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3755}
3756
3757@extension("VK_KHX_external_memory") // 73
3758class VkExternalMemoryBufferCreateInfoKHX {
3759 VkStructureType sType
3760 const void* pNext
3761 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3762}
3763
3764@extension("VK_KHX_external_memory") // 73
3765class VkExportMemoryAllocateInfoKHX {
3766 VkStructureType sType
3767 const void* pNext
3768 VkExternalMemoryHandleTypeFlagsKHX handleTypes
3769}
3770
3771@extension("VK_KHX_external_memory_win32") // 74
3772class VkImportMemoryWin32HandleInfoKHX {
3773 VkStructureType sType
3774 const void* pNext
3775 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3776 platform.HANDLE handle
3777}
3778
3779@extension("VK_KHX_external_memory_win32") // 74
3780class VkExportMemoryWin32HandleInfoKHX {
3781 VkStructureType sType
3782 const void* pNext
3783 const platform.SECURITY_ATTRIBUTES* pAttributes
3784 platform.DWORD dwAccess
3785 platform.LPCWSTR name
3786}
3787
3788@extension("VK_KHX_external_memory_win32") // 74
3789class VkMemoryWin32HandlePropertiesKHX {
3790 VkStructureType sType
3791 void* pNext
3792 u32 memoryTypeBits
3793}
3794
3795@extension("VK_KHX_external_memory_fd") // 75
3796class VkImportMemoryFdInfoKHX {
3797 VkStructureType sType
3798 const void* pNext
3799 VkExternalMemoryHandleTypeFlagBitsKHX handleType
3800 int fd
3801}
3802
3803@extension("VK_KHX_external_memory_fd") // 75
3804class VkMemoryFdPropertiesKHX {
3805 VkStructureType sType
3806 void* pNext
3807 u32 memoryTypeBits
3808}
3809
3810@extension("VK_KHX_win32_keyed_mutex") // 76
3811class VkWin32KeyedMutexAcquireReleaseInfoKHX {
3812 VkStructureType sType
3813 const void* pNext
3814 u32 acquireCount
3815 const VkDeviceMemory* pAcquireSyncs
3816 const u64* pAcquireKeys
3817 const u32* pAcquireTimeouts
3818 u32 releaseCount
3819 const VkDeviceMemory* pReleaseSyncs
3820 const u64* pReleaseKeys
3821}
3822
3823@extension("VK_KHX_external_semaphore_capabilities") // 77
3824class VkPhysicalDeviceExternalSemaphoreInfoKHX {
3825 VkStructureType sType
3826 const void* pNext
3827 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3828}
3829
3830@extension("VK_KHX_external_semaphore_capabilities") // 77
3831class VkExternalSemaphorePropertiesKHX {
3832 VkStructureType sType
3833 void* pNext
3834 VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes
3835 VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes
3836 VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures
3837}
3838
3839@extension("VK_KHX_external_semaphore") // 78
3840class VkExportSemaphoreCreateInfoKHX {
3841 VkStructureType sType
3842 const void* pNext
3843 VkExternalSemaphoreHandleTypeFlagsKHX handleTypes
3844}
3845
3846@extension("VK_KHX_external_semaphore_win32") // 79
3847class VkImportSemaphoreWin32HandleInfoKHX {
3848 VkStructureType sType
3849 const void* pNext
3850 VkSemaphore semaphore
3851 VkExternalSemaphoreHandleTypeFlagsKHX handleType
3852 platform.HANDLE handle
3853}
3854
3855@extension("VK_KHX_external_semaphore_win32") // 79
3856class VkExportSemaphoreWin32HandleInfoKHX {
3857 VkStructureType sType
3858 const void* pNext
3859 const platform.SECURITY_ATTRIBUTES* pAttributes
3860 platform.DWORD dwAccess
3861 platform.LPCWSTR name
3862}
3863
3864@extension("VK_KHX_external_semaphore_win32") // 79
3865class VkD3D12FenceSubmitInfoKHX {
3866 VkStructureType sType
3867 const void* pNext
3868 u32 waitSemaphoreValuesCount
3869 const u64* pWaitSemaphoreValues
3870 u32 signalSemaphoreValuesCount
3871 const u64* pSignalSemaphoreValues
3872}
3873
3874@extension("VK_KHX_external_semaphore_fd") // 80
3875class VkImportSemaphoreFdInfoKHX {
3876 VkStructureType sType
3877 const void* pNext
3878 VkSemaphore semaphore
3879 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType
3880 s32 fd
3881}
3882
3883@extension("VK_KHR_push_descriptor") // 81
3884class VkPhysicalDevicePushDescriptorPropertiesKHR {
3885 VkStructureType sType
3886 void* pNext
3887 u32 maxPushDescriptors
3888}
3889
Jesse Hall2c677d52017-03-20 13:09:19 -07003890@extension("VK_KHR_incremental_present") // 85
3891class VkRectLayerKHR {
3892 VkOffset2D offset
3893 VkExtent2D extent
3894 u32 layer
3895}
3896
3897@extension("VK_KHR_incremental_present") // 85
3898class VkPresentRegionKHR {
3899 u32 rectangleCount
3900 const VkRectLayerKHR* pRectangles
3901}
3902
3903@extension("VK_KHR_incremental_present") // 85
3904class VkPresentRegionsKHR {
3905 VkStructureType sType
3906 const void* pNext
3907 u32 swapchainCount
3908 const VkPresentRegionKHR* pRegions
3909}
3910
Jesse Halld0599582017-03-10 18:35:38 -08003911@extension("VK_KHR_descriptor_update_template") // 86
3912class VkDescriptorUpdateTemplateEntryKHR {
3913 u32 dstBinding
3914 u32 dstArrayElement
3915 u32 descriptorCount
3916 VkDescriptorType descriptorType
3917 platform.size_t offset
3918 platform.size_t stride
3919}
3920
3921@extension("VK_KHR_descriptor_update_template") // 86
3922class VkDescriptorUpdateTemplateCreateInfoKHR {
3923 VkStructureType sType
3924 void* pNext
3925 VkDescriptorUpdateTemplateCreateFlagsKHR flags
3926 u32 descriptorUpdateEntryCount
3927 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
3928 VkDescriptorUpdateTemplateTypeKHR templateType
3929 VkDescriptorSetLayout descriptorSetLayout
3930 VkPipelineBindPoint pipelineBindPoint
3931 VkPipelineLayout pipelineLayout
3932 u32 set
3933}
3934
3935@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003936class VkDeviceGeneratedCommandsFeaturesNVX {
3937 VkStructureType sType
3938 const void* pNext
3939 VkBool32 computeBindingPointSupport
3940}
3941
Jesse Halld0599582017-03-10 18:35:38 -08003942@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003943class VkDeviceGeneratedCommandsLimitsNVX {
3944 VkStructureType sType
3945 const void* pNext
3946 u32 maxIndirectCommandsLayoutTokenCount
3947 u32 maxObjectEntryCounts
3948 u32 minSequenceCountBufferOffsetAlignment
3949 u32 minSequenceIndexBufferOffsetAlignment
3950 u32 minCommandsTokenBufferOffsetAlignment
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 VkIndirectCommandsTokenNVX {
3955 VkIndirectCommandsTokenTypeNVX tokenType
3956 VkBuffer buffer
3957 VkDeviceSize offset
3958}
3959
Jesse Halld0599582017-03-10 18:35:38 -08003960@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003961class VkIndirectCommandsLayoutTokenNVX {
3962 VkIndirectCommandsTokenTypeNVX tokenType
3963 u32 bindingUnit
3964 u32 dynamicCount
3965 u32 divisor
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 VkIndirectCommandsLayoutCreateInfoNVX {
3970 VkStructureType sType
3971 const void* pNext
3972 VkPipelineBindPoint pipelineBindPoint
3973 VkIndirectCommandsLayoutUsageFlagsNVX flags
3974 u32 tokenCount
3975 const VkIndirectCommandsLayoutTokenNVX* pTokens
3976}
3977
Jesse Halld0599582017-03-10 18:35:38 -08003978@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003979class VkCmdProcessCommandsInfoNVX {
3980 VkStructureType sType
3981 const void* pNext
3982 VkObjectTableNVX objectTable
3983 VkIndirectCommandsLayoutNVX indirectCommandsLayout
3984 u32 indirectCommandsTokenCount
3985 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
3986 u32 maxSequencesCount
3987 VkCommandBuffer targetCommandBuffer
3988 VkBuffer sequencesCountBuffer
3989 VkDeviceSize sequencesCountOffset
3990 VkBuffer sequencesIndexBuffer
3991 VkDeviceSize sequencesIndexOffset
3992}
3993
Jesse Halld0599582017-03-10 18:35:38 -08003994@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08003995class VkCmdReserveSpaceForCommandsInfoNVX {
3996 VkStructureType sType
3997 const void* pNext
3998 VkObjectTableNVX objectTable
3999 VkIndirectCommandsLayoutNVX indirectCommandsLayout
4000 u32 maxSequencesCount
4001}
4002
Jesse Halld0599582017-03-10 18:35:38 -08004003@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004004class VkObjectTableCreateInfoNVX {
4005 VkStructureType sType
4006 const void* pNext
4007 u32 objectCount
4008 const VkObjectEntryTypeNVX* pObjectEntryTypes
4009 const u32* pObjectEntryCounts
4010 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
4011 u32 maxUniformBuffersPerDescriptor
4012 u32 maxStorageBuffersPerDescriptor
4013 u32 maxStorageImagesPerDescriptor
4014 u32 maxSampledImagesPerDescriptor
4015 u32 maxPipelineLayouts
4016}
4017
Jesse Halld0599582017-03-10 18:35:38 -08004018@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004019class VkObjectTableEntryNVX {
4020 VkObjectEntryTypeNVX type
4021 VkObjectEntryUsageFlagsNVX flags
4022}
4023
Jesse Halld0599582017-03-10 18:35:38 -08004024@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004025class VkObjectTablePipelineEntryNVX {
4026 VkObjectEntryTypeNVX type
4027 VkObjectEntryUsageFlagsNVX flags
4028 VkPipeline pipeline
4029}
4030
Jesse Halld0599582017-03-10 18:35:38 -08004031@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004032class VkObjectTableDescriptorSetEntryNVX {
4033 VkObjectEntryTypeNVX type
4034 VkObjectEntryUsageFlagsNVX flags
4035 VkPipelineLayout pipelineLayout
4036 VkDescriptorSet descriptorSet
4037}
4038
Jesse Halld0599582017-03-10 18:35:38 -08004039@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004040class VkObjectTableVertexBufferEntryNVX {
4041 VkObjectEntryTypeNVX type
4042 VkObjectEntryUsageFlagsNVX flags
4043 VkBuffer buffer
4044}
4045
Jesse Halld0599582017-03-10 18:35:38 -08004046@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004047class VkObjectTableIndexBufferEntryNVX {
4048 VkObjectEntryTypeNVX type
4049 VkObjectEntryUsageFlagsNVX flags
4050 VkBuffer buffer
Jesse Hall08e2f482017-03-06 15:22:17 -08004051 VkIndexType indexType
Jesse Halleb02c472017-02-24 15:13:45 -08004052}
4053
Jesse Halld0599582017-03-10 18:35:38 -08004054@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08004055class VkObjectTablePushConstantEntryNVX {
4056 VkObjectEntryTypeNVX type
4057 VkObjectEntryUsageFlagsNVX flags
4058 VkPipelineLayout pipelineLayout
4059 VkShaderStageFlags stageFlags
4060}
4061
Jesse Halld0599582017-03-10 18:35:38 -08004062@extension("VK_NV_clip_space_w_scaling") // 88
4063class VkViewportWScalingNV {
4064 f32 xcoeff
4065 f32 ycoeff
4066}
4067
4068@extension("VK_NV_clip_space_w_scaling") // 88
4069class VkPipelineViewportWScalingStateCreateInfoNV {
4070 VkStructureType sType
4071 const void* pNext
4072 VkBool32 viewportWScalingEnable
4073 u32 viewportCount
4074 const VkViewportWScalingNV* pViewportWScalings
4075}
4076
4077@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08004078class VkSurfaceCapabilities2EXT {
4079 VkStructureType sType
4080 void* pNext
4081 u32 minImageCount
4082 u32 maxImageCount
4083 VkExtent2D currentExtent
4084 VkExtent2D minImageExtent
4085 VkExtent2D maxImageExtent
4086 u32 maxImageArrayLayers
4087 VkSurfaceTransformFlagsKHR supportedTransforms
4088 VkSurfaceTransformFlagBitsKHR currentTransform
4089 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
4090 VkImageUsageFlags supportedUsageFlags
4091 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
4092}
4093
Jesse Halld0599582017-03-10 18:35:38 -08004094@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004095class VkDisplayPowerInfoEXT {
4096 VkStructureType sType
4097 const void* pNext
4098 VkDisplayPowerStateEXT powerState
4099}
4100
Jesse Halld0599582017-03-10 18:35:38 -08004101@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004102class VkDeviceEventInfoEXT {
4103 VkStructureType sType
4104 const void* pNext
4105 VkDeviceEventTypeEXT deviceEvent
4106}
4107
Jesse Halld0599582017-03-10 18:35:38 -08004108@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004109class VkDisplayEventInfoEXT {
4110 VkStructureType sType
4111 const void* pNext
4112 VkDisplayEventTypeEXT displayEvent
4113}
4114
Jesse Halld0599582017-03-10 18:35:38 -08004115@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08004116class VkSwapchainCounterCreateInfoEXT {
4117 VkStructureType sType
4118 const void* pNext
4119 VkSurfaceCounterFlagsEXT surfaceCounters
4120}
Jesse Hall1356b0d2015-11-23 17:24:58 -08004121
Jesse Halle8ec6a22017-03-10 21:01:57 -08004122@extension("VK_GOOGLE_display_timing") // 93
4123class VkRefreshCycleDurationGOOGLE {
4124 u64 refreshDuration
4125}
4126
4127@extension("VK_GOOGLE_display_timing") // 93
4128class VkPastPresentationTimingGOOGLE {
4129 u32 presentID
4130 u64 desiredPresentTime
4131 u64 actualPresentTime
4132 u64 earliestPresentTime
4133 u64 presentMargin
4134}
4135
4136@extension("VK_GOOGLE_display_timing") // 93
4137class VkPresentTimeGOOGLE {
4138 u32 presentID
4139 u64 desiredPresentTime
4140}
4141
4142@extension("VK_GOOGLE_display_timing") // 93
4143class VkPresentTimesInfoGOOGLE {
4144 VkStructureType sType
4145 const void* pNext
4146 u32 swapchainCount
4147 const VkPresentTimeGOOGLE* pTimes
4148}
4149
Jesse Halld0599582017-03-10 18:35:38 -08004150@extension("VK_NVX_multiview_per_view_attributes") // 98
4151class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
4152 VkStructureType sType
4153 void* pNext
4154 VkBool32 perViewPositionAllComponents
4155}
4156
4157@extension("VK_NV_viewport_swizzle") // 99
4158class VkViewportSwizzleNV {
4159 VkViewportCoordinateSwizzleNV x
4160 VkViewportCoordinateSwizzleNV y
4161 VkViewportCoordinateSwizzleNV z
4162 VkViewportCoordinateSwizzleNV w
4163}
4164
4165@extension("VK_NV_viewport_swizzle") // 99
4166class VkPipelineViewportSwizzleStateCreateInfoNV {
4167 VkStructureType sType
4168 const void* pNext
4169 VkPipelineViewportSwizzleStateCreateFlagsNV flags
4170 u32 viewportCount
4171 const VkViewportSwizzleNV* pViewportSwizzles
4172}
4173
4174@extension("VK_EXT_discard_rectangles") // 100
4175class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
4176 VkStructureType sType
Jesse Hall2c677d52017-03-20 13:09:19 -07004177 void* pNext
Jesse Halld0599582017-03-10 18:35:38 -08004178 u32 maxDiscardRectangles
4179}
4180
4181@extension("VK_EXT_discard_rectangles") // 100
4182class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Halle8ec6a22017-03-10 21:01:57 -08004183 VkStructureType sType
4184 const void* pNext
4185 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
4186 VkDiscardRectangleModeEXT discardRectangleMode
4187 u32 discardRectangleCount
4188 const VkRect2D* pDiscardRectangles
4189}
4190
4191@extension("VK_EXT_hdr_metadata") // 106
4192class VkXYColorEXT {
4193 f32 x
4194 f32 y
4195}
4196
4197@extension("VK_EXT_hdr_metadata") // 106
4198class VkHdrMetadataEXT {
4199 VkStructureType sType
4200 const void* pNext
4201 VkXYColorEXT displayPrimaryRed
4202 VkXYColorEXT displayPrimaryGreen
4203 VkXYColorEXT displayPrimaryBlue
4204 VkXYColorEXT whitePoint
4205 f32 maxLuminance
4206 f32 minLuminance
4207 f32 maxContentLightLevel
4208 f32 maxFrameAverageLightLevel
Jesse Halld0599582017-03-10 18:35:38 -08004209}
4210
4211@extension("VK_MVK_ios_surface") // 123
4212class VkIOSSurfaceCreateInfoMVK {
4213 VkStructureType sType
4214 const void* pNext
4215 VkIOSSurfaceCreateFlagsMVK flags
4216 const void* pView
4217}
4218
4219@extension("VK_MVK_macos_surface") // 124
4220class VkMacOSSurfaceCreateInfoMVK {
4221 VkStructureType sType
4222 const void* pNext
4223 VkMacOSSurfaceCreateFlagsMVK flags
4224 const void* pView
4225}
4226
Jesse Halld27f6aa2015-08-15 17:58:48 -07004227////////////////
4228// Commands //
4229////////////////
4230
4231// Function pointers. TODO: add support for function pointers.
4232
4233@external type void* PFN_vkVoidFunction
4234@pfn cmd void vkVoidFunction() {
4235}
4236
Jesse Hall3fbc8562015-11-29 22:10:52 -08004237@external type void* PFN_vkAllocationFunction
4238@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004239 void* pUserData,
4240 platform.size_t size,
4241 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004242 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004243 return ?
4244}
4245
Jesse Hall3fbc8562015-11-29 22:10:52 -08004246@external type void* PFN_vkReallocationFunction
4247@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004248 void* pUserData,
4249 void* pOriginal,
4250 platform.size_t size,
4251 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004252 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004253 return ?
4254}
4255
4256@external type void* PFN_vkFreeFunction
4257@pfn cmd void vkFreeFunction(
4258 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004259 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004260}
4261
Jesse Hall3fbc8562015-11-29 22:10:52 -08004262@external type void* PFN_vkInternalAllocationNotification
4263@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004264 void* pUserData,
4265 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004266 VkInternalAllocationType allocationType,
4267 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004268}
4269
4270@external type void* PFN_vkInternalFreeNotification
4271@pfn cmd void vkInternalFreeNotification(
4272 void* pUserData,
4273 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004274 VkInternalAllocationType allocationType,
4275 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08004276}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004277
4278// Global functions
4279
4280@threadSafety("system")
4281cmd VkResult vkCreateInstance(
4282 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004283 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004284 VkInstance* pInstance) {
4285 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
4286
4287 instance := ?
4288 pInstance[0] = instance
4289 State.Instances[instance] = new!InstanceObject()
4290
Jesse Hall3dd678a2016-01-08 21:52:01 -08004291 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
4292 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07004293
4294 return ?
4295}
4296
4297@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004298cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004299 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004300 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004301 instanceObject := GetInstance(instance)
4302
4303 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004304}
4305
4306@threadSafety("system")
4307cmd VkResult vkEnumeratePhysicalDevices(
4308 VkInstance instance,
4309 u32* pPhysicalDeviceCount,
4310 VkPhysicalDevice* pPhysicalDevices) {
4311 instanceObject := GetInstance(instance)
4312
4313 physicalDeviceCount := as!u32(?)
4314 pPhysicalDeviceCount[0] = physicalDeviceCount
4315 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
4316
4317 for i in (0 .. physicalDeviceCount) {
4318 physicalDevice := ?
4319 physicalDevices[i] = physicalDevice
4320 if !(physicalDevice in State.PhysicalDevices) {
4321 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
4322 }
4323 }
4324
4325 return ?
4326}
4327
4328cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
4329 VkDevice device,
4330 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004331 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004332 device := GetDevice(device)
4333 }
4334
4335 return ?
4336}
4337
4338cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
4339 VkInstance instance,
4340 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004341 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004342 instanceObject := GetInstance(instance)
4343 }
4344
4345 return ?
4346}
4347
Jesse Hall606a54e2015-11-19 22:17:28 -08004348cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004349 VkPhysicalDevice physicalDevice,
4350 VkPhysicalDeviceProperties* pProperties) {
4351 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4352
4353 properties := ?
4354 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004355}
4356
Jesse Hall606a54e2015-11-19 22:17:28 -08004357cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004358 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004359 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004360 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004361 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004362 // TODO: Figure out how to express fetch-count-or-properties
4363 // This version fails 'apic validate' with 'fence not allowed in
4364 // *semantic.Branch'. Other attempts have failed with the same or other
4365 // errors.
4366 // if pQueueFamilyProperties != null {
4367 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
4368 // for i in (0 .. pCount[0]) {
4369 // queueProperties := as!VkQueueFamilyProperties(?)
4370 // queuesProperties[i] = queueProperties
4371 // }
4372 // } else {
4373 // count := ?
4374 // pCount[0] = count
4375 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004376}
4377
Jesse Hall606a54e2015-11-19 22:17:28 -08004378cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004379 VkPhysicalDevice physicalDevice,
4380 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
4381 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4382
4383 memoryProperties := ?
4384 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004385}
4386
Jesse Hall606a54e2015-11-19 22:17:28 -08004387cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004388 VkPhysicalDevice physicalDevice,
4389 VkPhysicalDeviceFeatures* pFeatures) {
4390 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4391
4392 features := ?
4393 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07004394}
4395
Jesse Hall606a54e2015-11-19 22:17:28 -08004396cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004397 VkPhysicalDevice physicalDevice,
4398 VkFormat format,
4399 VkFormatProperties* pFormatProperties) {
4400 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4401
4402 formatProperties := ?
4403 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07004404}
4405
Jesse Halla9e57032015-11-30 01:03:10 -08004406cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004407 VkPhysicalDevice physicalDevice,
4408 VkFormat format,
4409 VkImageType type,
4410 VkImageTiling tiling,
4411 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004412 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004413 VkImageFormatProperties* pImageFormatProperties) {
4414 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4415
4416 imageFormatProperties := ?
4417 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08004418
4419 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07004420}
4421
Jesse Halld27f6aa2015-08-15 17:58:48 -07004422
4423// Device functions
4424
4425@threadSafety("system")
4426cmd VkResult vkCreateDevice(
4427 VkPhysicalDevice physicalDevice,
4428 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004429 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004430 VkDevice* pDevice) {
4431 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
4432 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4433
4434 device := ?
4435 pDevice[0] = device
4436 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
4437
4438 return ?
4439}
4440
4441@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004442cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004443 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004444 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004445 deviceObject := GetDevice(device)
4446
4447 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004448}
4449
4450
4451// Extension discovery functions
4452
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004453cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08004454 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004455 VkLayerProperties* pProperties) {
4456 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004457 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004458
4459 properties := pProperties[0:count]
4460 for i in (0 .. count) {
4461 property := ?
4462 properties[i] = property
4463 }
4464
4465 return ?
4466}
4467
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004468cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004469 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004470 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004471 VkExtensionProperties* pProperties) {
4472 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004473 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004474
4475 properties := pProperties[0:count]
4476 for i in (0 .. count) {
4477 property := ?
4478 properties[i] = property
4479 }
4480
4481 return ?
4482}
4483
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004484cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004485 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004486 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004487 VkLayerProperties* pProperties) {
4488 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4489 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004490 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004491
4492 properties := pProperties[0:count]
4493 for i in (0 .. count) {
4494 property := ?
4495 properties[i] = property
4496 }
4497
4498 return ?
4499}
4500
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004501cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004502 VkPhysicalDevice physicalDevice,
4503 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004504 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004505 VkExtensionProperties* pProperties) {
4506 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
4507
4508 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08004509 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07004510
4511 properties := pProperties[0:count]
4512 for i in (0 .. count) {
4513 property := ?
4514 properties[i] = property
4515 }
4516
4517 return ?
4518}
4519
4520
4521// Queue functions
4522
4523@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08004524cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004525 VkDevice device,
4526 u32 queueFamilyIndex,
4527 u32 queueIndex,
4528 VkQueue* pQueue) {
4529 deviceObject := GetDevice(device)
4530
4531 queue := ?
4532 pQueue[0] = queue
4533
4534 if !(queue in State.Queues) {
4535 State.Queues[queue] = new!QueueObject(device: device)
4536 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004537}
4538
4539@threadSafety("app")
4540cmd VkResult vkQueueSubmit(
4541 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08004542 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08004543 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004544 VkFence fence) {
4545 queueObject := GetQueue(queue)
4546
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004547 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004548 fenceObject := GetFence(fence)
4549 assert(fenceObject.device == queueObject.device)
4550 }
4551
Jesse Hall3fbc8562015-11-29 22:10:52 -08004552 // commandBuffers := pcommandBuffers[0:commandBufferCount]
4553 // for i in (0 .. commandBufferCount) {
4554 // commandBuffer := commandBuffers[i]
4555 // commandBufferObject := GetCommandBuffer(commandBuffer)
4556 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08004557 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08004558 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
4559 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08004560 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07004561
4562 return ?
4563}
4564
4565@threadSafety("system")
4566cmd VkResult vkQueueWaitIdle(
4567 VkQueue queue) {
4568 queueObject := GetQueue(queue)
4569
4570 return ?
4571}
4572
4573@threadSafety("system")
4574cmd VkResult vkDeviceWaitIdle(
4575 VkDevice device) {
4576 deviceObject := GetDevice(device)
4577
4578 return ?
4579}
4580
4581
4582// Memory functions
4583
4584@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004585cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004586 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004587 const VkMemoryAllocateInfo* pAllocateInfo,
4588 const VkAllocationCallbacks* pAllocator,
4589 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004590 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004591 deviceObject := GetDevice(device)
4592
Jesse Hall3fbc8562015-11-29 22:10:52 -08004593 memory := ?
4594 pMemory[0] = memory
4595 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004596 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004597 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004598
4599 return ?
4600}
4601
4602@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004603cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004604 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004605 VkDeviceMemory memory,
4606 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004607 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004608 memoryObject := GetDeviceMemory(memory)
4609 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004610
4611 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004612 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004613 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08004614 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
4615 "vkFreeMemory: commandBuffers still bound")
4616 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004617}
4618
4619@threadSafety("app")
4620cmd VkResult vkMapMemory(
4621 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004622 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004623 VkDeviceSize offset,
4624 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004625 VkMemoryMapFlags flags,
4626 void** ppData) {
4627 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004628 memoryObject := GetDeviceMemory(memory)
4629 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004630
4631 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08004632 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004633
4634 return ?
4635}
4636
4637@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004638cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004639 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004640 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004641 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08004642 memoryObject := GetDeviceMemory(memory)
4643 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004644}
4645
4646cmd VkResult vkFlushMappedMemoryRanges(
4647 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004648 u32 memoryRangeCount
4649 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004650 deviceObject := GetDevice(device)
4651
Jesse Hall3fbc8562015-11-29 22:10:52 -08004652 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4653 for i in (0 .. memoryRangeCount) {
4654 memoryRange := memoryRanges[i]
4655 memoryObject := GetDeviceMemory(memoryRange.memory)
4656 assert(memoryObject.device == device)
4657 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004658 }
4659
4660 return ?
4661}
4662
4663cmd VkResult vkInvalidateMappedMemoryRanges(
4664 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004665 u32 memoryRangeCount,
4666 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004667 deviceObject := GetDevice(device)
4668
Jesse Hall3fbc8562015-11-29 22:10:52 -08004669 memoryRanges := pMemoryRanges[0:memoryRangeCount]
4670 for i in (0 .. memoryRangeCount) {
4671 memoryRange := memoryRanges[i]
4672 memoryObject := GetDeviceMemory(memoryRange.memory)
4673 assert(memoryObject.device == device)
4674 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004675 }
4676
4677 return ?
4678}
4679
4680
4681// Memory management API functions
4682
Jesse Hall606a54e2015-11-19 22:17:28 -08004683cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004684 VkDevice device,
4685 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004686 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004687 deviceObject := GetDevice(device)
4688
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004689 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004690 memoryObject := GetDeviceMemory(memory)
4691 assert(memoryObject.device == device)
4692 }
4693
4694 committedMemoryInBytes := ?
4695 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07004696}
4697
Jesse Hall606a54e2015-11-19 22:17:28 -08004698cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004699 VkDevice device,
4700 VkBuffer buffer,
4701 VkMemoryRequirements* pMemoryRequirements) {
4702 deviceObject := GetDevice(device)
4703 bufferObject := GetBuffer(buffer)
4704 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004705}
4706
4707cmd VkResult vkBindBufferMemory(
4708 VkDevice device,
4709 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004710 VkDeviceMemory memory,
4711 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004712 deviceObject := GetDevice(device)
4713 bufferObject := GetBuffer(buffer)
4714 assert(bufferObject.device == device)
4715
4716 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004717 if bufferObject.memory != NULL_HANDLE {
4718 memoryObject := GetDeviceMemory(bufferObject.memory)
4719 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004720 }
4721
4722 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004723 if memory != NULL_HANDLE {
4724 memoryObject := GetDeviceMemory(memory)
4725 assert(memoryObject.device == device)
4726 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004727 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004728 bufferObject.memory = memory
4729 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004730
4731 return ?
4732}
4733
Jesse Hall606a54e2015-11-19 22:17:28 -08004734cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004735 VkDevice device,
4736 VkImage image,
4737 VkMemoryRequirements* pMemoryRequirements) {
4738 deviceObject := GetDevice(device)
4739 imageObject := GetImage(image)
4740 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004741}
4742
4743cmd VkResult vkBindImageMemory(
4744 VkDevice device,
4745 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004746 VkDeviceMemory memory,
4747 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004748 deviceObject := GetDevice(device)
4749 imageObject := GetImage(image)
4750 assert(imageObject.device == device)
4751
4752 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004753 if imageObject.memory != NULL_HANDLE {
4754 memoryObject := GetDeviceMemory(imageObject.memory)
4755 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004756 }
4757
4758 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08004759 if memory != NULL_HANDLE {
4760 memoryObject := GetDeviceMemory(memory)
4761 assert(memoryObject.device == device)
4762 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004763 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08004764 imageObject.memory = memory
4765 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07004766
4767 return ?
4768}
4769
Jesse Hall606a54e2015-11-19 22:17:28 -08004770cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004771 VkDevice device,
4772 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004773 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004774 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
4775 deviceObject := GetDevice(device)
4776 imageObject := GetImage(image)
4777 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004778}
4779
Jesse Hall606a54e2015-11-19 22:17:28 -08004780cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004781 VkPhysicalDevice physicalDevice,
4782 VkFormat format,
4783 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08004784 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004785 VkImageUsageFlags usage,
4786 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004787 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004788 VkSparseImageFormatProperties* pProperties) {
4789 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004790}
4791
Jesse Halla6429252015-11-29 18:59:42 -08004792cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004793 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004794 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08004795 const VkBindSparseInfo* pBindInfo,
4796 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004797 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07004798
4799 return ?
4800}
4801
4802
4803// Fence functions
4804
4805@threadSafety("system")
4806cmd VkResult vkCreateFence(
4807 VkDevice device,
4808 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004809 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004810 VkFence* pFence) {
4811 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
4812 deviceObject := GetDevice(device)
4813
4814 fence := ?
4815 pFence[0] = fence
4816 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08004817 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07004818
4819 return ?
4820}
4821
4822@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004823cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004824 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004825 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004826 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004827 deviceObject := GetDevice(device)
4828 fenceObject := GetFence(fence)
4829 assert(fenceObject.device == device)
4830
4831 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004832}
4833
4834@threadSafety("system")
4835cmd VkResult vkResetFences(
4836 VkDevice device,
4837 u32 fenceCount,
4838 const VkFence* pFences) {
4839 deviceObject := GetDevice(device)
4840
4841 fences := pFences[0:fenceCount]
4842 for i in (0 .. fenceCount) {
4843 fence := fences[i]
4844 fenceObject := GetFence(fence)
4845 assert(fenceObject.device == device)
4846 fenceObject.signaled = false
4847 }
4848
4849 return ?
4850}
4851
4852@threadSafety("system")
4853cmd VkResult vkGetFenceStatus(
4854 VkDevice device,
4855 VkFence fence) {
4856 deviceObject := GetDevice(device)
4857 fenceObject := GetFence(fence)
4858 assert(fenceObject.device == device)
4859
4860 return ?
4861}
4862
4863@threadSafety("system")
4864cmd VkResult vkWaitForFences(
4865 VkDevice device,
4866 u32 fenceCount,
4867 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004868 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004869 u64 timeout) { /// timeout in nanoseconds
4870 deviceObject := GetDevice(device)
4871
4872 fences := pFences[0:fenceCount]
4873 for i in (0 .. fenceCount) {
4874 fence := fences[i]
4875 fenceObject := GetFence(fence)
4876 assert(fenceObject.device == device)
4877 }
4878
4879 return ?
4880}
4881
4882
4883// Queue semaphore functions
4884
4885@threadSafety("system")
4886cmd VkResult vkCreateSemaphore(
4887 VkDevice device,
4888 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004889 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004890 VkSemaphore* pSemaphore) {
4891 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
4892 deviceObject := GetDevice(device)
4893
4894 semaphore := ?
4895 pSemaphore[0] = semaphore
4896 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
4897
4898 return ?
4899}
4900
4901@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004902cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004903 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004904 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004905 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004906 deviceObject := GetDevice(device)
4907 semaphoreObject := GetSemaphore(semaphore)
4908 assert(semaphoreObject.device == device)
4909
4910 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004911}
4912
Jesse Halld27f6aa2015-08-15 17:58:48 -07004913
4914// Event functions
4915
4916@threadSafety("system")
4917cmd VkResult vkCreateEvent(
4918 VkDevice device,
4919 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004920 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004921 VkEvent* pEvent) {
4922 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
4923 deviceObject := GetDevice(device)
4924
4925 event := ?
4926 pEvent[0] = event
4927 State.Events[event] = new!EventObject(device: device)
4928
4929 return ?
4930}
4931
4932@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004933cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004934 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004935 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004936 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07004937 deviceObject := GetDevice(device)
4938 eventObject := GetEvent(event)
4939 assert(eventObject.device == device)
4940
4941 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07004942}
4943
4944@threadSafety("system")
4945cmd VkResult vkGetEventStatus(
4946 VkDevice device,
4947 VkEvent event) {
4948 deviceObject := GetDevice(device)
4949 eventObject := GetEvent(event)
4950 assert(eventObject.device == device)
4951
4952 return ?
4953}
4954
4955@threadSafety("system")
4956cmd VkResult vkSetEvent(
4957 VkDevice device,
4958 VkEvent event) {
4959 deviceObject := GetDevice(device)
4960 eventObject := GetEvent(event)
4961 assert(eventObject.device == device)
4962
4963 return ?
4964}
4965
4966@threadSafety("system")
4967cmd VkResult vkResetEvent(
4968 VkDevice device,
4969 VkEvent event) {
4970 deviceObject := GetDevice(device)
4971 eventObject := GetEvent(event)
4972 assert(eventObject.device == device)
4973
4974 return ?
4975}
4976
4977
4978// Query functions
4979
4980@threadSafety("system")
4981cmd VkResult vkCreateQueryPool(
4982 VkDevice device,
4983 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08004984 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07004985 VkQueryPool* pQueryPool) {
4986 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
4987 deviceObject := GetDevice(device)
4988
4989 queryPool := ?
4990 pQueryPool[0] = queryPool
4991 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
4992
4993 return ?
4994}
4995
4996@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07004997cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07004998 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08004999 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005000 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005001 deviceObject := GetDevice(device)
5002 queryPoolObject := GetQueryPool(queryPool)
5003 assert(queryPoolObject.device == device)
5004
5005 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005006}
5007
5008@threadSafety("system")
5009cmd VkResult vkGetQueryPoolResults(
5010 VkDevice device,
5011 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005012 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005013 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005014 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005015 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005016 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005017 VkQueryResultFlags flags) {
5018 deviceObject := GetDevice(device)
5019 queryPoolObject := GetQueryPool(queryPool)
5020 assert(queryPoolObject.device == device)
5021
Jesse Halld27f6aa2015-08-15 17:58:48 -07005022 data := pData[0:dataSize]
5023
5024 return ?
5025}
5026
5027// Buffer functions
5028
5029@threadSafety("system")
5030cmd VkResult vkCreateBuffer(
5031 VkDevice device,
5032 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005033 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005034 VkBuffer* pBuffer) {
5035 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
5036 deviceObject := GetDevice(device)
5037
5038 buffer := ?
5039 pBuffer[0] = buffer
5040 State.Buffers[buffer] = new!BufferObject(device: device)
5041
5042 return ?
5043}
5044
5045@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005046cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005047 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005048 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005049 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005050 deviceObject := GetDevice(device)
5051 bufferObject := GetBuffer(buffer)
5052 assert(bufferObject.device == device)
5053
Jesse Hall3fbc8562015-11-29 22:10:52 -08005054 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005055 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005056}
5057
5058
5059// Buffer view functions
5060
5061@threadSafety("system")
5062cmd VkResult vkCreateBufferView(
5063 VkDevice device,
5064 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005065 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005066 VkBufferView* pView) {
5067 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
5068 deviceObject := GetDevice(device)
5069
5070 bufferObject := GetBuffer(pCreateInfo.buffer)
5071 assert(bufferObject.device == device)
5072
5073 view := ?
5074 pView[0] = view
5075 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
5076
5077 return ?
5078}
5079
5080@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005081cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005082 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005083 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005084 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005085 deviceObject := GetDevice(device)
5086 bufferViewObject := GetBufferView(bufferView)
5087 assert(bufferViewObject.device == device)
5088
5089 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005090}
5091
5092
5093// Image functions
5094
5095@threadSafety("system")
5096cmd VkResult vkCreateImage(
5097 VkDevice device,
5098 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005099 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005100 VkImage* pImage) {
5101 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
5102 deviceObject := GetDevice(device)
5103
5104 image := ?
5105 pImage[0] = image
5106 State.Images[image] = new!ImageObject(device: device)
5107
5108 return ?
5109}
5110
5111@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005112cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005113 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005114 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005115 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005116 deviceObject := GetDevice(device)
5117 imageObject := GetImage(image)
5118 assert(imageObject.device == device)
5119
Jesse Hall3fbc8562015-11-29 22:10:52 -08005120 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005121 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005122}
5123
Jesse Hall606a54e2015-11-19 22:17:28 -08005124cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005125 VkDevice device,
5126 VkImage image,
5127 const VkImageSubresource* pSubresource,
5128 VkSubresourceLayout* pLayout) {
5129 deviceObject := GetDevice(device)
5130 imageObject := GetImage(image)
5131 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005132}
5133
5134
5135// Image view functions
5136
5137@threadSafety("system")
5138cmd VkResult vkCreateImageView(
5139 VkDevice device,
5140 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005141 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005142 VkImageView* pView) {
5143 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
5144 deviceObject := GetDevice(device)
5145
5146 imageObject := GetImage(pCreateInfo.image)
5147 assert(imageObject.device == device)
5148
5149 view := ?
5150 pView[0] = view
5151 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
5152
5153 return ?
5154}
5155
5156@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005157cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005158 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005159 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005160 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005161 deviceObject := GetDevice(device)
5162 imageViewObject := GetImageView(imageView)
5163 assert(imageViewObject.device == device)
5164
5165 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005166}
5167
5168
5169// Shader functions
5170
5171cmd VkResult vkCreateShaderModule(
5172 VkDevice device,
5173 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005174 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005175 VkShaderModule* pShaderModule) {
5176 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
5177 deviceObject := GetDevice(device)
5178
5179 shaderModule := ?
5180 pShaderModule[0] = shaderModule
5181 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
5182
5183 return ?
5184}
5185
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005186cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005187 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005188 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005189 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005190 deviceObject := GetDevice(device)
5191 shaderModuleObject := GetShaderModule(shaderModule)
5192 assert(shaderModuleObject.device == device)
5193
5194 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005195}
5196
Jesse Halld27f6aa2015-08-15 17:58:48 -07005197
5198// Pipeline functions
5199
5200cmd VkResult vkCreatePipelineCache(
5201 VkDevice device,
5202 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005203 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005204 VkPipelineCache* pPipelineCache) {
5205 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
5206 deviceObject := GetDevice(device)
5207
5208 pipelineCache := ?
5209 pPipelineCache[0] = pipelineCache
5210 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
5211
5212 return ?
5213}
5214
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005215cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005216 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005217 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005218 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005219 deviceObject := GetDevice(device)
5220 pipelineCacheObject := GetPipelineCache(pipelineCache)
5221 assert(pipelineCacheObject.device == device)
5222
5223 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005224}
5225
Jesse Halld27f6aa2015-08-15 17:58:48 -07005226cmd VkResult vkGetPipelineCacheData(
5227 VkDevice device,
5228 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005229 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005230 void* pData) {
5231 deviceObject := GetDevice(device)
5232 pipelineCacheObject := GetPipelineCache(pipelineCache)
5233 assert(pipelineCacheObject.device == device)
5234
5235 return ?
5236}
5237
5238cmd VkResult vkMergePipelineCaches(
5239 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005240 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005241 u32 srcCacheCount,
5242 const VkPipelineCache* pSrcCaches) {
5243 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005244 dstCacheObject := GetPipelineCache(dstCache)
5245 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005246
5247 srcCaches := pSrcCaches[0:srcCacheCount]
5248 for i in (0 .. srcCacheCount) {
5249 srcCache := srcCaches[i]
5250 srcCacheObject := GetPipelineCache(srcCache)
5251 assert(srcCacheObject.device == device)
5252 }
5253
5254 return ?
5255}
5256
5257cmd VkResult vkCreateGraphicsPipelines(
5258 VkDevice device,
5259 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005260 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005261 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005262 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005263 VkPipeline* pPipelines) {
5264 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005265 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005266 pipelineCacheObject := GetPipelineCache(pipelineCache)
5267 assert(pipelineCacheObject.device == device)
5268 }
5269
Jesse Hall03b6fe12015-11-24 12:44:21 -08005270 createInfos := pCreateInfos[0:createInfoCount]
5271 pipelines := pPipelines[0:createInfoCount]
5272 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005273 pipeline := ?
5274 pipelines[i] = pipeline
5275 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5276 }
5277
5278 return ?
5279}
5280
5281cmd VkResult vkCreateComputePipelines(
5282 VkDevice device,
5283 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005284 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005285 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005286 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005287 VkPipeline* pPipelines) {
5288 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005289 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005290 pipelineCacheObject := GetPipelineCache(pipelineCache)
5291 assert(pipelineCacheObject.device == device)
5292 }
5293
Jesse Hall03b6fe12015-11-24 12:44:21 -08005294 createInfos := pCreateInfos[0:createInfoCount]
5295 pipelines := pPipelines[0:createInfoCount]
5296 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005297 pipeline := ?
5298 pipelines[i] = pipeline
5299 State.Pipelines[pipeline] = new!PipelineObject(device: device)
5300 }
5301
5302 return ?
5303}
5304
5305@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005306cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005307 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005308 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005309 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005310 deviceObject := GetDevice(device)
5311 pipelineObjects := GetPipeline(pipeline)
5312 assert(pipelineObjects.device == device)
5313
5314 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005315}
5316
5317
5318// Pipeline layout functions
5319
5320@threadSafety("system")
5321cmd VkResult vkCreatePipelineLayout(
5322 VkDevice device,
5323 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005324 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005325 VkPipelineLayout* pPipelineLayout) {
5326 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
5327 deviceObject := GetDevice(device)
5328
5329 pipelineLayout := ?
5330 pPipelineLayout[0] = pipelineLayout
5331 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
5332
5333 return ?
5334}
5335
5336@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005337cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005338 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005339 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005340 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005341 deviceObject := GetDevice(device)
5342 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
5343 assert(pipelineLayoutObjects.device == device)
5344
5345 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005346}
5347
5348
5349// Sampler functions
5350
5351@threadSafety("system")
5352cmd VkResult vkCreateSampler(
5353 VkDevice device,
5354 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005355 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005356 VkSampler* pSampler) {
5357 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
5358 deviceObject := GetDevice(device)
5359
5360 sampler := ?
5361 pSampler[0] = sampler
5362 State.Samplers[sampler] = new!SamplerObject(device: device)
5363
5364 return ?
5365}
5366
5367@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005368cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005369 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005370 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005371 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005372 deviceObject := GetDevice(device)
5373 samplerObject := GetSampler(sampler)
5374 assert(samplerObject.device == device)
5375
5376 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005377}
5378
5379
5380// Descriptor set functions
5381
5382@threadSafety("system")
5383cmd VkResult vkCreateDescriptorSetLayout(
5384 VkDevice device,
5385 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005386 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005387 VkDescriptorSetLayout* pSetLayout) {
5388 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
5389 deviceObject := GetDevice(device)
5390
5391 setLayout := ?
5392 pSetLayout[0] = setLayout
5393 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
5394
5395 return ?
5396}
5397
5398@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005399cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005400 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005401 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005402 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005403 deviceObject := GetDevice(device)
5404 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
5405 assert(descriptorSetLayoutObject.device == device)
5406
5407 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005408}
5409
5410@threadSafety("system")
5411cmd VkResult vkCreateDescriptorPool(
5412 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005413 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005414 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005415 VkDescriptorPool* pDescriptorPool) {
5416 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
5417 deviceObject := GetDevice(device)
5418
5419 descriptorPool := ?
5420 pDescriptorPool[0] = descriptorPool
5421 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
5422
5423 return ?
5424}
5425
5426@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005427cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005428 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005429 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005430 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005431 deviceObject := GetDevice(device)
5432 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5433 assert(descriptorPoolObject.device == device)
5434
5435 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005436}
5437
5438@threadSafety("app")
5439cmd VkResult vkResetDescriptorPool(
5440 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08005441 VkDescriptorPool descriptorPool,
5442 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005443 deviceObject := GetDevice(device)
5444 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5445 assert(descriptorPoolObject.device == device)
5446
5447 return ?
5448}
5449
5450@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005451cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005452 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005453 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005454 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005455 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005456 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005457 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005458
Jesse Hall03b6fe12015-11-24 12:44:21 -08005459 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
5460 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005461 setLayout := setLayouts[i]
5462 setLayoutObject := GetDescriptorSetLayout(setLayout)
5463 assert(setLayoutObject.device == device)
5464 }
5465
Jesse Hall03b6fe12015-11-24 12:44:21 -08005466 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
5467 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005468 descriptorSet := ?
5469 descriptorSets[i] = descriptorSet
5470 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
5471 }
5472
5473 return ?
5474}
5475
Jesse Hallf09c6b12015-08-15 19:54:28 -07005476cmd VkResult vkFreeDescriptorSets(
5477 VkDevice device,
5478 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005479 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07005480 const VkDescriptorSet* pDescriptorSets) {
5481 deviceObject := GetDevice(device)
5482 descriptorPoolObject := GetDescriptorPool(descriptorPool)
5483
Jesse Hall03b6fe12015-11-24 12:44:21 -08005484 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5485 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07005486 descriptorSet := descriptorSets[i]
5487 descriptorSetObject := GetDescriptorSet(descriptorSet)
5488 assert(descriptorSetObject.device == device)
5489 State.DescriptorSets[descriptorSet] = null
5490 }
5491
5492 return ?
5493}
5494
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005495cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005496 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08005497 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005498 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08005499 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005500 const VkCopyDescriptorSet* pDescriptorCopies) {
5501 deviceObject := GetDevice(device)
5502
Jesse Hallb00daad2015-11-29 19:46:20 -08005503 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
5504 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005505 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005506 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005507 assert(descriptorWriteObject.device == device)
5508 }
5509
Jesse Hallb00daad2015-11-29 19:46:20 -08005510 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
5511 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005512 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08005513 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005514 assert(descriptorCopyObject.device == device)
5515 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005516}
5517
5518
5519// Framebuffer functions
5520
5521@threadSafety("system")
5522cmd VkResult vkCreateFramebuffer(
5523 VkDevice device,
5524 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005525 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005526 VkFramebuffer* pFramebuffer) {
5527 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
5528 deviceObject := GetDevice(device)
5529
5530 framebuffer := ?
5531 pFramebuffer[0] = framebuffer
5532 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
5533
5534 return ?
5535}
5536
5537@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005538cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005539 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005540 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005541 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005542 deviceObject := GetDevice(device)
5543 framebufferObject := GetFramebuffer(framebuffer)
5544 assert(framebufferObject.device == device)
5545
5546 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005547}
5548
5549
5550// Renderpass functions
5551
5552@threadSafety("system")
5553cmd VkResult vkCreateRenderPass(
5554 VkDevice device,
5555 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005556 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005557 VkRenderPass* pRenderPass) {
5558 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
5559 deviceObject := GetDevice(device)
5560
5561 renderpass := ?
5562 pRenderPass[0] = renderpass
5563 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
5564
5565 return ?
5566}
5567
5568@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005569cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005570 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005571 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005572 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005573 deviceObject := GetDevice(device)
5574 renderPassObject := GetRenderPass(renderPass)
5575 assert(renderPassObject.device == device)
5576
5577 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005578}
5579
Jesse Hall606a54e2015-11-19 22:17:28 -08005580cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005581 VkDevice device,
5582 VkRenderPass renderPass,
5583 VkExtent2D* pGranularity) {
5584 deviceObject := GetDevice(device)
5585 renderPassObject := GetRenderPass(renderPass)
5586
5587 granularity := ?
5588 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07005589}
5590
5591// Command pool functions
5592
5593cmd VkResult vkCreateCommandPool(
5594 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005595 const VkCommandPoolCreateInfo* pCreateInfo,
5596 const VkAllocationCallbacks* pAllocator,
5597 VkCommandPool* pCommandPool) {
5598 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005599 deviceObject := GetDevice(device)
5600
Jesse Hall3fbc8562015-11-29 22:10:52 -08005601 commandPool := ?
5602 pCommandPool[0] = commandPool
5603 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005604
5605 return ?
5606}
5607
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005608cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005609 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005610 VkCommandPool commandPool,
5611 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005612 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005613 commandPoolObject := GetCommandPool(commandPool)
5614 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005615
Jesse Hall3fbc8562015-11-29 22:10:52 -08005616 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005617}
5618
5619cmd VkResult vkResetCommandPool(
5620 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005621 VkCommandPool commandPool,
5622 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005623 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005624 commandPoolObject := GetCommandPool(commandPool)
5625 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005626
5627 return ?
5628}
5629
5630// Command buffer functions
5631
Jesse Hall3fbc8562015-11-29 22:10:52 -08005632macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5633 memoryObject := GetDeviceMemory(memory)
5634 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07005635
Jesse Hall3fbc8562015-11-29 22:10:52 -08005636 commandBufferObject := GetCommandBuffer(commandBuffer)
5637 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07005638}
5639
Jesse Hall3fbc8562015-11-29 22:10:52 -08005640macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
5641 memoryObject := GetDeviceMemory(memory)
5642 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005643
Jesse Hall3fbc8562015-11-29 22:10:52 -08005644 commandBufferObject := GetCommandBuffer(commandBuffer)
5645 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07005646}
5647
5648@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08005649cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005650 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005651 const VkCommandBufferAllocateInfo* pAllocateInfo,
5652 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08005653 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005654
Jesse Hall3dd678a2016-01-08 21:52:01 -08005655 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08005656 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08005657 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005658 commandBuffer := ?
5659 commandBuffers[i] = commandBuffer
5660 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005661 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005662
5663 return ?
5664}
5665
5666@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08005667cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07005668 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005669 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005670 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005671 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005672 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005673
Jesse Hall3fbc8562015-11-29 22:10:52 -08005674 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08005675 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005676 commandBufferObject := GetCommandBuffer(commandBuffers[i])
5677 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08005678 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08005679 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08005680 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07005681}
5682
5683@threadSafety("app")
5684cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005685 VkCommandBuffer commandBuffer,
5686 const VkCommandBufferBeginInfo* pBeginInfo) {
5687 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
5688 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005689
5690 // TODO: iterate over boundObjects and clear memory bindings
5691
5692 return ?
5693}
5694
5695@threadSafety("app")
5696cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005697 VkCommandBuffer commandBuffer) {
5698 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005699
5700 return ?
5701}
5702
5703@threadSafety("app")
5704cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005705 VkCommandBuffer commandBuffer,
5706 VkCommandBufferResetFlags flags) {
5707 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005708
5709 // TODO: iterate over boundObjects and clear memory bindings
5710
5711 return ?
5712}
5713
5714
5715// Command buffer building functions
5716
5717@threadSafety("app")
5718cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005719 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005720 VkPipelineBindPoint pipelineBindPoint,
5721 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005722 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005723 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005724 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005725
Jesse Halld8bade02015-11-24 10:24:18 -08005726 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005727 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5728 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5729 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005730 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005731}
5732
5733@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005734cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005735 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005736 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005737 u32 viewportCount,
5738 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005739 commandBufferObject := GetCommandBuffer(commandBuffer)
5740 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005741}
5742
5743@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005744cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005745 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005746 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005747 u32 scissorCount,
5748 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005749 commandBufferObject := GetCommandBuffer(commandBuffer)
5750 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005751}
5752
5753@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005754cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005755 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005756 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005757 commandBufferObject := GetCommandBuffer(commandBuffer)
5758 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005759}
5760
5761@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005762cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005763 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005764 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005765 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08005766 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005767 commandBufferObject := GetCommandBuffer(commandBuffer)
5768 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005769}
Jesse Halld27f6aa2015-08-15 17:58:48 -07005770
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005771@threadSafety("app")
5772cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005773 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005774 // TODO(jessehall): apic only supports 'const' on pointer types. Using
5775 // an annotation as a quick hack to pass this to the template without
5776 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08005777 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005778 commandBufferObject := GetCommandBuffer(commandBuffer)
5779 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005780}
5781
5782@threadSafety("app")
5783cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005784 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005785 f32 minDepthBounds,
5786 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005787 commandBufferObject := GetCommandBuffer(commandBuffer)
5788 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005789}
5790
5791@threadSafety("app")
5792cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005793 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005794 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005795 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005796 commandBufferObject := GetCommandBuffer(commandBuffer)
5797 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005798}
5799
5800@threadSafety("app")
5801cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005802 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005803 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005804 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005805 commandBufferObject := GetCommandBuffer(commandBuffer)
5806 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005807}
5808
5809@threadSafety("app")
5810cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005811 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005812 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08005813 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005814 commandBufferObject := GetCommandBuffer(commandBuffer)
5815 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005816}
5817
5818@threadSafety("app")
5819cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005820 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005821 VkPipelineBindPoint pipelineBindPoint,
5822 VkPipelineLayout layout,
5823 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005824 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005825 const VkDescriptorSet* pDescriptorSets,
5826 u32 dynamicOffsetCount,
5827 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005828 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005829
Jesse Hall03b6fe12015-11-24 12:44:21 -08005830 descriptorSets := pDescriptorSets[0:descriptorSetCount]
5831 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005832 descriptorSet := descriptorSets[i]
5833 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005834 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005835 }
5836
5837 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
5838 for i in (0 .. dynamicOffsetCount) {
5839 dynamicOffset := dynamicOffsets[i]
5840 }
5841
Jesse Halld8bade02015-11-24 10:24:18 -08005842 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07005843 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
5844 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
5845 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08005846 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005847}
5848
5849@threadSafety("app")
5850cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005851 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005852 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005853 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005854 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005855 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005856 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005857 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005858
Jesse Hall3fbc8562015-11-29 22:10:52 -08005859 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005860
Jesse Hall3fbc8562015-11-29 22:10:52 -08005861 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005862}
5863
5864@threadSafety("app")
5865cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005866 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005867 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005868 u32 bindingCount,
5869 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005870 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005871 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005872
Jesse Hallf9fa9a52016-01-08 16:08:51 -08005873 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07005874 buffers := pBuffers[0:bindingCount]
5875 offsets := pOffsets[0:bindingCount]
5876 for i in (0 .. bindingCount) {
5877 buffer := buffers[i]
5878 offset := offsets[i]
5879 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005880 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005881
Jesse Hall3fbc8562015-11-29 22:10:52 -08005882 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005883 }
5884
Jesse Hall3fbc8562015-11-29 22:10:52 -08005885 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005886}
5887
5888@threadSafety("app")
5889cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005890 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005891 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005892 u32 instanceCount,
5893 u32 firstVertex,
5894 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005895 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005896
Jesse Hall3fbc8562015-11-29 22:10:52 -08005897 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005898}
5899
5900@threadSafety("app")
5901cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005902 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005903 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005904 u32 instanceCount,
5905 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005906 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005907 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005908 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005909
Jesse Hall3fbc8562015-11-29 22:10:52 -08005910 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005911}
5912
5913@threadSafety("app")
5914cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005915 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005916 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005917 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005918 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005919 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005920 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005921 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005922 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005923
Jesse Hall3fbc8562015-11-29 22:10:52 -08005924 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005925
Jesse Hall3fbc8562015-11-29 22:10:52 -08005926 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005927}
5928
5929@threadSafety("app")
5930cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005931 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005932 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005933 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08005934 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005935 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005936 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005937 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005938 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005939
Jesse Hall3fbc8562015-11-29 22:10:52 -08005940 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005941
Jesse Hall3fbc8562015-11-29 22:10:52 -08005942 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005943}
5944
5945@threadSafety("app")
5946cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005947 VkCommandBuffer commandBuffer,
Jesse Halld0599582017-03-10 18:35:38 -08005948 u32 groupCountX,
5949 u32 groupCountY,
5950 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005951 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005952
Jesse Hall3fbc8562015-11-29 22:10:52 -08005953 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005954}
5955
5956@threadSafety("app")
5957cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005958 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005959 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07005960 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005961 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005962 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005963 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005964
Jesse Hall3fbc8562015-11-29 22:10:52 -08005965 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005966
Jesse Hall3fbc8562015-11-29 22:10:52 -08005967 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005968}
5969
5970@threadSafety("app")
5971cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005972 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005973 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005974 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005975 u32 regionCount,
5976 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08005977 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005978 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08005979 dstBufferObject := GetBuffer(dstBuffer)
5980 assert(commandBufferObject.device == srcBufferObject.device)
5981 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005982
5983 regions := pRegions[0:regionCount]
5984 for i in (0 .. regionCount) {
5985 region := regions[i]
5986 }
5987
Jesse Hall3fbc8562015-11-29 22:10:52 -08005988 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
5989 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005990
Jesse Hall65ab5522015-11-30 00:07:16 -08005991 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07005992}
5993
5994@threadSafety("app")
5995cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08005996 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07005997 VkImage srcImage,
5998 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08005999 VkImage dstImage,
6000 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006001 u32 regionCount,
6002 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006003 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006004 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006005 dstImageObject := GetImage(dstImage)
6006 assert(commandBufferObject.device == srcImageObject.device)
6007 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006008
6009 regions := pRegions[0:regionCount]
6010 for i in (0 .. regionCount) {
6011 region := regions[i]
6012 }
6013
Jesse Hall3fbc8562015-11-29 22:10:52 -08006014 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6015 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006016
Jesse Hall65ab5522015-11-30 00:07:16 -08006017 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006018}
6019
6020@threadSafety("app")
6021cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006022 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006023 VkImage srcImage,
6024 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006025 VkImage dstImage,
6026 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006027 u32 regionCount,
6028 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08006029 VkFilter filter) {
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 dstImageObject := GetImage(dstImage)
6033 assert(commandBufferObject.device == srcImageObject.device)
6034 assert(commandBufferObject.device == dstImageObject.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, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006043
Jesse Hall3fbc8562015-11-29 22:10:52 -08006044 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006045}
6046
6047@threadSafety("app")
6048cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006049 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006050 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006051 VkImage dstImage,
6052 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006053 u32 regionCount,
6054 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006055 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006056 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006057 dstImageObject := GetImage(dstImage)
6058 assert(commandBufferObject.device == srcBufferObject.device)
6059 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006060
6061 regions := pRegions[0:regionCount]
6062 for i in (0 .. regionCount) {
6063 region := regions[i]
6064 }
6065
Jesse Hall3fbc8562015-11-29 22:10:52 -08006066 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
6067 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006068
Jesse Hall65ab5522015-11-30 00:07:16 -08006069 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006070}
6071
6072@threadSafety("app")
6073cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006074 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006075 VkImage srcImage,
6076 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006077 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006078 u32 regionCount,
6079 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006080 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006081 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006082 dstBufferObject := GetBuffer(dstBuffer)
6083 assert(commandBufferObject.device == srcImageObject.device)
6084 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006085
6086 regions := pRegions[0:regionCount]
6087 for i in (0 .. regionCount) {
6088 region := regions[i]
6089 }
6090
Jesse Hall3fbc8562015-11-29 22:10:52 -08006091 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6092 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006093
Jesse Hall65ab5522015-11-30 00:07:16 -08006094 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006095}
6096
6097@threadSafety("app")
6098cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006099 VkCommandBuffer commandBuffer,
6100 VkBuffer dstBuffer,
6101 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006102 VkDeviceSize dataSize,
Jesse Hall3f5499b2016-07-26 15:20:40 -07006103 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006104 commandBufferObject := GetCommandBuffer(commandBuffer)
6105 dstBufferObject := GetBuffer(dstBuffer)
6106 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006107
6108 data := pData[0:dataSize]
6109
Jesse Hall3fbc8562015-11-29 22:10:52 -08006110 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006111
Jesse Hall65ab5522015-11-30 00:07:16 -08006112 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006113}
6114
6115@threadSafety("app")
6116cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006117 VkCommandBuffer commandBuffer,
6118 VkBuffer dstBuffer,
6119 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08006120 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006121 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006122 commandBufferObject := GetCommandBuffer(commandBuffer)
6123 dstBufferObject := GetBuffer(dstBuffer)
6124 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006125
Jesse Hall65ab5522015-11-30 00:07:16 -08006126 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006127}
6128
6129@threadSafety("app")
6130cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006131 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006132 VkImage image,
6133 VkImageLayout imageLayout,
6134 const VkClearColorValue* pColor,
6135 u32 rangeCount,
6136 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006137 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006138 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006139 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006140
6141 ranges := pRanges[0:rangeCount]
6142 for i in (0 .. rangeCount) {
6143 range := ranges[i]
6144 }
6145
Jesse Hall3fbc8562015-11-29 22:10:52 -08006146 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006147
Jesse Hall3fbc8562015-11-29 22:10:52 -08006148 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006149}
6150
6151@threadSafety("app")
6152cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006153 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006154 VkImage image,
6155 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006156 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006157 u32 rangeCount,
6158 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006159 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006160 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006161 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006162
6163 ranges := pRanges[0:rangeCount]
6164 for i in (0 .. rangeCount) {
6165 range := ranges[i]
6166 }
6167
Jesse Hall3fbc8562015-11-29 22:10:52 -08006168 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006169
Jesse Hall3fbc8562015-11-29 22:10:52 -08006170 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006171}
6172
6173@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08006174cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006175 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08006176 u32 attachmentCount,
6177 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006178 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08006179 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006180 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006181
6182 rects := pRects[0:rectCount]
6183 for i in (0 .. rectCount) {
6184 rect := rects[i]
6185 }
6186
Jesse Hall3fbc8562015-11-29 22:10:52 -08006187 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006188}
6189
6190@threadSafety("app")
6191cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006192 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006193 VkImage srcImage,
6194 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006195 VkImage dstImage,
6196 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006197 u32 regionCount,
6198 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006199 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006200 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006201 dstImageObject := GetImage(dstImage)
6202 assert(commandBufferObject.device == srcImageObject.device)
6203 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006204
6205 regions := pRegions[0:regionCount]
6206 for i in (0 .. regionCount) {
6207 region := regions[i]
6208 }
6209
Jesse Hall3fbc8562015-11-29 22:10:52 -08006210 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
6211 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006212
Jesse Hall3fbc8562015-11-29 22:10:52 -08006213 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006214}
6215
6216@threadSafety("app")
6217cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006218 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006219 VkEvent event,
6220 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006221 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006222 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006223 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006224}
6225
6226@threadSafety("app")
6227cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006228 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006229 VkEvent event,
6230 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006231 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006232 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006233 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006234}
6235
6236@threadSafety("app")
6237cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006238 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006239 u32 eventCount,
6240 const VkEvent* pEvents,
6241 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006242 VkPipelineStageFlags dstStageMask,
6243 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006244 const VkMemoryBarrier* pMemoryBarriers,
6245 u32 bufferMemoryBarrierCount,
6246 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6247 u32 imageMemoryBarrierCount,
6248 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006249 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006250
6251 events := pEvents[0:eventCount]
6252 for i in (0 .. eventCount) {
6253 event := events[i]
6254 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006255 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006256 }
6257
Jesse Hall3dd678a2016-01-08 21:52:01 -08006258 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006259 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006260 memoryBarrier := memoryBarriers[i]
6261 }
6262 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6263 for i in (0 .. bufferMemoryBarrierCount) {
6264 bufferMemoryBarrier := bufferMemoryBarriers[i]
6265 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6266 assert(bufferObject.device == commandBufferObject.device)
6267 }
6268 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6269 for i in (0 .. imageMemoryBarrierCount) {
6270 imageMemoryBarrier := imageMemoryBarriers[i]
6271 imageObject := GetImage(imageMemoryBarrier.image)
6272 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006273 }
6274}
6275
6276@threadSafety("app")
6277cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006278 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006279 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006280 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08006281 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006282 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006283 const VkMemoryBarrier* pMemoryBarriers,
6284 u32 bufferMemoryBarrierCount,
6285 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
6286 u32 imageMemoryBarrierCount,
6287 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006288 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006289
Jesse Hall3dd678a2016-01-08 21:52:01 -08006290 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08006291 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08006292 memoryBarrier := memoryBarriers[i]
6293 }
6294 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
6295 for i in (0 .. bufferMemoryBarrierCount) {
6296 bufferMemoryBarrier := bufferMemoryBarriers[i]
6297 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
6298 assert(bufferObject.device == commandBufferObject.device)
6299 }
6300 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
6301 for i in (0 .. imageMemoryBarrierCount) {
6302 imageMemoryBarrier := imageMemoryBarriers[i]
6303 imageObject := GetImage(imageMemoryBarrier.image)
6304 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006305 }
6306}
6307
6308@threadSafety("app")
6309cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006310 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006311 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006312 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006313 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006314 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006315 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006316 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006317}
6318
6319@threadSafety("app")
6320cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006321 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006322 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006323 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006324 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006325 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006326 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006327}
6328
6329@threadSafety("app")
6330cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006331 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006332 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006333 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006334 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006335 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006336 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006337 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006338}
6339
6340@threadSafety("app")
6341cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006342 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08006343 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006344 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006345 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006346 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08006347 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006348 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006349}
6350
6351@threadSafety("app")
6352cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006353 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006354 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006355 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006356 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006357 VkBuffer dstBuffer,
6358 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006359 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006360 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006361 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006362 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006363 dstBufferObject := GetBuffer(dstBuffer)
6364 assert(commandBufferObject.device == queryPoolObject.device)
6365 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006366}
6367
6368cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006369 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006370 VkPipelineLayout layout,
6371 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006372 u32 offset,
6373 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006374 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006375 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006376 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006377 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006378}
6379
6380@threadSafety("app")
6381cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006382 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006383 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08006384 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006385 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006386 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
6387 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006388 assert(commandBufferObject.device == renderPassObject.device)
6389 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006390
Jesse Hall3fbc8562015-11-29 22:10:52 -08006391 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006392}
6393
6394cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006395 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08006396 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006397 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006398}
6399
6400@threadSafety("app")
6401cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006402 VkCommandBuffer commandBuffer) {
6403 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006404
Jesse Hall3fbc8562015-11-29 22:10:52 -08006405 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006406}
6407
6408cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08006409 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006410 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006411 const VkCommandBuffer* pCommandBuffers) {
6412 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006413
Jesse Hall3dd678a2016-01-08 21:52:01 -08006414 commandBuffers := pCommandBuffers[0:commandBufferCount]
6415 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08006416 secondaryCommandBuffer := commandBuffers[i]
6417 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
6418 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006419 }
6420}
6421
Jesse Halld0599582017-03-10 18:35:38 -08006422@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08006423cmd void vkDestroySurfaceKHR(
6424 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08006425 VkSurfaceKHR surface,
6426 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006427 instanceObject := GetInstance(instance)
6428 surfaceObject := GetSurface(surface)
6429 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08006430
Jesse Hall1356b0d2015-11-23 17:24:58 -08006431 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08006432}
6433
Jesse Halld0599582017-03-10 18:35:38 -08006434@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08006435cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006436 VkPhysicalDevice physicalDevice,
6437 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006438 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08006439 VkBool32* pSupported) {
6440 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006441
6442 return ?
6443}
6444
Jesse Halld0599582017-03-10 18:35:38 -08006445@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006446cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
6447 VkPhysicalDevice physicalDevice,
6448 VkSurfaceKHR surface,
6449 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
6450 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6451
6452 surfaceCapabilities := ?
6453 pSurfaceCapabilities[0] = surfaceCapabilities
6454
6455 return ?
6456}
6457
Jesse Halld0599582017-03-10 18:35:38 -08006458@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006459cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
6460 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006461 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006462 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006463 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006464 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006465
6466 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006467 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006468 surfaceFormats := pSurfaceFormats[0:count]
6469
6470 for i in (0 .. count) {
6471 surfaceFormat := ?
6472 surfaceFormats[i] = surfaceFormat
6473 }
6474
6475 return ?
6476}
6477
Jesse Halld0599582017-03-10 18:35:38 -08006478@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08006479cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
6480 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006481 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006482 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006483 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08006484 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08006485
6486 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006487 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006488 presentModes := pPresentModes[0:count]
6489
6490 for i in (0 .. count) {
6491 presentMode := ?
6492 presentModes[i] = presentMode
6493 }
6494
6495 return ?
6496}
6497
Jesse Halld0599582017-03-10 18:35:38 -08006498@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006499cmd VkResult vkCreateSwapchainKHR(
6500 VkDevice device,
6501 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006502 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08006503 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006504 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08006505 deviceObject := GetDevice(device)
6506
6507 swapchain := ?
6508 pSwapchain[0] = swapchain
6509 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
6510
6511 return ?
6512}
6513
Jesse Halld0599582017-03-10 18:35:38 -08006514@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08006515cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08006516 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08006517 VkSwapchainKHR swapchain,
6518 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08006519 deviceObject := GetDevice(device)
6520 swapchainObject := GetSwapchain(swapchain)
6521 assert(swapchainObject.device == device)
6522
6523 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08006524}
6525
Jesse Halld0599582017-03-10 18:35:38 -08006526@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006527cmd VkResult vkGetSwapchainImagesKHR(
6528 VkDevice device,
6529 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006530 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08006531 VkImage* pSwapchainImages) {
6532 deviceObject := GetDevice(device)
6533
6534 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006535 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08006536 swapchainImages := pSwapchainImages[0:count]
6537
6538 for i in (0 .. count) {
6539 swapchainImage := ?
6540 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08006541 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08006542 }
6543
6544 return ?
6545}
6546
Jesse Halld0599582017-03-10 18:35:38 -08006547@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006548cmd VkResult vkAcquireNextImageKHR(
6549 VkDevice device,
6550 VkSwapchainKHR swapchain,
6551 u64 timeout,
6552 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006553 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08006554 u32* pImageIndex) {
6555 deviceObject := GetDevice(device)
6556 swapchainObject := GetSwapchain(swapchain)
6557
6558 imageIndex := ?
6559 pImageIndex[0] = imageIndex
6560
6561 return ?
6562}
6563
Jesse Halld0599582017-03-10 18:35:38 -08006564@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08006565cmd VkResult vkQueuePresentKHR(
6566 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006567 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08006568 queueObject := GetQueue(queue)
6569
6570 presentInfo := ?
6571 pPresentInfo[0] = presentInfo
6572
6573 return ?
6574}
6575
Jesse Halld0599582017-03-10 18:35:38 -08006576@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006577cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
6578 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006579 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006580 VkDisplayPropertiesKHR* pProperties) {
6581 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 vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
6587 VkPhysicalDevice physicalDevice,
6588 u32* pPropertyCount,
6589 VkDisplayPlanePropertiesKHR* pProperties) {
6590 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6591 return ?
6592}
6593
Jesse Halld0599582017-03-10 18:35:38 -08006594@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006595cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
6596 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08006597 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006598 u32* pDisplayCount,
6599 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08006600 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6601 return ?
6602}
6603
Jesse Halld0599582017-03-10 18:35:38 -08006604@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006605cmd VkResult vkGetDisplayModePropertiesKHR(
6606 VkPhysicalDevice physicalDevice,
6607 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006608 u32* pPropertyCount,
6609 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006610 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6611 return ?
6612}
6613
Jesse Halld0599582017-03-10 18:35:38 -08006614@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08006615cmd VkResult vkCreateDisplayModeKHR(
6616 VkPhysicalDevice physicalDevice,
6617 VkDisplayKHR display,
6618 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006619 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006620 VkDisplayModeKHR* pMode) {
6621 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6622 return ?
6623}
6624
Jesse Halld0599582017-03-10 18:35:38 -08006625@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006626cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006627 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006628 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006629 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08006630 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08006631 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6632 return ?
6633}
6634
Jesse Halld0599582017-03-10 18:35:38 -08006635@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08006636cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
6637 VkInstance instance,
6638 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006639 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08006640 VkSurfaceKHR* pSurface) {
6641 return ?
6642}
6643
Jesse Halld0599582017-03-10 18:35:38 -08006644@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08006645cmd VkResult vkCreateSharedSwapchainsKHR(
6646 VkDevice device,
6647 u32 swapchainCount,
6648 const VkSwapchainCreateInfoKHR* pCreateInfos,
6649 const VkAllocationCallbacks* pAllocator,
6650 VkSwapchainKHR* pSwapchains) {
6651 return ?
6652}
6653
Jesse Halld0599582017-03-10 18:35:38 -08006654@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006655cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006656 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006657 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006658 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006659 VkSurfaceKHR* pSurface) {
6660 instanceObject := GetInstance(instance)
6661 return ?
6662}
6663
Jesse Halld0599582017-03-10 18:35:38 -08006664@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08006665cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
6666 VkPhysicalDevice physicalDevice,
6667 u32 queueFamilyIndex,
6668 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08006669 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08006670 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6671 return ?
6672}
6673
Jesse Halld0599582017-03-10 18:35:38 -08006674@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006675cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08006676 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006677 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006678 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006679 VkSurfaceKHR* pSurface) {
6680 instanceObject := GetInstance(instance)
6681 return ?
6682}
6683
Jesse Halld0599582017-03-10 18:35:38 -08006684@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08006685cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
6686 VkPhysicalDevice physicalDevice,
6687 u32 queueFamilyIndex,
6688 platform.xcb_connection_t* connection,
6689 platform.xcb_visualid_t visual_id) {
6690 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6691 return ?
6692}
6693
Jesse Halld0599582017-03-10 18:35:38 -08006694@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08006695cmd VkResult vkCreateWaylandSurfaceKHR(
6696 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006697 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006698 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006699 VkSurfaceKHR* pSurface) {
6700 instanceObject := GetInstance(instance)
6701 return ?
6702}
6703
Jesse Halld0599582017-03-10 18:35:38 -08006704@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08006705cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
6706 VkPhysicalDevice physicalDevice,
6707 u32 queueFamilyIndex,
6708 platform.wl_display* display) {
6709 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6710 return ?
6711}
6712
Jesse Halld0599582017-03-10 18:35:38 -08006713@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08006714cmd VkResult vkCreateMirSurfaceKHR(
6715 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006716 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006717 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006718 VkSurfaceKHR* pSurface) {
6719 instanceObject := GetInstance(instance)
6720 return ?
6721}
6722
Jesse Halld0599582017-03-10 18:35:38 -08006723@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08006724cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
6725 VkPhysicalDevice physicalDevice,
6726 u32 queueFamilyIndex,
6727 platform.MirConnection* connection) {
6728 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6729 return ?
6730}
6731
Jesse Halld0599582017-03-10 18:35:38 -08006732@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08006733cmd VkResult vkCreateAndroidSurfaceKHR(
6734 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006735 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006736 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006737 VkSurfaceKHR* pSurface) {
6738 instanceObject := GetInstance(instance)
6739 return ?
6740}
6741
Jesse Halld0599582017-03-10 18:35:38 -08006742@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08006743cmd VkResult vkCreateWin32SurfaceKHR(
6744 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006745 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08006746 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08006747 VkSurfaceKHR* pSurface) {
6748 instanceObject := GetInstance(instance)
6749 return ?
6750}
6751
Jesse Halld0599582017-03-10 18:35:38 -08006752@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08006753cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
6754 VkPhysicalDevice physicalDevice,
6755 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08006756 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08006757 return ?
6758}
6759
Jesse Halld0599582017-03-10 18:35:38 -08006760@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006761cmd VkResult vkGetSwapchainGrallocUsageANDROID(
6762 VkDevice device,
6763 VkFormat format,
6764 VkImageUsageFlags imageUsage,
6765 int* grallocUsage) {
6766 return ?
6767}
6768
Jesse Halld0599582017-03-10 18:35:38 -08006769@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006770cmd VkResult vkAcquireImageANDROID(
6771 VkDevice device,
6772 VkImage image,
6773 int nativeFenceFd,
6774 VkSemaphore semaphore,
6775 VkFence fence) {
6776 return ?
6777}
6778
Jesse Halld0599582017-03-10 18:35:38 -08006779@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08006780cmd VkResult vkQueueSignalReleaseImageANDROID(
6781 VkQueue queue,
6782 u32 waitSemaphoreCount,
6783 const VkSemaphore* pWaitSemaphores,
6784 VkImage image,
6785 int* pNativeFenceFd) {
6786 return ?
6787}
6788
Jesse Halld0599582017-03-10 18:35:38 -08006789@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006790@external type void* PFN_vkDebugReportCallbackEXT
Jesse Halld0599582017-03-10 18:35:38 -08006791@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006792@pfn cmd VkBool32 vkDebugReportCallbackEXT(
6793 VkDebugReportFlagsEXT flags,
6794 VkDebugReportObjectTypeEXT objectType,
6795 u64 object,
6796 platform.size_t location,
6797 s32 messageCode,
6798 const char* pLayerPrefix,
6799 const char* pMessage,
6800 void* pUserData) {
6801 return ?
6802}
6803
Jesse Halld0599582017-03-10 18:35:38 -08006804@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006805cmd VkResult vkCreateDebugReportCallbackEXT(
6806 VkInstance instance,
6807 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
6808 const VkAllocationCallbacks* pAllocator,
6809 VkDebugReportCallbackEXT* pCallback) {
6810 return ?
6811}
6812
Jesse Halld0599582017-03-10 18:35:38 -08006813@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006814cmd void vkDestroyDebugReportCallbackEXT(
6815 VkInstance instance,
6816 VkDebugReportCallbackEXT callback,
6817 const VkAllocationCallbacks* pAllocator) {
6818}
6819
Jesse Halld0599582017-03-10 18:35:38 -08006820@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08006821cmd void vkDebugReportMessageEXT(
6822 VkInstance instance,
6823 VkDebugReportFlagsEXT flags,
6824 VkDebugReportObjectTypeEXT objectType,
6825 u64 object,
6826 platform.size_t location,
6827 s32 messageCode,
6828 const char* pLayerPrefix,
6829 const char* pMessage) {
6830}
6831
Jesse Halld0599582017-03-10 18:35:38 -08006832@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006833cmd VkResult vkDebugMarkerSetObjectTagEXT(
6834 VkDevice device,
6835 VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
6836 return ?
6837}
6838
Jesse Halld0599582017-03-10 18:35:38 -08006839@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006840cmd VkResult vkDebugMarkerSetObjectNameEXT(
6841 VkDevice device,
6842 VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
6843 return ?
6844}
6845
Jesse Halld0599582017-03-10 18:35:38 -08006846@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006847cmd void vkCmdDebugMarkerBeginEXT(
6848 VkCommandBuffer commandBuffer,
6849 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6850}
6851
Jesse Halld0599582017-03-10 18:35:38 -08006852@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006853cmd void vkCmdDebugMarkerEndEXT(
6854 VkCommandBuffer commandBuffer) {
6855}
6856
Jesse Halld0599582017-03-10 18:35:38 -08006857@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07006858cmd void vkCmdDebugMarkerInsertEXT(
6859 VkCommandBuffer commandBuffer,
6860 VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
6861}
6862
Jesse Halld0599582017-03-10 18:35:38 -08006863@extension("VK_AMD_draw_indirect_count") // 34
Jesse Halleb02c472017-02-24 15:13:45 -08006864cmd void vkCmdDrawIndirectCountAMD(
6865 VkCommandBuffer commandBuffer,
6866 VkBuffer buffer,
6867 VkDeviceSize offset,
6868 VkBuffer countBuffer,
6869 VkDeviceSize countBufferOffset,
6870 u32 maxDrawCount,
6871 u32 stride) {
6872}
6873
Jesse Halld0599582017-03-10 18:35:38 -08006874@extension("VK_AMD_draw_indirect_count") // 34
Jesse Halleb02c472017-02-24 15:13:45 -08006875cmd void vkCmdDrawIndexedIndirectCountAMD(
6876 VkCommandBuffer commandBuffer,
6877 VkBuffer buffer,
6878 VkDeviceSize offset,
6879 VkBuffer countBuffer,
6880 VkDeviceSize countBufferOffset,
6881 u32 maxDrawCount,
6882 u32 stride) {
6883}
6884
Jesse Halld0599582017-03-10 18:35:38 -08006885@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08006886cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6887 VkPhysicalDevice physicalDevice,
6888 VkFormat format,
6889 VkImageType type,
6890 VkImageTiling tiling,
6891 VkImageUsageFlags usage,
6892 VkImageCreateFlags flags,
6893 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
6894 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
6895 return ?
6896}
6897
Jesse Halld0599582017-03-10 18:35:38 -08006898@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08006899cmd VkResult vkGetMemoryWin32HandleNV(
6900 VkDevice device,
6901 VkDeviceMemory memory,
6902 VkExternalMemoryHandleTypeFlagsNV handleType,
6903 platform.HANDLE* pHandle) {
6904 return ?
6905}
6906
Jesse Halld0599582017-03-10 18:35:38 -08006907@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006908cmd void vkGetPhysicalDeviceFeatures2KHR(
6909 VkPhysicalDevice physicalDevice,
6910 VkPhysicalDeviceFeatures2KHR* pFeatures) {
6911}
6912
Jesse Halld0599582017-03-10 18:35:38 -08006913@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006914cmd void vkGetPhysicalDeviceProperties2KHR(
6915 VkPhysicalDevice physicalDevice,
6916 VkPhysicalDeviceProperties2KHR* pProperties) {
6917}
6918
Jesse Halld0599582017-03-10 18:35:38 -08006919@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006920cmd void vkGetPhysicalDeviceFormatProperties2KHR(
6921 VkPhysicalDevice physicalDevice,
6922 VkFormat format,
6923 VkFormatProperties2KHR* pFormatProperties) {
6924}
6925
Jesse Halld0599582017-03-10 18:35:38 -08006926@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006927cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
6928 VkPhysicalDevice physicalDevice,
6929 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
6930 VkImageFormatProperties2KHR* pImageFormatProperties) {
6931 return ?
6932}
6933
Jesse Halld0599582017-03-10 18:35:38 -08006934@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006935cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
6936 VkPhysicalDevice physicalDevice,
6937 u32* pQueueFamilyPropertyCount,
6938 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
6939}
6940
Jesse Halld0599582017-03-10 18:35:38 -08006941@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006942cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
6943 VkPhysicalDevice physicalDevice,
6944 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
6945}
6946
Jesse Halld0599582017-03-10 18:35:38 -08006947@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall08e2f482017-03-06 15:22:17 -08006948cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
6949 VkPhysicalDevice physicalDevice,
6950 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
6951 u32* pPropertyCount,
6952 VkSparseImageFormatProperties2KHR* pProperties) {
6953}
6954
Jesse Halld0599582017-03-10 18:35:38 -08006955@extension("VK_KHX_device_group") // 61
6956cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX(
6957 VkDevice device,
6958 u32 heapIndex,
6959 u32 localDeviceIndex,
6960 u32 remoteDeviceIndex,
6961 VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) {
6962}
6963
6964@extension("VK_KHX_device_group") // 61
6965cmd VkResult vkBindBufferMemory2KHX(
6966 VkDevice device,
6967 u32 bindInfoCount,
6968 const VkBindBufferMemoryInfoKHX* pBindInfos) {
6969 return ?
6970}
6971
6972@extension("VK_KHX_device_group") // 61
6973cmd VkResult vkBindImageMemory2KHX(
6974 VkDevice device,
6975 u32 bindInfoCount,
6976 const VkBindImageMemoryInfoKHX* pBindInfos) {
6977 return ?
6978}
6979
6980@extension("VK_KHX_device_group") // 61
6981cmd void vkCmdSetDeviceMaskKHX(
6982 VkCommandBuffer commandBuffer,
6983 u32 deviceMask) {
6984}
6985
6986@extension("VK_KHX_device_group") // 61
6987cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX(
6988 VkDevice device,
6989 VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) {
6990 return ?
6991}
6992
6993@extension("VK_KHX_device_group") // 61
6994cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX(
6995 VkDevice device,
6996 VkSurfaceKHR surface,
6997 VkDeviceGroupPresentModeFlagsKHX* pModes) {
6998 return ?
6999}
7000
7001@extension("VK_KHX_device_group") // 61
7002cmd VkResult vkAcquireNextImage2KHX(
7003 VkDevice device,
7004 const VkAcquireNextImageInfoKHX* pAcquireInfo,
7005 u32* pImageIndex) {
7006 return ?
7007}
7008
7009@extension("VK_KHX_device_group") // 61
7010cmd void vkCmdDispatchBaseKHX(
7011 VkCommandBuffer commandBuffer,
7012 u32 baseGroupX,
7013 u32 baseGroupY,
7014 u32 baseGroupZ,
7015 u32 groupCountX,
7016 u32 groupCountY,
7017 u32 groupCountZ) {
7018}
7019
7020@extension("VK_KHX_device_group") // 61
7021cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX(
7022 VkPhysicalDevice physicalDevice,
7023 VkSurfaceKHR surface,
7024 u32* pRectCount,
7025 VkRect2D* pRects) {
7026 return ?
7027}
7028
7029@extension("VK_NN_vi_surface") // 63
Jesse Hall08e2f482017-03-06 15:22:17 -08007030cmd VkResult vkCreateViSurfaceNN(
7031 VkInstance instance,
7032 const VkViSurfaceCreateInfoNN* pCreateInfo,
7033 const VkAllocationCallbacks* pAllocator,
7034 VkSurfaceKHR* pSurface) {
7035 return ?
7036}
7037
Jesse Halld0599582017-03-10 18:35:38 -08007038@extension("VK_KHR_maintenance1") // 70
Jesse Hall08e2f482017-03-06 15:22:17 -08007039cmd void vkTrimCommandPoolKHR(
7040 VkDevice device,
7041 VkCommandPool commandPool,
7042 VkCommandPoolTrimFlagsKHR flags) {
7043}
7044
Jesse Halld0599582017-03-10 18:35:38 -08007045@extension("VK_KHX_device_group_creation") // 71
7046cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX(
7047 VkInstance instance,
7048 u32* pPhysicalDeviceGroupCount,
7049 VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) {
7050 return ?
7051}
7052
7053@extension("VK_KHX_external_memory_capabilities") // 72
7054cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
7055 VkPhysicalDevice physicalDevice,
7056 const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo,
7057 VkExternalBufferPropertiesKHX* pExternalBufferProperties) {
7058}
7059
Jesse Halld0599582017-03-10 18:35:38 -08007060@extension("VK_KHX_external_memory_win32") // 74
7061cmd VkResult vkGetMemoryWin32HandleKHX(
7062 VkDevice device,
7063 VkDeviceMemory memory,
7064 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7065 platform.HANDLE* pHandle) {
7066 return ?
7067}
7068
7069@extension("VK_KHX_external_memory_win32") // 74
7070cmd VkResult vkGetMemoryWin32HandlePropertiesKHX(
7071 VkDevice device,
7072 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7073 platform.HANDLE handle,
7074 VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) {
7075 return ?
7076}
7077
7078@extension("VK_KHX_external_memory_fd") // 75
7079cmd VkResult vkGetMemoryFdKHX(
7080 VkDevice device,
7081 VkDeviceMemory memory,
7082 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7083 s32* pFd) {
7084 return ?
7085}
7086
7087@extension("VK_KHX_external_memory_fd") // 75
7088cmd VkResult vkGetMemoryFdPropertiesKHX(
7089 VkDevice device,
7090 VkExternalMemoryHandleTypeFlagBitsKHX handleType,
7091 s32 fd,
7092 VkMemoryFdPropertiesKHX* pMemoryFdProperties) {
7093 return ?
7094}
7095
7096@extension("VK_KHX_external_semaphore_capabilities") // 77
7097cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
7098 VkPhysicalDevice physicalDevice,
7099 const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
7100 VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) {
7101}
7102
7103@extension("VK_KHX_external_semaphore_win32") // 79
7104cmd VkResult vkImportSemaphoreWin32HandleKHX(
7105 VkDevice device,
7106 const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) {
7107 return ?
7108}
7109
7110@extension("VK_KHX_external_semaphore_win32") // 79
7111cmd VkResult vkGetSemaphoreWin32HandleKHX(
7112 VkDevice device,
7113 VkSemaphore semaphore,
7114 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7115 platform.HANDLE* pHandle) {
7116 return ?
7117}
7118
7119@extension("VK_KHX_external_semaphore_fd") // 80
7120cmd VkResult vkImportSemaphoreFdKHX(
7121 VkDevice device,
7122 const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) {
7123 return ?
7124}
7125
7126@extension("VK_KHX_external_semaphore_fd") // 80
7127cmd VkResult vkGetSemaphoreFdKHX(
7128 VkDevice device,
7129 VkSemaphore semaphore,
7130 VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
7131 s32* pFd) {
7132 return ?
7133}
7134
7135@extension("VK_KHR_push_descriptor") // 81
7136cmd void vkCmdPushDescriptorSetKHR(
7137 VkCommandBuffer commandBuffer,
7138 VkPipelineBindPoint pipelineBindPoint,
7139 VkPipelineLayout layout,
7140 u32 set,
7141 u32 descriptorWriteCount,
7142 const VkWriteDescriptorSet* pDescriptorWrites) {
7143}
7144
7145@extension("VK_KHR_descriptor_update_template") // 86
7146cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
7147 VkDevice device,
7148 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
7149 const VkAllocationCallbacks* pAllocator,
7150 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
7151 return ?
7152}
7153
7154@extension("VK_KHR_descriptor_update_template") // 86
7155cmd void vkDestroyDescriptorUpdateTemplateKHR(
7156 VkDevice device,
7157 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7158 const VkAllocationCallbacks* pAllocator) {
7159}
7160
7161@extension("VK_KHR_descriptor_update_template") // 86
7162cmd void vkUpdateDescriptorSetWithTemplateKHR(
7163 VkDevice device,
7164 VkDescriptorSet descriptorSet,
7165 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7166 const void* pData) {
7167}
7168
7169@extension("VK_KHR_descriptor_update_template") // 86
7170cmd void vkCmdPushDescriptorSetWithTemplateKHR(
7171 VkCommandBuffer commandBuffer,
7172 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
7173 VkPipelineLayout layout,
7174 u32 set,
7175 const void* pData) {
7176}
7177
7178@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007179cmd void vkCmdProcessCommandsNVX(
7180 VkCommandBuffer commandBuffer,
7181 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
7182}
7183
Jesse Halld0599582017-03-10 18:35:38 -08007184@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007185cmd void vkCmdReserveSpaceForCommandsNVX(
7186 VkCommandBuffer commandBuffer,
7187 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
7188}
7189
Jesse Halld0599582017-03-10 18:35:38 -08007190@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007191cmd VkResult vkCreateIndirectCommandsLayoutNVX(
7192 VkDevice device,
7193 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
7194 const VkAllocationCallbacks* pAllocator,
7195 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
7196 return ?
7197}
7198
Jesse Halld0599582017-03-10 18:35:38 -08007199@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007200cmd void vkDestroyIndirectCommandsLayoutNVX(
7201 VkDevice device,
7202 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
7203 const VkAllocationCallbacks* pAllocator) {
7204}
7205
Jesse Halld0599582017-03-10 18:35:38 -08007206@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007207cmd VkResult vkCreateObjectTableNVX(
7208 VkDevice device,
7209 const VkObjectTableCreateInfoNVX* pCreateInfo,
7210 const VkAllocationCallbacks* pAllocator,
7211 VkObjectTableNVX* pObjectTable) {
7212 return ?
7213}
7214
Jesse Halld0599582017-03-10 18:35:38 -08007215@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007216cmd void vkDestroyObjectTableNVX(
7217 VkDevice device,
7218 VkObjectTableNVX objectTable,
7219 const VkAllocationCallbacks* pAllocator) {
7220}
7221
Jesse Halld0599582017-03-10 18:35:38 -08007222@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007223cmd VkResult vkRegisterObjectsNVX(
7224 VkDevice device,
7225 VkObjectTableNVX objectTable,
7226 u32 objectCount,
7227 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
7228 const u32* pObjectIndices) {
7229 return ?
7230}
7231
Jesse Halld0599582017-03-10 18:35:38 -08007232@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007233cmd VkResult vkUnregisterObjectsNVX(
7234 VkDevice device,
7235 VkObjectTableNVX objectTable,
7236 u32 objectCount,
7237 const VkObjectEntryTypeNVX* pObjectEntryTypes,
7238 const u32* pObjectIndices) {
7239 return ?
7240}
7241
Jesse Halld0599582017-03-10 18:35:38 -08007242@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08007243cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
7244 VkPhysicalDevice physicalDevice,
7245 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
7246 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
7247}
Jesse Halld27f6aa2015-08-15 17:58:48 -07007248
Jesse Halld0599582017-03-10 18:35:38 -08007249@extension("VK_NV_clip_space_w_scaling") // 88
7250cmd void vkCmdSetViewportWScalingNV(
7251 VkCommandBuffer commandBuffer,
7252 u32 firstViewport,
7253 u32 viewportCount,
7254 const VkViewportWScalingNV* pViewportWScalings) {
7255}
7256
7257@extension("VK_EXT_direct_mode_display") // 89
Jesse Hall08e2f482017-03-06 15:22:17 -08007258cmd VkResult vkReleaseDisplayEXT(
7259 VkPhysicalDevice physicalDevice,
7260 VkDisplayKHR display) {
7261 return ?
7262}
7263
Jesse Halld0599582017-03-10 18:35:38 -08007264@extension("VK_EXT_acquire_xlib_display") // 90
Jesse Hall08e2f482017-03-06 15:22:17 -08007265cmd VkResult vkAcquireXlibDisplayEXT(
7266 VkPhysicalDevice physicalDevice,
7267 platform.Display* dpy,
7268 VkDisplayKHR display) {
7269 return ?
7270}
7271
Jesse Halld0599582017-03-10 18:35:38 -08007272@extension("VK_EXT_acquire_xlib_display") // 90
Jesse Hall08e2f482017-03-06 15:22:17 -08007273cmd VkResult vkGetRandROutputDisplayEXT(
7274 VkPhysicalDevice physicalDevice,
7275 platform.Display* dpy,
7276 platform.RROutput rrOutput,
7277 VkDisplayKHR* pDisplay) {
7278 return ?
7279}
7280
Jesse Halld0599582017-03-10 18:35:38 -08007281@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall08e2f482017-03-06 15:22:17 -08007282cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
7283 VkPhysicalDevice physicalDevice,
7284 VkSurfaceKHR surface,
7285 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
7286 return ?
7287}
7288
Jesse Halld0599582017-03-10 18:35:38 -08007289@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007290cmd VkResult vkDisplayPowerControlEXT(
7291 VkDevice device,
7292 VkDisplayKHR display,
7293 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
7294 return ?
7295}
7296
Jesse Halld0599582017-03-10 18:35:38 -08007297@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007298cmd VkResult vkRegisterDeviceEventEXT(
7299 VkDevice device,
7300 const VkDeviceEventInfoEXT* pDeviceEventInfo,
7301 const VkAllocationCallbacks* pAllocator,
7302 VkFence* pFence) {
7303 return ?
7304}
7305
Jesse Halld0599582017-03-10 18:35:38 -08007306@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007307cmd VkResult vkRegisterDisplayEventEXT(
7308 VkDevice device,
7309 VkDisplayKHR display,
7310 const VkDisplayEventInfoEXT* pDisplayEventInfo,
7311 const VkAllocationCallbacks* pAllocator,
7312 VkFence* pFence) {
7313 return ?
7314}
7315
Jesse Halld0599582017-03-10 18:35:38 -08007316@extension("VK_EXT_display_control") // 92
Jesse Hall08e2f482017-03-06 15:22:17 -08007317cmd VkResult vkGetSwapchainCounterEXT(
7318 VkDevice device,
7319 VkSwapchainKHR swapchain,
7320 VkSurfaceCounterFlagBitsEXT counter,
7321 u64* pCounterValue) {
7322 return ?
7323}
7324
Jesse Halle8ec6a22017-03-10 21:01:57 -08007325@extension("VK_GOOGLE_display_timing") // 93
7326cmd VkResult vkGetRefreshCycleDurationGOOGLE(
7327 VkDevice device,
7328 VkSwapchainKHR swapchain,
7329 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
7330 return ?
7331}
7332
7333@extension("VK_GOOGLE_display_timing") // 93
7334cmd VkResult vkGetPastPresentationTimingGOOGLE(
7335 VkDevice device,
7336 VkSwapchainKHR swapchain,
7337 u32* pPresentationTimingCount,
7338 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
7339 return ?
7340}
7341
Jesse Halld0599582017-03-10 18:35:38 -08007342@extension("VK_EXT_discard_rectangles") // 100
7343cmd void vkCmdSetDiscardRectangleEXT(
7344 VkCommandBuffer commandBuffer,
7345 u32 firstDiscardRectangle,
7346 u32 discardRectangleCount,
7347 const VkRect2D* pDiscardRectangles) {
7348}
7349
Jesse Halle8ec6a22017-03-10 21:01:57 -08007350@extension("VK_EXT_hdr_metadata") // 106
7351cmd void vkSetHdrMetadataEXT(
7352 VkDevice device,
7353 u32 swapchainCount,
7354 const VkSwapchainKHR* pSwapchains,
7355 const VkHdrMetadataEXT* pMetadata) {
7356}
7357
Jesse Halld0599582017-03-10 18:35:38 -08007358@extension("VK_MVK_ios_surface") // 123
7359cmd VkResult vkCreateIOSSurfaceMVK(
7360 VkInstance instance,
7361 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
7362 const VkAllocationCallbacks* pAllocator,
7363 VkSurfaceKHR* pSurface) {
7364 return ?
7365}
7366
7367@extension("VK_MVK_macos_surface") // 124
7368cmd VkResult vkCreateMacOSSurfaceMVK(
7369 VkInstance instance,
7370 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
7371 const VkAllocationCallbacks* pAllocator,
7372 VkSurfaceKHR* pSurface) {
7373 return ?
7374}
7375
Jesse Halld27f6aa2015-08-15 17:58:48 -07007376////////////////
7377// Validation //
7378////////////////
7379
7380extern void validate(string layerName, bool condition, string message)
7381
7382
7383/////////////////////////////
7384// Internal State Tracking //
7385/////////////////////////////
7386
7387StateObject State
7388
7389@internal class StateObject {
7390 // Dispatchable objects.
7391 map!(VkInstance, ref!InstanceObject) Instances
7392 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
7393 map!(VkDevice, ref!DeviceObject) Devices
7394 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08007395 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007396
7397 // Non-dispatchable objects.
7398 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
7399 map!(VkBuffer, ref!BufferObject) Buffers
7400 map!(VkBufferView, ref!BufferViewObject) BufferViews
7401 map!(VkImage, ref!ImageObject) Images
7402 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07007403 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07007404 map!(VkPipeline, ref!PipelineObject) Pipelines
7405 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
7406 map!(VkSampler, ref!SamplerObject) Samplers
7407 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
7408 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
7409 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07007410 map!(VkFence, ref!FenceObject) Fences
7411 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
7412 map!(VkEvent, ref!EventObject) Events
7413 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
7414 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
7415 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
7416 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08007417 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08007418 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08007419 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07007420}
7421
7422@internal class InstanceObject {
7423}
7424
7425@internal class PhysicalDeviceObject {
7426 VkInstance instance
7427}
7428
7429@internal class DeviceObject {
7430 VkPhysicalDevice physicalDevice
7431}
7432
7433@internal class QueueObject {
7434 VkDevice device
7435 VkQueueFlags flags
7436}
7437
Jesse Hall3fbc8562015-11-29 22:10:52 -08007438@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007439 VkDevice device
7440 map!(u64, VkDeviceMemory) boundObjects
7441 VkQueueFlags queueFlags
7442}
7443
7444@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007445 VkDevice device
7446 VkDeviceSize allocationSize
7447 map!(u64, VkDeviceSize) boundObjects
7448 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07007449}
7450
7451@internal class BufferObject {
7452 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007453 VkDeviceMemory memory
7454 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007455}
7456
7457@internal class BufferViewObject {
7458 VkDevice device
7459 VkBuffer buffer
7460}
7461
7462@internal class ImageObject {
7463 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08007464 VkDeviceMemory memory
7465 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07007466}
7467
7468@internal class ImageViewObject {
7469 VkDevice device
7470 VkImage image
7471}
7472
Jesse Halld27f6aa2015-08-15 17:58:48 -07007473@internal class ShaderObject {
7474 VkDevice device
7475}
7476
7477@internal class ShaderModuleObject {
7478 VkDevice device
7479}
7480
7481@internal class PipelineObject {
7482 VkDevice device
7483}
7484
7485@internal class PipelineLayoutObject {
7486 VkDevice device
7487}
7488
7489@internal class SamplerObject {
7490 VkDevice device
7491}
7492
7493@internal class DescriptorSetObject {
7494 VkDevice device
7495}
7496
7497@internal class DescriptorSetLayoutObject {
7498 VkDevice device
7499}
7500
7501@internal class DescriptorPoolObject {
7502 VkDevice device
7503}
7504
Jesse Halld27f6aa2015-08-15 17:58:48 -07007505@internal class FenceObject {
7506 VkDevice device
7507 bool signaled
7508}
7509
7510@internal class SemaphoreObject {
7511 VkDevice device
7512}
7513
7514@internal class EventObject {
7515 VkDevice device
7516}
7517
7518@internal class QueryPoolObject {
7519 VkDevice device
7520}
7521
7522@internal class FramebufferObject {
7523 VkDevice device
7524}
7525
7526@internal class RenderPassObject {
7527 VkDevice device
7528}
7529
7530@internal class PipelineCacheObject {
7531 VkDevice device
7532}
7533
Jesse Hall3fbc8562015-11-29 22:10:52 -08007534@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007535 VkDevice device
7536}
7537
Jesse Hall1356b0d2015-11-23 17:24:58 -08007538@internal class SurfaceObject {
7539 VkInstance instance
7540}
7541
Michael Lentine88594d72015-11-12 12:49:45 -08007542@internal class SwapchainObject {
7543 VkDevice device
7544}
7545
Jesse Halld27f6aa2015-08-15 17:58:48 -07007546macro ref!InstanceObject GetInstance(VkInstance instance) {
7547 assert(instance in State.Instances)
7548 return State.Instances[instance]
7549}
7550
7551macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
7552 assert(physicalDevice in State.PhysicalDevices)
7553 return State.PhysicalDevices[physicalDevice]
7554}
7555
7556macro ref!DeviceObject GetDevice(VkDevice device) {
7557 assert(device in State.Devices)
7558 return State.Devices[device]
7559}
7560
7561macro ref!QueueObject GetQueue(VkQueue queue) {
7562 assert(queue in State.Queues)
7563 return State.Queues[queue]
7564}
7565
Jesse Hall3fbc8562015-11-29 22:10:52 -08007566macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
7567 assert(commandBuffer in State.CommandBuffers)
7568 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007569}
7570
Jesse Hall3fbc8562015-11-29 22:10:52 -08007571macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
7572 assert(memory in State.DeviceMemories)
7573 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007574}
7575
7576macro ref!BufferObject GetBuffer(VkBuffer buffer) {
7577 assert(buffer in State.Buffers)
7578 return State.Buffers[buffer]
7579}
7580
7581macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
7582 assert(bufferView in State.BufferViews)
7583 return State.BufferViews[bufferView]
7584}
7585
7586macro ref!ImageObject GetImage(VkImage image) {
7587 assert(image in State.Images)
7588 return State.Images[image]
7589}
7590
7591macro ref!ImageViewObject GetImageView(VkImageView imageView) {
7592 assert(imageView in State.ImageViews)
7593 return State.ImageViews[imageView]
7594}
7595
Jesse Halld27f6aa2015-08-15 17:58:48 -07007596macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
7597 assert(shaderModule in State.ShaderModules)
7598 return State.ShaderModules[shaderModule]
7599}
7600
7601macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
7602 assert(pipeline in State.Pipelines)
7603 return State.Pipelines[pipeline]
7604}
7605
7606macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
7607 assert(pipelineLayout in State.PipelineLayouts)
7608 return State.PipelineLayouts[pipelineLayout]
7609}
7610
7611macro ref!SamplerObject GetSampler(VkSampler sampler) {
7612 assert(sampler in State.Samplers)
7613 return State.Samplers[sampler]
7614}
7615
7616macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
7617 assert(descriptorSet in State.DescriptorSets)
7618 return State.DescriptorSets[descriptorSet]
7619}
7620
7621macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
7622 assert(descriptorSetLayout in State.DescriptorSetLayouts)
7623 return State.DescriptorSetLayouts[descriptorSetLayout]
7624}
7625
7626macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
7627 assert(descriptorPool in State.DescriptorPools)
7628 return State.DescriptorPools[descriptorPool]
7629}
7630
Jesse Halld27f6aa2015-08-15 17:58:48 -07007631macro ref!FenceObject GetFence(VkFence fence) {
7632 assert(fence in State.Fences)
7633 return State.Fences[fence]
7634}
7635
7636macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
7637 assert(semaphore in State.Semaphores)
7638 return State.Semaphores[semaphore]
7639}
7640
7641macro ref!EventObject GetEvent(VkEvent event) {
7642 assert(event in State.Events)
7643 return State.Events[event]
7644}
7645
7646macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
7647 assert(queryPool in State.QueryPools)
7648 return State.QueryPools[queryPool]
7649}
7650
7651macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
7652 assert(framebuffer in State.Framebuffers)
7653 return State.Framebuffers[framebuffer]
7654}
7655
7656macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
7657 assert(renderPass in State.RenderPasses)
7658 return State.RenderPasses[renderPass]
7659}
7660
7661macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
7662 assert(pipelineCache in State.PipelineCaches)
7663 return State.PipelineCaches[pipelineCache]
7664}
7665
Jesse Hall3fbc8562015-11-29 22:10:52 -08007666macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
7667 assert(commandPool in State.CommandPools)
7668 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07007669}
Michael Lentine88594d72015-11-12 12:49:45 -08007670
Jesse Hall1356b0d2015-11-23 17:24:58 -08007671macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
7672 assert(surface in State.Surfaces)
7673 return State.Surfaces[surface]
7674}
7675
Michael Lentine88594d72015-11-12 12:49:45 -08007676macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
7677 assert(swapchain in State.Swapchains)
7678 return State.Swapchains[swapchain]
7679}
Jesse Halld8bade02015-11-24 10:24:18 -08007680
7681macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
7682 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
7683}