blob: 1cb02c4f4127b9b921708cbbb2139d73ab728c72 [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
Daniel Kochf25f5bb2017-10-05 00:26:58 -040030define VERSION_MINOR 1
Jesse Hall076f95d2017-09-20 11:34:47 -070031define VERSION_PATCH 61
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.
Daniel Kochf25f5bb2017-10-05 00:26:58 -040040//@version 1.1
41define VK_MAX_DEVICE_GROUP_SIZE 32
42define VK_LUID_SIZE 8
43define VK_QUEUE_FAMILY_EXTERNAL -2
Jesse Halld27f6aa2015-08-15 17:58:48 -070044
45// API keywords
46define VK_TRUE 1
47define VK_FALSE 0
Jesse Hall5ae3abb2015-10-08 14:00:22 -070048
49// API keyword, but needs special handling by some templates
50define NULL_HANDLE 0
Jesse Halld27f6aa2015-08-15 17:58:48 -070051
Jesse Halleb02c472017-02-24 15:13:45 -080052// 1
Jesse Hall33faaad2016-01-24 21:00:49 -080053@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080054@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080055
Jesse Halleb02c472017-02-24 15:13:45 -080056// 2
Daniel Kochf25f5bb2017-10-05 00:26:58 -040057@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080058@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080059
Jesse Halleb02c472017-02-24 15:13:45 -080060// 3
Jesse Hall543a7ff2016-01-08 16:38:30 -080061@extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080062@extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
Jesse Hall1356b0d2015-11-23 17:24:58 -080063
Jesse Halleb02c472017-02-24 15:13:45 -080064// 4
Jesse Hall543a7ff2016-01-08 16:38:30 -080065@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
Jesse Hall0e74f002015-11-30 11:37:59 -080066@extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
Jesse Hall1356b0d2015-11-23 17:24:58 -080067
Jesse Halleb02c472017-02-24 15:13:45 -080068// 5
Jesse Hall543a7ff2016-01-08 16:38:30 -080069@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080070@extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080071
Jesse Halleb02c472017-02-24 15:13:45 -080072// 6
Jesse Hall543a7ff2016-01-08 16:38:30 -080073@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080074@extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080075
Jesse Halleb02c472017-02-24 15:13:45 -080076// 7
Jesse Hallfdc8ab32017-03-10 21:01:57 -080077@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080078@extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080079
Jesse Halleb02c472017-02-24 15:13:45 -080080// 8
Jesse Hall543a7ff2016-01-08 16:38:30 -080081@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080082@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080083
Jesse Halleb02c472017-02-24 15:13:45 -080084// 9
Jesse Hall33faaad2016-01-24 21:00:49 -080085@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080086@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080087
Jesse Halleb02c472017-02-24 15:13:45 -080088// 10
Jesse Hall7ba0ac72017-07-07 17:13:23 -070089@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
Jesse Hall3e0dc8f2015-11-30 00:42:57 -080090@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface"
Jesse Hall1356b0d2015-11-23 17:24:58 -080091
Jesse Halleb02c472017-02-24 15:13:45 -080092// 11
Chris Forbes1d4e5542017-02-15 19:38:50 +130093@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7
Chia-I Wub262ddc2016-03-22 07:38:20 +080094@extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer"
95
Jesse Halleb02c472017-02-24 15:13:45 -080096// 12
Daniel Kochf25f5bb2017-10-05 00:26:58 -040097@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
Jesse Hall715b86a2016-01-16 16:34:29 -080098@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report"
99
Jesse Halleb02c472017-02-24 15:13:45 -0800100// 13
Jesse Hall26763382016-05-20 07:13:52 -0700101@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1
102@extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader"
103
Jesse Hall77726222017-09-19 14:49:27 -0500104// 14
105@extension("VK_EXT_depth_range_unrestricted") define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
106@extension("VK_EXT_depth_range_unrestricted") define VK_EXT_DEPTH_RANGE_UNRESTRICTED_NAME "VK_EXT_depth_range_unrestricted"
107
Jesse Halleb02c472017-02-24 15:13:45 -0800108// 15
Jesse Hall26763382016-05-20 07:13:52 -0700109@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
110@extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
111
Jesse Halleb02c472017-02-24 15:13:45 -0800112// 16
Jesse Hall26763382016-05-20 07:13:52 -0700113@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
114@extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic"
115
Jesse Halleb02c472017-02-24 15:13:45 -0800116// 19
Jesse Hall26763382016-05-20 07:13:52 -0700117@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
118@extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order"
119
Jesse Halleb02c472017-02-24 15:13:45 -0800120// 21
Jesse Hall56d386a2016-07-26 15:20:40 -0700121@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
122@extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
123
Jesse Halleb02c472017-02-24 15:13:45 -0800124// 22
Jesse Hall56d386a2016-07-26 15:20:40 -0700125@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
126@extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
127
Jesse Halleb02c472017-02-24 15:13:45 -0800128// 23
Jesse Hall8f49fcb2017-03-06 16:02:58 -0800129@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
Jesse Hall26763382016-05-20 07:13:52 -0700130@extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker"
131
Jesse Halleb02c472017-02-24 15:13:45 -0800132// 26
Jesse Hall56d386a2016-07-26 15:20:40 -0700133@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1
134@extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
135
Jesse Halleb02c472017-02-24 15:13:45 -0800136// 27
Jesse Hall56d386a2016-07-26 15:20:40 -0700137@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
138@extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
139
Jesse Halleb02c472017-02-24 15:13:45 -0800140// 28
Chris Forbes289cb792016-12-30 15:03:55 +1300141@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
142@extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
143
Jesse Halleb02c472017-02-24 15:13:45 -0800144// 34
145@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
146@extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
147
148// 36
149@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
150@extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
151
152// 37
153@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
154@extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
155
156// 38
157@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
158@extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
159
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700160// 42
161@extension("VK_AMD_texture_gather_bias_lod") define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
162@extension("VK_AMD_texture_gather_bias_lod") define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
163
Jesse Hallad250842017-03-10 18:35:38 -0800164// 54
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400165@extension("VK_KHR_multiview") define VK_KHR_MULTIVIEW_SPEC_VERSION 1
166@extension("VK_KHR_multiview") define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview"
Jesse Hallad250842017-03-10 18:35:38 -0800167
Jesse Halleb02c472017-02-24 15:13:45 -0800168// 56
Chris Forbes289cb792016-12-30 15:03:55 +1300169@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
170@extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
171
Jesse Halleb02c472017-02-24 15:13:45 -0800172// 57
Chris Forbes289cb792016-12-30 15:03:55 +1300173@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
174@extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
175
Jesse Halleb02c472017-02-24 15:13:45 -0800176// 58
Chris Forbes289cb792016-12-30 15:03:55 +1300177@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
178@extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
179
Jesse Halleb02c472017-02-24 15:13:45 -0800180// 59
Chris Forbes289cb792016-12-30 15:03:55 +1300181@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
182@extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
183
Jesse Hall889cd9a2017-02-25 22:12:23 -0800184// 60
185@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
186@extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
187
Jesse Hallad250842017-03-10 18:35:38 -0800188// 61
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400189@extension("VK_KHR_device_group") define VK_KHR_DEVICE_GROUP_SPEC_VERSION 3
190@extension("VK_KHR_device_group") define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group"
Jesse Hallad250842017-03-10 18:35:38 -0800191
Jesse Halleb02c472017-02-24 15:13:45 -0800192// 62
Chris Forbes289cb792016-12-30 15:03:55 +1300193@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
194@extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
195
Jesse Hall77ad05b2017-03-10 22:02:20 -0800196// 63
197@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1
198@extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
199
200// 64
201@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
202@extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
203
204// 65
205@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
206@extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
207
208// 66
209@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
210@extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
211
212// 70
213@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
214@extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
215
Jesse Hallad250842017-03-10 18:35:38 -0800216// 71
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400217@extension("VK_KHR_device_group_creation") define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1
218@extension("VK_KHR_device_group_creation") define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation"
Jesse Hallad250842017-03-10 18:35:38 -0800219
220// 72
Jesse Hall9492f992017-08-28 12:10:06 -0700221@extension("VK_KHR_external_memory_capabilities") define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
222@extension("VK_KHR_external_memory_capabilities") define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities"
Jesse Hallad250842017-03-10 18:35:38 -0800223
224// 73
Jesse Hall9492f992017-08-28 12:10:06 -0700225@extension("VK_KHR_external_memory") define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
226@extension("VK_KHR_external_memory") define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
Jesse Hallad250842017-03-10 18:35:38 -0800227
228// 74
Jesse Hall9492f992017-08-28 12:10:06 -0700229@extension("VK_KHR_external_memory_win32") define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
230@extension("VK_KHR_external_memory_win32") define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
Jesse Hallad250842017-03-10 18:35:38 -0800231
232// 75
Jesse Hall9492f992017-08-28 12:10:06 -0700233@extension("VK_KHR_external_memory_fd") define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
234@extension("VK_KHR_external_memory_fd") define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd"
Jesse Hallad250842017-03-10 18:35:38 -0800235
236// 76
Jesse Hall9492f992017-08-28 12:10:06 -0700237@extension("VK_KHR_win32_keyed_mutex") define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
238@extension("VK_KHR_win32_keyed_mutex") define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
Jesse Hallad250842017-03-10 18:35:38 -0800239
240// 77
Jesse Hall9492f992017-08-28 12:10:06 -0700241@extension("VK_KHR_external_semaphore_capabilities") define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
242@extension("VK_KHR_external_semaphore_capabilities") define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities"
Jesse Hallad250842017-03-10 18:35:38 -0800243
244// 78
Jesse Hall9492f992017-08-28 12:10:06 -0700245@extension("VK_KHR_external_semaphore") define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
246@extension("VK_KHR_external_semaphore") define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore"
Jesse Hallad250842017-03-10 18:35:38 -0800247
248// 79
Jesse Hall9492f992017-08-28 12:10:06 -0700249@extension("VK_KHR_external_semaphore_win32") define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
250@extension("VK_KHR_external_semaphore_win32") define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
Jesse Hallad250842017-03-10 18:35:38 -0800251
252// 80
Jesse Hall9492f992017-08-28 12:10:06 -0700253@extension("VK_KHR_external_semaphore_fd") define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
254@extension("VK_KHR_external_semaphore_fd") define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd"
Jesse Hallad250842017-03-10 18:35:38 -0800255
256// 81
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400257@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2
Jesse Hallad250842017-03-10 18:35:38 -0800258@extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
259
Jesse Hall9492f992017-08-28 12:10:06 -0700260// 84
261@extension("VK_KHR_16bit_storage") define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
262@extension("VK_KHR_16bit_storage") define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
263
Jesse Hall889cd9a2017-02-25 22:12:23 -0800264// 85
265@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700266@extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800267
Jesse Hallad250842017-03-10 18:35:38 -0800268// 86
269@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
270@extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
271
Jesse Halleb02c472017-02-24 15:13:45 -0800272// 87
Jesse Hall77726222017-09-19 14:49:27 -0500273@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3
Chris Forbes289cb792016-12-30 15:03:55 +1300274@extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
275
Jesse Hallad250842017-03-10 18:35:38 -0800276// 88
277@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
278@extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
279
Jesse Hall77ad05b2017-03-10 22:02:20 -0800280// 89
281@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
282@extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
283
284// 90
285@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
286@extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
287
288// 91
289@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
290@extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
291
292// 92
293@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
294@extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control"
295
Jesse Hall889cd9a2017-02-25 22:12:23 -0800296// 93
297@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
Jesse Hallfdc8ab32017-03-10 21:01:57 -0800298@extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
Jesse Hall889cd9a2017-02-25 22:12:23 -0800299
Jesse Hallad250842017-03-10 18:35:38 -0800300// 95
301@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
302@extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
303
304// 96
305@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
306@extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
307
308// 97
309@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
310@extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
311
312// 98
313@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
314@extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
315
316// 99
317@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
318@extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
319
320// 100
321@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
322@extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
323
Jesse Hall77ad05b2017-03-10 22:02:20 -0800324// 105
Jesse Hall77726222017-09-19 14:49:27 -0500325@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 3
Jesse Hallf5ad48b2017-03-20 13:09:19 -0700326@extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
Jesse Hall77ad05b2017-03-10 22:02:20 -0800327
Jesse Hall889cd9a2017-02-25 22:12:23 -0800328// 106
329@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1
330@extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
331
332// 112
Chris Forbes1d5f68c2017-01-31 10:17:01 +1300333@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
334@extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
Chris Forbes2e12cb82017-01-18 11:45:17 +1300335
Jesse Hall9492f992017-08-28 12:10:06 -0700336// 113
337@extension("VK_KHR_external_fence_capabilities") define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
338@extension("VK_KHR_external_fence_capabilities") define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities"
339
340// 114
341@extension("VK_KHR_external_fence") define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1
342@extension("VK_KHR_external_fence") define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence"
343
344// 115
345@extension("VK_KHR_external_fence_win32") define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
346@extension("VK_KHR_external_fence_win32") define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
347
348// 116
349@extension("VK_KHR_external_fence_fd") define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1
350@extension("VK_KHR_external_fence_fd") define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd"
351
Jesse Hall076f95d2017-09-20 11:34:47 -0700352// 118
353@extension("VK_KHR_maintenance2") define VK_KHR_MAINTENANCE2_SPEC_VERSION 1
354@extension("VK_KHR_maintenance2") define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2"
355
Jesse Hall05556b12017-05-18 17:40:25 -0700356// 120
Chris Forbese2d3ee12017-03-16 16:10:15 +1300357@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
358@extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
359
Jesse Hall9492f992017-08-28 12:10:06 -0700360// 121
361@extension("VK_KHR_variable_pointers") define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
362@extension("VK_KHR_variable_pointers") define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
363
Jesse Hallad250842017-03-10 18:35:38 -0800364// 123
365@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1
366@extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
367
368// 124
369@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1
370@extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
371
Jesse Hall9492f992017-08-28 12:10:06 -0700372// 128
Jesse Hall77726222017-09-19 14:49:27 -0500373@extension("VK_KHR_dedicated_allocation") define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3
Jesse Hall9492f992017-08-28 12:10:06 -0700374@extension("VK_KHR_dedicated_allocation") define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
375
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700376// 131
377@extension("VK_EXT_sampler_filter_minmax") define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
378@extension("VK_EXT_sampler_filter_minmax") define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
379
Jesse Hall9492f992017-08-28 12:10:06 -0700380// 132
381@extension("VK_KHR_storage_buffer_storage_class") define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
382@extension("VK_KHR_storage_buffer_storage_class") define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
383
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700384// 133
385@extension("VK_AMD_gpu_shader_int16") define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
386@extension("VK_AMD_gpu_shader_int16") define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
387
Jesse Hall77726222017-09-19 14:49:27 -0500388// 137
389@extension("VK_AMD_mixed_attachment_samples") define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
390@extension("VK_AMD_mixed_attachment_samples") define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples"
391
392// 138
393@extension("VK_AMD_shader_fragment_mask") define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1
394@extension("VK_AMD_shader_fragment_mask") define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask"
395
396// 141
397@extension("VK_EXT_shader_stencil_export") define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
398@extension("VK_EXT_shader_stencil_export") define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export"
399
400// 144
401@extension("VK_EXT_sample_locations") define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1
402@extension("VK_EXT_sample_locations") define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations"
403
404// 145
405@extension("VK_KHR_relaxed_block_layout") define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1
406@extension("VK_KHR_relaxed_block_layout") define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout"
407
Jesse Hall9492f992017-08-28 12:10:06 -0700408// 147
409@extension("VK_KHR_get_memory_requirements2") define VK_KHR_GET_MEMORY_REQUIREMENTS2_SPEC_VERSION 1
410@extension("VK_KHR_get_memory_requirements2") define VK_KHR_GET_MEMORY_REQUIREMENTS2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
411
Jesse Hall076f95d2017-09-20 11:34:47 -0700412// 148
413@extension("VK_KHR_image_format_list") define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1
414@extension("VK_KHR_image_format_list") define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list"
415
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700416// 149
417@extension("VK_EXT_blend_operation_advanced") define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
418@extension("VK_EXT_blend_operation_advanced") define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
419
420// 150
421@extension("VK_NV_fragment_coverage_to_color") define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
422@extension("VK_NV_fragment_coverage_to_color") define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
423
424// 153
425@extension("VK_NV_framebuffer_mixed_samples") define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
426@extension("VK_NV_framebuffer_mixed_samples") define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
427
428// 154
429@extension("VK_NV_fill_rectangle") define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
430@extension("VK_NV_fill_rectangle") define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
431
Jesse Hall77726222017-09-19 14:49:27 -0500432// 156
433@extension("VK_EXT_post_depth_coverage") define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
434@extension("VK_EXT_post_depth_coverage") define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage"
435
Jesse Hall076f95d2017-09-20 11:34:47 -0700436// 157
437@extension("VK_KHR_sampler_ycbcr_conversion") define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1
438@extension("VK_KHR_sampler_ycbcr_conversion") define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion"
439
440// 158
441@extension("VK_KHR_bind_memory2") define VK_KHR_BIND_MEMORY2_SPEC_VERSION 1
442@extension("VK_KHR_bind_memory2") define VK_KHR_BIND_MEMORY2_EXTENSION_NAME "VK_KHR_bind_memory2"
443
Jesse Hall77726222017-09-19 14:49:27 -0500444// 161
445@extension("VK_EXT_validation_cache") define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1
446@extension("VK_EXT_validation_cache") define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache"
447
448// 165
449@extension("VK_EXT_shader_viewport_index_layer") define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
450@extension("VK_EXT_shader_viewport_index_layer") define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer"
451
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400452// 169
453@extension("VK_KHR_maintenance3") define VK_KHR_MAINTENANCE3_SPEC_VERSION 1
454@extension("VK_KHR_maintenance3") define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3"
455
Jesse Halld27f6aa2015-08-15 17:58:48 -0700456/////////////
457// Types //
458/////////////
459
Jesse Hall5ae3abb2015-10-08 14:00:22 -0700460type u32 VkBool32
461type u32 VkFlags
462type u64 VkDeviceSize
463type u32 VkSampleMask
464
Jesse Halld27f6aa2015-08-15 17:58:48 -0700465/// Dispatchable handle types.
466@dispatchHandle type u64 VkInstance
467@dispatchHandle type u64 VkPhysicalDevice
468@dispatchHandle type u64 VkDevice
469@dispatchHandle type u64 VkQueue
Jesse Hall3fbc8562015-11-29 22:10:52 -0800470@dispatchHandle type u64 VkCommandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -0700471
472/// Non dispatchable handle types.
473@nonDispatchHandle type u64 VkDeviceMemory
Jesse Hall3fbc8562015-11-29 22:10:52 -0800474@nonDispatchHandle type u64 VkCommandPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700475@nonDispatchHandle type u64 VkBuffer
476@nonDispatchHandle type u64 VkBufferView
477@nonDispatchHandle type u64 VkImage
478@nonDispatchHandle type u64 VkImageView
Jesse Halld27f6aa2015-08-15 17:58:48 -0700479@nonDispatchHandle type u64 VkShaderModule
Jesse Halld27f6aa2015-08-15 17:58:48 -0700480@nonDispatchHandle type u64 VkPipeline
481@nonDispatchHandle type u64 VkPipelineLayout
482@nonDispatchHandle type u64 VkSampler
483@nonDispatchHandle type u64 VkDescriptorSet
484@nonDispatchHandle type u64 VkDescriptorSetLayout
485@nonDispatchHandle type u64 VkDescriptorPool
Jesse Halld27f6aa2015-08-15 17:58:48 -0700486@nonDispatchHandle type u64 VkFence
487@nonDispatchHandle type u64 VkSemaphore
488@nonDispatchHandle type u64 VkEvent
489@nonDispatchHandle type u64 VkQueryPool
490@nonDispatchHandle type u64 VkFramebuffer
491@nonDispatchHandle type u64 VkRenderPass
492@nonDispatchHandle type u64 VkPipelineCache
Jesse Hall1356b0d2015-11-23 17:24:58 -0800493
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400494//@version 1.1
495@nonDispatchHandle type u64 VkSamplerYcbcrConversion
496@nonDispatchHandle type u64 VkDescriptorUpdateTemplate
497
Jesse Hallad250842017-03-10 18:35:38 -0800498// 1
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800499@extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800500
Jesse Hallad250842017-03-10 18:35:38 -0800501// 2
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800502@extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR
Jesse Hall1356b0d2015-11-23 17:24:58 -0800503
Jesse Hallad250842017-03-10 18:35:38 -0800504// 3
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800505@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR
506@extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR
Jesse Halld27f6aa2015-08-15 17:58:48 -0700507
Jesse Hallad250842017-03-10 18:35:38 -0800508// 12
Jesse Hall715b86a2016-01-16 16:34:29 -0800509@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT
510
Jesse Hallad250842017-03-10 18:35:38 -0800511// 86
512@extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR
513
514// 87
Chris Forbes289cb792016-12-30 15:03:55 +1300515@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX
516@extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX
517
Jesse Hall076f95d2017-09-20 11:34:47 -0700518// 157
519@extension("VK_KHR_sampler_ycbcr_conversion") @nonDispatchHandle type u64 VkSamplerYcbcrConversionKHR
520
Jesse Hall77726222017-09-19 14:49:27 -0500521// 161
522@extension("VK_EXT_validation_cache") @nonDispatchHandle type u64 VkValidationCacheEXT
Jesse Halld27f6aa2015-08-15 17:58:48 -0700523
524/////////////
525// Enums //
526/////////////
527
528enum VkImageLayout {
529 VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)
530 VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access
531 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write
532 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write
533 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access
534 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 -0800535 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations
536 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 -0700537 VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU
Jesse Hall1356b0d2015-11-23 17:24:58 -0800538
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400539 //@version 1.1
540 VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
541 VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
542
Jesse Hallad250842017-03-10 18:35:38 -0800543 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -0800544 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
Chris Forbesaf3a1112017-01-31 15:37:03 +1300545
Jesse Hall05556b12017-05-18 17:40:25 -0700546 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbesaf3a1112017-01-31 15:37:03 +1300547 VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
Jesse Hall076f95d2017-09-20 11:34:47 -0700548
549 //@extension("VK_KHR_maintenance2") // 118
550 VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000117000,
551 VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000117001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700552}
553
554enum VkAttachmentLoadOp {
555 VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000,
556 VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001,
557 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002,
558}
559
560enum VkAttachmentStoreOp {
561 VK_ATTACHMENT_STORE_OP_STORE = 0x00000000,
562 VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001,
563}
564
565enum VkImageType {
566 VK_IMAGE_TYPE_1D = 0x00000000,
567 VK_IMAGE_TYPE_2D = 0x00000001,
568 VK_IMAGE_TYPE_3D = 0x00000002,
569}
570
571enum VkImageTiling {
Jesse Hallc7467b72015-11-29 21:05:26 -0800572 VK_IMAGE_TILING_OPTIMAL = 0x00000000,
573 VK_IMAGE_TILING_LINEAR = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700574}
575
576enum VkImageViewType {
577 VK_IMAGE_VIEW_TYPE_1D = 0x00000000,
578 VK_IMAGE_VIEW_TYPE_2D = 0x00000001,
579 VK_IMAGE_VIEW_TYPE_3D = 0x00000002,
580 VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003,
581 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004,
582 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005,
583 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006,
584}
585
Jesse Hall3fbc8562015-11-29 22:10:52 -0800586enum VkCommandBufferLevel {
587 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000,
588 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700589}
590
Jesse Hall65ab5522015-11-30 00:07:16 -0800591enum VkComponentSwizzle {
592 VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000,
593 VK_COMPONENT_SWIZZLE_ZERO = 0x00000001,
594 VK_COMPONENT_SWIZZLE_ONE = 0x00000002,
595 VK_COMPONENT_SWIZZLE_R = 0x00000003,
596 VK_COMPONENT_SWIZZLE_G = 0x00000004,
597 VK_COMPONENT_SWIZZLE_B = 0x00000005,
598 VK_COMPONENT_SWIZZLE_A = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700599}
600
601enum VkDescriptorType {
602 VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000,
603 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001,
604 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002,
605 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003,
606 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004,
607 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005,
608 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006,
609 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007,
610 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008,
611 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009,
612 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a,
613}
614
Jesse Halld27f6aa2015-08-15 17:58:48 -0700615enum VkQueryType {
616 VK_QUERY_TYPE_OCCLUSION = 0x00000000,
617 VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional
Jesse Halla3a7a1d2015-11-24 11:37:23 -0800618 VK_QUERY_TYPE_TIMESTAMP = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700619}
620
Jesse Halld27f6aa2015-08-15 17:58:48 -0700621enum VkBorderColor {
622 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000,
623 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001,
624 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002,
625 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003,
626 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004,
627 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005,
628}
629
630enum VkPipelineBindPoint {
Jesse Hallc7467b72015-11-29 21:05:26 -0800631 VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000,
632 VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700633}
634
635enum VkPrimitiveTopology {
636 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000,
637 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001,
638 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002,
639 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003,
640 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004,
641 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800642 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006,
643 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007,
644 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008,
645 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009,
Jesse Hall091ed9e2015-11-30 00:55:29 -0800646 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700647}
648
649enum VkSharingMode {
650 VK_SHARING_MODE_EXCLUSIVE = 0x00000000,
651 VK_SHARING_MODE_CONCURRENT = 0x00000001,
652}
653
654enum VkIndexType {
655 VK_INDEX_TYPE_UINT16 = 0x00000000,
656 VK_INDEX_TYPE_UINT32 = 0x00000001,
657}
658
Jesse Hall23ff73f2015-11-29 14:36:39 -0800659enum VkFilter {
660 VK_FILTER_NEAREST = 0x00000000,
661 VK_FILTER_LINEAR = 0x00000001,
Jesse Hall26763382016-05-20 07:13:52 -0700662
Jesse Hallad250842017-03-10 18:35:38 -0800663 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -0700664 VK_FILTER_CUBIC_IMG = 1000015000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700665}
666
Jesse Hall23ff73f2015-11-29 14:36:39 -0800667enum VkSamplerMipmapMode {
Jesse Hall23ff73f2015-11-29 14:36:39 -0800668 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level
669 VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels
Jesse Halld27f6aa2015-08-15 17:58:48 -0700670}
671
Jesse Hall23ff73f2015-11-29 14:36:39 -0800672enum VkSamplerAddressMode {
Jesse Hallc7467b72015-11-29 21:05:26 -0800673 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000,
674 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001,
675 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002,
676 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003,
677 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700678}
679
680enum VkCompareOp {
681 VK_COMPARE_OP_NEVER = 0x00000000,
682 VK_COMPARE_OP_LESS = 0x00000001,
683 VK_COMPARE_OP_EQUAL = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800684 VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700685 VK_COMPARE_OP_GREATER = 0x00000004,
686 VK_COMPARE_OP_NOT_EQUAL = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800687 VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700688 VK_COMPARE_OP_ALWAYS = 0x00000007,
689}
690
Jesse Hall65ab5522015-11-30 00:07:16 -0800691enum VkPolygonMode {
692 VK_POLYGON_MODE_FILL = 0x00000000,
693 VK_POLYGON_MODE_LINE = 0x00000001,
694 VK_POLYGON_MODE_POINT = 0x00000002,
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700695
696 //@extension("VK_NV_fill_rectangle") // 154
697 VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700698}
699
700enum VkFrontFace {
Jesse Hall3fbc8562015-11-29 22:10:52 -0800701 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000,
702 VK_FRONT_FACE_CLOCKWISE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700703}
704
Jesse Hall65ab5522015-11-30 00:07:16 -0800705enum VkBlendFactor {
706 VK_BLEND_FACTOR_ZERO = 0x00000000,
707 VK_BLEND_FACTOR_ONE = 0x00000001,
708 VK_BLEND_FACTOR_SRC_COLOR = 0x00000002,
709 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003,
710 VK_BLEND_FACTOR_DST_COLOR = 0x00000004,
711 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005,
712 VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006,
713 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007,
714 VK_BLEND_FACTOR_DST_ALPHA = 0x00000008,
715 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009,
716 VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a,
717 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b,
718 VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c,
719 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d,
720 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e,
721 VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f,
722 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010,
723 VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011,
724 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700725}
726
727enum VkBlendOp {
728 VK_BLEND_OP_ADD = 0x00000000,
729 VK_BLEND_OP_SUBTRACT = 0x00000001,
730 VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002,
731 VK_BLEND_OP_MIN = 0x00000003,
732 VK_BLEND_OP_MAX = 0x00000004,
Jesse Hall7ba0ac72017-07-07 17:13:23 -0700733
734 //@extension("VK_EXT_blend_operation_advanced") // 149
735 VK_BLEND_OP_ZERO_EXT = 1000148000,
736 VK_BLEND_OP_SRC_EXT = 1000148001,
737 VK_BLEND_OP_DST_EXT = 1000148002,
738 VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
739 VK_BLEND_OP_DST_OVER_EXT = 1000148004,
740 VK_BLEND_OP_SRC_IN_EXT = 1000148005,
741 VK_BLEND_OP_DST_IN_EXT = 1000148006,
742 VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
743 VK_BLEND_OP_DST_OUT_EXT = 1000148008,
744 VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
745 VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
746 VK_BLEND_OP_XOR_EXT = 1000148011,
747 VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
748 VK_BLEND_OP_SCREEN_EXT = 1000148013,
749 VK_BLEND_OP_OVERLAY_EXT = 1000148014,
750 VK_BLEND_OP_DARKEN_EXT = 1000148015,
751 VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
752 VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
753 VK_BLEND_OP_COLORBURN_EXT = 1000148018,
754 VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
755 VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
756 VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
757 VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
758 VK_BLEND_OP_INVERT_EXT = 1000148023,
759 VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
760 VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
761 VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
762 VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
763 VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
764 VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
765 VK_BLEND_OP_HARDMIX_EXT = 1000148030,
766 VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
767 VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
768 VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
769 VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
770 VK_BLEND_OP_PLUS_EXT = 1000148035,
771 VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
772 VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
773 VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
774 VK_BLEND_OP_MINUS_EXT = 1000148039,
775 VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
776 VK_BLEND_OP_CONTRAST_EXT = 1000148041,
777 VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
778 VK_BLEND_OP_RED_EXT = 1000148043,
779 VK_BLEND_OP_GREEN_EXT = 1000148044,
780 VK_BLEND_OP_BLUE_EXT = 1000148045,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700781}
782
783enum VkStencilOp {
784 VK_STENCIL_OP_KEEP = 0x00000000,
785 VK_STENCIL_OP_ZERO = 0x00000001,
786 VK_STENCIL_OP_REPLACE = 0x00000002,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800787 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003,
788 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700789 VK_STENCIL_OP_INVERT = 0x00000005,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800790 VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006,
791 VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700792}
793
794enum VkLogicOp {
795 VK_LOGIC_OP_CLEAR = 0x00000000,
796 VK_LOGIC_OP_AND = 0x00000001,
797 VK_LOGIC_OP_AND_REVERSE = 0x00000002,
798 VK_LOGIC_OP_COPY = 0x00000003,
799 VK_LOGIC_OP_AND_INVERTED = 0x00000004,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800800 VK_LOGIC_OP_NO_OP = 0x00000005,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700801 VK_LOGIC_OP_XOR = 0x00000006,
802 VK_LOGIC_OP_OR = 0x00000007,
803 VK_LOGIC_OP_NOR = 0x00000008,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800804 VK_LOGIC_OP_EQUIVALENT = 0x00000009,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700805 VK_LOGIC_OP_INVERT = 0x0000000a,
806 VK_LOGIC_OP_OR_REVERSE = 0x0000000b,
807 VK_LOGIC_OP_COPY_INVERTED = 0x0000000c,
808 VK_LOGIC_OP_OR_INVERTED = 0x0000000d,
809 VK_LOGIC_OP_NAND = 0x0000000e,
810 VK_LOGIC_OP_SET = 0x0000000f,
811}
812
Jesse Hall3fbc8562015-11-29 22:10:52 -0800813enum VkSystemAllocationScope {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -0800814 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000,
Jesse Hall3fbc8562015-11-29 22:10:52 -0800815 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001,
816 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002,
817 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003,
818 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004,
Jesse Hall03b6fe12015-11-24 12:44:21 -0800819}
820
Jesse Hall3fbc8562015-11-29 22:10:52 -0800821enum VkInternalAllocationType {
822 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700823}
824
825enum VkPhysicalDeviceType {
826 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000,
827 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001,
828 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002,
829 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003,
830 VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004,
831}
832
Jesse Hall65ab5522015-11-30 00:07:16 -0800833enum VkVertexInputRate {
834 VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000,
835 VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -0700836}
837
838/// Vulkan format definitions
839enum VkFormat {
Jesse Hallf4ab2b12015-11-30 16:04:55 -0800840 VK_FORMAT_UNDEFINED = 0,
841 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
842 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
843 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
844 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
845 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
846 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
847 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
848 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
849 VK_FORMAT_R8_UNORM = 9,
850 VK_FORMAT_R8_SNORM = 10,
851 VK_FORMAT_R8_USCALED = 11,
852 VK_FORMAT_R8_SSCALED = 12,
853 VK_FORMAT_R8_UINT = 13,
854 VK_FORMAT_R8_SINT = 14,
855 VK_FORMAT_R8_SRGB = 15,
856 VK_FORMAT_R8G8_UNORM = 16,
857 VK_FORMAT_R8G8_SNORM = 17,
858 VK_FORMAT_R8G8_USCALED = 18,
859 VK_FORMAT_R8G8_SSCALED = 19,
860 VK_FORMAT_R8G8_UINT = 20,
861 VK_FORMAT_R8G8_SINT = 21,
862 VK_FORMAT_R8G8_SRGB = 22,
863 VK_FORMAT_R8G8B8_UNORM = 23,
864 VK_FORMAT_R8G8B8_SNORM = 24,
865 VK_FORMAT_R8G8B8_USCALED = 25,
866 VK_FORMAT_R8G8B8_SSCALED = 26,
867 VK_FORMAT_R8G8B8_UINT = 27,
868 VK_FORMAT_R8G8B8_SINT = 28,
869 VK_FORMAT_R8G8B8_SRGB = 29,
870 VK_FORMAT_B8G8R8_UNORM = 30,
871 VK_FORMAT_B8G8R8_SNORM = 31,
872 VK_FORMAT_B8G8R8_USCALED = 32,
873 VK_FORMAT_B8G8R8_SSCALED = 33,
874 VK_FORMAT_B8G8R8_UINT = 34,
875 VK_FORMAT_B8G8R8_SINT = 35,
876 VK_FORMAT_B8G8R8_SRGB = 36,
877 VK_FORMAT_R8G8B8A8_UNORM = 37,
878 VK_FORMAT_R8G8B8A8_SNORM = 38,
879 VK_FORMAT_R8G8B8A8_USCALED = 39,
880 VK_FORMAT_R8G8B8A8_SSCALED = 40,
881 VK_FORMAT_R8G8B8A8_UINT = 41,
882 VK_FORMAT_R8G8B8A8_SINT = 42,
883 VK_FORMAT_R8G8B8A8_SRGB = 43,
884 VK_FORMAT_B8G8R8A8_UNORM = 44,
885 VK_FORMAT_B8G8R8A8_SNORM = 45,
886 VK_FORMAT_B8G8R8A8_USCALED = 46,
887 VK_FORMAT_B8G8R8A8_SSCALED = 47,
888 VK_FORMAT_B8G8R8A8_UINT = 48,
889 VK_FORMAT_B8G8R8A8_SINT = 49,
890 VK_FORMAT_B8G8R8A8_SRGB = 50,
891 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
892 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
893 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
894 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
895 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
896 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
897 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
898 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
899 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
900 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
901 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
902 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
903 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
904 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
905 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
906 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
907 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
908 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
909 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
910 VK_FORMAT_R16_UNORM = 70,
911 VK_FORMAT_R16_SNORM = 71,
912 VK_FORMAT_R16_USCALED = 72,
913 VK_FORMAT_R16_SSCALED = 73,
914 VK_FORMAT_R16_UINT = 74,
915 VK_FORMAT_R16_SINT = 75,
916 VK_FORMAT_R16_SFLOAT = 76,
917 VK_FORMAT_R16G16_UNORM = 77,
918 VK_FORMAT_R16G16_SNORM = 78,
919 VK_FORMAT_R16G16_USCALED = 79,
920 VK_FORMAT_R16G16_SSCALED = 80,
921 VK_FORMAT_R16G16_UINT = 81,
922 VK_FORMAT_R16G16_SINT = 82,
923 VK_FORMAT_R16G16_SFLOAT = 83,
924 VK_FORMAT_R16G16B16_UNORM = 84,
925 VK_FORMAT_R16G16B16_SNORM = 85,
926 VK_FORMAT_R16G16B16_USCALED = 86,
927 VK_FORMAT_R16G16B16_SSCALED = 87,
928 VK_FORMAT_R16G16B16_UINT = 88,
929 VK_FORMAT_R16G16B16_SINT = 89,
930 VK_FORMAT_R16G16B16_SFLOAT = 90,
931 VK_FORMAT_R16G16B16A16_UNORM = 91,
932 VK_FORMAT_R16G16B16A16_SNORM = 92,
933 VK_FORMAT_R16G16B16A16_USCALED = 93,
934 VK_FORMAT_R16G16B16A16_SSCALED = 94,
935 VK_FORMAT_R16G16B16A16_UINT = 95,
936 VK_FORMAT_R16G16B16A16_SINT = 96,
937 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
938 VK_FORMAT_R32_UINT = 98,
939 VK_FORMAT_R32_SINT = 99,
940 VK_FORMAT_R32_SFLOAT = 100,
941 VK_FORMAT_R32G32_UINT = 101,
942 VK_FORMAT_R32G32_SINT = 102,
943 VK_FORMAT_R32G32_SFLOAT = 103,
944 VK_FORMAT_R32G32B32_UINT = 104,
945 VK_FORMAT_R32G32B32_SINT = 105,
946 VK_FORMAT_R32G32B32_SFLOAT = 106,
947 VK_FORMAT_R32G32B32A32_UINT = 107,
948 VK_FORMAT_R32G32B32A32_SINT = 108,
949 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
950 VK_FORMAT_R64_UINT = 110,
951 VK_FORMAT_R64_SINT = 111,
952 VK_FORMAT_R64_SFLOAT = 112,
953 VK_FORMAT_R64G64_UINT = 113,
954 VK_FORMAT_R64G64_SINT = 114,
955 VK_FORMAT_R64G64_SFLOAT = 115,
956 VK_FORMAT_R64G64B64_UINT = 116,
957 VK_FORMAT_R64G64B64_SINT = 117,
958 VK_FORMAT_R64G64B64_SFLOAT = 118,
959 VK_FORMAT_R64G64B64A64_UINT = 119,
960 VK_FORMAT_R64G64B64A64_SINT = 120,
961 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
962 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
963 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
964 VK_FORMAT_D16_UNORM = 124,
965 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
966 VK_FORMAT_D32_SFLOAT = 126,
967 VK_FORMAT_S8_UINT = 127,
968 VK_FORMAT_D16_UNORM_S8_UINT = 128,
969 VK_FORMAT_D24_UNORM_S8_UINT = 129,
970 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
971 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
972 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
973 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
974 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
975 VK_FORMAT_BC2_UNORM_BLOCK = 135,
976 VK_FORMAT_BC2_SRGB_BLOCK = 136,
977 VK_FORMAT_BC3_UNORM_BLOCK = 137,
978 VK_FORMAT_BC3_SRGB_BLOCK = 138,
979 VK_FORMAT_BC4_UNORM_BLOCK = 139,
980 VK_FORMAT_BC4_SNORM_BLOCK = 140,
981 VK_FORMAT_BC5_UNORM_BLOCK = 141,
982 VK_FORMAT_BC5_SNORM_BLOCK = 142,
983 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
984 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
985 VK_FORMAT_BC7_UNORM_BLOCK = 145,
986 VK_FORMAT_BC7_SRGB_BLOCK = 146,
987 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
988 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
989 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
990 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
991 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
992 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
993 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
994 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
995 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
996 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
997 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
998 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
999 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
1000 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
1001 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
1002 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
1003 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
1004 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
1005 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
1006 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
1007 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
1008 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
1009 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
1010 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
1011 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
1012 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
1013 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
1014 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
1015 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
1016 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
1017 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
1018 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
1019 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
1020 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
1021 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
1022 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
1023 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
1024 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
Chris Forbes289cb792016-12-30 15:03:55 +13001025
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001026 //@version 1.1
1027 VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
1028 VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
1029 VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
1030 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
1031 VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
1032 VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
1033 VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
1034 VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,
1035 VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,
1036 VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
1037 VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
1038 VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
1039 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
1040 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
1041 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
1042 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
1043 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
1044 VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,
1045 VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,
1046 VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
1047 VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
1048 VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
1049 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
1050 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
1051 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
1052 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
1053 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
1054 VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,
1055 VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,
1056 VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,
1057 VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,
1058 VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,
1059 VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,
1060 VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033,
1061
Jesse Hallad250842017-03-10 18:35:38 -08001062 //@extension("VK_IMG_format_pvrtc") // 28
Jesse Halleb02c472017-02-24 15:13:45 -08001063 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
1064 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
1065 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
1066 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
1067 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
1068 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
1069 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
1070 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
Jesse Hall076f95d2017-09-20 11:34:47 -07001071
1072 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1073 VK_FORMAT_G8B8G8R8_422_UNORM_KHR = 1000156000,
1074 VK_FORMAT_B8G8R8G8_422_UNORM_KHR = 1000156001,
1075 VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002,
1076 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003,
1077 VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004,
1078 VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005,
1079 VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006,
1080 VK_FORMAT_R10X6_UNORM_PACK16_KHR = 1000156007,
1081 VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = 1000156008,
1082 VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009,
1083 VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010,
1084 VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011,
1085 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012,
1086 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013,
1087 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014,
1088 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015,
1089 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016,
1090 VK_FORMAT_R12X4_UNORM_PACK16_KHR = 1000156017,
1091 VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = 1000156018,
1092 VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019,
1093 VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020,
1094 VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021,
1095 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022,
1096 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023,
1097 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024,
1098 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025,
1099 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026,
1100 VK_FORMAT_G16B16G16R16_422_UNORM_KHR = 1000156027,
1101 VK_FORMAT_B16G16R16G16_422_UNORM_KHR = 1000156028,
1102 VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029,
1103 VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030,
1104 VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031,
1105 VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032,
1106 VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001107}
1108
Jesse Halld27f6aa2015-08-15 17:58:48 -07001109/// Structure type enumerant
1110enum VkStructureType {
1111 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
Jesse Hallc7467b72015-11-29 21:05:26 -08001112 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
1113 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
1114 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
1115 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001116 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
Jesse Hallc7467b72015-11-29 21:05:26 -08001117 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
1118 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
1119 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
1120 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001121 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
Jesse Hallc7467b72015-11-29 21:05:26 -08001122 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
1123 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
1124 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
1125 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
1126 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
1127 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001128 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
1129 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
1130 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
1131 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
1132 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
1133 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
1134 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
1135 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
1136 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
1137 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
1138 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
1139 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
1140 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
1141 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
1142 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
1143 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
1144 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001145 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001146 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
1147 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
1148 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
1149 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
1150 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08001151 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
Jesse Hall3dd678a2016-01-08 21:52:01 -08001152 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
1153 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
1154 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
1155 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
1156 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
1157 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
1158 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
1159 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001160
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001161 //@version 1.1
1162 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
1163 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
1164 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
1165 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
1166 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
1167 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
1168 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
1169 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
1170 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
1171 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
1172 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
1173 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
1174 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
1175 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
1176 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
1177 VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
1178 VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
1179 VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
1180 VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
1181 VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
1182 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
1183 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
1184 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
1185 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
1186 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
1187 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
1188 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
1189 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
1190 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
1191 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
1192 VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
1193 VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
1194 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
1195 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
1196 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
1197 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
1198 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000,
1199 VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
1200 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
1201 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
1202 VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
1203 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
1204 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
1205 VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
1206 VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
1207 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
1208 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
1209 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
1210 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
1211 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
1212 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
1213 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
1214 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
1215 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
1216 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
1217 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
1218 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
1219 VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
1220 VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
1221 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
1222 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
1223 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
1224 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
1225 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
1226 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000,
1227 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
1228
Jesse Hallad250842017-03-10 18:35:38 -08001229 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001230 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
1231 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001232 // added as interaction from VK_KHR_device_group / VK 1.1
1233 VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
1234 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
1235 VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
1236 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
1237 VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001238
Jesse Hallad250842017-03-10 18:35:38 -08001239 //@extension("VK_KHR_display") // 3
Jesse Hallbd888842015-11-30 21:44:14 -08001240 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
1241 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001242
Jesse Hallad250842017-03-10 18:35:38 -08001243 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001244 VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001245
Jesse Hallad250842017-03-10 18:35:38 -08001246 //@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001247 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
1248
Jesse Hallad250842017-03-10 18:35:38 -08001249 //@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001250 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
1251
Jesse Hallad250842017-03-10 18:35:38 -08001252 //@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001253 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
1254
Jesse Hallad250842017-03-10 18:35:38 -08001255 //@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001256 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
1257
Jesse Hallad250842017-03-10 18:35:38 -08001258 //@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001259 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
1260
Jesse Hallad250842017-03-10 18:35:38 -08001261 //@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08001262 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
Jesse Hall543a7ff2016-01-08 16:38:30 -08001263
Jesse Hallad250842017-03-10 18:35:38 -08001264 //@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08001265 VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000,
Chris Forbes8e4438b2016-12-07 16:26:49 +13001266 VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001,
Chris Forbes1d4e5542017-02-15 19:38:50 +13001267 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002,
Chia-I Wub262ddc2016-03-22 07:38:20 +08001268
Jesse Hallad250842017-03-10 18:35:38 -08001269 //@extension("VK_EXT_debug_report") // 12
Jesse Hall26763382016-05-20 07:13:52 -07001270 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
1271
Jesse Hallad250842017-03-10 18:35:38 -08001272 //@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001273 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
1274
Jesse Hallad250842017-03-10 18:35:38 -08001275 //@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07001276 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
Jesse Hall26763382016-05-20 07:13:52 -07001277 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
Jesse Hall26763382016-05-20 07:13:52 -07001278 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
Jesse Hall56d386a2016-07-26 15:20:40 -07001279
Jesse Hallad250842017-03-10 18:35:38 -08001280 //@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07001281 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
Jesse Hall56d386a2016-07-26 15:20:40 -07001282 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
Jesse Hall56d386a2016-07-26 15:20:40 -07001283 VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
Chris Forbes289cb792016-12-30 15:03:55 +13001284
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001285 //@extension("VK_AMD_texture_gather_bias_lod") // 42
1286 VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
1287
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001288 //@extension("VK_KHR_multiview") // 54
1289 VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = 1000053000,
1290 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = 1000053001,
1291 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = 1000053002,
Jesse Hallad250842017-03-10 18:35:38 -08001292
1293 //@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08001294 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
1295 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
Chris Forbes289cb792016-12-30 15:03:55 +13001296
Jesse Hallad250842017-03-10 18:35:38 -08001297 //@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08001298 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
1299 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
Chris Forbes289cb792016-12-30 15:03:55 +13001300
Jesse Hallad250842017-03-10 18:35:38 -08001301 //@extension("VK_NV_win32_keyed_mutex") // 59
Chris Forbes289cb792016-12-30 15:03:55 +13001302 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
1303
Jesse Hallad250842017-03-10 18:35:38 -08001304 //@extension("VK_KHR_get_physical_device_properties2") // 60
Jesse Hall889cd9a2017-02-25 22:12:23 -08001305 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
1306 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
1307 VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
1308 VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
1309 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
1310 VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
1311 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
1312 VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
Chris Forbes1194ede2016-12-30 16:29:25 +13001313 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
1314
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001315 //@extension("VK_KHR_device_group") // 61
1316 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = 1000060000,
1317 VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = 1000060003,
1318 VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = 1000060004,
1319 VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = 1000060005,
1320 VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = 1000060006,
1321 VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
1322 // tokens 08-12 are listed with VK_KHR_swapchain
1323 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060013,
1324 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060014,
Jesse Hallad250842017-03-10 18:35:38 -08001325
1326 //@extension("VK_EXT_validation_flags") // 62
Jesse Halleb02c472017-02-24 15:13:45 -08001327 VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
Chris Forbes289cb792016-12-30 15:03:55 +13001328
Jesse Hallad250842017-03-10 18:35:38 -08001329 //@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08001330 VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
1331
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001332 //@extension("VK_KHR_device_group_creation") // 71
1333 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = 1000070000,
1334 VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = 1000070001,
Jesse Hallad250842017-03-10 18:35:38 -08001335
Jesse Hall9492f992017-08-28 12:10:06 -07001336 //@extension("VK_KHR_external_memory_capabilities") // 72
1337 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000,
1338 VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001,
1339 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002,
1340 VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003,
1341 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004,
Jesse Hallad250842017-03-10 18:35:38 -08001342
Jesse Hall9492f992017-08-28 12:10:06 -07001343 //@extension("VK_KHR_external_memory") // 73
1344 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000,
1345 VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001,
1346 VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002,
Jesse Hallad250842017-03-10 18:35:38 -08001347
Jesse Hall9492f992017-08-28 12:10:06 -07001348 //@extension("VK_KHR_external_memory_win32") // 74
1349 VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
1350 VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
1351 VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
Jesse Hallad250842017-03-10 18:35:38 -08001352
Jesse Hall9492f992017-08-28 12:10:06 -07001353 //@extension("VK_KHR_external_memory_fd") // 75
1354 VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
1355 VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
Jesse Hallad250842017-03-10 18:35:38 -08001356
Jesse Hall9492f992017-08-28 12:10:06 -07001357 //@extension("VK_KHR_win32_keyed_mutex") // 76
1358 VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
Jesse Hallad250842017-03-10 18:35:38 -08001359
Jesse Hall9492f992017-08-28 12:10:06 -07001360 //@extension("VK_KHR_external_semaphore_capabilities") // 77
1361 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000,
1362 VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001,
Jesse Hallad250842017-03-10 18:35:38 -08001363
Jesse Hall9492f992017-08-28 12:10:06 -07001364 //@extension("VK_KHR_external_semaphore") // 78
1365 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000,
Jesse Hallad250842017-03-10 18:35:38 -08001366
Jesse Hall9492f992017-08-28 12:10:06 -07001367 //@extension("VK_KHR_external_semaphore_win32") // 79
1368 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
1369 VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
1370 VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
Jesse Hallad250842017-03-10 18:35:38 -08001371
Jesse Hall9492f992017-08-28 12:10:06 -07001372 //@extension("VK_KHR_external_semaphore_fd") // 80
1373 VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
1374 VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
Jesse Hallad250842017-03-10 18:35:38 -08001375
1376 //@extension("VK_KHR_push_descriptor") // 81
1377 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
1378
Jesse Hall9492f992017-08-28 12:10:06 -07001379 //@extension("VK_KHR_16bit_storage") // 84
1380 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000,
1381
Jesse Hallad250842017-03-10 18:35:38 -08001382 //@extension("VK_KHR_incremental_present") // 85
Jesse Hall889cd9a2017-02-25 22:12:23 -08001383 VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
Chris Forbes289cb792016-12-30 15:03:55 +13001384
Jesse Hallad250842017-03-10 18:35:38 -08001385 //@extension("VK_KHR_descriptor_update_template") // 86
1386 VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
1387
1388 //@extension("VK_NVX_device_generated_commands") // 87
Jesse Halleb02c472017-02-24 15:13:45 -08001389 VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
1390 VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
1391 VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
1392 VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
1393 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
1394 VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001395
Jesse Hallad250842017-03-10 18:35:38 -08001396 //@extension("VK_NV_clip_space_w_scaling") // 88
1397 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
1398
1399 //@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77726222017-09-19 14:49:27 -05001400 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001401
Jesse Hallad250842017-03-10 18:35:38 -08001402 //@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001403 VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
1404 VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
1405 VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
1406 VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
Jesse Hallad250842017-03-10 18:35:38 -08001407
1408 //@extension("VK_GOOGLE_display_timing") // 93
1409 VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
1410
1411 //@extension("VK_NVX_multiview_per_view_attributes") // 98
1412 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
1413
1414 //@extension("VK_NV_viewport_swizzle") // 99
1415 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
1416
1417 //@extension("VK_EXT_discard_rectangles") // 100
1418 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
1419 VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
1420
Jesse Hallfdc8ab32017-03-10 21:01:57 -08001421 //@extension("VK_EXT_hdr_metadata") // 106
1422 VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
1423
Jesse Hall05556b12017-05-18 17:40:25 -07001424 //@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13001425 VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
1426
Jesse Hall9492f992017-08-28 12:10:06 -07001427 //@extension("VK_KHR_external_fence_capabilities") // 113
1428 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000,
1429 VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001,
1430
1431 //@extension("VK_KHR_external_fence") // 114
1432 VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = 1000113000,
1433
1434 //@extension("VK_KHR_external_fence_win32") // 115
1435 VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
1436 VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
1437 VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
1438
1439 //@extension("VK_KHR_external_fence_fd") // 117
1440 VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
1441 VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
1442
Jesse Hall076f95d2017-09-20 11:34:47 -07001443 //@extension("VK_KHR_maintenance2") // 118
1444 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = 1000117000,
1445 VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = 1000117001,
1446 VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = 1000117002,
1447 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = 1000117003,
1448
Jesse Hall05556b12017-05-18 17:40:25 -07001449 //@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13001450 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
1451 VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
1452 VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
1453
Jesse Hall9492f992017-08-28 12:10:06 -07001454 //@extension("VK_KHR_variable_pointers") // 121
1455 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = 1000120000,
1456
Jesse Hallad250842017-03-10 18:35:38 -08001457 //@extension("VK_MVK_ios_surface") // 123
1458 VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
1459
1460 //@extension("VK_MVK_macos_surface") // 124
1461 VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001462
Jesse Hall9492f992017-08-28 12:10:06 -07001463 //@extension("VK_KHR_dedicated_allocation") // 128
1464 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000,
1465 VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001,
1466
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001467 //@extension("VK_EXT_sampler_filter_minmax") // 131
1468 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
1469 VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
1470
Jesse Hall77726222017-09-19 14:49:27 -05001471 //@extension("VK_EXT_sample_locations") // 144
1472 VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
1473 VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
1474 VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
1475 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003,
1476 VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004,
1477
Jesse Hall9492f992017-08-28 12:10:06 -07001478 //@extension("VK_KHR_get_memory_requirements2") // 147
1479 VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000,
1480 VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001,
1481 VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002,
1482 VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = 1000146003,
1483 VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004,
1484
Jesse Hall076f95d2017-09-20 11:34:47 -07001485 //@extension("VK_KHR_image_format_list") // 148
1486 VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000,
1487
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001488 //@extension("VK_EXT_blend_operation_advanced") // 149
1489 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
1490 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
1491 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
1492
1493 //@extension("VK_NV_fragment_coverage_to_color") // 150
1494 VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
1495
Jesse Hall77726222017-09-19 14:49:27 -05001496 //@extension("VK_NV_framebuffer_mixed_samples") // 153
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001497 VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
Jesse Hall77726222017-09-19 14:49:27 -05001498
Jesse Hall076f95d2017-09-20 11:34:47 -07001499 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1500 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000,
1501 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001,
1502 VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002,
1503 VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003,
1504 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004,
1505 VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005,
1506
1507 //@extension("VK_KHR_bind_memory2") // 158
1508 VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = 1000157000,
1509 VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = 1000157001,
1510
Jesse Hall77726222017-09-19 14:49:27 -05001511 //@extension("VK_EXT_validation_cache") // 161
1512 VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
1513 VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001514
1515 //@extension("VK_KHR_maintenance3") // 169
1516 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = 1000168000,
1517 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = 1000168001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001518}
1519
Jesse Hall65ab5522015-11-30 00:07:16 -08001520enum VkSubpassContents {
1521 VK_SUBPASS_CONTENTS_INLINE = 0x00000000,
1522 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001523}
1524
Jesse Hall543a7ff2016-01-08 16:38:30 -08001525enum VkPipelineCacheHeaderVersion {
1526 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
1527}
1528
Jesse Hallbd888842015-11-30 21:44:14 -08001529@lastUnused(-11)
Jesse Halld27f6aa2015-08-15 17:58:48 -07001530/// Error and return codes
1531enum VkResult {
1532 // Return codes for successful operation execution (positive values)
Jesse Hallbd888842015-11-30 21:44:14 -08001533 VK_SUCCESS = 0,
1534 VK_NOT_READY = 1,
1535 VK_TIMEOUT = 2,
1536 VK_EVENT_SET = 3,
1537 VK_EVENT_RESET = 4,
1538 VK_INCOMPLETE = 5,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001539
Jesse Hallad250842017-03-10 18:35:38 -08001540 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001541 VK_SUBOPTIMAL_KHR = 1000001003,
Jesse Hall1356b0d2015-11-23 17:24:58 -08001542
Jesse Halld27f6aa2015-08-15 17:58:48 -07001543 // Error codes (negative values)
Jesse Hallbd888842015-11-30 21:44:14 -08001544 VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1
1545 VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2
1546 VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3
1547 VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4
1548 VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5
1549 VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6
1550 VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7
1551 VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8
1552 VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9
1553 VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10
1554 VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11
Jesse Hall56d386a2016-07-26 15:20:40 -07001555 VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12
Jesse Hall1356b0d2015-11-23 17:24:58 -08001556
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001557 //@version 1.1
1558 VK_ERROR_OUT_OF_POOL_MEMORY = 0xC4642878, // -1000069000
1559 VK_ERROR_INVALID_EXTERNAL_HANDLE = 0xC4641CBD, // -1000072003
1560
Jesse Hallad250842017-03-10 18:35:38 -08001561 //@extension("VK_KHR_surface") // 1
Jesse Hallbd888842015-11-30 21:44:14 -08001562 VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000
Jesse Hallad250842017-03-10 18:35:38 -08001563 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001
Jesse Halla6429252015-11-29 18:59:42 -08001564
Jesse Hallad250842017-03-10 18:35:38 -08001565 //@extension("VK_KHR_swapchain") // 2
Jesse Hallbd888842015-11-30 21:44:14 -08001566 VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004
Jesse Hall1356b0d2015-11-23 17:24:58 -08001567
Jesse Hallad250842017-03-10 18:35:38 -08001568 //@extension("VK_KHR_display_swapchain") // 4
Jesse Hallbd888842015-11-30 21:44:14 -08001569 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001
Jesse Hall1356b0d2015-11-23 17:24:58 -08001570
Jesse Hallad250842017-03-10 18:35:38 -08001571 //@extension("VK_EXT_debug_report") // 12
Jesse Hall543a7ff2016-01-08 16:38:30 -08001572 VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001
Jesse Hall26763382016-05-20 07:13:52 -07001573
Jesse Hallad250842017-03-10 18:35:38 -08001574 //@extension("VK_NV_glsl_shader") // 13
Jesse Hall26763382016-05-20 07:13:52 -07001575 VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000
Jesse Hall77ad05b2017-03-10 22:02:20 -08001576
Jesse Hallad250842017-03-10 18:35:38 -08001577 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08001578 VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000
Jesse Hallad250842017-03-10 18:35:38 -08001579
Jesse Hall9492f992017-08-28 12:10:06 -07001580 //@extension("VK_KHR_external_memory") // 73
1581 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = 0xC4641CBD, // -1000072003
Jesse Hall5ae3abb2015-10-08 14:00:22 -07001582}
1583
1584enum VkDynamicState {
1585 VK_DYNAMIC_STATE_VIEWPORT = 0x00000000,
1586 VK_DYNAMIC_STATE_SCISSOR = 0x00000001,
1587 VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002,
1588 VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003,
1589 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004,
1590 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005,
1591 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006,
1592 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007,
1593 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08001594
1595 //@extension("VK_NV_clip_space_w_scaling") // 88
1596 VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
1597
1598 //@extension("VK_EXT_discard_rectangles") // 100
1599 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
Jesse Hall77726222017-09-19 14:49:27 -05001600
1601 //@extension("VK_EXT_sample_locations") // 144
1602 VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001603}
1604
Jesse Hall05556b12017-05-18 17:40:25 -07001605enum VkObjectType {
1606 VK_OBJECT_TYPE_UNKNOWN = 0,
1607 VK_OBJECT_TYPE_INSTANCE = 1,
1608 VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
1609 VK_OBJECT_TYPE_DEVICE = 3,
1610 VK_OBJECT_TYPE_QUEUE = 4,
1611 VK_OBJECT_TYPE_SEMAPHORE = 5,
1612 VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
1613 VK_OBJECT_TYPE_FENCE = 7,
1614 VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
1615 VK_OBJECT_TYPE_BUFFER = 9,
1616 VK_OBJECT_TYPE_IMAGE = 10,
1617 VK_OBJECT_TYPE_EVENT = 11,
1618 VK_OBJECT_TYPE_QUERY_POOL = 12,
1619 VK_OBJECT_TYPE_BUFFER_VIEW = 13,
1620 VK_OBJECT_TYPE_IMAGE_VIEW = 14,
1621 VK_OBJECT_TYPE_SHADER_MODULE = 15,
1622 VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
1623 VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
1624 VK_OBJECT_TYPE_RENDER_PASS = 18,
1625 VK_OBJECT_TYPE_PIPELINE = 19,
1626 VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
1627 VK_OBJECT_TYPE_SAMPLER = 21,
1628 VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
1629 VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
1630 VK_OBJECT_TYPE_FRAMEBUFFER = 24,
1631 VK_OBJECT_TYPE_COMMAND_POOL = 25,
1632
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001633 //@version 1.1
1634 VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,
1635 VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,
1636
Jesse Hall05556b12017-05-18 17:40:25 -07001637 //@extension("VK_KHR_surface") // 1
1638 VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
1639
1640 //@extension("VK_KHR_swapchain") // 2
1641 VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
1642
1643 //@extension("VK_KHR_display") // 3
1644 VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000,
1645 VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001,
1646
1647 //@extension("VK_KHR_debug_report") // 12
1648 VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000,
1649
1650 //@extension("VK_KHR_descriptor_update_template") // 86
1651 VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
1652
1653 //@extension("VK_NVX_device_generated_commands") // 87
1654 VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000,
1655 VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001,
Jesse Hall77726222017-09-19 14:49:27 -05001656
Jesse Hall076f95d2017-09-20 11:34:47 -07001657 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1658 VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = 1000156000,
1659
Jesse Hall77726222017-09-19 14:49:27 -05001660 //@extension("VK_EXT_validation_cache") // 161
1661 VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000,
Jesse Hall05556b12017-05-18 17:40:25 -07001662}
1663
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001664
1665//@version 1.1 enums
1666
1667enum VkPointClippingBehavior {
1668 VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
1669 VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1,
1670}
1671
1672enum VkTessellationDomainOrigin {
1673 VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
1674 VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1,
1675}
1676
1677enum VkSamplerYcbcrModelConversion {
1678 VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
1679 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
1680 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
1681 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
1682 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4,
1683}
1684
1685enum VkSamplerYcbcrRange {
1686 VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
1687 VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1,
1688}
1689
1690enum VkChromaLocation {
1691 VK_CHROMA_LOCATION_COSITED_EVEN = 0,
1692 VK_CHROMA_LOCATION_MIDPOINT = 1,
1693}
1694
1695enum VkDescriptorUpdateTemplateType {
1696 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0,
1697 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1698}
1699
Jesse Hallad250842017-03-10 18:35:38 -08001700@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001701enum VkPresentModeKHR {
1702 VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000,
1703 VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001,
1704 VK_PRESENT_MODE_FIFO_KHR = 0x00000002,
Jesse Hall03b6fe12015-11-24 12:44:21 -08001705 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001706
Jesse Hall05556b12017-05-18 17:40:25 -07001707 //@extension("VK_KHR_shared_presentable_image") // 112
Jesse Hall77ad05b2017-03-10 22:02:20 -08001708 VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
1709 VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
Michael Lentine88594d72015-11-12 12:49:45 -08001710}
1711
Jesse Hallad250842017-03-10 18:35:38 -08001712@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08001713enum VkColorSpaceKHR {
1714 VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001715 VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0x00000000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08001716
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001717 //@extension("VK_EXT_swapchain_colorspace") // 105
1718 VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
1719 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
1720 VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
1721 VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
1722 VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
1723 VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
1724 VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
1725 VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
1726 VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
1727 VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
Courtney Goeltzenleuchter7f558ed2017-01-23 17:15:24 -07001728 VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
1729 VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001730 VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
Jesse Hall77726222017-09-19 14:49:27 -05001731 VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
Michael Lentine88594d72015-11-12 12:49:45 -08001732}
Jesse Halld27f6aa2015-08-15 17:58:48 -07001733
Jesse Hallad250842017-03-10 18:35:38 -08001734@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08001735enum VkDebugReportObjectTypeEXT {
1736 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
1737 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
1738 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
1739 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
1740 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
1741 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
1742 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
1743 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
1744 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
1745 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
1746 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
1747 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
1748 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
1749 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
1750 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
1751 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
1752 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
1753 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
1754 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
1755 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
1756 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
1757 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
1758 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
1759 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
1760 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
1761 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
1762 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
1763 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001764 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
Chris Forbes289cb792016-12-30 15:03:55 +13001765 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
1766 VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
1767 VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
1768 VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001769
Jesse Hall77726222017-09-19 14:49:27 -05001770 //extension("VK_EXT_validation_cache") // 161
1771 VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33,
1772
Jesse Hallf5ad48b2017-03-20 13:09:19 -07001773 //extension("VK_KHR_descriptor_update_template") // 86
1774 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
Jesse Hall77726222017-09-19 14:49:27 -05001775
Jesse Hall076f95d2017-09-20 11:34:47 -07001776 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1777 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000,
Jesse Hall715b86a2016-01-16 16:34:29 -08001778}
1779
Jesse Hallad250842017-03-10 18:35:38 -08001780@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07001781enum VkRasterizationOrderAMD {
1782 VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
1783 VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
1784}
1785
Jesse Hallad250842017-03-10 18:35:38 -08001786@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13001787enum VkValidationCheckEXT {
1788 VK_VALIDATION_CHECK_ALL_EXT = 0,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001789 VK_VALIDATION_CHECK_SHADERS_EXT = 1,
Chris Forbes289cb792016-12-30 15:03:55 +13001790}
1791
Jesse Hallad250842017-03-10 18:35:38 -08001792@extension("VK_KHR_descriptor_update_template") // 86
1793enum VkDescriptorUpdateTemplateTypeKHR {
1794 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
1795 VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
1796}
1797
1798@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001799enum VkIndirectCommandsTokenTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001800 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0,
1801 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1,
1802 VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2,
1803 VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3,
1804 VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4,
1805 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5,
1806 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6,
1807 VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7,
Chris Forbes289cb792016-12-30 15:03:55 +13001808}
1809
Jesse Hallad250842017-03-10 18:35:38 -08001810@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001811enum VkObjectEntryTypeNVX {
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001812 VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0,
1813 VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1,
1814 VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2,
1815 VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3,
1816 VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4,
Chris Forbes289cb792016-12-30 15:03:55 +13001817}
Jesse Hall715b86a2016-01-16 16:34:29 -08001818
Jesse Hallad250842017-03-10 18:35:38 -08001819@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001820enum VkDisplayPowerStateEXT {
1821 VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
1822 VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
1823 VK_DISPLAY_POWER_STATE_ON_EXT = 2,
1824}
1825
Jesse Hallad250842017-03-10 18:35:38 -08001826@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001827enum VkDeviceEventTypeEXT {
1828 VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
1829}
1830
Jesse Hallad250842017-03-10 18:35:38 -08001831@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08001832enum VkDisplayEventTypeEXT {
1833 VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
1834}
1835
Jesse Hallad250842017-03-10 18:35:38 -08001836@extension("VK_NV_viewport_swizzle") // 99
1837enum VkViewportCoordinateSwizzleNV {
1838 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
1839 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
1840 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
1841 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
1842 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
1843 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
1844 VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
1845 VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
1846}
1847
1848@extension("VK_EXT_discard_rectangles") // 100
1849enum VkDiscardRectangleModeEXT {
1850 VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
1851 VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
1852}
1853
Jesse Hall076f95d2017-09-20 11:34:47 -07001854@extension("VK_KHR_maintenance2") // 118
1855enum VkPointClippingBehaviorKHR {
1856 VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = 0,
1857 VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = 1,
1858}
1859
1860@extension("VK_KHR_maintenance2") // 118
1861enum VkTessellationDomainOriginKHR {
1862 VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = 0,
1863 VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = 1,
1864}
1865
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001866@extension("VK_EXT_sampler_filter_minmax") // 131
1867enum VkSamplerReductionModeEXT {
1868 VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
1869 VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
1870 VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
1871}
1872
1873@extension("VK_EXT_blend_operation_advanced") // 149
1874enum VkBlendOverlapEXT {
1875 VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
1876 VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
1877 VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
1878}
1879
1880@extension("VK_NV_framebuffer_mixed_samples") // 153
1881enum VkCoverageModulationModeNV {
1882 VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
1883 VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
1884 VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
1885 VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
1886}
1887
Jesse Hall076f95d2017-09-20 11:34:47 -07001888@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1889enum VkSamplerYcbcrModelConversionKHR {
1890 VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = 0,
1891 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = 1,
1892 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = 2,
1893 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = 3,
1894 VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = 4,
1895}
1896
1897@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1898enum VkSamplerYcbcrRangeKHR {
1899 VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = 0,
1900 VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = 1,
1901}
1902
1903@extension("VK_KHR_sampler_ycbcr_conversion") // 157
1904enum VkChromaLocationKHR {
1905 VK_CHROMA_LOCATION_COSITED_EVEN_KHR = 0,
1906 VK_CHROMA_LOCATION_MIDPOINT_KHR = 1,
1907}
1908
Jesse Hall77726222017-09-19 14:49:27 -05001909@extension("VK_EXT_validation_cache") // 161
1910enum VkValidationCacheHeaderVersionEXT {
1911 VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1,
1912}
1913
Jesse Halld27f6aa2015-08-15 17:58:48 -07001914/////////////////
1915// Bitfields //
1916/////////////////
1917
Jesse Halld27f6aa2015-08-15 17:58:48 -07001918/// Queue capabilities
Jesse Halld8bade02015-11-24 10:24:18 -08001919type VkFlags VkQueueFlags
1920bitfield VkQueueFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07001921 VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations
1922 VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations
Jesse Hall65ab5522015-11-30 00:07:16 -08001923 VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations
Jesse Hallb00daad2015-11-29 19:46:20 -08001924 VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001925
1926 //@version 1.1
1927 VK_QUEUE_PROTECTED_BIT = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001928}
1929
1930/// Memory properties passed into vkAllocMemory().
Jesse Halld8bade02015-11-24 10:24:18 -08001931type VkFlags VkMemoryPropertyFlags
1932bitfield VkMemoryPropertyFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001933 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1934 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1935 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1936 VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1937 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001938
1939 //@version 1.1
1940 VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001941}
1942
1943/// Memory heap flags
Jesse Halld8bade02015-11-24 10:24:18 -08001944type VkFlags VkMemoryHeapFlags
1945bitfield VkMemoryHeapFlagBits {
Jesse Halld1af8122015-11-29 23:50:38 -08001946 VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08001947
Daniel Kochf25f5bb2017-10-05 00:26:58 -04001948 //@version 1.1
1949 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002,
1950
1951 //@extension("VK_KHR_device_group_creation") // 71
1952 VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001953}
1954
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08001955/// Access flags
1956type VkFlags VkAccessFlags
1957bitfield VkAccessFlagBits {
1958 VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1959 VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1960 VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1961 VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1962 VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1963 VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1964 VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1965 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1966 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1967 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1968 VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1969 VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1970 VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1971 VK_ACCESS_HOST_READ_BIT = 0x00002000,
1972 VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1973 VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1974 VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
Chris Forbes289cb792016-12-30 15:03:55 +13001975
Jesse Hallad250842017-03-10 18:35:38 -08001976 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13001977 VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
Chris Forbes289cb792016-12-30 15:03:55 +13001978 VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07001979
1980 //@extension("VK_EXT_blend_operation_advanced") // 149
1981 VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07001982}
1983
1984/// Buffer usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08001985type VkFlags VkBufferUsageFlags
1986bitfield VkBufferUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08001987 VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
1988 VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07001989 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO
1990 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO
1991 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO
1992 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO
1993 VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer)
1994 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO)
1995 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)
1996}
1997
1998/// Buffer creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08001999type VkFlags VkBufferCreateFlags
2000bitfield VkBufferCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002001 VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07002002 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency
2003 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002004
2005 //@version 1.1
2006 VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002007}
2008
2009/// Shader stage flags
Jesse Halld8bade02015-11-24 10:24:18 -08002010type VkFlags VkShaderStageFlags
2011bitfield VkShaderStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002012 VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
Jesse Hallae38f732015-11-19 21:32:50 -08002013 VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
2014 VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002015 VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
2016 VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
2017 VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
Jesse Hallc7467b72015-11-29 21:05:26 -08002018 VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002019
2020 VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
2021}
2022
Jesse Hallfbf97b02015-11-20 14:17:03 -08002023/// Descriptor pool create flags
Jesse Halld8bade02015-11-24 10:24:18 -08002024type VkFlags VkDescriptorPoolCreateFlags
2025bitfield VkDescriptorPoolCreateFlagBits {
Jesse Hallfbf97b02015-11-20 14:17:03 -08002026 VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
2027}
2028
2029/// Descriptor pool reset flags
Jesse Halld8bade02015-11-24 10:24:18 -08002030type VkFlags VkDescriptorPoolResetFlags
Jesse Halla6429252015-11-29 18:59:42 -08002031//bitfield VkDescriptorPoolResetFlagBits {
2032//}
Jesse Hallfbf97b02015-11-20 14:17:03 -08002033
Jesse Halld27f6aa2015-08-15 17:58:48 -07002034/// Image usage flags
Jesse Halld8bade02015-11-24 10:24:18 -08002035type VkFlags VkImageUsageFlags
2036bitfield VkImageUsageFlagBits {
Jesse Hall3fbc8562015-11-29 22:10:52 -08002037 VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations
2038 VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations
Jesse Halld27f6aa2015-08-15 17:58:48 -07002039 VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
2040 VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type)
2041 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002042 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment
Jesse Halld27f6aa2015-08-15 17:58:48 -07002043 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering
2044 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment
2045}
2046
2047/// Image creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002048type VkFlags VkImageCreateFlags
2049bitfield VkImageCreateFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002050 VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing
Jesse Halld27f6aa2015-08-15 17:58:48 -07002051 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency
2052 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 -07002053 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image
2054 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image
Jesse Hall77ad05b2017-03-10 22:02:20 -08002055
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002056 //@version 1.1
2057 VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400,
2058 VK_IMAGE_CREATE_BIND_SFR_BIT = 0x00000040,
2059 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020,
2060 VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080,
2061 VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100,
2062 VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800,
2063 VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200,
2064
Jesse Hallad250842017-03-10 18:35:38 -08002065 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002066 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
Jesse Hallad250842017-03-10 18:35:38 -08002067
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002068 //@extension("VK_KHR_device_group") // 61
2069 VK_IMAGE_CREATE_BIND_SFR_BIT_KHR = 0x00000040,
Jesse Hall77726222017-09-19 14:49:27 -05002070
2071 //@extension("VK_EXT_sample_locations") // 144
2072 VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000,
Jesse Hall076f95d2017-09-20 11:34:47 -07002073
2074 //@extension("VK_KHR_maintenance2") // 118
2075 VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 0x00000080,
2076 VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = 0x00000100,
2077
2078 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
2079 VK_IMAGE_CREATE_DISJOINT_BIT_KHR = 0x00000200,
2080
2081 //@extension("VK_KHR_bind_memory2") // 158
2082 VK_IMAGE_CREATE_ALIAS_BIT_KHR = 0x00000400,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002083}
2084
Jesse Hallb00daad2015-11-29 19:46:20 -08002085/// Image view creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002086type VkFlags VkImageViewCreateFlags
Jesse Hallb00daad2015-11-29 19:46:20 -08002087//bitfield VkImageViewCreateFlagBits {
2088//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002089
2090/// Pipeline creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002091type VkFlags VkPipelineCreateFlags
2092bitfield VkPipelineCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002093 VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
2094 VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
2095 VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08002096
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002097 //@version 1.1
2098 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008,
2099 VK_PIPELINE_CREATE_DISPATCH_BASE = 0x00000010,
2100
2101 //@extension("VK_KHR_device_group") // 61
2102 VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008,
2103 VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = 0x00000010,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002104}
2105
Jesse Hall65ab5522015-11-30 00:07:16 -08002106/// Color component flags
2107type VkFlags VkColorComponentFlags
2108bitfield VkColorComponentFlagBits {
2109 VK_COLOR_COMPONENT_R_BIT = 0x00000001,
2110 VK_COLOR_COMPONENT_G_BIT = 0x00000002,
2111 VK_COLOR_COMPONENT_B_BIT = 0x00000004,
2112 VK_COLOR_COMPONENT_A_BIT = 0x00000008,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002113}
2114
2115/// Fence creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002116type VkFlags VkFenceCreateFlags
2117bitfield VkFenceCreateFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002118 VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
2119}
2120
2121/// Semaphore creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002122type VkFlags VkSemaphoreCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08002123//bitfield VkSemaphoreCreateFlagBits {
2124//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002125
2126/// Format capability flags
Jesse Halld8bade02015-11-24 10:24:18 -08002127type VkFlags VkFormatFeatureFlags
2128bitfield VkFormatFeatureFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002129 VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)
2130 VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type)
2131 VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images
2132 VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs)
2133 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs)
2134 VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers
2135 VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs)
2136 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images
2137 VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images
2138 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images
Jesse Hall3fbc8562015-11-29 22:10:52 -08002139 VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage
2140 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 -08002141 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
Jesse Hall26763382016-05-20 07:13:52 -07002142
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002143 //@version 1.1
2144 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000,
2145 VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000,
2146 VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000,
2147 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000,
2148 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000,
2149 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000,
2150 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000,
2151 VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000,
2152 VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000,
2153
Jesse Hallad250842017-03-10 18:35:38 -08002154 //@extension("VK_IMG_filter_cubic") // 16
Jesse Hall26763382016-05-20 07:13:52 -07002155 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
Jesse Hall77ad05b2017-03-10 22:02:20 -08002156
Jesse Hallad250842017-03-10 18:35:38 -08002157 //@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002158 VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
2159 VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
Jesse Hall7ba0ac72017-07-07 17:13:23 -07002160
2161 //@extension("VK_EXT_sampler_filter_minmax") // 131
2162 VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
Jesse Hall076f95d2017-09-20 11:34:47 -07002163
2164 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
2165 VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000,
2166 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000,
2167 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000,
2168 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000,
2169 VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000,
2170 VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = 0x00400000,
2171 VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002172}
2173
2174/// Query control flags
Jesse Halld8bade02015-11-24 10:24:18 -08002175type VkFlags VkQueryControlFlags
2176bitfield VkQueryControlFlagBits {
Jesse Hall65ab5522015-11-30 00:07:16 -08002177 VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002178}
2179
2180/// Query result flags
Jesse Halld8bade02015-11-24 10:24:18 -08002181type VkFlags VkQueryResultFlags
2182bitfield VkQueryResultFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002183 VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values
2184 VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy
2185 VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written
2186 VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available
2187}
2188
2189/// Shader module creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002190type VkFlags VkShaderModuleCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08002191//bitfield VkShaderModuleCreateFlagBits {
2192//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002193
Jesse Halld27f6aa2015-08-15 17:58:48 -07002194/// Event creation flags
Jesse Halld8bade02015-11-24 10:24:18 -08002195type VkFlags VkEventCreateFlags
Jesse Halla6429252015-11-29 18:59:42 -08002196//bitfield VkEventCreateFlagBits {
2197//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002198
Jesse Halla15a4bf2015-11-19 22:48:02 -08002199/// Command buffer usage flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002200type VkFlags VkCommandBufferUsageFlags
2201bitfield VkCommandBufferUsageFlagBits {
2202 VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
2203 VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
2204 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002205}
2206
2207/// Pipeline statistics flags
Jesse Halld8bade02015-11-24 10:24:18 -08002208type VkFlags VkQueryPipelineStatisticFlags
2209bitfield VkQueryPipelineStatisticFlagBits {
Jesse Hallae38f732015-11-19 21:32:50 -08002210 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional
2211 VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional
2212 VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional
2213 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional
2214 VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional
2215 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional
2216 VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional
2217 VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional
2218 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional
2219 VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional
2220 VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional
Jesse Halld27f6aa2015-08-15 17:58:48 -07002221}
2222
2223/// Memory mapping flags
Jesse Halld8bade02015-11-24 10:24:18 -08002224type VkFlags VkMemoryMapFlags
Jesse Halla6429252015-11-29 18:59:42 -08002225//bitfield VkMemoryMapFlagBits {
2226//}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002227
2228/// Bitfield of image aspects
Jesse Halld8bade02015-11-24 10:24:18 -08002229type VkFlags VkImageAspectFlags
2230bitfield VkImageAspectFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002231 VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
2232 VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
2233 VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
2234 VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
Jesse Hall076f95d2017-09-20 11:34:47 -07002235
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002236 //@version 1.1
2237 VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010,
2238 VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020,
2239 VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040,
2240
Jesse Hall076f95d2017-09-20 11:34:47 -07002241 //@extension("VK_KHR_sampler_ycbcr_conversion") // 157
2242 VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = 0x00000010,
2243 VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = 0x00000020,
2244 VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = 0x00000040,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002245}
2246
2247/// Sparse memory bind flags
Jesse Halld8bade02015-11-24 10:24:18 -08002248type VkFlags VkSparseMemoryBindFlags
Jesse Hall091ed9e2015-11-30 00:55:29 -08002249bitfield VkSparseMemoryBindFlagBits {
2250 VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
2251}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002252
2253/// Sparse image memory requirements flags
Jesse Halld8bade02015-11-24 10:24:18 -08002254type VkFlags VkSparseImageFormatFlags
2255bitfield VkSparseImageFormatFlagBits {
Jesse Hallb00daad2015-11-29 19:46:20 -08002256 VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices
2257 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.
2258 VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size
Jesse Halld27f6aa2015-08-15 17:58:48 -07002259}
2260
2261/// Pipeline stages
Jesse Halld8bade02015-11-24 10:24:18 -08002262type VkFlags VkPipelineStageFlags
2263bitfield VkPipelineStageFlagBits {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002264 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed
2265 VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch
2266 VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch
2267 VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading
Jesse Hallae38f732015-11-19 21:32:50 -08002268 VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading
2269 VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading
Jesse Halld27f6aa2015-08-15 17:58:48 -07002270 VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading
2271 VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading
2272 VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests
2273 VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests
2274 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes
2275 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading
2276 VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations
Jesse Hall543a7ff2016-01-08 16:38:30 -08002277 VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
2278 VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency
Jesse Halld27f6aa2015-08-15 17:58:48 -07002279
Jesse Hall543a7ff2016-01-08 16:38:30 -08002280 VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline
2281 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands
Chris Forbes289cb792016-12-30 15:03:55 +13002282
Jesse Hallad250842017-03-10 18:35:38 -08002283 //@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002284 VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002285}
2286
2287/// Render pass attachment description flags
Jesse Halld8bade02015-11-24 10:24:18 -08002288type VkFlags VkAttachmentDescriptionFlags
2289bitfield VkAttachmentDescriptionFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002290 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 -07002291}
2292
2293/// Subpass description flags
Jesse Halld8bade02015-11-24 10:24:18 -08002294type VkFlags VkSubpassDescriptionFlags
2295bitfield VkSubpassDescriptionFlagBits {
Jesse Hallad250842017-03-10 18:35:38 -08002296 //@extension("VK_NVX_multiview_per_view_attributes") // 98
2297 VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
2298 VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002299}
2300
2301/// Command pool creation flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002302type VkFlags VkCommandPoolCreateFlags
2303bitfield VkCommandPoolCreateFlagBits {
2304 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime
2305 VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002306
2307 //@version 1.1
2308 VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002309}
2310
2311/// Command pool reset flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08002312type VkFlags VkCommandPoolResetFlags
2313bitfield VkCommandPoolResetFlagBits {
2314 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool
Jesse Halld27f6aa2015-08-15 17:58:48 -07002315}
2316
Jesse Hall3fbc8562015-11-29 22:10:52 -08002317type VkFlags VkCommandBufferResetFlags
2318bitfield VkCommandBufferResetFlagBits {
2319 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002320}
2321
Jesse Halld8bade02015-11-24 10:24:18 -08002322type VkFlags VkSampleCountFlags
2323bitfield VkSampleCountFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002324 VK_SAMPLE_COUNT_1_BIT = 0x00000001,
2325 VK_SAMPLE_COUNT_2_BIT = 0x00000002,
2326 VK_SAMPLE_COUNT_4_BIT = 0x00000004,
2327 VK_SAMPLE_COUNT_8_BIT = 0x00000008,
2328 VK_SAMPLE_COUNT_16_BIT = 0x00000010,
2329 VK_SAMPLE_COUNT_32_BIT = 0x00000020,
2330 VK_SAMPLE_COUNT_64_BIT = 0x00000040,
2331}
2332
Jesse Halld8bade02015-11-24 10:24:18 -08002333type VkFlags VkStencilFaceFlags
2334bitfield VkStencilFaceFlagBits {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002335 VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face
2336 VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face
Jesse Hallc7467b72015-11-29 21:05:26 -08002337 VK_STENCIL_FRONT_AND_BACK = 0x00000003,
Jesse Halld27f6aa2015-08-15 17:58:48 -07002338}
2339
Jesse Halla6429252015-11-29 18:59:42 -08002340/// Instance creation flags
2341type VkFlags VkInstanceCreateFlags
2342//bitfield VkInstanceCreateFlagBits {
2343//}
2344
2345/// Device creation flags
2346type VkFlags VkDeviceCreateFlags
2347//bitfield VkDeviceCreateFlagBits {
2348//}
2349
2350/// Device queue creation flags
2351type VkFlags VkDeviceQueueCreateFlags
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002352//@version 1.1
2353bitfield VkDeviceQueueCreateFlagBits {
2354 VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001,
2355}
Jesse Halla6429252015-11-29 18:59:42 -08002356
2357/// Query pool creation flags
2358type VkFlags VkQueryPoolCreateFlags
2359//bitfield VkQueryPoolCreateFlagBits {
2360//}
2361
2362/// Buffer view creation flags
2363type VkFlags VkBufferViewCreateFlags
2364//bitfield VkBufferViewCreateFlagBits {
2365//}
2366
2367/// Pipeline cache creation flags
2368type VkFlags VkPipelineCacheCreateFlags
2369//bitfield VkPipelineCacheCreateFlagBits {
2370//}
2371
2372/// Pipeline shader stage creation flags
2373type VkFlags VkPipelineShaderStageCreateFlags
2374//bitfield VkPipelineShaderStageCreateFlagBits {
2375//}
2376
2377/// Descriptor set layout creation flags
2378type VkFlags VkDescriptorSetLayoutCreateFlags
Jesse Hallad250842017-03-10 18:35:38 -08002379bitfield VkDescriptorSetLayoutCreateFlagBits {
2380 //@extension("VK_KHR_push_descriptor") // 81
2381 VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
2382}
Jesse Halla6429252015-11-29 18:59:42 -08002383
2384/// Pipeline vertex input state creation flags
2385type VkFlags VkPipelineVertexInputStateCreateFlags
2386//bitfield VkPipelineVertexInputStateCreateFlagBits {
2387//}
2388
2389/// Pipeline input assembly state creation flags
2390type VkFlags VkPipelineInputAssemblyStateCreateFlags
2391//bitfield VkPipelineInputAssemblyStateCreateFlagBits {
2392//}
2393
2394/// Tessellation state creation flags
2395type VkFlags VkPipelineTessellationStateCreateFlags
2396//bitfield VkPipelineTessellationStateCreateFlagBits {
2397//}
2398
2399/// Viewport state creation flags
2400type VkFlags VkPipelineViewportStateCreateFlags
2401//bitfield VkPipelineViewportStateCreateFlagBits {
2402//}
2403
Jesse Hall3fbc8562015-11-29 22:10:52 -08002404/// Rasterization state creation flags
2405type VkFlags VkPipelineRasterizationStateCreateFlags
2406//bitfield VkPipelineRasterizationStateCreateFlagBits {
Jesse Halla6429252015-11-29 18:59:42 -08002407//}
2408
2409/// Multisample state creation flags
2410type VkFlags VkPipelineMultisampleStateCreateFlags
2411//bitfield VkPipelineMultisampleStateCreateFlagBits {
2412//}
2413
2414/// Color blend state creation flags
2415type VkFlags VkPipelineColorBlendStateCreateFlags
2416//bitfield VkPipelineColorBlendStateCreateFlagBits {
2417//}
2418
2419/// Depth/stencil state creation flags
2420type VkFlags VkPipelineDepthStencilStateCreateFlags
2421//bitfield VkPipelineDepthStencilStateCreateFlagBits {
2422//}
2423
2424/// Dynamic state creation flags
2425type VkFlags VkPipelineDynamicStateCreateFlags
2426//bitfield VkPipelineDynamicStateCreateFlagBits {
2427//}
2428
2429/// Pipeline layout creation flags
2430type VkFlags VkPipelineLayoutCreateFlags
2431//bitfield VkPipelineLayoutCreateFlagBits {
2432//}
2433
2434/// Sampler creation flags
2435type VkFlags VkSamplerCreateFlags
2436//bitfield VkSamplerCreateFlagBits {
2437//}
2438
2439/// Render pass creation flags
2440type VkFlags VkRenderPassCreateFlags
2441//bitfield VkRenderPassCreateFlagBits {
2442//}
2443
2444/// Framebuffer creation flags
2445type VkFlags VkFramebufferCreateFlags
2446//bitfield VkFramebufferCreateFlagBits {
2447//}
2448
Jesse Halldc6d36c2015-11-29 19:12:15 -08002449/// Dependency flags
2450type VkFlags VkDependencyFlags
2451bitfield VkDependencyFlagBits {
2452 VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002453
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002454 //@version 1.1
2455 VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004,
2456 VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002,
Jesse Hallad250842017-03-10 18:35:38 -08002457
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002458 //@extension("VK_KHR_multiview") // 54
2459 VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = 0x00000002,
2460
2461 //@extension("VK_KHR_device_group") // 61
2462 VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = 0x00000004,
Jesse Halldc6d36c2015-11-29 19:12:15 -08002463}
2464
Jesse Hallc7467b72015-11-29 21:05:26 -08002465/// Cull mode flags
2466type VkFlags VkCullModeFlags
2467bitfield VkCullModeFlagBits {
2468 VK_CULL_MODE_NONE = 0x00000000,
2469 VK_CULL_MODE_FRONT_BIT = 0x00000001,
2470 VK_CULL_MODE_BACK_BIT = 0x00000002,
2471 VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
2472}
2473
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002474//@version 1.1 flags
2475
2476/// Subgroup feature flags
2477type VkFlags VkSubgroupFeatureFlags
2478bitfield VkSubgroupFeatureFlagBits {
2479 VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001,
2480 VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002,
2481 VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004,
2482 VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008,
2483 VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010,
2484 VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020,
2485 VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040,
2486 VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080,
2487}
2488
2489/// Peer memory feature flags
2490type VkFlags VkPeerMemoryFeatureFlags
2491bitfield VkPeerMemoryFeatureFlagBits {
2492 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001,
2493 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002,
2494 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004,
2495 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008,
2496}
2497
2498/// Memory allocation flags
2499type VkFlags VkMemoryAllocateFlags
2500bitfield VkMemoryAllocateFlagBits {
2501 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
2502}
2503
2504type VkFlags VkCommandPoolTrimFlags
2505//bitfield VkCommandPoolTrimFlagBits {
2506//}
2507
2508type VkFlags VkDescriptorUpdateTemplateCreateFlags
2509//bitfield VkDescriptorUpdateTemplateCreateFlagBits {
2510//}
2511
2512/// External memory handle type flags
2513type VkFlags VkExternalMemoryHandleTypeFlags
2514bitfield VkExternalMemoryHandleTypeFlagBits {
2515 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
2516 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
2517 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
2518 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008,
2519 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010,
2520 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020,
2521 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040,
2522}
2523
2524/// External memory feature flags
2525type VkFlags VkExternalMemoryFeatureFlags
2526bitfield VkExternalMemoryFeatureFlagBits {
2527 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001,
2528 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002,
2529 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004,
2530}
2531
2532/// External fence handle type flags
2533type VkFlags VkExternalFenceHandleTypeFlags
2534bitfield VkExternalFenceHandleTypeFlagBits {
2535 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
2536 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
2537 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
2538 VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008,
2539}
2540
2541/// External fence feature flags
2542type VkFlags VkExternalFenceFeatureFlags
2543bitfield VkExternalFenceFeatureFlagBits {
2544 VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001,
2545 VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002,
2546}
2547
2548/// Fence import flags
2549type VkFlags VkFenceImportFlags
2550bitfield VkFenceImportFlagBits {
2551 VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001,
2552}
2553
2554/// Semaphore import flags
2555type VkFlags VkSemaphoreImportFlags
2556bitfield VkSemaphoreImportFlagBits {
2557 VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001,
2558}
2559
2560/// External semaphore handle type flags
2561type VkFlags VkExternalSemaphoreHandleTypeFlags
2562bitfield VkExternalSemaphoreHandleTypeFlagBits {
2563 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
2564 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
2565 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
2566 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008,
2567 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010,
2568}
2569
2570/// External semaphore feature flags
2571type VkFlags VkExternalSemaphoreFeatureFlags
2572bitfield VkExternalSemaphoreFeatureFlagBits {
2573 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001,
2574 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002,
2575}
2576
Jesse Hallad250842017-03-10 18:35:38 -08002577@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002578type VkFlags VkSurfaceTransformFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002579@extension("VK_KHR_surface") // 1
Jesse Halld8bade02015-11-24 10:24:18 -08002580bitfield VkSurfaceTransformFlagBitsKHR {
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002581 VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002582 VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
2583 VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
2584 VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
2585 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
2586 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
2587 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
2588 VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
2589 VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
Michael Lentine88594d72015-11-12 12:49:45 -08002590}
Jesse Halld27f6aa2015-08-15 17:58:48 -07002591
Jesse Hallad250842017-03-10 18:35:38 -08002592@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002593type VkFlags VkCompositeAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002594@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08002595bitfield VkCompositeAlphaFlagBitsKHR {
2596 VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2597 VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
2598 VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
2599 VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
2600}
2601
Jesse Hallad250842017-03-10 18:35:38 -08002602@extension("VK_KHR_swapchain") // 2
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002603type VkFlags VkSwapchainCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002604@extension("VK_KHR_swapchain") // 2
2605bitfield VkSwapchainCreateFlagBitsKHR {
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002606 //@version 1.1
2607 VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHR = 0x00000001,
2608 VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002,
2609}
2610
2611//@version 1.1
2612@extension("VK_KHR_swapchain") // 2
2613type VkFlags VkDeviceGroupPresentModeFlagsKHR
2614//@version 1.1
2615@extension("VK_KHR_swapchain") // 2
2616bitfield VkDeviceGroupPresentModeFlagBitsKHR {
2617 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001,
2618 VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002,
2619 VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004,
2620 VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08002621}
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002622
Jesse Hallad250842017-03-10 18:35:38 -08002623@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002624type VkFlags VkDisplayPlaneAlphaFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002625@extension("VK_KHR_display") // 3
Jesse Halld8bade02015-11-24 10:24:18 -08002626bitfield VkDisplayPlaneAlphaFlagBitsKHR {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002627 VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
2628 VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
2629 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
2630 VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
Jesse Hall1356b0d2015-11-23 17:24:58 -08002631}
2632
Jesse Hallad250842017-03-10 18:35:38 -08002633@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002634type VkFlags VkDisplaySurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002635//@extension("VK_KHR_display") // 3
Jesse Hallf4ab2b12015-11-30 16:04:55 -08002636//bitfield VkDisplaySurfaceCreateFlagBitsKHR {
2637//}
2638
Jesse Hallad250842017-03-10 18:35:38 -08002639@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002640type VkFlags VkDisplayModeCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002641//@extension("VK_KHR_display") // 3
Jesse Hall9ba8bc82015-11-30 16:22:16 -08002642//bitfield VkDisplayModeCreateFlagBitsKHR {
2643//}
2644
Jesse Hallad250842017-03-10 18:35:38 -08002645@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002646type VkFlags VkXlibSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002647//@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002648//bitfield VkXlibSurfaceCreateFlagBitsKHR {
2649//}
2650
Jesse Hallad250842017-03-10 18:35:38 -08002651@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002652type VkFlags VkXcbSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002653//@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002654//bitfield VkXcbSurfaceCreateFlagBitsKHR {
2655//}
2656
Jesse Hallad250842017-03-10 18:35:38 -08002657@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002658type VkFlags VkWaylandSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002659//@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002660//bitfield VkWaylandSurfaceCreateFlagBitsKHR {
2661//}
2662
Jesse Hallad250842017-03-10 18:35:38 -08002663@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002664type VkFlags VkMirSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002665//@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002666//bitfield VkMirSurfaceCreateFlagBitsKHR {
2667//}
2668
Jesse Hallad250842017-03-10 18:35:38 -08002669@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002670type VkFlags VkAndroidSurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002671//@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002672//bitfield VkAndroidSurfaceCreateFlagBitsKHR {
2673//}
2674
Jesse Hallad250842017-03-10 18:35:38 -08002675@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002676type VkFlags VkWin32SurfaceCreateFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002677//@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08002678//bitfield VkWin32SurfaceCreateFlagBitsKHR {
2679//}
2680
Jesse Hallad250842017-03-10 18:35:38 -08002681@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002682type VkFlags VkSwapchainImageUsageFlagsANDROID
Jesse Hallad250842017-03-10 18:35:38 -08002683@extension("VK_ANDROID_native_buffer") // 11
Jesse Hall889cd9a2017-02-25 22:12:23 -08002684bitfield VkSwapchainImageUsageFlagBitsANDROID {
2685 VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001,
2686}
2687
Jesse Hallad250842017-03-10 18:35:38 -08002688@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002689type VkFlags VkDebugReportFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002690@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08002691bitfield VkDebugReportFlagBitsEXT {
Jesse Halle2948d82016-02-25 04:19:32 -08002692 VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
2693 VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
2694 VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
Jesse Hall715b86a2016-01-16 16:34:29 -08002695 VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
2696 VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
2697}
2698
Jesse Hallad250842017-03-10 18:35:38 -08002699@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002700type VkFlags VkExternalMemoryHandleTypeFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002701@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002702bitfield VkExternalMemoryHandleTypeFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002703 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
2704 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
2705 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
2706 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002707}
2708
Jesse Hallad250842017-03-10 18:35:38 -08002709@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002710type VkFlags VkExternalMemoryFeatureFlagsNV
Jesse Hallad250842017-03-10 18:35:38 -08002711@extension("VK_NV_external_memory_capabilities") // 56
Chris Forbes289cb792016-12-30 15:03:55 +13002712bitfield VkExternalMemoryFeatureFlagBitsNV {
Jesse Halleb02c472017-02-24 15:13:45 -08002713 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
2714 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
2715 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
Chris Forbes289cb792016-12-30 15:03:55 +13002716}
2717
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002718@extension("VK_KHR_device_group") // 61
2719type VkFlags VkPeerMemoryFeatureFlagsKHR
2720@extension("VK_KHR_device_group") // 61
2721bitfield VkPeerMemoryFeatureFlagBitsKHR {
2722 VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = 0x00000001,
2723 VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = 0x00000002,
2724 VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = 0x00000004,
2725 VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = 0x00000008,
Jesse Hallad250842017-03-10 18:35:38 -08002726}
2727
Daniel Kochf25f5bb2017-10-05 00:26:58 -04002728@extension("VK_KHR_device_group") // 61
2729type VkFlags VkMemoryAllocateFlagsKHR
2730@extension("VK_KHR_device_group") // 61
2731bitfield VkMemoryAllocateFlagBitsKHR {
2732 VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002733}
2734
2735@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002736type VkFlags VkViSurfaceCreateFlagsNN
Jesse Hallad250842017-03-10 18:35:38 -08002737//@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08002738//bitfield VkViSurfaceCreateFlagBitsNN {
2739//}
2740
Jesse Hallad250842017-03-10 18:35:38 -08002741@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002742type VkFlags VkCommandPoolTrimFlagsKHR
Jesse Hallad250842017-03-10 18:35:38 -08002743//@extension("VK_KHR_maintenance1") // 70
Jesse Hall77ad05b2017-03-10 22:02:20 -08002744//bitfield VkCommandPoolTrimFlagBitsKHR {
2745//}
2746
Jesse Hall9492f992017-08-28 12:10:06 -07002747@extension("VK_KHR_external_memory_capabilities") // 72
2748type VkFlags VkExternalMemoryHandleTypeFlagsKHR
2749@extension("VK_KHR_external_memory_capabilities") // 72
2750bitfield VkExternalMemoryHandleTypeFlagBitsKHR {
2751 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2752 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2753 VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2754 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = 0x00000008,
2755 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010,
2756 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020,
2757 VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040,
Jesse Hallad250842017-03-10 18:35:38 -08002758}
2759
Jesse Hall9492f992017-08-28 12:10:06 -07002760@extension("VK_KHR_external_memory_capabilities") // 72
2761type VkFlags VkExternalMemoryFeatureFlagsKHR
2762@extension("VK_KHR_external_memory_capabilities") // 72
2763bitfield VkExternalMemoryFeatureFlagBitsKHR {
2764 VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = 0x00000001,
2765 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = 0x00000002,
2766 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = 0x00000004,
Jesse Hallad250842017-03-10 18:35:38 -08002767}
2768
Jesse Hall9492f992017-08-28 12:10:06 -07002769@extension("VK_KHR_external_semaphore_capabilities") // 77
2770type VkFlags VkExternalSemaphoreHandleTypeFlagsKHR
2771@extension("VK_KHR_external_semaphore_capabilities") // 77
2772bitfield VkExternalSemaphoreHandleTypeFlagBitsKHR {
2773 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001
2774 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002
2775 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004
2776 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = 0x00000008
2777 VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHR = 0x00000010
Jesse Hallad250842017-03-10 18:35:38 -08002778}
2779
Jesse Hall9492f992017-08-28 12:10:06 -07002780@extension("VK_KHR_external_semaphore_capabilities") // 77
2781type VkFlags VkExternalSemaphoreFeatureFlagsKHR
2782@extension("VK_KHR_external_semaphore_capabilities") // 77
2783bitfield VkExternalSemaphoreFeatureFlagBitsKHR {
2784 VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2785 VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2786}
2787
2788@extension("VK_KHR_external_semaphore") // 78
2789type VkFlags VkSemaphoreImportFlagsKHR
2790@extension("VK_KHR_external_semaphore") // 78
2791bitfield VkSemaphoreImportFlagBitsKHR {
2792 VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
Jesse Hallad250842017-03-10 18:35:38 -08002793}
2794
2795@extension("VK_KHR_descriptor_update_template") // 86
2796type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR
2797//@extension("VK_KHR_descriptor_update_template") // 86
2798//bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR {
2799//}
2800
2801@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002802type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002803@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002804bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002805 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
2806 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
2807 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
2808 VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
Chris Forbes289cb792016-12-30 15:03:55 +13002809}
2810
Jesse Hallad250842017-03-10 18:35:38 -08002811@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002812type VkFlags VkObjectEntryUsageFlagsNVX
Jesse Hallad250842017-03-10 18:35:38 -08002813@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13002814bitfield VkObjectEntryUsageFlagBitsNVX {
Jesse Halleb02c472017-02-24 15:13:45 -08002815 VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
2816 VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
Chris Forbes289cb792016-12-30 15:03:55 +13002817}
2818
Jesse Hallad250842017-03-10 18:35:38 -08002819@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002820type VkFlags VkSurfaceCounterFlagsEXT
Jesse Hallad250842017-03-10 18:35:38 -08002821@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08002822bitfield VkSurfaceCounterFlagBitsEXT {
2823 VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
2824}
2825
Jesse Hallad250842017-03-10 18:35:38 -08002826@extension("VK_NV_viewport_swizzle") // 99
2827type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV
2828//@extension("VK_NV_viewport_swizzle") // 99
2829//bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV {
2830//}
2831
2832@extension("VK_EXT_discard_rectangles") // 100
2833type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT
2834//@extension("VK_EXT_discard_rectangles") // 100
2835//bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT {
2836//}
2837
Jesse Hall9492f992017-08-28 12:10:06 -07002838@extension("VK_KHR_external_fence_capabilities") // 113
2839type VkFlags VkExternalFenceHandleTypeFlagsKHR
2840@extension("VK_KHR_external_fence_capabilities") // 113
2841bitfield VkExternalFenceHandleTypeFlagBitsKHR {
2842 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
2843 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
2844 VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
2845 VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000008,
2846}
2847
2848@extension("VK_KHR_external_fence_capabilities") // 113
2849type VkFlags VkExternalFenceFeatureFlagsKHR
2850@extension("VK_KHR_external_fence_capabilities") // 113
2851bitfield VkExternalFenceFeatureFlagBitsKHR {
2852 VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
2853 VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
2854}
2855
2856@extension("VK_KHR_external_fence") // 114
2857type VkFlags VkFenceImportFlagsKHR
2858@extension("VK_KHR_external_fence") // 114
2859bitfield VkFenceImportFlagBitsKHR {
2860 VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
2861}
2862
Jesse Hallad250842017-03-10 18:35:38 -08002863@extension("VK_MVK_ios_surface") // 123
2864type VkFlags VkIOSSurfaceCreateFlagsMVK
2865//@extension("VK_MVK_ios_surface") // 123
2866//bitfield VkIOSSurfaceCreateFlagBitsMVK {
2867//}
2868
2869@extension("VK_MVK_macos_surface") // 124
2870type VkFlags VkMacOSSurfaceCreateFlagsMVK
2871//@extension("VK_MVK_macos_surface") // 124
2872//bitfield VkMacOSSurfaceCreateFlagBitsMVK {
2873//}
2874
Jesse Hall7ba0ac72017-07-07 17:13:23 -07002875@extension("VK_NV_fragment_coverage_to_color") // 150
2876type VkFlags VkPipelineCoverageToColorStateCreateFlagsNV
2877@extension("VK_NV_fragment_coverage_to_color") // 150
2878//bitfield VkPipelineCoverageToColorStateCreateFlagBitsNV {
2879//}
2880
2881@extension("VK_NV_framebuffer_mixed_samples") // 153
2882type VkFlags VkPipelineCoverageModulationStateCreateFlagsNV
2883@extension("VK_NV_framebuffer_mixed_samples") // 153
2884//bitfield VkPipelineCoverageModulationStateCreateFlagBitsNV {
2885//}
2886
Jesse Hall77726222017-09-19 14:49:27 -05002887@extension("VK_EXT_validation_cache") // 161
2888type VkFlags VkValidationCacheCreateFlagsEXT
2889@extension("VK_EXT_validation_cache") // 161
2890//bitfield VkValidationCacheCreateFlagBitsEXT {
2891//}
2892
Jesse Halld27f6aa2015-08-15 17:58:48 -07002893//////////////////
2894// Structures //
2895//////////////////
2896
2897class VkOffset2D {
2898 s32 x
2899 s32 y
2900}
2901
2902class VkOffset3D {
2903 s32 x
2904 s32 y
2905 s32 z
2906}
2907
2908class VkExtent2D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002909 u32 width
2910 u32 height
Jesse Halld27f6aa2015-08-15 17:58:48 -07002911}
2912
2913class VkExtent3D {
Jesse Hall3dd678a2016-01-08 21:52:01 -08002914 u32 width
2915 u32 height
2916 u32 depth
Jesse Halld27f6aa2015-08-15 17:58:48 -07002917}
2918
2919class VkViewport {
Jesse Hall65ab5522015-11-30 00:07:16 -08002920 f32 x
2921 f32 y
Jesse Halld27f6aa2015-08-15 17:58:48 -07002922 f32 width
2923 f32 height
2924 f32 minDepth
2925 f32 maxDepth
2926}
2927
2928class VkRect2D {
2929 VkOffset2D offset
2930 VkExtent2D extent
2931}
2932
Jesse Halla15a4bf2015-11-19 22:48:02 -08002933class VkClearRect {
2934 VkRect2D rect
2935 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08002936 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07002937}
2938
Jesse Hall65ab5522015-11-30 00:07:16 -08002939class VkComponentMapping {
2940 VkComponentSwizzle r
2941 VkComponentSwizzle g
2942 VkComponentSwizzle b
2943 VkComponentSwizzle a
Jesse Halld27f6aa2015-08-15 17:58:48 -07002944}
2945
2946class VkPhysicalDeviceProperties {
2947 u32 apiVersion
2948 u32 driverVersion
Jesse Hall65ab5522015-11-30 00:07:16 -08002949 u32 vendorID
2950 u32 deviceID
Jesse Halld27f6aa2015-08-15 17:58:48 -07002951 VkPhysicalDeviceType deviceType
Jesse Hall65ab5522015-11-30 00:07:16 -08002952 char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName
2953 u8[VK_UUID_SIZE] pipelineCacheUUID
Jesse Hall5ae3abb2015-10-08 14:00:22 -07002954 VkPhysicalDeviceLimits limits
2955 VkPhysicalDeviceSparseProperties sparseProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07002956}
2957
2958class VkExtensionProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002959 char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name
Jesse Halld27f6aa2015-08-15 17:58:48 -07002960 u32 specVersion /// version of the extension specification implemented
2961}
2962
2963class VkLayerProperties {
Jesse Hall65ab5522015-11-30 00:07:16 -08002964 char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name
Jesse Hall3fbc8562015-11-29 22:10:52 -08002965 u32 specVersion /// version of the layer specification implemented
2966 u32 implementationVersion /// build or release version of the layer's library
Jesse Hall65ab5522015-11-30 00:07:16 -08002967 char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer
Jesse Halld27f6aa2015-08-15 17:58:48 -07002968}
2969
Jesse Halla366a512015-11-19 22:30:07 -08002970class VkSubmitInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08002971 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO
2972 const void* pNext /// Next structure in chain
2973 u32 waitSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002974 const VkSemaphore* pWaitSemaphores
Jesse Hall543a7ff2016-01-08 16:38:30 -08002975 const VkPipelineStageFlags* pWaitDstStageMask
Jesse Hall03b6fe12015-11-24 12:44:21 -08002976 u32 commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08002977 const VkCommandBuffer* pCommandBuffers
Jesse Hall03b6fe12015-11-24 12:44:21 -08002978 u32 signalSemaphoreCount
Jesse Halla366a512015-11-19 22:30:07 -08002979 const VkSemaphore* pSignalSemaphores
2980}
2981
Jesse Halld27f6aa2015-08-15 17:58:48 -07002982class VkApplicationInfo {
2983 VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO
2984 const void* pNext /// Next structure in chain
Jesse Hall3fbc8562015-11-29 22:10:52 -08002985 const char* pApplicationName
2986 u32 applicationVersion
Jesse Halld27f6aa2015-08-15 17:58:48 -07002987 const char* pEngineName
2988 u32 engineVersion
2989 u32 apiVersion
2990}
2991
Jesse Hall3fbc8562015-11-29 22:10:52 -08002992class VkAllocationCallbacks {
Jesse Halld27f6aa2015-08-15 17:58:48 -07002993 void* pUserData
Jesse Hall3fbc8562015-11-29 22:10:52 -08002994 PFN_vkAllocationFunction pfnAllocation
2995 PFN_vkReallocationFunction pfnReallocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07002996 PFN_vkFreeFunction pfnFree
Jesse Hall3fbc8562015-11-29 22:10:52 -08002997 PFN_vkInternalAllocationNotification pfnInternalAllocation
Jesse Hall03b6fe12015-11-24 12:44:21 -08002998 PFN_vkInternalFreeNotification pfnInternalFree
Jesse Halld27f6aa2015-08-15 17:58:48 -07002999}
3000
3001class VkDeviceQueueCreateInfo {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003002 VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
3003 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003004 VkDeviceQueueCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003005 u32 queueFamilyIndex
Jesse Halldba27f72015-11-30 14:25:46 -08003006 u32 queueCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08003007 const f32* pQueuePriorities
Jesse Halld27f6aa2015-08-15 17:58:48 -07003008}
3009
3010class VkDeviceCreateInfo {
3011 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
3012 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003013 VkDeviceCreateFlags flags
Jesse Halldba27f72015-11-30 14:25:46 -08003014 u32 queueCreateInfoCount
3015 const VkDeviceQueueCreateInfo* pQueueCreateInfos
Jesse Hall3dd678a2016-01-08 21:52:01 -08003016 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003017 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08003018 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003019 const char* const* ppEnabledExtensionNames
3020 const VkPhysicalDeviceFeatures* pEnabledFeatures
Jesse Halld27f6aa2015-08-15 17:58:48 -07003021}
3022
3023class VkInstanceCreateInfo {
3024 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
3025 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003026 VkInstanceCreateFlags flags
Jesse Hall3fbc8562015-11-29 22:10:52 -08003027 const VkApplicationInfo* pApplicationInfo
Jesse Hall3dd678a2016-01-08 21:52:01 -08003028 u32 enabledLayerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003029 const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled
Jesse Hall3dd678a2016-01-08 21:52:01 -08003030 u32 enabledExtensionCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003031 const char* const* ppEnabledExtensionNames /// Extension names to be enabled
3032}
3033
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003034class VkQueueFamilyProperties {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003035 VkQueueFlags queueFlags /// Queue flags
3036 u32 queueCount
Jesse Hallacfa5342015-11-19 21:51:33 -08003037 u32 timestampValidBits
Jesse Hall65ab5522015-11-30 00:07:16 -08003038 VkExtent3D minImageTransferGranularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07003039}
3040
3041class VkPhysicalDeviceMemoryProperties {
3042 u32 memoryTypeCount
3043 VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes
3044 u32 memoryHeapCount
3045 VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps
3046}
3047
Jesse Hall3fbc8562015-11-29 22:10:52 -08003048class VkMemoryAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003049 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003050 const void* pNext /// Pointer to next structure
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003051 VkDeviceSize allocationSize /// Size of memory allocation
Jesse Halld27f6aa2015-08-15 17:58:48 -07003052 u32 memoryTypeIndex /// Index of the of the memory type to allocate from
3053}
3054
3055class VkMemoryRequirements {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003056 VkDeviceSize size /// Specified in bytes
3057 VkDeviceSize alignment /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003058 u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object
3059}
3060
3061class VkSparseImageFormatProperties {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003062 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003063 VkExtent3D imageGranularity
3064 VkSparseImageFormatFlags flags
3065}
3066
3067class VkSparseImageMemoryRequirements {
Jesse Hallb00daad2015-11-29 19:46:20 -08003068 VkSparseImageFormatProperties formatProperties
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003069 u32 imageMipTailFirstLod
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003070 VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment
3071 VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment
3072 VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment
Jesse Halld27f6aa2015-08-15 17:58:48 -07003073}
3074
3075class VkMemoryType {
3076 VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type
3077 u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from
3078}
3079
3080class VkMemoryHeap {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003081 VkDeviceSize size /// Available memory in the heap
Jesse Halld27f6aa2015-08-15 17:58:48 -07003082 VkMemoryHeapFlags flags /// Flags for the heap
3083}
3084
3085class VkMappedMemoryRange {
3086 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
3087 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003088 VkDeviceMemory memory /// Mapped memory object
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003089 VkDeviceSize offset /// Offset within the mapped memory the range starts from
3090 VkDeviceSize size /// Size of the range within the mapped memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07003091}
3092
3093class VkFormatProperties {
3094 VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling
3095 VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003096 VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07003097}
3098
3099class VkImageFormatProperties {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003100 VkExtent3D maxExtent /// max image dimensions for this resource type
3101 u32 maxMipLevels /// max number of mipmap levels for this resource type
Jesse Halla15a4bf2015-11-19 22:48:02 -08003102 u32 maxArrayLayers /// max array layers for this resource type
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003103 VkSampleCountFlags sampleCounts /// supported sample counts for this resource type
3104 VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type
3105}
3106
Jesse Halla15a4bf2015-11-19 22:48:02 -08003107class VkDescriptorImageInfo {
3108 VkSampler sampler
3109 VkImageView imageView
3110 VkImageLayout imageLayout
3111}
3112
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003113class VkDescriptorBufferInfo {
3114 VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC]
3115 VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set.
3116 VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update.
Jesse Halld27f6aa2015-08-15 17:58:48 -07003117}
3118
Jesse Halld27f6aa2015-08-15 17:58:48 -07003119class VkWriteDescriptorSet {
3120 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
3121 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003122 VkDescriptorSet dstSet /// Destination descriptor set
3123 u32 dstBinding /// Binding within the destination descriptor set to write
3124 u32 dstArrayElement /// Array element within the destination binding to write
Jesse Hall03b6fe12015-11-24 12:44:21 -08003125 u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003126 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 -08003127 const VkDescriptorImageInfo* pImageInfo
3128 const VkDescriptorBufferInfo* pBufferInfo
3129 const VkBufferView* pTexelBufferView
Jesse Halld27f6aa2015-08-15 17:58:48 -07003130}
3131
3132class VkCopyDescriptorSet {
3133 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
3134 const void* pNext /// Pointer to next structure
3135 VkDescriptorSet srcSet /// Source descriptor set
3136 u32 srcBinding /// Binding within the source descriptor set to copy from
3137 u32 srcArrayElement /// Array element within the source binding to copy from
Jesse Hall3fbc8562015-11-29 22:10:52 -08003138 VkDescriptorSet dstSet /// Destination descriptor set
3139 u32 dstBinding /// Binding within the destination descriptor set to copy to
3140 u32 dstArrayElement /// Array element within the destination binding to copy to
Jesse Hall03b6fe12015-11-24 12:44:21 -08003141 u32 descriptorCount /// Number of descriptors to copy
Jesse Halld27f6aa2015-08-15 17:58:48 -07003142}
3143
3144class VkBufferCreateInfo {
3145 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
3146 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08003147 VkBufferCreateFlags flags /// Buffer creation flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003148 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003149 VkBufferUsageFlags usage /// Buffer usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003150 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003151 u32 queueFamilyIndexCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003152 const u32* pQueueFamilyIndices
3153}
3154
3155class VkBufferViewCreateInfo {
3156 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
3157 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08003158 VkBufferViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003159 VkBuffer buffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07003160 VkFormat format /// Optionally specifies format of elements
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003161 VkDeviceSize offset /// Specified in bytes
3162 VkDeviceSize range /// View size specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003163}
3164
3165class VkImageSubresource {
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003166 VkImageAspectFlagBits aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003167 u32 mipLevel
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003168 u32 arrayLayer
Jesse Halld27f6aa2015-08-15 17:58:48 -07003169}
3170
3171class VkImageSubresourceRange {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003172 VkImageAspectFlags aspectMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003173 u32 baseMipLevel
Jesse Hall3fbc8562015-11-29 22:10:52 -08003174 u32 levelCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003175 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08003176 u32 layerCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003177}
3178
3179class VkMemoryBarrier {
3180 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER
3181 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003182 VkAccessFlags srcAccessMask
3183 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003184}
3185
3186class VkBufferMemoryBarrier {
3187 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
3188 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003189 VkAccessFlags srcAccessMask
3190 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003191 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08003192 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07003193 VkBuffer buffer /// Buffer to sync
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003194 VkDeviceSize offset /// Offset within the buffer to sync
3195 VkDeviceSize size /// Amount of bytes to sync
Jesse Halld27f6aa2015-08-15 17:58:48 -07003196}
3197
3198class VkImageMemoryBarrier {
3199 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
3200 const void* pNext /// Pointer to next structure.
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003201 VkAccessFlags srcAccessMask
3202 VkAccessFlags dstAccessMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003203 VkImageLayout oldLayout /// Current layout of the image
3204 VkImageLayout newLayout /// New layout to transition the image to
3205 u32 srcQueueFamilyIndex /// Queue family to transition ownership from
Jesse Hall3fbc8562015-11-29 22:10:52 -08003206 u32 dstQueueFamilyIndex /// Queue family to transition ownership to
Jesse Halld27f6aa2015-08-15 17:58:48 -07003207 VkImage image /// Image to sync
3208 VkImageSubresourceRange subresourceRange /// Subresource range to sync
3209}
3210
3211class VkImageCreateInfo {
3212 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
3213 const void* pNext /// Pointer to next structure.
Jesse Halla6429252015-11-29 18:59:42 -08003214 VkImageCreateFlags flags /// Image creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003215 VkImageType imageType
3216 VkFormat format
3217 VkExtent3D extent
3218 u32 mipLevels
Jesse Halla15a4bf2015-11-19 22:48:02 -08003219 u32 arrayLayers
Jesse Hall091ed9e2015-11-30 00:55:29 -08003220 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07003221 VkImageTiling tiling
3222 VkImageUsageFlags usage /// Image usage flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003223 VkSharingMode sharingMode /// Cross-queue-family sharing mode
Jesse Hall03b6fe12015-11-24 12:44:21 -08003224 u32 queueFamilyIndexCount /// Number of queue families to share across
Jesse Halld27f6aa2015-08-15 17:58:48 -07003225 const u32* pQueueFamilyIndices /// Array of queue family indices to share across
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003226 VkImageLayout initialLayout /// Initial image layout for all subresources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003227}
3228
3229class VkSubresourceLayout {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003230 VkDeviceSize offset /// Specified in bytes
3231 VkDeviceSize size /// Specified in bytes
3232 VkDeviceSize rowPitch /// Specified in bytes
Jesse Hall543a7ff2016-01-08 16:38:30 -08003233 VkDeviceSize arrayPitch /// Specified in bytes
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003234 VkDeviceSize depthPitch /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003235}
3236
3237class VkImageViewCreateInfo {
3238 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
3239 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003240 VkImageViewCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003241 VkImage image
3242 VkImageViewType viewType
3243 VkFormat format
Jesse Hall65ab5522015-11-30 00:07:16 -08003244 VkComponentMapping components
Jesse Halld27f6aa2015-08-15 17:58:48 -07003245 VkImageSubresourceRange subresourceRange
Jesse Halld27f6aa2015-08-15 17:58:48 -07003246}
3247
3248class VkBufferCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003249 VkDeviceSize srcOffset /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08003250 VkDeviceSize dstOffset /// Specified in bytes
Jesse Hallb00daad2015-11-29 19:46:20 -08003251 VkDeviceSize size /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003252}
3253
Jesse Halla6429252015-11-29 18:59:42 -08003254class VkSparseMemoryBind {
Jesse Hallb00daad2015-11-29 19:46:20 -08003255 VkDeviceSize resourceOffset /// Specified in bytes
3256 VkDeviceSize size /// Specified in bytes
Jesse Hall3fbc8562015-11-29 22:10:52 -08003257 VkDeviceMemory memory
3258 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003259 VkSparseMemoryBindFlags flags
3260}
3261
Jesse Halla6429252015-11-29 18:59:42 -08003262class VkSparseImageMemoryBind {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003263 VkImageSubresource subresource
3264 VkOffset3D offset
3265 VkExtent3D extent
Jesse Hall3fbc8562015-11-29 22:10:52 -08003266 VkDeviceMemory memory
3267 VkDeviceSize memoryOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003268 VkSparseMemoryBindFlags flags
3269}
3270
Jesse Halla6429252015-11-29 18:59:42 -08003271class VkSparseBufferMemoryBindInfo {
3272 VkBuffer buffer
3273 u32 bindCount
3274 const VkSparseMemoryBind* pBinds
3275}
3276
3277class VkSparseImageOpaqueMemoryBindInfo {
3278 VkImage image
3279 u32 bindCount
3280 const VkSparseMemoryBind* pBinds
3281}
3282
3283class VkSparseImageMemoryBindInfo {
3284 VkImage image
3285 u32 bindCount
3286 const VkSparseMemoryBind* pBinds
3287}
3288
3289class VkBindSparseInfo {
3290 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO
3291 const void* pNext
3292 u32 waitSemaphoreCount
3293 const VkSemaphore* pWaitSemaphores
3294 u32 numBufferBinds
3295 const VkSparseBufferMemoryBindInfo* pBufferBinds
3296 u32 numImageOpaqueBinds
3297 const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds
3298 u32 numImageBinds
3299 const VkSparseImageMemoryBindInfo* pImageBinds
3300 u32 signalSemaphoreCount
3301 const VkSemaphore* pSignalSemaphores
3302}
3303
Jesse Hall65ab5522015-11-30 00:07:16 -08003304class VkImageSubresourceLayers {
3305 VkImageAspectFlags aspectMask
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003306 u32 mipLevel
Jesse Halla15a4bf2015-11-19 22:48:02 -08003307 u32 baseArrayLayer
Jesse Hall3fbc8562015-11-29 22:10:52 -08003308 u32 layerCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003309}
3310
Jesse Halld27f6aa2015-08-15 17:58:48 -07003311class VkImageCopy {
Jesse Hall65ab5522015-11-30 00:07:16 -08003312 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07003313 VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Hall65ab5522015-11-30 00:07:16 -08003314 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08003315 VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images
Jesse Halld27f6aa2015-08-15 17:58:48 -07003316 VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images
3317}
3318
3319class VkImageBlit {
Jesse Hall65ab5522015-11-30 00:07:16 -08003320 VkImageSubresourceLayers srcSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08003321 VkOffset3D[2] srcOffsets
Jesse Hall65ab5522015-11-30 00:07:16 -08003322 VkImageSubresourceLayers dstSubresource
Jesse Hall3dd678a2016-01-08 21:52:01 -08003323 VkOffset3D[2] dstOffsets
Jesse Halld27f6aa2015-08-15 17:58:48 -07003324}
3325
3326class VkBufferImageCopy {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003327 VkDeviceSize bufferOffset /// Specified in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003328 u32 bufferRowLength /// Specified in texels
3329 u32 bufferImageHeight
Jesse Hall65ab5522015-11-30 00:07:16 -08003330 VkImageSubresourceLayers imageSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07003331 VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images
3332 VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images
3333}
3334
3335class VkImageResolve {
Jesse Hall65ab5522015-11-30 00:07:16 -08003336 VkImageSubresourceLayers srcSubresource
Jesse Halld27f6aa2015-08-15 17:58:48 -07003337 VkOffset3D srcOffset
Jesse Hall65ab5522015-11-30 00:07:16 -08003338 VkImageSubresourceLayers dstSubresource
Jesse Hall3fbc8562015-11-29 22:10:52 -08003339 VkOffset3D dstOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003340 VkExtent3D extent
3341}
3342
3343class VkShaderModuleCreateInfo {
3344 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
3345 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003346 VkShaderModuleCreateFlags flags /// Reserved
Jesse Halld27f6aa2015-08-15 17:58:48 -07003347 platform.size_t codeSize /// Specified in bytes
Jesse Halla9bb62b2015-11-21 19:31:56 -08003348 const u32* pCode /// Binary code of size codeSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003349}
3350
Jesse Halld27f6aa2015-08-15 17:58:48 -07003351class VkDescriptorSetLayoutBinding {
Jesse Hall091ed9e2015-11-30 00:55:29 -08003352 u32 binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07003353 VkDescriptorType descriptorType /// Type of the descriptors in this binding
Jesse Halldba27f72015-11-30 14:25:46 -08003354 u32 descriptorCount /// Number of descriptors in this binding
Jesse Halld27f6aa2015-08-15 17:58:48 -07003355 VkShaderStageFlags stageFlags /// Shader stages this binding is visible to
3356 const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements)
3357}
3358
3359class VkDescriptorSetLayoutCreateInfo {
3360 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
3361 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003362 VkDescriptorSetLayoutCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08003363 u32 bindingCount /// Number of bindings in the descriptor set layout
Jesse Hall543a7ff2016-01-08 16:38:30 -08003364 const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07003365}
3366
Jesse Hall65ab5522015-11-30 00:07:16 -08003367class VkDescriptorPoolSize {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003368 VkDescriptorType type
Jesse Hall03b6fe12015-11-24 12:44:21 -08003369 u32 descriptorCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003370}
3371
3372class VkDescriptorPoolCreateInfo {
3373 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
3374 const void* pNext /// Pointer to next structure
Jesse Hallfbf97b02015-11-20 14:17:03 -08003375 VkDescriptorPoolCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003376 u32 maxSets
Jesse Hall65ab5522015-11-30 00:07:16 -08003377 u32 poolSizeCount
3378 const VkDescriptorPoolSize* pPoolSizes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003379}
3380
Jesse Hall3fbc8562015-11-29 22:10:52 -08003381class VkDescriptorSetAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003382 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Jesse Hallfbf97b02015-11-20 14:17:03 -08003383 const void* pNext /// Pointer to next structure
3384 VkDescriptorPool descriptorPool
Jesse Hall03b6fe12015-11-24 12:44:21 -08003385 u32 setCount
Jesse Hallfbf97b02015-11-20 14:17:03 -08003386 const VkDescriptorSetLayout* pSetLayouts
3387}
3388
Jesse Halld27f6aa2015-08-15 17:58:48 -07003389class VkSpecializationMapEntry {
Jesse Hall65ab5522015-11-30 00:07:16 -08003390 u32 constantID /// The SpecConstant ID specified in the BIL
Jesse Halld27f6aa2015-08-15 17:58:48 -07003391 u32 offset /// Offset of the value in the data block
Jesse Hallb00daad2015-11-29 19:46:20 -08003392 platform.size_t size /// Size in bytes of the SpecConstant
Jesse Halld27f6aa2015-08-15 17:58:48 -07003393}
3394
3395class VkSpecializationInfo {
3396 u32 mapEntryCount /// Number of entries in the map
Jesse Hallb00daad2015-11-29 19:46:20 -08003397 const VkSpecializationMapEntry* pMapEntries /// Array of map entries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003398 platform.size_t dataSize /// Size in bytes of pData
3399 const void* pData /// Pointer to SpecConstant data
3400}
3401
3402class VkPipelineShaderStageCreateInfo {
3403 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
3404 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003405 VkPipelineShaderStageCreateFlags flags
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003406 VkShaderStageFlagBits stage
3407 VkShaderModule module
3408 const char* pName
Jesse Halld27f6aa2015-08-15 17:58:48 -07003409 const VkSpecializationInfo* pSpecializationInfo
3410}
3411
3412class VkComputePipelineCreateInfo {
3413 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
3414 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07003415 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halla6429252015-11-29 18:59:42 -08003416 VkPipelineShaderStageCreateInfo stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07003417 VkPipelineLayout layout /// Interface layout of the pipeline
3418 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
3419 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
3420}
3421
3422class VkVertexInputBindingDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08003423 u32 binding /// Vertex buffer binding id
3424 u32 stride /// Distance between vertices in bytes (0 = no advancement)
Jesse Hall65ab5522015-11-30 00:07:16 -08003425 VkVertexInputRate inputRate /// Rate at which binding is incremented
Jesse Halld27f6aa2015-08-15 17:58:48 -07003426}
3427
3428class VkVertexInputAttributeDescription {
Jesse Hallb00daad2015-11-29 19:46:20 -08003429 u32 location /// location of the shader vertex attrib
3430 u32 binding /// Vertex buffer binding id
3431 VkFormat format /// format of source data
3432 u32 offset /// Offset of first element in bytes from base of vertex
Jesse Halld27f6aa2015-08-15 17:58:48 -07003433}
3434
3435class VkPipelineVertexInputStateCreateInfo {
Jesse Hall03b6fe12015-11-24 12:44:21 -08003436 VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
3437 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003438 VkPipelineVertexInputStateCreateFlags flags
Jesse Hall03b6fe12015-11-24 12:44:21 -08003439 u32 vertexBindingDescriptionCount /// number of bindings
Jesse Halld27f6aa2015-08-15 17:58:48 -07003440 const VkVertexInputBindingDescription* pVertexBindingDescriptions
Jesse Hall03b6fe12015-11-24 12:44:21 -08003441 u32 vertexAttributeDescriptionCount /// number of attributes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003442 const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
3443}
3444
3445class VkPipelineInputAssemblyStateCreateInfo {
3446 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
3447 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003448 VkPipelineInputAssemblyStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003449 VkPrimitiveTopology topology
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003450 VkBool32 primitiveRestartEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003451}
3452
3453class VkPipelineTessellationStateCreateInfo {
3454 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
3455 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003456 VkPipelineTessellationStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003457 u32 patchControlPoints
3458}
3459
3460class VkPipelineViewportStateCreateInfo {
3461 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
3462 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003463 VkPipelineViewportStateCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003464 u32 viewportCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003465 const VkViewport* pViewports
3466 u32 scissorCount
3467 const VkRect2D* pScissors
Jesse Halld27f6aa2015-08-15 17:58:48 -07003468}
3469
Jesse Hall3fbc8562015-11-29 22:10:52 -08003470class VkPipelineRasterizationStateCreateInfo {
Jesse Hall65ab5522015-11-30 00:07:16 -08003471 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003472 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003473 VkPipelineRasterizationStateCreateFlags flags
Jesse Hallae38f732015-11-19 21:32:50 -08003474 VkBool32 depthClampEnable
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003475 VkBool32 rasterizerDiscardEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08003476 VkPolygonMode polygonMode /// optional (GL45)
Jesse Hallc7467b72015-11-29 21:05:26 -08003477 VkCullModeFlags cullMode
Jesse Halld27f6aa2015-08-15 17:58:48 -07003478 VkFrontFace frontFace
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003479 VkBool32 depthBiasEnable
Jesse Halla9bb62b2015-11-21 19:31:56 -08003480 f32 depthBiasConstantFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003481 f32 depthBiasClamp
Jesse Halla9bb62b2015-11-21 19:31:56 -08003482 f32 depthBiasSlopeFactor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003483 f32 lineWidth
Jesse Halld27f6aa2015-08-15 17:58:48 -07003484}
3485
3486class VkPipelineMultisampleStateCreateInfo {
3487 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
3488 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003489 VkPipelineMultisampleStateCreateFlags flags
Jesse Hall091ed9e2015-11-30 00:55:29 -08003490 VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003491 VkBool32 sampleShadingEnable /// optional (GL45)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003492 f32 minSampleShading /// optional (GL45)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003493 const VkSampleMask* pSampleMask
Jesse Hallacfa5342015-11-19 21:51:33 -08003494 VkBool32 alphaToCoverageEnable
3495 VkBool32 alphaToOneEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003496}
3497
3498class VkPipelineColorBlendAttachmentState {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003499 VkBool32 blendEnable
Jesse Hall65ab5522015-11-30 00:07:16 -08003500 VkBlendFactor srcColorBlendFactor
3501 VkBlendFactor dstColorBlendFactor
3502 VkBlendOp colorBlendOp
3503 VkBlendFactor srcAlphaBlendFactor
3504 VkBlendFactor dstAlphaBlendFactor
3505 VkBlendOp alphaBlendOp
3506 VkColorComponentFlags colorWriteMask
Jesse Halld27f6aa2015-08-15 17:58:48 -07003507}
3508
3509class VkPipelineColorBlendStateCreateInfo {
3510 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
3511 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003512 VkPipelineColorBlendStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003513 VkBool32 logicOpEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003514 VkLogicOp logicOp
3515 u32 attachmentCount /// # of pAttachments
3516 const VkPipelineColorBlendAttachmentState* pAttachments
Jesse Hallb00daad2015-11-29 19:46:20 -08003517 f32[4] blendConstants
Jesse Halld27f6aa2015-08-15 17:58:48 -07003518}
3519
3520class VkStencilOpState {
Jesse Hall65ab5522015-11-30 00:07:16 -08003521 VkStencilOp failOp
3522 VkStencilOp passOp
3523 VkStencilOp depthFailOp
3524 VkCompareOp compareOp
3525 u32 compareMask
3526 u32 writeMask
3527 u32 reference
Jesse Halld27f6aa2015-08-15 17:58:48 -07003528}
3529
3530class VkPipelineDepthStencilStateCreateInfo {
3531 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
3532 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003533 VkPipelineDepthStencilStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003534 VkBool32 depthTestEnable
3535 VkBool32 depthWriteEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003536 VkCompareOp depthCompareOp
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003537 VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test)
3538 VkBool32 stencilTestEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003539 VkStencilOpState front
3540 VkStencilOpState back
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003541 f32 minDepthBounds
3542 f32 maxDepthBounds
3543}
3544
3545class VkPipelineDynamicStateCreateInfo {
3546 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
3547 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003548 VkPipelineDynamicStateCreateFlags flags
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003549 u32 dynamicStateCount
3550 const VkDynamicState* pDynamicStates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003551}
3552
3553class VkGraphicsPipelineCreateInfo {
Jesse Halla6429252015-11-29 18:59:42 -08003554 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
3555 const void* pNext /// Pointer to next structure
3556 VkPipelineCreateFlags flags /// Pipeline creation flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003557 u32 stageCount
Jesse Halla6429252015-11-29 18:59:42 -08003558 const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage
Jesse Halld27f6aa2015-08-15 17:58:48 -07003559 const VkPipelineVertexInputStateCreateInfo* pVertexInputState
3560 const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
3561 const VkPipelineTessellationStateCreateInfo* pTessellationState
3562 const VkPipelineViewportStateCreateInfo* pViewportState
Jesse Hall3fbc8562015-11-29 22:10:52 -08003563 const VkPipelineRasterizationStateCreateInfo* pRasterizationState
Jesse Halld27f6aa2015-08-15 17:58:48 -07003564 const VkPipelineMultisampleStateCreateInfo* pMultisampleState
3565 const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
3566 const VkPipelineColorBlendStateCreateInfo* pColorBlendState
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003567 const VkPipelineDynamicStateCreateInfo* pDynamicState
Jesse Halla6429252015-11-29 18:59:42 -08003568 VkPipelineLayout layout /// Interface layout of the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003569 VkRenderPass renderPass
3570 u32 subpass
Jesse Halla6429252015-11-29 18:59:42 -08003571 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
3572 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 -07003573}
3574
3575class VkPipelineCacheCreateInfo {
Jesse Hallb00daad2015-11-29 19:46:20 -08003576 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
3577 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003578 VkPipelineCacheCreateFlags flags
Jesse Hallb00daad2015-11-29 19:46:20 -08003579 platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes
3580 const void* pInitialData /// Initial data to populate cache
Jesse Halld27f6aa2015-08-15 17:58:48 -07003581}
3582
3583class VkPushConstantRange {
3584 VkShaderStageFlags stageFlags /// Which stages use the range
Jesse Hall03b6fe12015-11-24 12:44:21 -08003585 u32 offset /// Start of the range, in bytes
3586 u32 size /// Length of the range, in bytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07003587}
3588
3589class VkPipelineLayoutCreateInfo {
3590 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
3591 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003592 VkPipelineLayoutCreateFlags flags
Jesse Hall3dd678a2016-01-08 21:52:01 -08003593 u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003594 const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the
3595 u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline
3596 const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages
3597}
3598
3599class VkSamplerCreateInfo {
3600 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
3601 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003602 VkSamplerCreateFlags flags
Jesse Hall23ff73f2015-11-29 14:36:39 -08003603 VkFilter magFilter /// Filter mode for magnification
3604 VkFilter minFilter /// Filter mode for minifiation
3605 VkSamplerMipmapMode mipmapMode /// Mipmap selection mode
3606 VkSamplerAddressMode addressModeU
3607 VkSamplerAddressMode addressModeV
3608 VkSamplerAddressMode addressModeW
Jesse Halld27f6aa2015-08-15 17:58:48 -07003609 f32 mipLodBias
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003610 VkBool32 anisotropyEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003611 f32 maxAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003612 VkBool32 compareEnable
Jesse Halld27f6aa2015-08-15 17:58:48 -07003613 VkCompareOp compareOp
3614 f32 minLod
3615 f32 maxLod
3616 VkBorderColor borderColor
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003617 VkBool32 unnormalizedCoordinates
Jesse Halld27f6aa2015-08-15 17:58:48 -07003618}
3619
Jesse Hall3fbc8562015-11-29 22:10:52 -08003620class VkCommandPoolCreateInfo {
3621 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003622 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003623 VkCommandPoolCreateFlags flags /// Command pool creation flags
Jesse Halla6429252015-11-29 18:59:42 -08003624 u32 queueFamilyIndex
Jesse Halld27f6aa2015-08-15 17:58:48 -07003625}
3626
Jesse Hall3fbc8562015-11-29 22:10:52 -08003627class VkCommandBufferAllocateInfo {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003628 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003629 const void* pNext /// Pointer to next structure
Jesse Hall3fbc8562015-11-29 22:10:52 -08003630 VkCommandPool commandPool
3631 VkCommandBufferLevel level
Jesse Hall3dd678a2016-01-08 21:52:01 -08003632 u32 commandBufferCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003633}
3634
Jesse Hall3dd678a2016-01-08 21:52:01 -08003635class VkCommandBufferInheritanceInfo {
3636 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
Jesse Halld27f6aa2015-08-15 17:58:48 -07003637 const void* pNext /// Pointer to next structure
Jesse Halld27f6aa2015-08-15 17:58:48 -07003638 VkRenderPass renderPass /// Render pass for secondary command buffers
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003639 u32 subpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003640 VkFramebuffer framebuffer /// Framebuffer for secondary command buffers
Jesse Hallf4ab2b12015-11-30 16:04:55 -08003641 VkBool32 occlusionQueryEnable
3642 VkQueryControlFlags queryFlags
3643 VkQueryPipelineStatisticFlags pipelineStatistics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003644}
3645
Jesse Hall3dd678a2016-01-08 21:52:01 -08003646class VkCommandBufferBeginInfo {
3647 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
3648 const void* pNext /// Pointer to next structure
3649 VkCommandBufferUsageFlags flags /// Command buffer usage flags
3650 const VkCommandBufferInheritanceInfo* pInheritanceInfo
3651}
3652
Jesse Halld27f6aa2015-08-15 17:58:48 -07003653class VkRenderPassBeginInfo {
3654 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
3655 const void* pNext /// Pointer to next structure
3656 VkRenderPass renderPass
3657 VkFramebuffer framebuffer
3658 VkRect2D renderArea
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003659 u32 clearValueCount
3660 const VkClearValue* pClearValues
Jesse Halld27f6aa2015-08-15 17:58:48 -07003661}
3662
3663@union
3664/// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.
3665class VkClearColorValue {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003666 f32[4] float32
3667 s32[4] int32
3668 u32[4] uint32
Jesse Halld27f6aa2015-08-15 17:58:48 -07003669}
3670
3671class VkClearDepthStencilValue {
3672 f32 depth
3673 u32 stencil
3674}
3675
3676@union
3677/// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared.
3678class VkClearValue {
3679 VkClearColorValue color
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003680 VkClearDepthStencilValue depthStencil
Jesse Halld27f6aa2015-08-15 17:58:48 -07003681}
3682
Jesse Hallae38f732015-11-19 21:32:50 -08003683class VkClearAttachment {
3684 VkImageAspectFlags aspectMask
3685 u32 colorAttachment
3686 VkClearValue clearValue
3687}
3688
Jesse Halld27f6aa2015-08-15 17:58:48 -07003689class VkAttachmentDescription {
Jesse Halla6429252015-11-29 18:59:42 -08003690 VkAttachmentDescriptionFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003691 VkFormat format
Jesse Hall091ed9e2015-11-30 00:55:29 -08003692 VkSampleCountFlagBits samples
Jesse Halld27f6aa2015-08-15 17:58:48 -07003693 VkAttachmentLoadOp loadOp /// Load op for color or depth data
3694 VkAttachmentStoreOp storeOp /// Store op for color or depth data
3695 VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data
3696 VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data
3697 VkImageLayout initialLayout
3698 VkImageLayout finalLayout
3699}
3700
3701class VkAttachmentReference {
3702 u32 attachment
3703 VkImageLayout layout
3704}
3705
3706class VkSubpassDescription {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003707 VkSubpassDescriptionFlags flags
Jesse Halla6429252015-11-29 18:59:42 -08003708 VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now
Jesse Hall03b6fe12015-11-24 12:44:21 -08003709 u32 inputAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003710 const VkAttachmentReference* pInputAttachments
Jesse Hall03b6fe12015-11-24 12:44:21 -08003711 u32 colorAttachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003712 const VkAttachmentReference* pColorAttachments
3713 const VkAttachmentReference* pResolveAttachments
Jesse Hallc7467b72015-11-29 21:05:26 -08003714 const VkAttachmentReference* pDepthStencilAttachment
Jesse Hall03b6fe12015-11-24 12:44:21 -08003715 u32 preserveAttachmentCount
Jesse Hall3dd678a2016-01-08 21:52:01 -08003716 const u32* pPreserveAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003717}
3718
3719class VkSubpassDependency {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003720 u32 srcSubpass
Jesse Hall3fbc8562015-11-29 22:10:52 -08003721 u32 dstSubpass
Jesse Halld27f6aa2015-08-15 17:58:48 -07003722 VkPipelineStageFlags srcStageMask
Jesse Hall3fbc8562015-11-29 22:10:52 -08003723 VkPipelineStageFlags dstStageMask
Jesse Hall3e0dc8f2015-11-30 00:42:57 -08003724 VkAccessFlags srcAccessMask
3725 VkAccessFlags dstAccessMask
Jesse Halldc6d36c2015-11-29 19:12:15 -08003726 VkDependencyFlags dependencyFlags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003727}
3728
3729class VkRenderPassCreateInfo {
3730 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
3731 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003732 VkRenderPassCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003733 u32 attachmentCount
3734 const VkAttachmentDescription* pAttachments
3735 u32 subpassCount
3736 const VkSubpassDescription* pSubpasses
3737 u32 dependencyCount
3738 const VkSubpassDependency* pDependencies
3739}
3740
3741class VkEventCreateInfo {
3742 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO
3743 const void* pNext /// Pointer to next structure
3744 VkEventCreateFlags flags /// Event creation flags
3745}
3746
3747class VkFenceCreateInfo {
3748 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
3749 const void* pNext /// Pointer to next structure
3750 VkFenceCreateFlags flags /// Fence creation flags
3751}
3752
3753class VkPhysicalDeviceFeatures {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003754 VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined
3755 VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls
3756 VkBool32 imageCubeArray /// image views which are arrays of cube maps
3757 VkBool32 independentBlend /// blending operations are controlled per-attachment
3758 VkBool32 geometryShader /// geometry stage
3759 VkBool32 tessellationShader /// tessellation control and evaluation stage
3760 VkBool32 sampleRateShading /// per-sample shading and interpolation
Jesse Hall3fbc8562015-11-29 22:10:52 -08003761 VkBool32 dualSrcBlend /// blend operations which take two sources
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003762 VkBool32 logicOp /// logic operations
3763 VkBool32 multiDrawIndirect /// multi draw indirect
Jesse Hall543a7ff2016-01-08 16:38:30 -08003764 VkBool32 drawIndirectFirstInstance
Jesse Hallae38f732015-11-19 21:32:50 -08003765 VkBool32 depthClamp /// depth clamping
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003766 VkBool32 depthBiasClamp /// depth bias clamping
3767 VkBool32 fillModeNonSolid /// point and wireframe fill modes
3768 VkBool32 depthBounds /// depth bounds test
3769 VkBool32 wideLines /// lines with width greater than 1
3770 VkBool32 largePoints /// points with size greater than 1
Jesse Hallfbf97b02015-11-20 14:17:03 -08003771 VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value
3772 VkBool32 multiViewport
3773 VkBool32 samplerAnisotropy
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003774 VkBool32 textureCompressionETC2 /// ETC texture compression formats
3775 VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats
3776 VkBool32 textureCompressionBC /// BC1-7 texture compressed formats
Jesse Hall65ab5522015-11-30 00:07:16 -08003777 VkBool32 occlusionQueryPrecise
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003778 VkBool32 pipelineStatisticsQuery /// pipeline statistics query
Jesse Halldc6d36c2015-11-29 19:12:15 -08003779 VkBool32 vertexPipelineStoresAndAtomics
3780 VkBool32 fragmentStoresAndAtomics
3781 VkBool32 shaderTessellationAndGeometryPointSize
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003782 VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets
3783 VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images
3784 VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images
Jesse Halld1af8122015-11-29 23:50:38 -08003785 VkBool32 shaderStorageImageReadWithoutFormat
3786 VkBool32 shaderStorageImageWriteWithoutFormat
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003787 VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices
3788 VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices
3789 VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices
3790 VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices
3791 VkBool32 shaderClipDistance /// clip distance in shaders
3792 VkBool32 shaderCullDistance /// cull distance in shaders
3793 VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders
3794 VkBool32 shaderInt64 /// 64-bit integers in shaders
3795 VkBool32 shaderInt16 /// 16-bit integers in shaders
3796 VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support)
Jesse Hall65ab5522015-11-30 00:07:16 -08003797 VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003798 VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level
3799 VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers
3800 VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images
3801 VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images
3802 VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples
3803 VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples
3804 VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples
3805 VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples
3806 VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)
Jesse Halld1af8122015-11-29 23:50:38 -08003807 VkBool32 variableMultisampleRate
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003808 VkBool32 inheritedQueries
Jesse Halld27f6aa2015-08-15 17:58:48 -07003809}
3810
3811class VkPhysicalDeviceLimits {
3812 /// resource maximum sizes
3813 u32 maxImageDimension1D /// max 1D image dimension
3814 u32 maxImageDimension2D /// max 2D image dimension
3815 u32 maxImageDimension3D /// max 3D image dimension
3816 u32 maxImageDimensionCube /// max cubemap image dimension
3817 u32 maxImageArrayLayers /// max layers for image arrays
Jesse Hallb00daad2015-11-29 19:46:20 -08003818 u32 maxTexelBufferElements
Jesse Hallfbf97b02015-11-20 14:17:03 -08003819 u32 maxUniformBufferRange /// max uniform buffer size (bytes)
3820 u32 maxStorageBufferRange /// max storage buffer size (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003821 u32 maxPushConstantsSize /// max size of the push constants pool (bytes)
3822 /// memory limits
3823 u32 maxMemoryAllocationCount /// max number of device memory allocations supported
Jesse Hall091ed9e2015-11-30 00:55:29 -08003824 u32 maxSamplerAllocationCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003825 VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
3826 VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003827 /// descriptor set limits
3828 u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline
Jesse Halld27f6aa2015-08-15 17:58:48 -07003829 u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set
3830 u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set
3831 u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set
3832 u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set
3833 u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003834 u32 maxPerStageDescriptorInputAttachments
Jesse Halldba27f72015-11-30 14:25:46 -08003835 u32 maxPerStageResources
Jesse Halld27f6aa2015-08-15 17:58:48 -07003836 u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set
3837 u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003838 u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003839 u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003840 u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set
Jesse Halld27f6aa2015-08-15 17:58:48 -07003841 u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set
3842 u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set
Jesse Halle1b12782015-11-30 11:27:32 -08003843 u32 maxDescriptorSetInputAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003844 /// vertex stage limits
3845 u32 maxVertexInputAttributes /// max num of vertex input attribute slots
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003846 u32 maxVertexInputBindings /// max num of vertex input binding slots
Jesse Halld27f6aa2015-08-15 17:58:48 -07003847 u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset
3848 u32 maxVertexInputBindingStride /// max vertex input binding stride
3849 u32 maxVertexOutputComponents /// max num of output components written by vertex shader
3850 /// tessellation control stage limits
Jesse Hall3fbc8562015-11-29 22:10:52 -08003851 u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator
Jesse Hallae38f732015-11-19 21:32:50 -08003852 u32 maxTessellationPatchSize /// max patch size (vertices)
3853 u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS
3854 u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS
3855 u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS
3856 u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS
3857 u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES
3858 u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES
Jesse Halld27f6aa2015-08-15 17:58:48 -07003859 /// geometry stage limits
3860 u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader
3861 u32 maxGeometryInputComponents /// max num of input components read in geometry stage
3862 u32 maxGeometryOutputComponents /// max num of output components written in geometry stage
3863 u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage
3864 u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage
3865 /// fragment stage limits
3866 u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage
Jesse Hallfbf97b02015-11-20 14:17:03 -08003867 u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage
Jesse Hall3fbc8562015-11-29 22:10:52 -08003868 u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending
Jesse Halld27f6aa2015-08-15 17:58:48 -07003869 u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers
3870 /// compute stage limits
3871 u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes)
3872 u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z)
3873 u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group
3874 u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z)
3875
3876 u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y
3877 u32 subTexelPrecisionBits /// num bits of subtexel precision
3878 u32 mipmapPrecisionBits /// num bits of mipmap precision
3879
3880 u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices)
Jesse Halldba27f72015-11-30 14:25:46 -08003881 u32 maxDrawIndirectCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003882
3883 f32 maxSamplerLodBias /// max absolute sampler level of detail bias
3884 f32 maxSamplerAnisotropy /// max degree of sampler anisotropy
3885
3886 u32 maxViewports /// max number of active viewports
Jesse Halld27f6aa2015-08-15 17:58:48 -07003887 u32[2] maxViewportDimensions /// max viewport dimensions (x,y)
3888 f32[2] viewportBoundsRange /// viewport bounds range (min,max)
3889 u32 viewportSubPixelBits /// num bits of subpixel precision for viewport
3890
Jesse Halldc6d36c2015-11-29 19:12:15 -08003891 platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes)
3892 VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes)
3893 VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes)
3894 VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes)
Jesse Halld27f6aa2015-08-15 17:58:48 -07003895
Jesse Hallfbf97b02015-11-20 14:17:03 -08003896 s32 minTexelOffset /// min texel offset for OpTextureSampleOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003897 u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset
Jesse Hallfbf97b02015-11-20 14:17:03 -08003898 s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07003899 u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset
3900 f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset
3901 f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset
3902 u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset
3903
3904 u32 maxFramebufferWidth /// max width for a framebuffer
3905 u32 maxFramebufferHeight /// max height for a framebuffer
3906 u32 maxFramebufferLayers /// max layer count for a layered framebuffer
Jesse Hall091ed9e2015-11-30 00:55:29 -08003907 VkSampleCountFlags framebufferColorSampleCounts
3908 VkSampleCountFlags framebufferDepthSampleCounts
3909 VkSampleCountFlags framebufferStencilSampleCounts
3910 VkSampleCountFlags framebufferNoAttachmentSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003911 u32 maxColorAttachments /// max num of framebuffer color attachments
3912
Jesse Hall091ed9e2015-11-30 00:55:29 -08003913 VkSampleCountFlags sampledImageColorSampleCounts
3914 VkSampleCountFlags sampledImageIntegerSampleCounts
3915 VkSampleCountFlags sampledImageDepthSampleCounts
3916 VkSampleCountFlags sampledImageStencilSampleCounts
3917 VkSampleCountFlags storageImageSampleCounts
Jesse Halld27f6aa2015-08-15 17:58:48 -07003918 u32 maxSampleMaskWords /// max num of sample mask words
Jesse Hallf9fa9a52016-01-08 16:08:51 -08003919 VkBool32 timestampComputeAndGraphics
Jesse Halld27f6aa2015-08-15 17:58:48 -07003920
Jesse Halla9bb62b2015-11-21 19:31:56 -08003921 f32 timestampPeriod
Jesse Halld27f6aa2015-08-15 17:58:48 -07003922
3923 u32 maxClipDistances /// max number of clip distances
3924 u32 maxCullDistances /// max number of cull distances
3925 u32 maxCombinedClipAndCullDistances /// max combined number of user clipping
3926
Jesse Hallfbf97b02015-11-20 14:17:03 -08003927 u32 discreteQueuePriorities
3928
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003929 f32[2] pointSizeRange /// range (min,max) of supported point sizes
3930 f32[2] lineWidthRange /// range (min,max) of supported line widths
Jesse Halld27f6aa2015-08-15 17:58:48 -07003931 f32 pointSizeGranularity /// granularity of supported point sizes
3932 f32 lineWidthGranularity /// granularity of supported line widths
Jesse Hall03b6fe12015-11-24 12:44:21 -08003933 VkBool32 strictLines
Jesse Hall091ed9e2015-11-30 00:55:29 -08003934 VkBool32 standardSampleLocations
Jesse Halla9bb62b2015-11-21 19:31:56 -08003935
Jesse Hall65ab5522015-11-30 00:07:16 -08003936 VkDeviceSize optimalBufferCopyOffsetAlignment
3937 VkDeviceSize optimalBufferCopyRowPitchAlignment
Jesse Halldba27f72015-11-30 14:25:46 -08003938 VkDeviceSize nonCoherentAtomSize
Jesse Halld27f6aa2015-08-15 17:58:48 -07003939}
3940
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003941class VkPhysicalDeviceSparseProperties {
3942 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 -08003943 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 -07003944 VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format)
3945 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 -07003946 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
3947}
3948
Jesse Halld27f6aa2015-08-15 17:58:48 -07003949class VkSemaphoreCreateInfo {
3950 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
3951 const void* pNext /// Pointer to next structure
3952 VkSemaphoreCreateFlags flags /// Semaphore creation flags
3953}
3954
3955class VkQueryPoolCreateInfo {
3956 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
3957 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003958 VkQueryPoolCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003959 VkQueryType queryType
Jesse Hall3dd678a2016-01-08 21:52:01 -08003960 u32 queryCount
Jesse Halld27f6aa2015-08-15 17:58:48 -07003961 VkQueryPipelineStatisticFlags pipelineStatistics /// Optional
3962}
3963
3964class VkFramebufferCreateInfo {
3965 VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
3966 const void* pNext /// Pointer to next structure
Jesse Halla6429252015-11-29 18:59:42 -08003967 VkFramebufferCreateFlags flags
Jesse Halld27f6aa2015-08-15 17:58:48 -07003968 VkRenderPass renderPass
3969 u32 attachmentCount
Jesse Hall5ae3abb2015-10-08 14:00:22 -07003970 const VkImageView* pAttachments
Jesse Halld27f6aa2015-08-15 17:58:48 -07003971 u32 width
3972 u32 height
3973 u32 layers
3974}
3975
Jesse Hall3fbc8562015-11-29 22:10:52 -08003976class VkDrawIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003977 u32 vertexCount
3978 u32 instanceCount
3979 u32 firstVertex
3980 u32 firstInstance
3981}
3982
Jesse Hall3fbc8562015-11-29 22:10:52 -08003983class VkDrawIndexedIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003984 u32 indexCount
3985 u32 instanceCount
3986 u32 firstIndex
3987 s32 vertexOffset
3988 u32 firstInstance
3989}
3990
Jesse Hall3fbc8562015-11-29 22:10:52 -08003991class VkDispatchIndirectCommand {
Jesse Halld27f6aa2015-08-15 17:58:48 -07003992 u32 x
3993 u32 y
3994 u32 z
3995}
3996
Daniel Kochf25f5bb2017-10-05 00:26:58 -04003997//@version 1.1 structures
3998
3999class VkPhysicalDeviceSubgroupProperties {
4000 VkStructureType sType
4001 void* pNext
4002 u32 subgroupSize
4003 VkShaderStageFlags supportedStages
4004 VkSubgroupFeatureFlags supportedOperations
4005 VkBool32 quadOperationsInAllStages
4006}
4007
4008class VkBindBufferMemoryInfo {
4009 VkStructureType sType
4010 const void* pNext
4011 VkBuffer buffer
4012 VkDeviceMemory memory
4013 VkDeviceSize memoryOffset
4014}
4015
4016class VkBindImageMemoryInfo {
4017 VkStructureType sType
4018 const void* pNext
4019 VkImage image
4020 VkDeviceMemory memory
4021 VkDeviceSize memoryOffset
4022}
4023
4024class VkPhysicalDevice16BitStorageFeatures {
4025 VkStructureType sType
4026 void* pNext
4027 VkBool32 storageBuffer16BitAccess
4028 VkBool32 uniformAndStorageBuffer16BitAccess
4029 VkBool32 storagePushConstant16
4030 VkBool32 storageInputOutput16
4031}
4032
4033class VkMemoryDedicatedRequirements {
4034 VkStructureType sType
4035 void* pNext
4036 VkBool32 prefersDedicatedAllocation
4037 VkBool32 requiresDedicatedAllocation
4038}
4039
4040class VkMemoryDedicatedAllocateInfo {
4041 VkStructureType sType
4042 const void* pNext
4043 VkImage image
4044 VkBuffer buffer
4045}
4046
4047class VkMemoryAllocateFlagsInfo {
4048 VkStructureType sType
4049 const void* pNext
4050 VkMemoryAllocateFlags flags
4051 u32 deviceMask
4052}
4053
4054class VkDeviceGroupRenderPassBeginInfo {
4055 VkStructureType sType
4056 const void* pNext
4057 u32 deviceMask
4058 u32 deviceRenderAreaCount
4059 const VkRect2D* pDeviceRenderAreas
4060}
4061
4062class VkDeviceGroupCommandBufferBeginInfo {
4063 VkStructureType sType
4064 const void* pNext
4065 u32 deviceMask
4066}
4067
4068class VkDeviceGroupSubmitInfo {
4069 VkStructureType sType
4070 const void* pNext
4071 u32 waitSemaphoreCount
4072 const u32* pWaitSemaphoreDeviceIndices
4073 u32 commandBufferCount
4074 const u32* pCommandBufferDeviceMasks
4075 u32 signalSemaphoreCount
4076 const u32* pSignalSemaphoreDeviceIndices
4077}
4078
4079class VkDeviceGroupBindSparseInfo {
4080 VkStructureType sType
4081 const void* pNext
4082 u32 resourceDeviceIndex
4083 u32 memoryDeviceIndex
4084}
4085
4086class VkBindBufferMemoryDeviceGroupInfo {
4087 VkStructureType sType
4088 const void* pNext
4089 u32 deviceIndexCount
4090 const u32* pDeviceIndices
4091}
4092
4093class VkBindImageMemoryDeviceGroupInfo {
4094 VkStructureType sType
4095 const void* pNext
4096 u32 deviceIndexCount
4097 const u32* pDeviceIndices
4098 u32 SFRRectCount
4099 const VkRect2D* pSFRRects
4100}
4101
4102class VkPhysicalDeviceGroupProperties {
4103 VkStructureType sType
4104 void* pNext
4105 u32 physicalDeviceCount
4106 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE] physicalDevices
4107 VkBool32 subsetAllocation
4108}
4109
4110class VkDeviceGroupDeviceCreateInfo {
4111 VkStructureType sType
4112 const void* pNext
4113 u32 physicalDeviceCount
4114 const VkPhysicalDevice* pPhysicalDevices
4115}
4116
4117class VkBufferMemoryRequirementsInfo2 {
4118 VkStructureType sType
4119 const void* pNext
4120 VkBuffer buffer
4121}
4122
4123class VkImageMemoryRequirementsInfo2 {
4124 VkStructureType sType
4125 const void* pNext
4126 VkImage image
4127}
4128
4129class VkImageSparseMemoryRequirementsInfo2 {
4130 VkStructureType sType
4131 const void* pNext
4132 VkImage image
4133}
4134
4135class VkMemoryRequirements2 {
4136 VkStructureType sType
4137 void* pNext
4138 VkMemoryRequirements memoryRequirements
4139}
4140
4141class VkSparseImageMemoryRequirements2 {
4142 VkStructureType sType
4143 void* pNext
4144 VkSparseImageMemoryRequirements memoryRequirements
4145}
4146
4147class VkPhysicalDeviceFeatures2 {
4148 VkStructureType sType
4149 void* pNext
4150 VkPhysicalDeviceFeatures features
4151}
4152
4153class VkPhysicalDeviceProperties2 {
4154 VkStructureType sType
4155 void* pNext
4156 VkPhysicalDeviceProperties properties
4157}
4158
4159class VkFormatProperties2 {
4160 VkStructureType sType
4161 void* pNext
4162 VkFormatProperties formatProperties
4163}
4164
4165class VkImageFormatProperties2 {
4166 VkStructureType sType
4167 void* pNext
4168 VkImageFormatProperties imageFormatProperties
4169}
4170
4171class VkPhysicalDeviceImageFormatInfo2 {
4172 VkStructureType sType
4173 const void* pNext
4174 VkFormat format
4175 VkImageType type
4176 VkImageTiling tiling
4177 VkImageUsageFlags usage
4178 VkImageCreateFlags flags
4179}
4180
4181class VkQueueFamilyProperties2 {
4182 VkStructureType sType
4183 void* pNext
4184 VkQueueFamilyProperties queueFamilyProperties
4185}
4186
4187class VkPhysicalDeviceMemoryProperties2 {
4188 VkStructureType sType
4189 void* pNext
4190 VkPhysicalDeviceMemoryProperties memoryProperties
4191}
4192
4193class VkSparseImageFormatProperties2 {
4194 VkStructureType sType
4195 void* pNext
4196 VkSparseImageFormatProperties properties
4197}
4198
4199class VkPhysicalDeviceSparseImageFormatInfo2 {
4200 VkStructureType sType
4201 const void* pNext
4202 VkFormat format
4203 VkImageType type
4204 VkSampleCountFlagBits samples
4205 VkImageUsageFlags usage
4206 VkImageTiling tiling
4207}
4208
4209class VkPhysicalDevicePointClippingProperties {
4210 VkStructureType sType
4211 void* pNext
4212 VkPointClippingBehavior pointClippingBehavior
4213}
4214
4215class VkInputAttachmentAspectReference {
4216 u32 subpass
4217 u32 inputAttachmentIndex
4218 VkImageAspectFlags aspectMask
4219}
4220
4221class VkRenderPassInputAttachmentAspectCreateInfo {
4222 VkStructureType sType
4223 const void* pNext
4224 u32 aspectReferenceCount
4225 const VkInputAttachmentAspectReference* pAspectReferences
4226}
4227
4228class VkImageViewUsageCreateInfo {
4229 VkStructureType sType
4230 const void* pNext
4231 VkImageUsageFlags usage
4232}
4233
4234class VkPipelineTessellationDomainOriginStateCreateInfo {
4235 VkStructureType sType
4236 const void* pNext
4237 VkTessellationDomainOrigin domainOrigin
4238}
4239
4240class VkRenderPassMultiviewCreateInfo {
4241 VkStructureType sType
4242 const void* pNext
4243 u32 subpassCount
4244 const u32* pViewMasks
4245 u32 dependencyCount
4246 const s32* pViewOffsets
4247 u32 correlationMaskCount
4248 const u32* pCorrelationMasks
4249}
4250
4251class VkPhysicalDeviceMultiviewFeatures {
4252 VkStructureType sType
4253 void* pNext
4254 VkBool32 multiview
4255 VkBool32 multiviewGeometryShader
4256 VkBool32 multiviewTessellationShader
4257}
4258
4259class VkPhysicalDeviceMultiviewProperties {
4260 VkStructureType sType
4261 void* pNext
4262 u32 maxMultiviewViewCount
4263 u32 maxMultiviewInstanceIndex
4264}
4265
4266class VkPhysicalDeviceVariablePointerFeatures {
4267 VkStructureType sType
4268 void* pNext
4269 VkBool32 variablePointersStorageBuffer
4270 VkBool32 variablePointers
4271}
4272
4273class VkPhysicalDeviceProtectedMemoryFeatures {
4274 VkStructureType sType
4275 void* pNext
4276 VkBool32 protectedMemory
4277}
4278
4279class VkPhysicalDeviceProtectedMemoryProperties {
4280 VkStructureType sType
4281 void* pNext
4282 VkBool32 protectedNoFault
4283}
4284
4285class VkDeviceQueueInfo2 {
4286 VkStructureType sType
4287 const void* pNext
4288 VkDeviceQueueCreateFlags flags
4289 u32 queueFamilyIndex
4290 u32 queueIndex
4291}
4292
4293class VkProtectedSubmitInfo {
4294 VkStructureType sType
4295 const void* pNext
4296 VkBool32 protectedSubmit
4297}
4298
4299class VkSamplerYcbcrConversionCreateInfo {
4300 VkStructureType sType
4301 const void* pNext
4302 VkFormat format
4303 VkSamplerYcbcrModelConversion ycbcrModel
4304 VkSamplerYcbcrRange ycbcrRange
4305 VkComponentMapping components
4306 VkChromaLocation xChromaOffset
4307 VkChromaLocation yChromaOffset
4308 VkFilter chromaFilter
4309 VkBool32 forceExplicitReconstruction
4310}
4311
4312class VkSamplerYcbcrConversionInfo {
4313 VkStructureType sType
4314 const void* pNext
4315 VkSamplerYcbcrConversion conversion
4316}
4317
4318class VkBindImagePlaneMemoryInfo {
4319 VkStructureType sType
4320 const void* pNext
4321 VkImageAspectFlagBits planeAspect
4322}
4323
4324class VkImagePlaneMemoryRequirementsInfo {
4325 VkStructureType sType
4326 const void* pNext
4327 VkImageAspectFlagBits planeAspect
4328}
4329
4330class VkPhysicalDeviceSamplerYcbcrConversionFeatures {
4331 VkStructureType sType
4332 void* pNext
4333 VkBool32 samplerYcbcrConversion
4334}
4335
4336class VkSamplerYcbcrConversionImageFormatProperties {
4337 VkStructureType sType
4338 void* pNext
4339 u32 combinedImageSamplerDescriptorCount
4340}
4341
4342class VkDescriptorUpdateTemplateEntry {
4343 u32 dstBinding
4344 u32 dstArrayElement
4345 u32 descriptorCount
4346 VkDescriptorType descriptorType
4347 platform.size_t offset
4348 platform.size_t stride
4349}
4350
4351class VkDescriptorUpdateTemplateCreateInfo {
4352 VkStructureType sType
4353 void* pNext
4354 VkDescriptorUpdateTemplateCreateFlags flags
4355 u32 descriptorUpdateEntryCount
4356 const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntries
4357 VkDescriptorUpdateTemplateType templateType
4358 VkDescriptorSetLayout descriptorSetLayout
4359 VkPipelineBindPoint pipelineBindPoint
4360 VkPipelineLayout pipelineLayout
4361 u32 set
4362}
4363
4364class VkExternalMemoryProperties {
4365 VkExternalMemoryFeatureFlags externalMemoryFeatures
4366 VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes
4367 VkExternalMemoryHandleTypeFlags compatibleHandleTypes
4368}
4369
4370class VkPhysicalDeviceExternalImageFormatInfo {
4371 VkStructureType sType
4372 const void* pNext
4373 VkExternalMemoryHandleTypeFlagBits handleType
4374}
4375
4376class VkExternalImageFormatProperties {
4377 VkStructureType sType
4378 void* pNext
4379 VkExternalMemoryProperties externalMemoryProperties
4380}
4381
4382class VkPhysicalDeviceExternalBufferInfo {
4383 VkStructureType sType
4384 const void* pNext
4385 VkBufferCreateFlags flags
4386 VkBufferUsageFlags usage
4387 VkExternalMemoryHandleTypeFlagBits handleType
4388}
4389
4390class VkExternalBufferProperties {
4391 VkStructureType sType
4392 void* pNext
4393 VkExternalMemoryProperties externalMemoryProperties
4394}
4395
4396class VkPhysicalDeviceIDProperties {
4397 VkStructureType sType
4398 void* pNext
4399 u8[VK_UUID_SIZE] deviceUUID
4400 u8[VK_UUID_SIZE] driverUUID
4401 u8[VK_LUID_SIZE] deviceLUID
4402 u32 deviceNodeMask
4403 VkBool32 deviceLUIDValid
4404}
4405
4406class VkExternalMemoryImageCreateInfo {
4407 VkStructureType sType
4408 const void* pNext
4409 VkExternalMemoryHandleTypeFlags handleTypes
4410}
4411
4412class VkExternalMemoryBufferCreateInfo {
4413 VkStructureType sType
4414 const void* pNext
4415 VkExternalMemoryHandleTypeFlags handleTypes
4416}
4417
4418class VkExportMemoryAllocateInfo {
4419 VkStructureType sType
4420 const void* pNext
4421 VkExternalMemoryHandleTypeFlags handleTypes
4422}
4423
4424class VkPhysicalDeviceExternalFenceInfo {
4425 VkStructureType sType
4426 const void* pNext
4427 VkExternalFenceHandleTypeFlagBits handleType
4428}
4429
4430class VkExternalFenceProperties {
4431 VkStructureType sType
4432 void* pNext
4433 VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes
4434 VkExternalFenceHandleTypeFlags compatibleHandleTypes
4435 VkExternalFenceFeatureFlags externalFenceFeatures
4436}
4437
4438class VkExportFenceCreateInfo {
4439 VkStructureType sType
4440 const void* pNext
4441 VkExternalFenceHandleTypeFlags handleTypes
4442}
4443
4444class VkExportSemaphoreCreateInfo {
4445 VkStructureType sType
4446 const void* pNext
4447 VkExternalSemaphoreHandleTypeFlags handleTypes
4448}
4449
4450class VkPhysicalDeviceExternalSemaphoreInfo {
4451 VkStructureType sType
4452 const void* pNext
4453 VkExternalSemaphoreHandleTypeFlagBits handleType
4454}
4455
4456class VkExternalSemaphoreProperties {
4457 VkStructureType sType
4458 void* pNext
4459 VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes
4460 VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes
4461 VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures
4462}
4463
4464class VkPhysicalDeviceMaintenance3Properties {
4465 VkStructureType sType
4466 void* pNext
4467 u32 maxPerSetDescriptors
4468 VkDeviceSize maxMemoryAllocationSize
4469}
4470
4471class VkDescriptorSetLayoutSupport {
4472 VkStructureType sType
4473 void* pNext
4474 VkBool32 supported
4475}
4476
4477class VkPhysicalDeviceShaderDrawParameterFeatures {
4478 VkStructureType sType
4479 void* pNext
4480 VkBool32 shaderDrawParameters
4481}
4482
4483
Jesse Hallad250842017-03-10 18:35:38 -08004484@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08004485class VkSurfaceCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004486 u32 minImageCount
4487 u32 maxImageCount
4488 VkExtent2D currentExtent
4489 VkExtent2D minImageExtent
4490 VkExtent2D maxImageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004491 u32 maxImageArrayLayers
Jesse Hall1356b0d2015-11-23 17:24:58 -08004492 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004493 VkSurfaceTransformFlagBitsKHR currentTransform
Jesse Halla6429252015-11-29 18:59:42 -08004494 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08004495 VkImageUsageFlags supportedUsageFlags
Michael Lentine88594d72015-11-12 12:49:45 -08004496}
4497
Jesse Hallad250842017-03-10 18:35:38 -08004498@extension("VK_KHR_surface") // 1
Michael Lentine88594d72015-11-12 12:49:45 -08004499class VkSurfaceFormatKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004500 VkFormat format
4501 VkColorSpaceKHR colorSpace
Michael Lentine88594d72015-11-12 12:49:45 -08004502}
4503
Jesse Hallad250842017-03-10 18:35:38 -08004504@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08004505class VkSwapchainCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004506 VkStructureType sType
4507 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004508 VkSwapchainCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08004509 VkSurfaceKHR surface
4510 u32 minImageCount
4511 VkFormat imageFormat
4512 VkColorSpaceKHR imageColorSpace
4513 VkExtent2D imageExtent
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004514 u32 imageArrayLayers
4515 VkImageUsageFlags imageUsage
Jesse Hall1356b0d2015-11-23 17:24:58 -08004516 VkSharingMode sharingMode
Jesse Hall03b6fe12015-11-24 12:44:21 -08004517 u32 queueFamilyIndexCount
Jesse Hall1356b0d2015-11-23 17:24:58 -08004518 const u32* pQueueFamilyIndices
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004519 VkSurfaceTransformFlagBitsKHR preTransform
4520 VkCompositeAlphaFlagBitsKHR compositeAlpha
Jesse Hall1356b0d2015-11-23 17:24:58 -08004521 VkPresentModeKHR presentMode
Jesse Hall1356b0d2015-11-23 17:24:58 -08004522 VkBool32 clipped
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004523 VkSwapchainKHR oldSwapchain
Michael Lentine88594d72015-11-12 12:49:45 -08004524}
4525
Jesse Hallad250842017-03-10 18:35:38 -08004526@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08004527class VkPresentInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004528 VkStructureType sType
4529 const void* pNext
Jesse Hallb00daad2015-11-29 19:46:20 -08004530 u32 waitSemaphoreCount
4531 const VkSemaphore* pWaitSemaphores
Jesse Hall1356b0d2015-11-23 17:24:58 -08004532 u32 swapchainCount
Jesse Hall03b6fe12015-11-24 12:44:21 -08004533 const VkSwapchainKHR* pSwapchains
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004534 const u32* pImageIndices
Jesse Halle1b12782015-11-30 11:27:32 -08004535 VkResult* pResults
Michael Lentine88594d72015-11-12 12:49:45 -08004536}
4537
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004538//@version 1.1
4539@extension("VK_KHR_swapchain") // 2
4540class VkImageSwapchainCreateInfoKHR {
4541 VkStructureType sType
4542 const void* pNext
4543 VkSwapchainKHR swapchain
4544}
4545
4546//@version 1.1
4547@extension("VK_KHR_swapchain") // 2
4548class VkBindImageMemorySwapchainInfoKHR {
4549 VkStructureType sType
4550 const void* pNext
4551 VkSwapchainKHR swapchain
4552 u32 imageIndex
4553}
4554
4555//@version 1.1
4556@extension("VK_KHR_swapchain") // 2
4557class VkAcquireNextImageInfoKHR {
4558 VkStructureType sType
4559 const void* pNext
4560 VkSwapchainKHR swapchain
4561 u64 timeout
4562 VkSemaphore semaphore
4563 VkFence fence
4564 u32 deviceMask
4565}
4566
4567//@version 1.1
4568@extension("VK_KHR_swapchain") // 2
4569class VkDeviceGroupPresentCapabilitiesKHR {
4570 VkStructureType sType
4571 const void* pNext
4572 u32[VK_MAX_DEVICE_GROUP_SIZE] presentMask
4573 VkDeviceGroupPresentModeFlagsKHR modes
4574}
4575
4576//@version 1.1
4577@extension("VK_KHR_swapchain") // 2
4578class VkDeviceGroupPresentInfoKHR {
4579 VkStructureType sType
4580 const void* pNext
4581 u32 swapchainCount
4582 const u32* pDeviceMasks
4583 VkDeviceGroupPresentModeFlagBitsKHR mode
4584}
4585
4586//@version 1.1
4587@extension("VK_KHR_swapchain") // 2
4588class VkDeviceGroupSwapchainCreateInfoKHR {
4589 VkStructureType sType
4590 const void* pNext
4591 VkDeviceGroupPresentModeFlagsKHR modes
4592}
4593
Jesse Hallad250842017-03-10 18:35:38 -08004594@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004595class VkDisplayPropertiesKHR {
4596 VkDisplayKHR display
4597 const char* displayName
4598 VkExtent2D physicalDimensions
4599 VkExtent2D physicalResolution
4600 VkSurfaceTransformFlagsKHR supportedTransforms
Jesse Hall1356b0d2015-11-23 17:24:58 -08004601 VkBool32 planeReorderPossible
Jesse Halla6429252015-11-29 18:59:42 -08004602 VkBool32 persistentContent
Michael Lentine88594d72015-11-12 12:49:45 -08004603}
4604
Jesse Hallad250842017-03-10 18:35:38 -08004605@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08004606class VkDisplayModeParametersKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004607 VkExtent2D visibleRegion
Jesse Halla6429252015-11-29 18:59:42 -08004608 u32 refreshRate
Michael Lentine88594d72015-11-12 12:49:45 -08004609}
Jesse Halld27f6aa2015-08-15 17:58:48 -07004610
Jesse Hallad250842017-03-10 18:35:38 -08004611@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004612class VkDisplayModePropertiesKHR {
4613 VkDisplayModeKHR displayMode
Jesse Halla6429252015-11-29 18:59:42 -08004614 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08004615}
4616
Jesse Hallad250842017-03-10 18:35:38 -08004617@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004618class VkDisplayModeCreateInfoKHR {
4619 VkStructureType sType
4620 const void* pNext
Jesse Hall9ba8bc82015-11-30 16:22:16 -08004621 VkDisplayModeCreateFlagsKHR flags
Jesse Halla6429252015-11-29 18:59:42 -08004622 VkDisplayModeParametersKHR parameters
Jesse Hall1356b0d2015-11-23 17:24:58 -08004623}
4624
Jesse Hallad250842017-03-10 18:35:38 -08004625@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08004626class VkDisplayPlanePropertiesKHR {
Jesse Halla6429252015-11-29 18:59:42 -08004627 VkDisplayKHR currentDisplay
4628 u32 currentStackIndex
4629}
4630
Jesse Hallad250842017-03-10 18:35:38 -08004631@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08004632class VkDisplayPlaneCapabilitiesKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004633 VkDisplayPlaneAlphaFlagsKHR supportedAlpha
4634 VkOffset2D minSrcPosition
4635 VkOffset2D maxSrcPosition
4636 VkExtent2D minSrcExtent
4637 VkExtent2D maxSrcExtent
4638 VkOffset2D minDstPosition
4639 VkOffset2D maxDstPosition
4640 VkExtent2D minDstExtent
4641 VkExtent2D maxDstExtent
4642}
4643
Jesse Hallad250842017-03-10 18:35:38 -08004644@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08004645class VkDisplaySurfaceCreateInfoKHR {
Jesse Hall1356b0d2015-11-23 17:24:58 -08004646 VkStructureType sType
4647 const void* pNext
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004648 VkDisplaySurfaceCreateFlagsKHR flags
Jesse Hall1356b0d2015-11-23 17:24:58 -08004649 VkDisplayModeKHR displayMode
4650 u32 planeIndex
4651 u32 planeStackIndex
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004652 VkSurfaceTransformFlagBitsKHR transform
Jesse Hall1356b0d2015-11-23 17:24:58 -08004653 f32 globalAlpha
Jesse Hallf4ab2b12015-11-30 16:04:55 -08004654 VkDisplayPlaneAlphaFlagBitsKHR alphaMode
4655 VkExtent2D imageExtent
Jesse Hall1356b0d2015-11-23 17:24:58 -08004656}
4657
Jesse Hallad250842017-03-10 18:35:38 -08004658@extension("VK_KHR_display_swapchain") // 4
Jesse Hall1356b0d2015-11-23 17:24:58 -08004659class VkDisplayPresentInfoKHR {
4660 VkStructureType sType
4661 const void* pNext
4662 VkRect2D srcRect
4663 VkRect2D dstRect
Jesse Halla6429252015-11-29 18:59:42 -08004664 VkBool32 persistent
Jesse Hall1356b0d2015-11-23 17:24:58 -08004665}
4666
Jesse Hallad250842017-03-10 18:35:38 -08004667@extension("VK_KHR_xlib_surface") // 5
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004668class VkXlibSurfaceCreateInfoKHR {
4669 VkStructureType sType
4670 const void* pNext
4671 VkXlibSurfaceCreateFlagsKHR flags
4672 platform.Display* dpy
4673 platform.Window window
4674}
4675
Jesse Hallad250842017-03-10 18:35:38 -08004676@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004677class VkXcbSurfaceCreateInfoKHR {
4678 VkStructureType sType
4679 const void* pNext
4680 VkXcbSurfaceCreateFlagsKHR flags
4681 platform.xcb_connection_t* connection
4682 platform.xcb_window_t window
4683}
4684
Jesse Hallad250842017-03-10 18:35:38 -08004685@extension("VK_KHR_wayland_surface") // 7
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004686class VkWaylandSurfaceCreateInfoKHR {
4687 VkStructureType sType
4688 const void* pNext
4689 VkWaylandSurfaceCreateFlagsKHR flags
4690 platform.wl_display* display
4691 platform.wl_surface* surface
4692}
4693
Jesse Hallad250842017-03-10 18:35:38 -08004694@extension("VK_KHR_mir_surface") // 8
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004695class VkMirSurfaceCreateInfoKHR {
4696 VkStructureType sType
4697 const void* pNext
4698 VkMirSurfaceCreateFlagsKHR flags
4699 platform.MirConnection* connection
4700 platform.MirSurface* mirSurface
4701}
4702
Jesse Hallad250842017-03-10 18:35:38 -08004703@extension("VK_KHR_android_surface") // 9
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004704class VkAndroidSurfaceCreateInfoKHR {
4705 VkStructureType sType
4706 const void* pNext
4707 VkAndroidSurfaceCreateFlagsKHR flags
4708 platform.ANativeWindow* window
4709}
4710
Jesse Hallad250842017-03-10 18:35:38 -08004711@extension("VK_KHR_win32_surface") // 10
Jesse Hallf9fa9a52016-01-08 16:08:51 -08004712class VkWin32SurfaceCreateInfoKHR {
4713 VkStructureType sType
4714 const void* pNext
4715 VkWin32SurfaceCreateFlagsKHR flags
4716 platform.HINSTANCE hinstance
4717 platform.HWND hwnd
4718}
4719
Jesse Hallad250842017-03-10 18:35:38 -08004720@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08004721@internal class Gralloc1Usage {
4722 u64 consumer
4723 u64 producer
4724}
4725
Jesse Hallad250842017-03-10 18:35:38 -08004726@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08004727class VkNativeBufferANDROID {
4728 VkStructureType sType
4729 const void* pNext
4730 platform.buffer_handle_t handle
Jesse Halld1abd742017-02-09 21:45:51 -08004731 s32 stride
4732 s32 format
4733 s32 usage
4734 Gralloc1Usage usage2
Chia-I Wub262ddc2016-03-22 07:38:20 +08004735}
4736
Jesse Hallad250842017-03-10 18:35:38 -08004737@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes8e4438b2016-12-07 16:26:49 +13004738class VkSwapchainImageCreateInfoANDROID {
4739 VkStructureType sType
4740 const void* pNext
Chris Forbes134d9582017-01-12 14:26:37 +13004741 VkSwapchainImageUsageFlagsANDROID flags
Chris Forbes48853712017-01-12 14:09:33 +13004742}
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07004743
Jesse Hallad250842017-03-10 18:35:38 -08004744@extension("VK_ANDROID_native_buffer") // 11
Chris Forbes1d4e5542017-02-15 19:38:50 +13004745class VkPhysicalDevicePresentationPropertiesANDROID {
4746 VkStructureType sType
4747 void* pNext
4748 VkBool32 sharedImage
4749}
4750
Jesse Hallad250842017-03-10 18:35:38 -08004751@extension("VK_EXT_debug_report") // 12
Jesse Hall715b86a2016-01-16 16:34:29 -08004752class VkDebugReportCallbackCreateInfoEXT {
4753 VkStructureType sType
4754 const void* pNext
4755 VkDebugReportFlagsEXT flags
4756 PFN_vkDebugReportCallbackEXT pfnCallback
4757 void* pUserData
4758}
4759
Jesse Hallad250842017-03-10 18:35:38 -08004760@extension("VK_AMD_rasterization_order") // 19
Jesse Hall26763382016-05-20 07:13:52 -07004761class VkPipelineRasterizationStateRasterizationOrderAMD {
4762 VkStructureType sType
4763 const void* pNext
4764 VkRasterizationOrderAMD rasterizationOrder
4765}
4766
Jesse Hallad250842017-03-10 18:35:38 -08004767@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07004768class VkDebugMarkerObjectNameInfoEXT {
4769 VkStructureType sType
4770 const void* pNext
4771 VkDebugReportObjectTypeEXT objectType
4772 u64 object
4773 const char* pObjectName
4774}
4775
Jesse Hallad250842017-03-10 18:35:38 -08004776@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07004777class VkDebugMarkerObjectTagInfoEXT {
4778 VkStructureType sType
4779 const void* pNext
4780 VkDebugReportObjectTypeEXT objectType
4781 u64 object
4782 u64 tagName
4783 platform.size_t tagSize
4784 const void* pTag
4785}
4786
Jesse Hallad250842017-03-10 18:35:38 -08004787@extension("VK_EXT_debug_marker") // 23
Jesse Hall26763382016-05-20 07:13:52 -07004788class VkDebugMarkerMarkerInfoEXT {
4789 VkStructureType sType
4790 const void* pNext
4791 const char* pMarkerName
4792 f32[4] color
4793}
4794
Jesse Hallad250842017-03-10 18:35:38 -08004795@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07004796class VkDedicatedAllocationImageCreateInfoNV {
4797 VkStructureType sType
4798 const void* pNext
4799 VkBool32 dedicatedAllocation
4800}
4801
Jesse Hallad250842017-03-10 18:35:38 -08004802@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07004803class VkDedicatedAllocationBufferCreateInfoNV {
4804 VkStructureType sType
4805 const void* pNext
4806 VkBool32 dedicatedAllocation
4807}
4808
Jesse Hallad250842017-03-10 18:35:38 -08004809@extension("VK_NV_dedicated_allocation") // 27
Jesse Hall56d386a2016-07-26 15:20:40 -07004810class VkDedicatedAllocationMemoryAllocateInfoNV {
4811 VkStructureType sType
4812 const void* pNext
4813 VkImage image
4814 VkBuffer buffer
4815}
4816
Jesse Hall7ba0ac72017-07-07 17:13:23 -07004817@extension("VK_AMD_texture_gather_bias_lod") // 42
4818class VkTextureLODGatherFormatPropertiesAMD {
4819 VkStructureType sType
4820 void* pNext
4821 VkBool32 supportsTextureGatherLODBiasAMD
4822}
4823
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004824@extension("VK_KHR_multiview") // 54
4825class VkRenderPassMultiviewCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004826 VkStructureType sType
4827 const void* pNext
4828 u32 subpassCount
4829 const u32* pViewMasks
4830 u32 dependencyCount
4831 const s32* pViewOffsets
4832 u32 correlationMaskCount
4833 const u32* pCorrelationMasks
4834}
4835
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004836@extension("VK_KHR_multiview") // 54
4837class VkPhysicalDeviceMultiviewFeaturesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004838 VkStructureType sType
4839 void* pNext
4840 VkBool32 multiview
4841 VkBool32 multiviewGeometryShader
4842 VkBool32 multiviewTessellationShader
4843}
4844
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004845@extension("VK_KHR_multiview") // 54
4846class VkPhysicalDeviceMultiviewPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004847 VkStructureType sType
4848 void* pNext
4849 u32 maxMultiviewViewCount
4850 u32 maxMultiviewInstanceIndex
4851}
4852
4853@extension("VK_NV_external_memory_capabilities") // 56
Jesse Halleb02c472017-02-24 15:13:45 -08004854class VkExternalImageFormatPropertiesNV {
4855 VkImageFormatProperties imageFormatProperties
4856 VkExternalMemoryFeatureFlagsNV externalMemoryFeatures
4857 VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes
4858 VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes
4859}
4860
Jesse Hallad250842017-03-10 18:35:38 -08004861@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08004862class VkExternalMemoryImageCreateInfoNV {
4863 VkStructureType sType
4864 const void* pNext
4865 VkExternalMemoryHandleTypeFlagsNV handleTypes
4866}
4867
Jesse Hallad250842017-03-10 18:35:38 -08004868@extension("VK_NV_external_memory") // 57
Jesse Halleb02c472017-02-24 15:13:45 -08004869class VkExportMemoryAllocateInfoNV {
4870 VkStructureType sType
4871 const void* pNext
4872 VkExternalMemoryHandleTypeFlagsNV handleTypes
4873}
4874
Jesse Hallad250842017-03-10 18:35:38 -08004875@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08004876class VkImportMemoryWin32HandleInfoNV {
4877 VkStructureType sType
4878 const void* pNext
4879 VkExternalMemoryHandleTypeFlagsNV handleType
4880 platform.HANDLE handle
4881}
4882
Jesse Hallad250842017-03-10 18:35:38 -08004883@extension("VK_NV_external_memory_win32") // 58
Jesse Halleb02c472017-02-24 15:13:45 -08004884class VkExportMemoryWin32HandleInfoNV {
4885 VkStructureType sType
4886 const void* pNext
4887 const platform.SECURITY_ATTRIBUTES* pAttributes
4888 platform.DWORD dwAccess
4889}
4890
Jesse Hallad250842017-03-10 18:35:38 -08004891@extension("VK_NV_win32_keyed_mutex") // 59
Jesse Halleb02c472017-02-24 15:13:45 -08004892class VkWin32KeyedMutexAcquireReleaseInfoNV {
4893 VkStructureType sType
4894 const void* pNext
4895 u32 acquireCount
4896 const VkDeviceMemory* pAcquireSyncs
4897 const u64* pAcquireKeys
4898 const u32* pAcquireTimeoutMilliseconds
4899 u32 releaseCount
4900 const VkDeviceMemory* pReleaseSyncs
4901 const u64* pReleaseKeys
4902}
4903
Jesse Hallad250842017-03-10 18:35:38 -08004904@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004905class VkPhysicalDeviceFeatures2KHR {
4906 VkStructureType sType
4907 void* pNext
4908 VkPhysicalDeviceFeatures features
4909}
4910
Jesse Hallad250842017-03-10 18:35:38 -08004911@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004912class VkPhysicalDeviceProperties2KHR {
4913 VkStructureType sType
4914 void* pNext
4915 VkPhysicalDeviceProperties properties
4916}
4917
Jesse Hallad250842017-03-10 18:35:38 -08004918@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004919class VkFormatProperties2KHR {
4920 VkStructureType sType
4921 void* pNext
4922 VkFormatProperties formatProperties
4923}
4924
Jesse Hallad250842017-03-10 18:35:38 -08004925@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004926class VkImageFormatProperties2KHR {
4927 VkStructureType sType
4928 void* pNext
4929 VkImageFormatProperties imageFormatProperties
4930}
4931
Jesse Hallad250842017-03-10 18:35:38 -08004932@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004933class VkPhysicalDeviceImageFormatInfo2KHR {
4934 VkStructureType sType
4935 const void* pNext
4936 VkFormat format
4937 VkImageType type
4938 VkImageTiling tiling
4939 VkImageUsageFlags usage
4940 VkImageCreateFlags flags
4941}
4942
Jesse Hallad250842017-03-10 18:35:38 -08004943@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004944class VkQueueFamilyProperties2KHR {
4945 VkStructureType sType
4946 void* pNext
4947 VkQueueFamilyProperties queueFamilyProperties
4948}
4949
Jesse Hallad250842017-03-10 18:35:38 -08004950@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004951class VkPhysicalDeviceMemoryProperties2KHR {
4952 VkStructureType sType
4953 void* pNext
4954 VkPhysicalDeviceMemoryProperties memoryProperties
4955}
4956
Jesse Hallad250842017-03-10 18:35:38 -08004957@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004958class VkSparseImageFormatProperties2KHR {
4959 VkStructureType sType
4960 void* pNext
4961 VkSparseImageFormatProperties properties
4962}
4963
Jesse Hallad250842017-03-10 18:35:38 -08004964@extension("VK_KHR_get_physical_device_properties2") // 60
Chris Forbes1194ede2016-12-30 16:29:25 +13004965class VkPhysicalDeviceSparseImageFormatInfo2KHR {
4966 VkStructureType sType
4967 const void* pNext
4968 VkFormat format
4969 VkImageType type
4970 VkSampleCountFlagBits samples
4971 VkImageUsageFlags usage
4972 VkImageTiling tiling
4973}
4974
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004975@extension("VK_KHR_device_group") // 61
4976class VkMemoryAllocateFlagsInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004977 VkStructureType sType
4978 const void* pNext
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004979 VkMemoryAllocateFlagsKHR flags
Jesse Hallad250842017-03-10 18:35:38 -08004980 u32 deviceMask
4981}
4982
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004983@extension("VK_KHR_device_group") // 61
4984class VkBindBufferMemoryDeviceGroupInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004985 VkStructureType sType
4986 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004987 u32 deviceIndexCount
4988 const u32* pDeviceIndices
4989}
4990
Daniel Kochf25f5bb2017-10-05 00:26:58 -04004991@extension("VK_KHR_device_group") // 61
4992class VkBindImageMemoryDeviceGroupInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08004993 VkStructureType sType
4994 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08004995 u32 deviceIndexCount
4996 const u32* pDeviceIndices
4997 u32 SFRRectCount
4998 const VkRect2D* pSFRRects
4999}
5000
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005001@extension("VK_KHR_device_group") // 61
5002class VkDeviceGroupRenderPassBeginInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005003 VkStructureType sType
5004 const void* pNext
5005 u32 deviceMask
5006 u32 deviceRenderAreaCount
5007 const VkRect2D* pDeviceRenderAreas
5008}
5009
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005010@extension("VK_KHR_device_group") // 61
5011class VkDeviceGroupCommandBufferBeginInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005012 VkStructureType sType
5013 const void* pNext
5014 u32 deviceMask
5015}
5016
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005017@extension("VK_KHR_device_group") // 61
5018class VkDeviceGroupSubmitInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005019 VkStructureType sType
5020 const void* pNext
5021 u32 waitSemaphoreCount
5022 const u32* pWaitSemaphoreDeviceIndices
5023 u32 commandBufferCount
5024 const u32* pCommandBufferDeviceMasks
5025 u32 signalSemaphoreCount
5026 const u32* pSignalSemaphoreDeviceIndices
5027}
5028
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005029@extension("VK_KHR_device_group") // 61
5030class VkDeviceGroupBindSparseInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005031 VkStructureType sType
5032 const void* pNext
5033 u32 resourceDeviceIndex
5034 u32 memoryDeviceIndex
5035}
5036
Jesse Hallad250842017-03-10 18:35:38 -08005037@extension("VK_EXT_validation_flags") // 62
Chris Forbes289cb792016-12-30 15:03:55 +13005038class VkValidationFlagsEXT {
5039 VkStructureType sType
5040 const void* pNext
5041 u32 disabledValidationCheckCount
5042 VkValidationCheckEXT* pDisabledValidationChecks
5043}
5044
Jesse Hallad250842017-03-10 18:35:38 -08005045@extension("VK_NN_vi_surface") // 63
Jesse Hall77ad05b2017-03-10 22:02:20 -08005046class VkViSurfaceCreateInfoNN {
5047 VkStructureType sType
5048 const void* pNext
5049 VkViSurfaceCreateFlagsNN flags
5050 void* window
5051}
5052
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005053@extension("VK_KHR_device_group_creation") // 71
5054class VkPhysicalDeviceGroupPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005055 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07005056 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08005057 u32 physicalDeviceCount
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005058 VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE] physicalDevices
Jesse Hallad250842017-03-10 18:35:38 -08005059 VkBool32 subsetAllocation
5060}
5061
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005062@extension("VK_KHR_device_group_creation") // 71
5063class VkDeviceGroupDeviceCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005064 VkStructureType sType
5065 const void* pNext
5066 u32 physicalDeviceCount
5067 const VkPhysicalDevice* pPhysicalDevices
5068}
5069
Jesse Hall9492f992017-08-28 12:10:06 -07005070@extension("VK_KHR_external_memory_capabilities") // 72
5071class VkExternalMemoryPropertiesKHR {
5072 VkExternalMemoryFeatureFlagsKHR externalMemoryFeatures
5073 VkExternalMemoryHandleTypeFlagsKHR exportFromImportedHandleTypes
5074 VkExternalMemoryHandleTypeFlagsKHR compatibleHandleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005075}
5076
Jesse Hall9492f992017-08-28 12:10:06 -07005077@extension("VK_KHR_external_memory_capabilities") // 72
5078class VkPhysicalDeviceExternalImageFormatInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005079 VkStructureType sType
5080 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005081 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005082}
5083
Jesse Hall9492f992017-08-28 12:10:06 -07005084@extension("VK_KHR_external_memory_capabilities") // 72
5085class VkExternalImageFormatPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005086 VkStructureType sType
5087 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005088 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08005089}
5090
Jesse Hall9492f992017-08-28 12:10:06 -07005091@extension("VK_KHR_external_memory_capabilities") // 72
5092class VkPhysicalDeviceExternalBufferInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005093 VkStructureType sType
5094 const void* pNext
5095 VkBufferCreateFlags flags
5096 VkBufferUsageFlags usage
Jesse Hall9492f992017-08-28 12:10:06 -07005097 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005098}
5099
Jesse Hall9492f992017-08-28 12:10:06 -07005100@extension("VK_KHR_external_memory_capabilities") // 72
5101class VkExternalBufferPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005102 VkStructureType sType
5103 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005104 VkExternalMemoryPropertiesKHR externalMemoryProperties
Jesse Hallad250842017-03-10 18:35:38 -08005105}
5106
Jesse Hall9492f992017-08-28 12:10:06 -07005107@extension("VK_KHR_external_memory_capabilities") // 72
5108class VkPhysicalDeviceIDPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005109 VkStructureType sType
5110 void* pNext
5111 u8[VK_UUID_SIZE] deviceUUID
5112 u8[VK_UUID_SIZE] driverUUID
Daniel Kochf25f5bb2017-10-05 00:26:58 -04005113 u8[VK_LUID_SIZE] deviceLUID
Jesse Hall9492f992017-08-28 12:10:06 -07005114 u32 deviceNodeMask
Jesse Hallad250842017-03-10 18:35:38 -08005115 VkBool32 deviceLUIDValid
5116}
5117
Jesse Hall9492f992017-08-28 12:10:06 -07005118@extension("VK_KHR_external_memory") // 73
5119class VkExternalMemoryImageCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005120 VkStructureType sType
5121 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005122 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005123}
5124
Jesse Hall9492f992017-08-28 12:10:06 -07005125@extension("VK_KHR_external_memory") // 73
5126class VkExternalMemoryBufferCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005127 VkStructureType sType
5128 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005129 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005130}
5131
Jesse Hall9492f992017-08-28 12:10:06 -07005132@extension("VK_KHR_external_memory") // 73
5133class VkExportMemoryAllocateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005134 VkStructureType sType
5135 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005136 VkExternalMemoryHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005137}
5138
Jesse Hall9492f992017-08-28 12:10:06 -07005139@extension("VK_KHR_external_memory_win32") // 74
5140class VkImportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005141 VkStructureType sType
5142 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005143 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005144 platform.HANDLE handle
Jesse Hall9492f992017-08-28 12:10:06 -07005145 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08005146}
5147
Jesse Hall9492f992017-08-28 12:10:06 -07005148@extension("VK_KHR_external_memory_win32") // 74
5149class VkExportMemoryWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005150 VkStructureType sType
5151 const void* pNext
5152 const platform.SECURITY_ATTRIBUTES* pAttributes
5153 platform.DWORD dwAccess
5154 platform.LPCWSTR name
5155}
5156
Jesse Hall9492f992017-08-28 12:10:06 -07005157@extension("VK_KHR_external_memory_win32") // 74
5158class VkMemoryWin32HandlePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005159 VkStructureType sType
5160 void* pNext
5161 u32 memoryTypeBits
5162}
5163
Jesse Hall9492f992017-08-28 12:10:06 -07005164@extension("VK_KHR_external_memory_win32") // 74
5165class VkMemoryGetWin32HandleInfoKHR {
5166 VkStructureType sType
5167 void* pNext
5168 VkDeviceMemory memory
5169 VkExternalMemoryHandleTypeFlagBitsKHR handleType
5170}
5171
5172@extension("VK_KHR_external_memory_fd") // 75
5173class VkImportMemoryFdInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005174 VkStructureType sType
5175 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005176 VkExternalMemoryHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005177 int fd
5178}
5179
Jesse Hall9492f992017-08-28 12:10:06 -07005180@extension("VK_KHR_external_memory_fd") // 75
5181class VkMemoryFdPropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005182 VkStructureType sType
5183 void* pNext
5184 u32 memoryTypeBits
5185}
5186
Jesse Hall9492f992017-08-28 12:10:06 -07005187@extension("VK_KHR_external_memory_fd") // 75
5188class VkMemoryGetFdInfoKHR {
5189 VkStructureType sType
5190 void* pNext
5191 VkDeviceMemory memory
5192 VkExternalMemoryHandleTypeFlagBitsKHR handleType
5193}
5194
5195@extension("VK_KHR_win32_keyed_mutex") // 76
5196class VkWin32KeyedMutexAcquireReleaseInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005197 VkStructureType sType
5198 const void* pNext
5199 u32 acquireCount
5200 const VkDeviceMemory* pAcquireSyncs
5201 const u64* pAcquireKeys
5202 const u32* pAcquireTimeouts
5203 u32 releaseCount
5204 const VkDeviceMemory* pReleaseSyncs
5205 const u64* pReleaseKeys
5206}
5207
Jesse Hall9492f992017-08-28 12:10:06 -07005208@extension("VK_KHR_external_semaphore_capabilities") // 77
5209class VkPhysicalDeviceExternalSemaphoreInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005210 VkStructureType sType
5211 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005212 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005213}
5214
Jesse Hall9492f992017-08-28 12:10:06 -07005215@extension("VK_KHR_external_semaphore_capabilities") // 77
5216class VkExternalSemaphorePropertiesKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005217 VkStructureType sType
5218 void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005219 VkExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes
5220 VkExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes
5221 VkExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures
Jesse Hallad250842017-03-10 18:35:38 -08005222}
5223
Jesse Hall9492f992017-08-28 12:10:06 -07005224@extension("VK_KHR_external_semaphore") // 78
5225class VkExportSemaphoreCreateInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005226 VkStructureType sType
5227 const void* pNext
Jesse Hall9492f992017-08-28 12:10:06 -07005228 VkExternalSemaphoreHandleTypeFlagsKHR handleTypes
Jesse Hallad250842017-03-10 18:35:38 -08005229}
5230
Jesse Hall9492f992017-08-28 12:10:06 -07005231@extension("VK_KHR_external_semaphore_win32") // 79
5232class VkImportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005233 VkStructureType sType
5234 const void* pNext
5235 VkSemaphore semaphore
Jesse Hall9492f992017-08-28 12:10:06 -07005236 VkSemaphoreImportFlagsKHR flags
5237 VkExternalSemaphoreHandleTypeFlagsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005238 platform.HANDLE handle
Jesse Hall9492f992017-08-28 12:10:06 -07005239 platform.LPCWSTR name
Jesse Hallad250842017-03-10 18:35:38 -08005240}
5241
Jesse Hall9492f992017-08-28 12:10:06 -07005242@extension("VK_KHR_external_semaphore_win32") // 79
5243class VkExportSemaphoreWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005244 VkStructureType sType
5245 const void* pNext
5246 const platform.SECURITY_ATTRIBUTES* pAttributes
5247 platform.DWORD dwAccess
5248 platform.LPCWSTR name
5249}
5250
Jesse Hall9492f992017-08-28 12:10:06 -07005251@extension("VK_KHR_external_semaphore_win32") // 79
5252class VkD3D12FenceSubmitInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005253 VkStructureType sType
5254 const void* pNext
5255 u32 waitSemaphoreValuesCount
5256 const u64* pWaitSemaphoreValues
5257 u32 signalSemaphoreValuesCount
5258 const u64* pSignalSemaphoreValues
5259}
5260
Jesse Hall9492f992017-08-28 12:10:06 -07005261@extension("VK_KHR_external_semaphore_win32") // 79
5262class VkSemaphoreGetWin32HandleInfoKHR {
Jesse Hallad250842017-03-10 18:35:38 -08005263 VkStructureType sType
5264 const void* pNext
5265 VkSemaphore semaphore
Jesse Hall9492f992017-08-28 12:10:06 -07005266 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
5267}
5268
5269@extension("VK_KHR_external_semaphore_fd") // 80
5270class VkImportSemaphoreFdInfoKHR {
5271 VkStructureType sType
5272 const void* pNext
5273 VkSemaphore semaphore
5274 VkSemaphoreImportFlagsKHR flags
5275 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
Jesse Hallad250842017-03-10 18:35:38 -08005276 s32 fd
5277}
5278
Jesse Hall9492f992017-08-28 12:10:06 -07005279@extension("VK_KHR_external_semaphore_fd") // 80
5280class VkSemaphoreGetFdInfoKHR {
5281 VkStructureType sType
5282 const void* pNext
5283 VkSemaphore semaphore
5284 VkExternalSemaphoreHandleTypeFlagBitsKHR handleType
5285}
5286
Jesse Hallad250842017-03-10 18:35:38 -08005287@extension("VK_KHR_push_descriptor") // 81
5288class VkPhysicalDevicePushDescriptorPropertiesKHR {
5289 VkStructureType sType
5290 void* pNext
5291 u32 maxPushDescriptors
5292}
5293
Jesse Hall9492f992017-08-28 12:10:06 -07005294@extension("VK_KHR_16bit_storage") // 84
5295class VkPhysicalDevice16BitStorageFeaturesKHR {
5296 VkStructureType sType
5297 void* pNext
5298 VkBool32 storageBuffer16BitAccess
5299 VkBool32 uniformAndStorageBuffer16BitAccess
5300 VkBool32 storagePushConstant16
5301 VkBool32 storageInputOutput16
5302}
5303
Jesse Hallad250842017-03-10 18:35:38 -08005304@extension("VK_KHR_incremental_present") // 85
5305class VkRectLayerKHR {
5306 VkOffset2D offset
5307 VkExtent2D extent
5308 u32 layer
5309}
5310
5311@extension("VK_KHR_incremental_present") // 85
5312class VkPresentRegionKHR {
5313 u32 rectangleCount
5314 const VkRectLayerKHR* pRectangles
5315}
5316
5317@extension("VK_KHR_incremental_present") // 85
5318class VkPresentRegionsKHR {
5319 VkStructureType sType
5320 const void* pNext
5321 u32 swapchainCount
5322 const VkPresentRegionKHR* pRegions
5323}
5324
5325@extension("VK_KHR_descriptor_update_template") // 86
5326class VkDescriptorUpdateTemplateEntryKHR {
5327 u32 dstBinding
5328 u32 dstArrayElement
5329 u32 descriptorCount
5330 VkDescriptorType descriptorType
5331 platform.size_t offset
5332 platform.size_t stride
5333}
5334
5335@extension("VK_KHR_descriptor_update_template") // 86
5336class VkDescriptorUpdateTemplateCreateInfoKHR {
5337 VkStructureType sType
5338 void* pNext
5339 VkDescriptorUpdateTemplateCreateFlagsKHR flags
5340 u32 descriptorUpdateEntryCount
5341 const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries
5342 VkDescriptorUpdateTemplateTypeKHR templateType
5343 VkDescriptorSetLayout descriptorSetLayout
5344 VkPipelineBindPoint pipelineBindPoint
5345 VkPipelineLayout pipelineLayout
5346 u32 set
5347}
5348
5349@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005350class VkDeviceGeneratedCommandsFeaturesNVX {
5351 VkStructureType sType
5352 const void* pNext
5353 VkBool32 computeBindingPointSupport
5354}
5355
Jesse Hallad250842017-03-10 18:35:38 -08005356@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005357class VkDeviceGeneratedCommandsLimitsNVX {
5358 VkStructureType sType
5359 const void* pNext
5360 u32 maxIndirectCommandsLayoutTokenCount
5361 u32 maxObjectEntryCounts
5362 u32 minSequenceCountBufferOffsetAlignment
5363 u32 minSequenceIndexBufferOffsetAlignment
5364 u32 minCommandsTokenBufferOffsetAlignment
5365}
5366
Jesse Hallad250842017-03-10 18:35:38 -08005367@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005368class VkIndirectCommandsTokenNVX {
5369 VkIndirectCommandsTokenTypeNVX tokenType
5370 VkBuffer buffer
5371 VkDeviceSize offset
5372}
5373
Jesse Hallad250842017-03-10 18:35:38 -08005374@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005375class VkIndirectCommandsLayoutTokenNVX {
5376 VkIndirectCommandsTokenTypeNVX tokenType
5377 u32 bindingUnit
5378 u32 dynamicCount
5379 u32 divisor
5380}
5381
Jesse Hallad250842017-03-10 18:35:38 -08005382@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005383class VkIndirectCommandsLayoutCreateInfoNVX {
5384 VkStructureType sType
5385 const void* pNext
5386 VkPipelineBindPoint pipelineBindPoint
5387 VkIndirectCommandsLayoutUsageFlagsNVX flags
5388 u32 tokenCount
5389 const VkIndirectCommandsLayoutTokenNVX* pTokens
5390}
5391
Jesse Hallad250842017-03-10 18:35:38 -08005392@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005393class VkCmdProcessCommandsInfoNVX {
5394 VkStructureType sType
5395 const void* pNext
5396 VkObjectTableNVX objectTable
5397 VkIndirectCommandsLayoutNVX indirectCommandsLayout
5398 u32 indirectCommandsTokenCount
5399 const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens
5400 u32 maxSequencesCount
5401 VkCommandBuffer targetCommandBuffer
5402 VkBuffer sequencesCountBuffer
5403 VkDeviceSize sequencesCountOffset
5404 VkBuffer sequencesIndexBuffer
5405 VkDeviceSize sequencesIndexOffset
5406}
5407
Jesse Hallad250842017-03-10 18:35:38 -08005408@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005409class VkCmdReserveSpaceForCommandsInfoNVX {
5410 VkStructureType sType
5411 const void* pNext
5412 VkObjectTableNVX objectTable
5413 VkIndirectCommandsLayoutNVX indirectCommandsLayout
5414 u32 maxSequencesCount
5415}
5416
Jesse Hallad250842017-03-10 18:35:38 -08005417@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005418class VkObjectTableCreateInfoNVX {
5419 VkStructureType sType
5420 const void* pNext
5421 u32 objectCount
5422 const VkObjectEntryTypeNVX* pObjectEntryTypes
5423 const u32* pObjectEntryCounts
5424 const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags
5425 u32 maxUniformBuffersPerDescriptor
5426 u32 maxStorageBuffersPerDescriptor
5427 u32 maxStorageImagesPerDescriptor
5428 u32 maxSampledImagesPerDescriptor
5429 u32 maxPipelineLayouts
5430}
5431
Jesse Hallad250842017-03-10 18:35:38 -08005432@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005433class VkObjectTableEntryNVX {
5434 VkObjectEntryTypeNVX type
5435 VkObjectEntryUsageFlagsNVX flags
5436}
5437
Jesse Hallad250842017-03-10 18:35:38 -08005438@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005439class VkObjectTablePipelineEntryNVX {
5440 VkObjectEntryTypeNVX type
5441 VkObjectEntryUsageFlagsNVX flags
5442 VkPipeline pipeline
5443}
5444
Jesse Hallad250842017-03-10 18:35:38 -08005445@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005446class VkObjectTableDescriptorSetEntryNVX {
5447 VkObjectEntryTypeNVX type
5448 VkObjectEntryUsageFlagsNVX flags
5449 VkPipelineLayout pipelineLayout
5450 VkDescriptorSet descriptorSet
5451}
5452
Jesse Hallad250842017-03-10 18:35:38 -08005453@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005454class VkObjectTableVertexBufferEntryNVX {
5455 VkObjectEntryTypeNVX type
5456 VkObjectEntryUsageFlagsNVX flags
5457 VkBuffer buffer
5458}
5459
Jesse Hallad250842017-03-10 18:35:38 -08005460@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005461class VkObjectTableIndexBufferEntryNVX {
5462 VkObjectEntryTypeNVX type
5463 VkObjectEntryUsageFlagsNVX flags
5464 VkBuffer buffer
Jesse Hall77ad05b2017-03-10 22:02:20 -08005465 VkIndexType indexType
Chris Forbes289cb792016-12-30 15:03:55 +13005466}
5467
Jesse Hallad250842017-03-10 18:35:38 -08005468@extension("VK_NVX_device_generated_commands") // 87
Chris Forbes289cb792016-12-30 15:03:55 +13005469class VkObjectTablePushConstantEntryNVX {
5470 VkObjectEntryTypeNVX type
5471 VkObjectEntryUsageFlagsNVX flags
5472 VkPipelineLayout pipelineLayout
5473 VkShaderStageFlags stageFlags
5474}
5475
Jesse Hallad250842017-03-10 18:35:38 -08005476@extension("VK_NV_clip_space_w_scaling") // 88
5477class VkViewportWScalingNV {
5478 f32 xcoeff
5479 f32 ycoeff
Jesse Hall889cd9a2017-02-25 22:12:23 -08005480}
5481
Jesse Hallad250842017-03-10 18:35:38 -08005482@extension("VK_NV_clip_space_w_scaling") // 88
5483class VkPipelineViewportWScalingStateCreateInfoNV {
Jesse Hall889cd9a2017-02-25 22:12:23 -08005484 VkStructureType sType
5485 const void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08005486 VkBool32 viewportWScalingEnable
5487 u32 viewportCount
5488 const VkViewportWScalingNV* pViewportWScalings
Jesse Hall889cd9a2017-02-25 22:12:23 -08005489}
5490
Jesse Hallad250842017-03-10 18:35:38 -08005491@extension("VK_EXT_display_surface_counter") // 91
Jesse Hall77ad05b2017-03-10 22:02:20 -08005492class VkSurfaceCapabilities2EXT {
5493 VkStructureType sType
5494 void* pNext
5495 u32 minImageCount
5496 u32 maxImageCount
5497 VkExtent2D currentExtent
5498 VkExtent2D minImageExtent
5499 VkExtent2D maxImageExtent
5500 u32 maxImageArrayLayers
5501 VkSurfaceTransformFlagsKHR supportedTransforms
5502 VkSurfaceTransformFlagBitsKHR currentTransform
5503 VkCompositeAlphaFlagsKHR supportedCompositeAlpha
5504 VkImageUsageFlags supportedUsageFlags
5505 VkSurfaceCounterFlagsEXT supportedSurfaceCounters
5506}
5507
Jesse Hallad250842017-03-10 18:35:38 -08005508@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005509class VkDisplayPowerInfoEXT {
5510 VkStructureType sType
5511 const void* pNext
5512 VkDisplayPowerStateEXT powerState
5513}
5514
Jesse Hallad250842017-03-10 18:35:38 -08005515@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005516class VkDeviceEventInfoEXT {
5517 VkStructureType sType
5518 const void* pNext
5519 VkDeviceEventTypeEXT deviceEvent
5520}
5521
Jesse Hallad250842017-03-10 18:35:38 -08005522@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005523class VkDisplayEventInfoEXT {
5524 VkStructureType sType
5525 const void* pNext
5526 VkDisplayEventTypeEXT displayEvent
5527}
5528
Jesse Hallad250842017-03-10 18:35:38 -08005529@extension("VK_EXT_display_control") // 92
Jesse Hall77ad05b2017-03-10 22:02:20 -08005530class VkSwapchainCounterCreateInfoEXT {
5531 VkStructureType sType
5532 const void* pNext
5533 VkSurfaceCounterFlagsEXT surfaceCounters
5534}
5535
Jesse Hallad250842017-03-10 18:35:38 -08005536@extension("VK_GOOGLE_display_timing") // 93
5537class VkRefreshCycleDurationGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005538 u64 refreshDuration
Jesse Hallad250842017-03-10 18:35:38 -08005539}
5540
5541@extension("VK_GOOGLE_display_timing") // 93
5542class VkPastPresentationTimingGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005543 u32 presentID
5544 u64 desiredPresentTime
5545 u64 actualPresentTime
5546 u64 earliestPresentTime
5547 u64 presentMargin
Jesse Hallad250842017-03-10 18:35:38 -08005548}
5549
5550@extension("VK_GOOGLE_display_timing") // 93
5551class VkPresentTimeGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005552 u32 presentID
5553 u64 desiredPresentTime
Jesse Hallad250842017-03-10 18:35:38 -08005554}
5555
5556@extension("VK_GOOGLE_display_timing") // 93
5557class VkPresentTimesInfoGOOGLE {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005558 VkStructureType sType
5559 const void* pNext
5560 u32 swapchainCount
5561 const VkPresentTimeGOOGLE* pTimes
Jesse Hallad250842017-03-10 18:35:38 -08005562}
5563
5564@extension("VK_NVX_multiview_per_view_attributes") // 98
5565class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
5566 VkStructureType sType
5567 void* pNext
5568 VkBool32 perViewPositionAllComponents
5569}
5570
5571@extension("VK_NV_viewport_swizzle") // 99
5572class VkViewportSwizzleNV {
5573 VkViewportCoordinateSwizzleNV x
5574 VkViewportCoordinateSwizzleNV y
5575 VkViewportCoordinateSwizzleNV z
5576 VkViewportCoordinateSwizzleNV w
5577}
5578
5579@extension("VK_NV_viewport_swizzle") // 99
5580class VkPipelineViewportSwizzleStateCreateInfoNV {
5581 VkStructureType sType
5582 const void* pNext
5583 VkPipelineViewportSwizzleStateCreateFlagsNV flags
5584 u32 viewportCount
5585 const VkViewportSwizzleNV* pViewportSwizzles
5586}
5587
5588@extension("VK_EXT_discard_rectangles") // 100
5589class VkPhysicalDeviceDiscardRectanglePropertiesEXT {
5590 VkStructureType sType
Jesse Hallf5ad48b2017-03-20 13:09:19 -07005591 void* pNext
Jesse Hallad250842017-03-10 18:35:38 -08005592 u32 maxDiscardRectangles
5593}
5594
5595@extension("VK_EXT_discard_rectangles") // 100
5596class VkPipelineDiscardRectangleStateCreateInfoEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005597 VkStructureType sType
5598 const void* pNext
5599 VkPipelineDiscardRectangleStateCreateFlagsEXT flags
5600 VkDiscardRectangleModeEXT discardRectangleMode
5601 u32 discardRectangleCount
5602 const VkRect2D* pDiscardRectangles
Jesse Hallad250842017-03-10 18:35:38 -08005603}
5604
5605@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005606class VkXYColorEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005607 f32 x
5608 f32 y
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005609}
5610
Jesse Hallad250842017-03-10 18:35:38 -08005611@extension("VK_EXT_hdr_metadata") // 106
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005612class VkHdrMetadataEXT {
Jesse Hallfdc8ab32017-03-10 21:01:57 -08005613 VkStructureType sType
5614 const void* pNext
5615 VkXYColorEXT displayPrimaryRed
5616 VkXYColorEXT displayPrimaryGreen
5617 VkXYColorEXT displayPrimaryBlue
5618 VkXYColorEXT whitePoint
5619 f32 maxLuminance
5620 f32 minLuminance
5621 f32 maxContentLightLevel
5622 f32 maxFrameAverageLightLevel
Courtney Goeltzenleuchterd634c482017-01-05 15:55:31 -07005623}
5624
Jesse Hall05556b12017-05-18 17:40:25 -07005625@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbese2d3ee12017-03-16 16:10:15 +13005626class VkSharedPresentSurfaceCapabilitiesKHR {
5627 VkStructureType sType
5628 const void* pNext
5629 VkImageUsageFlags sharedPresentSupportedUsageFlags
5630}
5631
Jesse Hall9492f992017-08-28 12:10:06 -07005632@extension("VK_KHR_external_fence_capabilities") // 113
5633class VkPhysicalDeviceExternalFenceInfoKHR {
5634 VkStructureType sType
5635 const void* pNext
5636 VkExternalFenceHandleTypeFlagBitsKHR handleType
5637}
5638
5639@extension("VK_KHR_external_fence_capabilities") // 113
5640class VkExternalFencePropertiesKHR {
5641 VkStructureType sType
5642 void* pNext
5643 VkExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes
5644 VkExternalFenceHandleTypeFlagsKHR compatibleHandleTypes
5645 VkExternalFenceFeatureFlagsKHR externalFenceFeatures
5646}
5647
5648@extension("VK_KHR_external_fence") // 114
5649class VkExportFenceCreateInfoKHR {
5650 VkStructureType sType
5651 const void* pNext
5652 VkExternalFenceHandleTypeFlagsKHR handleTypes
5653}
5654
5655@extension("VK_KHR_external_fence_win32") // 115
5656class VkImportFenceWin32HandleInfoKHR {
5657 VkStructureType sType
5658 const void* pNext
5659 VkFence fence
5660 VkFenceImportFlagsKHR flags
5661 VkExternalFenceHandleTypeFlagBitsKHR handleType
5662 platform.HANDLE handle
5663 platform.LPCWSTR name
5664}
5665
5666@extension("VK_KHR_external_fence_win32") // 115
5667class VkExportFenceWin32HandleInfoKHR {
5668 VkStructureType sType
5669 const void* pNext
5670 const platform.SECURITY_ATTRIBUTES* pAttributes
5671 platform.DWORD dwAccess
5672 platform.LPCWSTR name
5673}
5674
5675@extension("VK_KHR_external_fence_win32") // 115
5676class VkFenceGetWin32HandleInfoKHR {
5677 VkStructureType sType
5678 const void* pNext
5679 VkFence fence
5680 VkExternalFenceHandleTypeFlagBitsKHR handleType
5681}
5682
5683@extension("VK_KHR_external_fence_fd") // 116
5684class VkImportFenceFdInfoKHR {
5685 VkStructureType sType
5686 const void* pNext
5687 VkFence fence
5688 VkFenceImportFlagsKHR flags
5689 VkExternalFenceHandleTypeFlagBitsKHR handleType
5690 int fd
5691}
5692
5693@extension("VK_KHR_external_fence_fd") // 116
5694class VkFenceGetFdInfoKHR {
5695 VkStructureType sType
5696 const void* pNext
5697 VkFence fence
5698 VkExternalFenceHandleTypeFlagBitsKHR handleType
5699}
5700
Jesse Hall076f95d2017-09-20 11:34:47 -07005701@extension("VK_KHR_maintenance2") // 118
5702class VkPhysicalDevicePointClippingPropertiesKHR {
5703 VkStructureType sType
5704 void* pNext
5705 VkPointClippingBehaviorKHR pointClippingBehavior
5706}
5707
5708@extension("VK_KHR_maintenance2") // 118
5709class VkInputAttachmentAspectReferenceKHR {
5710 u32 subpass
5711 u32 inputAttachmentIndex
5712 VkImageAspectFlags aspectMask
5713}
5714
5715@extension("VK_KHR_maintenance2") // 118
5716class VkRenderPassInputAttachmentAspectCreateInfoKHR {
5717 VkStructureType sType
5718 const void* pNext
5719 u32 aspectReferenceCount
5720 const VkInputAttachmentAspectReferenceKHR* pAspectReferences
5721}
5722
5723@extension("VK_KHR_maintenance2") // 118
5724class VkImageViewUsageCreateInfoKHR {
5725 VkStructureType sType
5726 const void* pNext
5727 VkImageUsageFlags usage
5728}
5729
5730@extension("VK_KHR_maintenance2") // 118
5731class VkPipelineTessellationDomainOriginStateCreateInfoKHR {
5732 VkStructureType sType
5733 const void* pNext
5734 VkTessellationDomainOriginKHR domainOrigin
5735}
5736
Jesse Hall05556b12017-05-18 17:40:25 -07005737@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13005738class VkPhysicalDeviceSurfaceInfo2KHR {
5739 VkStructureType sType
5740 const void* pNext
5741 VkSurfaceKHR surface
5742}
5743
Jesse Hall05556b12017-05-18 17:40:25 -07005744@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13005745class VkSurfaceCapabilities2KHR {
5746 VkStructureType sType
5747 void* pNext
5748 VkSurfaceCapabilitiesKHR surfaceCapabilities
5749}
5750
Jesse Hall05556b12017-05-18 17:40:25 -07005751@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13005752class VkSurfaceFormat2KHR {
5753 VkStructureType sType
5754 void* pNext
5755 VkSurfaceFormatKHR surfaceFormat
5756}
5757
Jesse Hall9492f992017-08-28 12:10:06 -07005758@extension("VK_KHR_variable_pointers") // 121
5759class VkPhysicalDeviceVariablePointerFeaturesKHR {
5760 VkStructureType sType
5761 void* pNext
5762 VkBool32 variablePointersStorageBuffer
5763 VkBool32 variablePointers
5764}
5765
Jesse Hallad250842017-03-10 18:35:38 -08005766@extension("VK_MVK_ios_surface") // 123
5767class VkIOSSurfaceCreateInfoMVK {
5768 VkStructureType sType
5769 const void* pNext
5770 VkIOSSurfaceCreateFlagsMVK flags
5771 const void* pView
5772}
5773
5774@extension("VK_MVK_macos_surface") // 124
5775class VkMacOSSurfaceCreateInfoMVK {
5776 VkStructureType sType
5777 const void* pNext
5778 VkMacOSSurfaceCreateFlagsMVK flags
5779 const void* pView
5780}
5781
Jesse Hall9492f992017-08-28 12:10:06 -07005782@extension("VK_KHR_dedicated_allocation") // 128
5783class VkMemoryDedicatedRequirementsKHR {
5784 VkStructureType sType
5785 void* pNext
5786 VkBool32 prefersDedicatedAllocation
5787 VkBool32 requiresDedicatedAllocation
5788}
5789
5790@extension("VK_KHR_dedicated_allocation") // 128
5791class VkMemoryDedicatedAllocateInfoKHR {
5792 VkStructureType sType
5793 const void* pNext
5794 VkImage image
5795 VkBuffer buffer
5796}
5797
Jesse Hall7ba0ac72017-07-07 17:13:23 -07005798@extension("VK_EXT_sampler_filter_minmax") // 131
5799class VkSamplerReductionModeCreateInfoEXT {
5800 VkStructureType sType
5801 const void* pNext
5802 VkSamplerReductionModeEXT reductionMode
5803}
5804
5805@extension("VK_EXT_sampler_filter_minmax") // 131
5806class VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
5807 VkStructureType sType
5808 void* pNext
5809 VkBool32 filterMinmaxSingleComponentFormats
5810 VkBool32 filterMinmaxImageComponentMapping
5811}
5812
Jesse Hall77726222017-09-19 14:49:27 -05005813@extension("VK_EXT_sample_locations") // 144
5814class VkSampleLocationEXT {
5815 f32 x
5816 f32 y
5817}
5818
5819@extension("VK_EXT_sample_locations") // 144
5820class VkSampleLocationsInfoEXT {
5821 VkStructureType sType
5822 const void* pNext
5823 VkSampleCountFlagBits sampleLocationsPerPixel
5824 VkExtent2D sampleLocationGridSize
5825 u32 sampleLocationsCount
5826 const VkSampleLocationEXT* pSampleLocations
5827}
5828
5829@extension("VK_EXT_sample_locations") // 144
5830class VkAttachmentSampleLocationsEXT {
5831 u32 attachmentIndex
5832 VkSampleLocationsInfoEXT sampleLocationsInfo
5833}
5834
5835@extension("VK_EXT_sample_locations") // 144
5836class VkSubpassSampleLocationsEXT {
5837 u32 subpassIndex
5838 VkSampleLocationsInfoEXT sampleLocationsInfo
5839}
5840
5841@extension("VK_EXT_sample_locations") // 144
5842class VkRenderPassSampleLocationsBeginInfoEXT {
5843 VkStructureType sType
5844 const void* pNext
5845 u32 attachmentInitialSampleLocationsCount
5846 const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations
5847 u32 postSubpassSampleLocationsCount
5848 const VkSubpassSampleLocationsEXT* pSubpassSampleLocations
5849}
5850
5851@extension("VK_EXT_sample_locations") // 144
5852class VkPipelineSampleLocationsStateCreateInfoEXT {
5853 VkStructureType sType
5854 const void* pNext
5855 VkBool32 sampleLocationsEnable
5856 VkSampleLocationsInfoEXT sampleLocationsInfo
5857}
5858
5859@extension("VK_EXT_sample_locations") // 144
5860class VkPhysicalDeviceSampleLocationsPropertiesEXT {
5861 VkStructureType sType
5862 void* pNext
5863 VkSampleCountFlags sampleLocationSampleCounts
5864 VkExtent2D maxSampleLocationGridSize
5865 f32[2] sampleLocationCoordinateRange
5866 u32 sampleLocationSubPixelBits
5867 VkBool32 variableSampleLocations
5868}
5869
5870@extension("VK_EXT_sample_locations") // 144
5871class VkMultisamplePropertiesEXT {
5872 VkStructureType sType
5873 void* pNext
5874 VkExtent2D maxSampleLocationGridSize
5875}
5876
Jesse Hall9492f992017-08-28 12:10:06 -07005877@extension("VK_KHR_get_memory_requirements2") // 147
5878class VkBufferMemoryRequirementsInfo2KHR {
5879 VkStructureType sType
5880 const void* pNext
5881 VkBuffer buffer
5882}
5883
5884@extension("VK_KHR_get_memory_requirements2") // 147
5885class VkImageMemoryRequirementsInfo2KHR {
5886 VkStructureType sType
5887 const void* pNext
5888 VkImage image
5889}
5890
5891@extension("VK_KHR_get_memory_requirements2") // 147
5892class VkImageSparseMemoryRequirementsInfo2KHR {
5893 VkStructureType sType
5894 const void* pNext
5895 VkImage image
5896}
5897
5898@extension("VK_KHR_get_memory_requirements2") // 147
5899class VkMemoryRequirements2KHR {
5900 VkStructureType sType
5901 void* pNext
5902 VkMemoryRequirements memoryRequirements
5903}
5904
5905@extension("VK_KHR_get_memory_requirements2") // 147
5906class VkSparseImageMemoryRequirements2KHR {
5907 VkStructureType sType
5908 void* pNext
5909 VkSparseImageMemoryRequirements memoryRequirements
5910}
5911
Jesse Hall076f95d2017-09-20 11:34:47 -07005912@extension("VK_KHR_image_format_list") // 148
5913class VkImageFormatListCreateInfoKHR {
5914 VkStructureType sType
5915 const void* pNext
5916 u32 viewFormatCount
5917 const VkFormat* pViewFormats
5918}
5919
Jesse Hall7ba0ac72017-07-07 17:13:23 -07005920@extension("VK_EXT_blend_operation_advanced") // 149
5921class VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
5922 VkStructureType sType
5923 void* pNext
5924 VkBool32 advancedBlendCoherentOperations
5925}
5926
5927@extension("VK_EXT_blend_operation_advanced") // 149
5928class VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT {
5929 VkStructureType sType
5930 void* pNext
5931 u32 advancedBlendMaxColorAttachments
5932 VkBool32 advancedBlendIndependentBlend
5933 VkBool32 advancedBlendNonPremultipliedSrcColor
5934 VkBool32 advancedBlendNonPremultipliedDstColor
5935 VkBool32 advancedBlendCorrelatedOverlap
5936 VkBool32 advancedBlendAllOperations
5937}
5938
5939@extension("VK_EXT_blend_operation_advanced") // 149
5940class VkPipelineColorBlendAdvancedStateCreateInfoEXT {
5941 VkStructureType sType
5942 const void* pNext
5943 VkBool32 srcPremultiplied
5944 VkBool32 dstPremultiplied
5945 VkBlendOverlapEXT blendOverlap
5946}
5947
5948@extension("VK_NV_fragment_coverage_to_color") // 150
5949class VkPipelineCoverageToColorStateCreateInfoNV {
5950 VkStructureType sType
5951 const void* pNext
5952 VkPipelineCoverageToColorStateCreateFlagsNV flags
5953 VkBool32 coverageToColorEnable
5954 u32 coverageToColorLocation
5955}
5956
5957@extension("VK_NV_framebuffer_mixed_samples") // 153
5958class VkPipelineCoverageModulationStateCreateInfoNV {
5959 VkStructureType sType
5960 const void* pNext
5961 VkPipelineCoverageModulationStateCreateFlagsNV flags
5962 VkCoverageModulationModeNV coverageModulationMode
5963 VkBool32 coverageModulationTableEnable
5964 u32 coverageModulationTableCount
5965 const f32* pCoverageModulationTable
5966}
5967
Jesse Hall076f95d2017-09-20 11:34:47 -07005968@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5969class VkSamplerYcbcrConversionCreateInfoKHR {
5970 VkStructureType sType
5971 const void* pNext
5972 VkFormat format
5973 VkSamplerYcbcrModelConversionKHR ycbcrModel
5974 VkSamplerYcbcrRangeKHR ycbcrRange
5975 VkComponentMapping components
5976 VkChromaLocationKHR xChromaOffset
5977 VkChromaLocationKHR yChromaOffset
5978 VkFilter chromaFilter
5979 VkBool32 forceExplicitReconstruction
5980}
5981
5982@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5983class VkSamplerYcbcrConversionInfoKHR {
5984 VkStructureType sType
5985 const void* pNext
5986 VkSamplerYcbcrConversionKHR conversion
5987}
5988
5989@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5990class VkBindImagePlaneMemoryInfoKHR {
5991 VkStructureType sType
5992 const void* pNext
5993 VkImageAspectFlagBits planeAspect
5994}
5995
5996@extension("VK_KHR_sampler_ycbcr_conversion") // 157
5997class VkImagePlaneMemoryRequirementsInfoKHR {
5998 VkStructureType sType
5999 const void* pNext
6000 VkImageAspectFlagBits planeAspect
6001}
6002
6003@extension("VK_KHR_sampler_ycbcr_conversion") // 157
6004class VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR {
6005 VkStructureType sType
6006 void* pNext
6007 VkBool32 samplerYcbcrConversion
6008}
6009
6010@extension("VK_KHR_sampler_ycbcr_conversion") // 157
6011class VkSamplerYcbcrConversionImageFormatPropertiesKHR {
6012 VkStructureType sType
6013 void* pNext
6014 u32 combinedImageSamplerDescriptorCount
6015}
6016
6017@extension("VK_KHR_bind_memory2") // 158
6018class VkBindBufferMemoryInfoKHR {
6019 VkStructureType sType
6020 const void* pNext
6021 VkBuffer buffer
6022 VkDeviceMemory memory
6023 VkDeviceSize memoryOffset
6024}
6025
6026@extension("VK_KHR_bind_memory2") // 158
6027class VkBindImageMemoryInfoKHR {
6028 VkStructureType sType
6029 const void* pNext
6030 VkImage image
6031 VkDeviceMemory memory
6032 VkDeviceSize memoryOffset
6033}
6034
Jesse Hall77726222017-09-19 14:49:27 -05006035@extension("VK_EXT_validation_cache") // 161
6036class VkValidationCacheCreateInfoEXT {
6037 VkStructureType sType
6038 const void* pNext
6039 VkValidationCacheCreateFlagsEXT flags
6040 platform.size_t initialDataSize
6041 const void* pInitialData
6042}
6043
6044@extension("VK_EXT_validation_cache") // 161
6045class VkShaderModuleValidationCacheCreateInfoEXT {
6046 VkStructureType sType
6047 const void* pNext
6048 VkValidationCacheEXT validationCache
6049}
6050
Daniel Kochf25f5bb2017-10-05 00:26:58 -04006051@extension("VK_KHR_maintenance3") // 169
6052class VkPhysicalDeviceMaintenance3PropertiesKHR {
6053 VkStructureType sType
6054 void* pNext
6055 u32 maxPerSetDescriptors
6056 VkDeviceSize maxMemoryAllocationSize
6057}
6058
6059@extension("VK_KHR_maintenance3") // 169
6060class VkDescriptorSetLayoutSupportKHR {
6061 VkStructureType sType
6062 void* pNext
6063 VkBool32 supported
6064}
6065
6066
Jesse Halld27f6aa2015-08-15 17:58:48 -07006067////////////////
6068// Commands //
6069////////////////
6070
6071// Function pointers. TODO: add support for function pointers.
6072
6073@external type void* PFN_vkVoidFunction
6074@pfn cmd void vkVoidFunction() {
6075}
6076
Jesse Hall3fbc8562015-11-29 22:10:52 -08006077@external type void* PFN_vkAllocationFunction
6078@pfn cmd void* vkAllocationFunction(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006079 void* pUserData,
6080 platform.size_t size,
6081 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006082 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08006083 return ?
6084}
6085
Jesse Hall3fbc8562015-11-29 22:10:52 -08006086@external type void* PFN_vkReallocationFunction
6087@pfn cmd void* vkReallocationFunction(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006088 void* pUserData,
6089 void* pOriginal,
6090 platform.size_t size,
6091 platform.size_t alignment,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006092 VkSystemAllocationScope allocationScope) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006093 return ?
6094}
6095
6096@external type void* PFN_vkFreeFunction
6097@pfn cmd void vkFreeFunction(
6098 void* pUserData,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006099 void* pMemory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006100}
6101
Jesse Hall3fbc8562015-11-29 22:10:52 -08006102@external type void* PFN_vkInternalAllocationNotification
6103@pfn cmd void vkInternalAllocationNotification(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006104 void* pUserData,
6105 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006106 VkInternalAllocationType allocationType,
6107 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08006108}
6109
6110@external type void* PFN_vkInternalFreeNotification
6111@pfn cmd void vkInternalFreeNotification(
6112 void* pUserData,
6113 platform.size_t size,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006114 VkInternalAllocationType allocationType,
6115 VkSystemAllocationScope allocationScope) {
Jesse Hall03b6fe12015-11-24 12:44:21 -08006116}
Jesse Halld27f6aa2015-08-15 17:58:48 -07006117
6118// Global functions
6119
6120@threadSafety("system")
6121cmd VkResult vkCreateInstance(
6122 const VkInstanceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006123 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006124 VkInstance* pInstance) {
6125 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
6126
6127 instance := ?
6128 pInstance[0] = instance
6129 State.Instances[instance] = new!InstanceObject()
6130
Jesse Hall3dd678a2016-01-08 21:52:01 -08006131 layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount]
6132 extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07006133
6134 return ?
6135}
6136
6137@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006138cmd void vkDestroyInstance(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006139 VkInstance instance,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006140 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006141 instanceObject := GetInstance(instance)
6142
6143 State.Instances[instance] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006144}
6145
6146@threadSafety("system")
6147cmd VkResult vkEnumeratePhysicalDevices(
6148 VkInstance instance,
6149 u32* pPhysicalDeviceCount,
6150 VkPhysicalDevice* pPhysicalDevices) {
6151 instanceObject := GetInstance(instance)
6152
6153 physicalDeviceCount := as!u32(?)
6154 pPhysicalDeviceCount[0] = physicalDeviceCount
6155 physicalDevices := pPhysicalDevices[0:physicalDeviceCount]
6156
6157 for i in (0 .. physicalDeviceCount) {
6158 physicalDevice := ?
6159 physicalDevices[i] = physicalDevice
6160 if !(physicalDevice in State.PhysicalDevices) {
6161 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
6162 }
6163 }
6164
6165 return ?
6166}
6167
6168cmd PFN_vkVoidFunction vkGetDeviceProcAddr(
6169 VkDevice device,
6170 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006171 if device != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006172 device := GetDevice(device)
6173 }
6174
6175 return ?
6176}
6177
6178cmd PFN_vkVoidFunction vkGetInstanceProcAddr(
6179 VkInstance instance,
6180 const char* pName) {
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006181 if instance != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006182 instanceObject := GetInstance(instance)
6183 }
6184
6185 return ?
6186}
6187
Jesse Hall606a54e2015-11-19 22:17:28 -08006188cmd void vkGetPhysicalDeviceProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006189 VkPhysicalDevice physicalDevice,
6190 VkPhysicalDeviceProperties* pProperties) {
6191 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6192
6193 properties := ?
6194 pProperties[0] = properties
Jesse Halld27f6aa2015-08-15 17:58:48 -07006195}
6196
Jesse Hall606a54e2015-11-19 22:17:28 -08006197cmd void vkGetPhysicalDeviceQueueFamilyProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006198 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006199 u32* pQueueFamilyPropertyCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006200 VkQueueFamilyProperties* pQueueFamilyProperties) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006201 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006202 // TODO: Figure out how to express fetch-count-or-properties
6203 // This version fails 'apic validate' with 'fence not allowed in
6204 // *semantic.Branch'. Other attempts have failed with the same or other
6205 // errors.
6206 // if pQueueFamilyProperties != null {
6207 // queuesProperties := pQueueFamilyProperties[0:pCount[0]]
6208 // for i in (0 .. pCount[0]) {
6209 // queueProperties := as!VkQueueFamilyProperties(?)
6210 // queuesProperties[i] = queueProperties
6211 // }
6212 // } else {
6213 // count := ?
6214 // pCount[0] = count
6215 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006216}
6217
Jesse Hall606a54e2015-11-19 22:17:28 -08006218cmd void vkGetPhysicalDeviceMemoryProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006219 VkPhysicalDevice physicalDevice,
6220 VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
6221 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6222
6223 memoryProperties := ?
6224 pMemoryProperties[0] = memoryProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07006225}
6226
Jesse Hall606a54e2015-11-19 22:17:28 -08006227cmd void vkGetPhysicalDeviceFeatures(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006228 VkPhysicalDevice physicalDevice,
6229 VkPhysicalDeviceFeatures* pFeatures) {
6230 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6231
6232 features := ?
6233 pFeatures[0] = features
Jesse Halld27f6aa2015-08-15 17:58:48 -07006234}
6235
Jesse Hall606a54e2015-11-19 22:17:28 -08006236cmd void vkGetPhysicalDeviceFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006237 VkPhysicalDevice physicalDevice,
6238 VkFormat format,
6239 VkFormatProperties* pFormatProperties) {
6240 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6241
6242 formatProperties := ?
6243 pFormatProperties[0] = formatProperties
Jesse Halld27f6aa2015-08-15 17:58:48 -07006244}
6245
Jesse Halla9e57032015-11-30 01:03:10 -08006246cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006247 VkPhysicalDevice physicalDevice,
6248 VkFormat format,
6249 VkImageType type,
6250 VkImageTiling tiling,
6251 VkImageUsageFlags usage,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006252 VkImageCreateFlags flags,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006253 VkImageFormatProperties* pImageFormatProperties) {
6254 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6255
6256 imageFormatProperties := ?
6257 pImageFormatProperties[0] = imageFormatProperties
Jesse Halla9e57032015-11-30 01:03:10 -08006258
6259 return ?
Jesse Halld27f6aa2015-08-15 17:58:48 -07006260}
6261
Jesse Halld27f6aa2015-08-15 17:58:48 -07006262
6263// Device functions
6264
6265@threadSafety("system")
6266cmd VkResult vkCreateDevice(
6267 VkPhysicalDevice physicalDevice,
6268 const VkDeviceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006269 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006270 VkDevice* pDevice) {
6271 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
6272 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6273
6274 device := ?
6275 pDevice[0] = device
6276 State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice)
6277
6278 return ?
6279}
6280
6281@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006282cmd void vkDestroyDevice(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006283 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006284 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006285 deviceObject := GetDevice(device)
6286
6287 State.Devices[device] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006288}
6289
6290
6291// Extension discovery functions
6292
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006293cmd VkResult vkEnumerateInstanceLayerProperties(
Jesse Hall03b6fe12015-11-24 12:44:21 -08006294 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006295 VkLayerProperties* pProperties) {
6296 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006297 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006298
6299 properties := pProperties[0:count]
6300 for i in (0 .. count) {
6301 property := ?
6302 properties[i] = property
6303 }
6304
6305 return ?
6306}
6307
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006308cmd VkResult vkEnumerateInstanceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006309 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006310 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006311 VkExtensionProperties* pProperties) {
6312 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006313 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006314
6315 properties := pProperties[0:count]
6316 for i in (0 .. count) {
6317 property := ?
6318 properties[i] = property
6319 }
6320
6321 return ?
6322}
6323
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006324cmd VkResult vkEnumerateDeviceLayerProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006325 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006326 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006327 VkLayerProperties* pProperties) {
6328 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6329 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006330 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006331
6332 properties := pProperties[0:count]
6333 for i in (0 .. count) {
6334 property := ?
6335 properties[i] = property
6336 }
6337
6338 return ?
6339}
6340
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006341cmd VkResult vkEnumerateDeviceExtensionProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006342 VkPhysicalDevice physicalDevice,
6343 const char* pLayerName,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006344 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006345 VkExtensionProperties* pProperties) {
6346 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
6347
6348 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08006349 pPropertyCount[0] = count
Jesse Halld27f6aa2015-08-15 17:58:48 -07006350
6351 properties := pProperties[0:count]
6352 for i in (0 .. count) {
6353 property := ?
6354 properties[i] = property
6355 }
6356
6357 return ?
6358}
6359
6360
6361// Queue functions
6362
6363@threadSafety("system")
Jesse Hall606a54e2015-11-19 22:17:28 -08006364cmd void vkGetDeviceQueue(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006365 VkDevice device,
6366 u32 queueFamilyIndex,
6367 u32 queueIndex,
6368 VkQueue* pQueue) {
6369 deviceObject := GetDevice(device)
6370
6371 queue := ?
6372 pQueue[0] = queue
6373
6374 if !(queue in State.Queues) {
6375 State.Queues[queue] = new!QueueObject(device: device)
6376 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006377}
6378
6379@threadSafety("app")
6380cmd VkResult vkQueueSubmit(
6381 VkQueue queue,
Jesse Halla366a512015-11-19 22:30:07 -08006382 u32 submitCount,
Jesse Hallb00daad2015-11-29 19:46:20 -08006383 const VkSubmitInfo* pSubmits,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006384 VkFence fence) {
6385 queueObject := GetQueue(queue)
6386
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006387 if fence != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006388 fenceObject := GetFence(fence)
6389 assert(fenceObject.device == queueObject.device)
6390 }
6391
Jesse Hall3fbc8562015-11-29 22:10:52 -08006392 // commandBuffers := pcommandBuffers[0:commandBufferCount]
6393 // for i in (0 .. commandBufferCount) {
6394 // commandBuffer := commandBuffers[i]
6395 // commandBufferObject := GetCommandBuffer(commandBuffer)
6396 // assert(commandBufferObject.device == queueObject.device)
Jesse Halla366a512015-11-19 22:30:07 -08006397 //
Jesse Hall3fbc8562015-11-29 22:10:52 -08006398 // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags,
6399 // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.")
Jesse Halla366a512015-11-19 22:30:07 -08006400 // }
Jesse Halld27f6aa2015-08-15 17:58:48 -07006401
6402 return ?
6403}
6404
6405@threadSafety("system")
6406cmd VkResult vkQueueWaitIdle(
6407 VkQueue queue) {
6408 queueObject := GetQueue(queue)
6409
6410 return ?
6411}
6412
6413@threadSafety("system")
6414cmd VkResult vkDeviceWaitIdle(
6415 VkDevice device) {
6416 deviceObject := GetDevice(device)
6417
6418 return ?
6419}
6420
6421
6422// Memory functions
6423
6424@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006425cmd VkResult vkAllocateMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006426 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006427 const VkMemoryAllocateInfo* pAllocateInfo,
6428 const VkAllocationCallbacks* pAllocator,
6429 VkDeviceMemory* pMemory) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08006430 assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006431 deviceObject := GetDevice(device)
6432
Jesse Hall3fbc8562015-11-29 22:10:52 -08006433 memory := ?
6434 pMemory[0] = memory
6435 State.DeviceMemories[memory] = new!DeviceMemoryObject(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006436 device: device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006437 allocationSize: pAllocateInfo[0].allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006438
6439 return ?
6440}
6441
6442@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006443cmd void vkFreeMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006444 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006445 VkDeviceMemory memory,
6446 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006447 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006448 memoryObject := GetDeviceMemory(memory)
6449 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006450
6451 // Check that no objects are still bound before freeing.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006452 validate("MemoryCheck", len(memoryObject.boundObjects) == 0,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006453 "vkFreeMemory: objects still bound")
Jesse Hall3fbc8562015-11-29 22:10:52 -08006454 validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0,
6455 "vkFreeMemory: commandBuffers still bound")
6456 State.DeviceMemories[memory] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006457}
6458
6459@threadSafety("app")
6460cmd VkResult vkMapMemory(
6461 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006462 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006463 VkDeviceSize offset,
6464 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006465 VkMemoryMapFlags flags,
6466 void** ppData) {
6467 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006468 memoryObject := GetDeviceMemory(memory)
6469 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006470
6471 assert(flags == as!VkMemoryMapFlags(0))
Jesse Hall3fbc8562015-11-29 22:10:52 -08006472 assert((offset + size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006473
6474 return ?
6475}
6476
6477@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006478cmd void vkUnmapMemory(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006479 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006480 VkDeviceMemory memory) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006481 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08006482 memoryObject := GetDeviceMemory(memory)
6483 assert(memoryObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006484}
6485
6486cmd VkResult vkFlushMappedMemoryRanges(
6487 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006488 u32 memoryRangeCount
6489 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006490 deviceObject := GetDevice(device)
6491
Jesse Hall3fbc8562015-11-29 22:10:52 -08006492 memoryRanges := pMemoryRanges[0:memoryRangeCount]
6493 for i in (0 .. memoryRangeCount) {
6494 memoryRange := memoryRanges[i]
6495 memoryObject := GetDeviceMemory(memoryRange.memory)
6496 assert(memoryObject.device == device)
6497 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006498 }
6499
6500 return ?
6501}
6502
6503cmd VkResult vkInvalidateMappedMemoryRanges(
6504 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006505 u32 memoryRangeCount,
6506 const VkMappedMemoryRange* pMemoryRanges) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006507 deviceObject := GetDevice(device)
6508
Jesse Hall3fbc8562015-11-29 22:10:52 -08006509 memoryRanges := pMemoryRanges[0:memoryRangeCount]
6510 for i in (0 .. memoryRangeCount) {
6511 memoryRange := memoryRanges[i]
6512 memoryObject := GetDeviceMemory(memoryRange.memory)
6513 assert(memoryObject.device == device)
6514 assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006515 }
6516
6517 return ?
6518}
6519
6520
6521// Memory management API functions
6522
Jesse Hall606a54e2015-11-19 22:17:28 -08006523cmd void vkGetDeviceMemoryCommitment(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006524 VkDevice device,
6525 VkDeviceMemory memory,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006526 VkDeviceSize* pCommittedMemoryInBytes) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006527 deviceObject := GetDevice(device)
6528
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006529 if memory != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006530 memoryObject := GetDeviceMemory(memory)
6531 assert(memoryObject.device == device)
6532 }
6533
6534 committedMemoryInBytes := ?
6535 pCommittedMemoryInBytes[0] = committedMemoryInBytes
Jesse Halld27f6aa2015-08-15 17:58:48 -07006536}
6537
Jesse Hall606a54e2015-11-19 22:17:28 -08006538cmd void vkGetBufferMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006539 VkDevice device,
6540 VkBuffer buffer,
6541 VkMemoryRequirements* pMemoryRequirements) {
6542 deviceObject := GetDevice(device)
6543 bufferObject := GetBuffer(buffer)
6544 assert(bufferObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006545}
6546
6547cmd VkResult vkBindBufferMemory(
6548 VkDevice device,
6549 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006550 VkDeviceMemory memory,
6551 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006552 deviceObject := GetDevice(device)
6553 bufferObject := GetBuffer(buffer)
6554 assert(bufferObject.device == device)
6555
6556 // Unbind buffer from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006557 if bufferObject.memory != NULL_HANDLE {
6558 memoryObject := GetDeviceMemory(bufferObject.memory)
6559 memoryObject.boundObjects[as!u64(buffer)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006560 }
6561
6562 // Bind buffer to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006563 if memory != NULL_HANDLE {
6564 memoryObject := GetDeviceMemory(memory)
6565 assert(memoryObject.device == device)
6566 memoryObject.boundObjects[as!u64(buffer)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006567 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006568 bufferObject.memory = memory
6569 bufferObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006570
6571 return ?
6572}
6573
Jesse Hall606a54e2015-11-19 22:17:28 -08006574cmd void vkGetImageMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006575 VkDevice device,
6576 VkImage image,
6577 VkMemoryRequirements* pMemoryRequirements) {
6578 deviceObject := GetDevice(device)
6579 imageObject := GetImage(image)
6580 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006581}
6582
6583cmd VkResult vkBindImageMemory(
6584 VkDevice device,
6585 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006586 VkDeviceMemory memory,
6587 VkDeviceSize memoryOffset) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006588 deviceObject := GetDevice(device)
6589 imageObject := GetImage(image)
6590 assert(imageObject.device == device)
6591
6592 // Unbind image from previous memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006593 if imageObject.memory != NULL_HANDLE {
6594 memoryObject := GetDeviceMemory(imageObject.memory)
6595 memoryObject.boundObjects[as!u64(image)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006596 }
6597
6598 // Bind image to given memory object, if not VK_NULL_HANDLE.
Jesse Hall3fbc8562015-11-29 22:10:52 -08006599 if memory != NULL_HANDLE {
6600 memoryObject := GetDeviceMemory(memory)
6601 assert(memoryObject.device == device)
6602 memoryObject.boundObjects[as!u64(image)] = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006603 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08006604 imageObject.memory = memory
6605 imageObject.memoryOffset = memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07006606
6607 return ?
6608}
6609
Jesse Hall606a54e2015-11-19 22:17:28 -08006610cmd void vkGetImageSparseMemoryRequirements(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006611 VkDevice device,
6612 VkImage image,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006613 u32* pSparseMemoryRequirementCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006614 VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
6615 deviceObject := GetDevice(device)
6616 imageObject := GetImage(image)
6617 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006618}
6619
Jesse Hall606a54e2015-11-19 22:17:28 -08006620cmd void vkGetPhysicalDeviceSparseImageFormatProperties(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006621 VkPhysicalDevice physicalDevice,
6622 VkFormat format,
6623 VkImageType type,
Jesse Hall091ed9e2015-11-30 00:55:29 -08006624 VkSampleCountFlagBits samples,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006625 VkImageUsageFlags usage,
6626 VkImageTiling tiling,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006627 u32* pPropertyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006628 VkSparseImageFormatProperties* pProperties) {
6629 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006630}
6631
Jesse Halla6429252015-11-29 18:59:42 -08006632cmd VkResult vkQueueBindSparse(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006633 VkQueue queue,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006634 u32 bindInfoCount,
Jesse Halla6429252015-11-29 18:59:42 -08006635 const VkBindSparseInfo* pBindInfo,
6636 VkFence fence) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006637 queueObject := GetQueue(queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006638
6639 return ?
6640}
6641
6642
6643// Fence functions
6644
6645@threadSafety("system")
6646cmd VkResult vkCreateFence(
6647 VkDevice device,
6648 const VkFenceCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006649 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006650 VkFence* pFence) {
6651 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
6652 deviceObject := GetDevice(device)
6653
6654 fence := ?
6655 pFence[0] = fence
6656 State.Fences[fence] = new!FenceObject(
Jesse Halld8bade02015-11-24 10:24:18 -08006657 device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT)))
Jesse Halld27f6aa2015-08-15 17:58:48 -07006658
6659 return ?
6660}
6661
6662@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006663cmd void vkDestroyFence(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006664 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006665 VkFence fence,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006666 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006667 deviceObject := GetDevice(device)
6668 fenceObject := GetFence(fence)
6669 assert(fenceObject.device == device)
6670
6671 State.Fences[fence] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006672}
6673
6674@threadSafety("system")
6675cmd VkResult vkResetFences(
6676 VkDevice device,
6677 u32 fenceCount,
6678 const VkFence* pFences) {
6679 deviceObject := GetDevice(device)
6680
6681 fences := pFences[0:fenceCount]
6682 for i in (0 .. fenceCount) {
6683 fence := fences[i]
6684 fenceObject := GetFence(fence)
6685 assert(fenceObject.device == device)
6686 fenceObject.signaled = false
6687 }
6688
6689 return ?
6690}
6691
6692@threadSafety("system")
6693cmd VkResult vkGetFenceStatus(
6694 VkDevice device,
6695 VkFence fence) {
6696 deviceObject := GetDevice(device)
6697 fenceObject := GetFence(fence)
6698 assert(fenceObject.device == device)
6699
6700 return ?
6701}
6702
6703@threadSafety("system")
6704cmd VkResult vkWaitForFences(
6705 VkDevice device,
6706 u32 fenceCount,
6707 const VkFence* pFences,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006708 VkBool32 waitAll,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006709 u64 timeout) { /// timeout in nanoseconds
6710 deviceObject := GetDevice(device)
6711
6712 fences := pFences[0:fenceCount]
6713 for i in (0 .. fenceCount) {
6714 fence := fences[i]
6715 fenceObject := GetFence(fence)
6716 assert(fenceObject.device == device)
6717 }
6718
6719 return ?
6720}
6721
6722
6723// Queue semaphore functions
6724
6725@threadSafety("system")
6726cmd VkResult vkCreateSemaphore(
6727 VkDevice device,
6728 const VkSemaphoreCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006729 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006730 VkSemaphore* pSemaphore) {
6731 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
6732 deviceObject := GetDevice(device)
6733
6734 semaphore := ?
6735 pSemaphore[0] = semaphore
6736 State.Semaphores[semaphore] = new!SemaphoreObject(device: device)
6737
6738 return ?
6739}
6740
6741@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006742cmd void vkDestroySemaphore(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006743 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006744 VkSemaphore semaphore,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006745 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006746 deviceObject := GetDevice(device)
6747 semaphoreObject := GetSemaphore(semaphore)
6748 assert(semaphoreObject.device == device)
6749
6750 State.Semaphores[semaphore] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006751}
6752
Jesse Halld27f6aa2015-08-15 17:58:48 -07006753
6754// Event functions
6755
6756@threadSafety("system")
6757cmd VkResult vkCreateEvent(
6758 VkDevice device,
6759 const VkEventCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006760 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006761 VkEvent* pEvent) {
6762 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
6763 deviceObject := GetDevice(device)
6764
6765 event := ?
6766 pEvent[0] = event
6767 State.Events[event] = new!EventObject(device: device)
6768
6769 return ?
6770}
6771
6772@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006773cmd void vkDestroyEvent(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006774 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006775 VkEvent event,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006776 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006777 deviceObject := GetDevice(device)
6778 eventObject := GetEvent(event)
6779 assert(eventObject.device == device)
6780
6781 State.Events[event] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006782}
6783
6784@threadSafety("system")
6785cmd VkResult vkGetEventStatus(
6786 VkDevice device,
6787 VkEvent event) {
6788 deviceObject := GetDevice(device)
6789 eventObject := GetEvent(event)
6790 assert(eventObject.device == device)
6791
6792 return ?
6793}
6794
6795@threadSafety("system")
6796cmd VkResult vkSetEvent(
6797 VkDevice device,
6798 VkEvent event) {
6799 deviceObject := GetDevice(device)
6800 eventObject := GetEvent(event)
6801 assert(eventObject.device == device)
6802
6803 return ?
6804}
6805
6806@threadSafety("system")
6807cmd VkResult vkResetEvent(
6808 VkDevice device,
6809 VkEvent event) {
6810 deviceObject := GetDevice(device)
6811 eventObject := GetEvent(event)
6812 assert(eventObject.device == device)
6813
6814 return ?
6815}
6816
6817
6818// Query functions
6819
6820@threadSafety("system")
6821cmd VkResult vkCreateQueryPool(
6822 VkDevice device,
6823 const VkQueryPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006824 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006825 VkQueryPool* pQueryPool) {
6826 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
6827 deviceObject := GetDevice(device)
6828
6829 queryPool := ?
6830 pQueryPool[0] = queryPool
6831 State.QueryPools[queryPool] = new!QueryPoolObject(device: device)
6832
6833 return ?
6834}
6835
6836@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006837cmd void vkDestroyQueryPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006838 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006839 VkQueryPool queryPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006840 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006841 deviceObject := GetDevice(device)
6842 queryPoolObject := GetQueryPool(queryPool)
6843 assert(queryPoolObject.device == device)
6844
6845 State.QueryPools[queryPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006846}
6847
6848@threadSafety("system")
6849cmd VkResult vkGetQueryPoolResults(
6850 VkDevice device,
6851 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08006852 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006853 u32 queryCount,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006854 platform.size_t dataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006855 void* pData,
Jesse Halla9bb62b2015-11-21 19:31:56 -08006856 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006857 VkQueryResultFlags flags) {
6858 deviceObject := GetDevice(device)
6859 queryPoolObject := GetQueryPool(queryPool)
6860 assert(queryPoolObject.device == device)
6861
Jesse Halld27f6aa2015-08-15 17:58:48 -07006862 data := pData[0:dataSize]
6863
6864 return ?
6865}
6866
6867// Buffer functions
6868
6869@threadSafety("system")
6870cmd VkResult vkCreateBuffer(
6871 VkDevice device,
6872 const VkBufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006873 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006874 VkBuffer* pBuffer) {
6875 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
6876 deviceObject := GetDevice(device)
6877
6878 buffer := ?
6879 pBuffer[0] = buffer
6880 State.Buffers[buffer] = new!BufferObject(device: device)
6881
6882 return ?
6883}
6884
6885@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006886cmd void vkDestroyBuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006887 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006888 VkBuffer buffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006889 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006890 deviceObject := GetDevice(device)
6891 bufferObject := GetBuffer(buffer)
6892 assert(bufferObject.device == device)
6893
Jesse Hall3fbc8562015-11-29 22:10:52 -08006894 assert(bufferObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006895 State.Buffers[buffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006896}
6897
6898
6899// Buffer view functions
6900
6901@threadSafety("system")
6902cmd VkResult vkCreateBufferView(
6903 VkDevice device,
6904 const VkBufferViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006905 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006906 VkBufferView* pView) {
6907 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
6908 deviceObject := GetDevice(device)
6909
6910 bufferObject := GetBuffer(pCreateInfo.buffer)
6911 assert(bufferObject.device == device)
6912
6913 view := ?
6914 pView[0] = view
6915 State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer)
6916
6917 return ?
6918}
6919
6920@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006921cmd void vkDestroyBufferView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006922 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006923 VkBufferView bufferView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006924 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006925 deviceObject := GetDevice(device)
6926 bufferViewObject := GetBufferView(bufferView)
6927 assert(bufferViewObject.device == device)
6928
6929 State.BufferViews[bufferView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006930}
6931
6932
6933// Image functions
6934
6935@threadSafety("system")
6936cmd VkResult vkCreateImage(
6937 VkDevice device,
6938 const VkImageCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006939 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006940 VkImage* pImage) {
6941 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
6942 deviceObject := GetDevice(device)
6943
6944 image := ?
6945 pImage[0] = image
6946 State.Images[image] = new!ImageObject(device: device)
6947
6948 return ?
6949}
6950
6951@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006952cmd void vkDestroyImage(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006953 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006954 VkImage image,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006955 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07006956 deviceObject := GetDevice(device)
6957 imageObject := GetImage(image)
6958 assert(imageObject.device == device)
6959
Jesse Hall3fbc8562015-11-29 22:10:52 -08006960 assert(imageObject.memory == 0)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006961 State.Images[image] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07006962}
6963
Jesse Hall606a54e2015-11-19 22:17:28 -08006964cmd void vkGetImageSubresourceLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006965 VkDevice device,
6966 VkImage image,
6967 const VkImageSubresource* pSubresource,
6968 VkSubresourceLayout* pLayout) {
6969 deviceObject := GetDevice(device)
6970 imageObject := GetImage(image)
6971 assert(imageObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07006972}
6973
6974
6975// Image view functions
6976
6977@threadSafety("system")
6978cmd VkResult vkCreateImageView(
6979 VkDevice device,
6980 const VkImageViewCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08006981 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07006982 VkImageView* pView) {
6983 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
6984 deviceObject := GetDevice(device)
6985
6986 imageObject := GetImage(pCreateInfo.image)
6987 assert(imageObject.device == device)
6988
6989 view := ?
6990 pView[0] = view
6991 State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image)
6992
6993 return ?
6994}
6995
6996@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07006997cmd void vkDestroyImageView(
Jesse Halld27f6aa2015-08-15 17:58:48 -07006998 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08006999 VkImageView imageView,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007000 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007001 deviceObject := GetDevice(device)
7002 imageViewObject := GetImageView(imageView)
7003 assert(imageViewObject.device == device)
7004
7005 State.ImageViews[imageView] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007006}
7007
7008
7009// Shader functions
7010
7011cmd VkResult vkCreateShaderModule(
7012 VkDevice device,
7013 const VkShaderModuleCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007014 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007015 VkShaderModule* pShaderModule) {
7016 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
7017 deviceObject := GetDevice(device)
7018
7019 shaderModule := ?
7020 pShaderModule[0] = shaderModule
7021 State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device)
7022
7023 return ?
7024}
7025
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007026cmd void vkDestroyShaderModule(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007027 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007028 VkShaderModule shaderModule,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007029 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007030 deviceObject := GetDevice(device)
7031 shaderModuleObject := GetShaderModule(shaderModule)
7032 assert(shaderModuleObject.device == device)
7033
7034 State.ShaderModules[shaderModule] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007035}
7036
Jesse Halld27f6aa2015-08-15 17:58:48 -07007037
7038// Pipeline functions
7039
7040cmd VkResult vkCreatePipelineCache(
7041 VkDevice device,
7042 const VkPipelineCacheCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007043 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007044 VkPipelineCache* pPipelineCache) {
7045 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
7046 deviceObject := GetDevice(device)
7047
7048 pipelineCache := ?
7049 pPipelineCache[0] = pipelineCache
7050 State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device)
7051
7052 return ?
7053}
7054
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007055cmd void vkDestroyPipelineCache(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007056 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007057 VkPipelineCache pipelineCache,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007058 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007059 deviceObject := GetDevice(device)
7060 pipelineCacheObject := GetPipelineCache(pipelineCache)
7061 assert(pipelineCacheObject.device == device)
7062
7063 State.PipelineCaches[pipelineCache] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007064}
7065
Jesse Halld27f6aa2015-08-15 17:58:48 -07007066cmd VkResult vkGetPipelineCacheData(
7067 VkDevice device,
7068 VkPipelineCache pipelineCache,
Jesse Halla9bb62b2015-11-21 19:31:56 -08007069 platform.size_t* pDataSize,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007070 void* pData) {
7071 deviceObject := GetDevice(device)
7072 pipelineCacheObject := GetPipelineCache(pipelineCache)
7073 assert(pipelineCacheObject.device == device)
7074
7075 return ?
7076}
7077
7078cmd VkResult vkMergePipelineCaches(
7079 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007080 VkPipelineCache dstCache,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007081 u32 srcCacheCount,
7082 const VkPipelineCache* pSrcCaches) {
7083 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007084 dstCacheObject := GetPipelineCache(dstCache)
7085 assert(dstCacheObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007086
7087 srcCaches := pSrcCaches[0:srcCacheCount]
7088 for i in (0 .. srcCacheCount) {
7089 srcCache := srcCaches[i]
7090 srcCacheObject := GetPipelineCache(srcCache)
7091 assert(srcCacheObject.device == device)
7092 }
7093
7094 return ?
7095}
7096
7097cmd VkResult vkCreateGraphicsPipelines(
7098 VkDevice device,
7099 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007100 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007101 const VkGraphicsPipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007102 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007103 VkPipeline* pPipelines) {
7104 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007105 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007106 pipelineCacheObject := GetPipelineCache(pipelineCache)
7107 assert(pipelineCacheObject.device == device)
7108 }
7109
Jesse Hall03b6fe12015-11-24 12:44:21 -08007110 createInfos := pCreateInfos[0:createInfoCount]
7111 pipelines := pPipelines[0:createInfoCount]
7112 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007113 pipeline := ?
7114 pipelines[i] = pipeline
7115 State.Pipelines[pipeline] = new!PipelineObject(device: device)
7116 }
7117
7118 return ?
7119}
7120
7121cmd VkResult vkCreateComputePipelines(
7122 VkDevice device,
7123 VkPipelineCache pipelineCache,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007124 u32 createInfoCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007125 const VkComputePipelineCreateInfo* pCreateInfos,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007126 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007127 VkPipeline* pPipelines) {
7128 deviceObject := GetDevice(device)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007129 if pipelineCache != NULL_HANDLE {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007130 pipelineCacheObject := GetPipelineCache(pipelineCache)
7131 assert(pipelineCacheObject.device == device)
7132 }
7133
Jesse Hall03b6fe12015-11-24 12:44:21 -08007134 createInfos := pCreateInfos[0:createInfoCount]
7135 pipelines := pPipelines[0:createInfoCount]
7136 for i in (0 .. createInfoCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007137 pipeline := ?
7138 pipelines[i] = pipeline
7139 State.Pipelines[pipeline] = new!PipelineObject(device: device)
7140 }
7141
7142 return ?
7143}
7144
7145@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007146cmd void vkDestroyPipeline(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007147 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007148 VkPipeline pipeline,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007149 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007150 deviceObject := GetDevice(device)
7151 pipelineObjects := GetPipeline(pipeline)
7152 assert(pipelineObjects.device == device)
7153
7154 State.Pipelines[pipeline] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007155}
7156
7157
7158// Pipeline layout functions
7159
7160@threadSafety("system")
7161cmd VkResult vkCreatePipelineLayout(
7162 VkDevice device,
7163 const VkPipelineLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007164 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007165 VkPipelineLayout* pPipelineLayout) {
7166 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
7167 deviceObject := GetDevice(device)
7168
7169 pipelineLayout := ?
7170 pPipelineLayout[0] = pipelineLayout
7171 State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device)
7172
7173 return ?
7174}
7175
7176@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007177cmd void vkDestroyPipelineLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007178 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007179 VkPipelineLayout pipelineLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007180 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007181 deviceObject := GetDevice(device)
7182 pipelineLayoutObjects := GetPipelineLayout(pipelineLayout)
7183 assert(pipelineLayoutObjects.device == device)
7184
7185 State.PipelineLayouts[pipelineLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007186}
7187
7188
7189// Sampler functions
7190
7191@threadSafety("system")
7192cmd VkResult vkCreateSampler(
7193 VkDevice device,
7194 const VkSamplerCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007195 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007196 VkSampler* pSampler) {
7197 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
7198 deviceObject := GetDevice(device)
7199
7200 sampler := ?
7201 pSampler[0] = sampler
7202 State.Samplers[sampler] = new!SamplerObject(device: device)
7203
7204 return ?
7205}
7206
7207@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007208cmd void vkDestroySampler(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007209 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007210 VkSampler sampler,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007211 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007212 deviceObject := GetDevice(device)
7213 samplerObject := GetSampler(sampler)
7214 assert(samplerObject.device == device)
7215
7216 State.Samplers[sampler] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007217}
7218
7219
7220// Descriptor set functions
7221
7222@threadSafety("system")
7223cmd VkResult vkCreateDescriptorSetLayout(
7224 VkDevice device,
7225 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007226 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007227 VkDescriptorSetLayout* pSetLayout) {
7228 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
7229 deviceObject := GetDevice(device)
7230
7231 setLayout := ?
7232 pSetLayout[0] = setLayout
7233 State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device)
7234
7235 return ?
7236}
7237
7238@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007239cmd void vkDestroyDescriptorSetLayout(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007240 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007241 VkDescriptorSetLayout descriptorSetLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007242 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007243 deviceObject := GetDevice(device)
7244 descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout)
7245 assert(descriptorSetLayoutObject.device == device)
7246
7247 State.DescriptorSetLayouts[descriptorSetLayout] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007248}
7249
7250@threadSafety("system")
7251cmd VkResult vkCreateDescriptorPool(
7252 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007253 const VkDescriptorPoolCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007254 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007255 VkDescriptorPool* pDescriptorPool) {
7256 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
7257 deviceObject := GetDevice(device)
7258
7259 descriptorPool := ?
7260 pDescriptorPool[0] = descriptorPool
7261 State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device)
7262
7263 return ?
7264}
7265
7266@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007267cmd void vkDestroyDescriptorPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007268 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007269 VkDescriptorPool descriptorPool,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007270 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007271 deviceObject := GetDevice(device)
7272 descriptorPoolObject := GetDescriptorPool(descriptorPool)
7273 assert(descriptorPoolObject.device == device)
7274
7275 State.DescriptorPools[descriptorPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007276}
7277
7278@threadSafety("app")
7279cmd VkResult vkResetDescriptorPool(
7280 VkDevice device,
Jesse Hallfbf97b02015-11-20 14:17:03 -08007281 VkDescriptorPool descriptorPool,
7282 VkDescriptorPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007283 deviceObject := GetDevice(device)
7284 descriptorPoolObject := GetDescriptorPool(descriptorPool)
7285 assert(descriptorPoolObject.device == device)
7286
7287 return ?
7288}
7289
7290@threadSafety("app")
Jesse Hall3fbc8562015-11-29 22:10:52 -08007291cmd VkResult vkAllocateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007292 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007293 const VkDescriptorSetAllocateInfo* pAllocateInfo,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007294 VkDescriptorSet* pDescriptorSets) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007295 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007296 allocInfo := pAllocateInfo[0]
Jesse Hallfbf97b02015-11-20 14:17:03 -08007297 descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007298
Jesse Hall03b6fe12015-11-24 12:44:21 -08007299 setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount]
7300 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007301 setLayout := setLayouts[i]
7302 setLayoutObject := GetDescriptorSetLayout(setLayout)
7303 assert(setLayoutObject.device == device)
7304 }
7305
Jesse Hall03b6fe12015-11-24 12:44:21 -08007306 descriptorSets := pDescriptorSets[0:allocInfo.setCount]
7307 for i in (0 .. allocInfo.setCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007308 descriptorSet := ?
7309 descriptorSets[i] = descriptorSet
7310 State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device)
7311 }
7312
7313 return ?
7314}
7315
Jesse Hallf09c6b12015-08-15 19:54:28 -07007316cmd VkResult vkFreeDescriptorSets(
7317 VkDevice device,
7318 VkDescriptorPool descriptorPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007319 u32 descriptorSetCount,
Jesse Hallf09c6b12015-08-15 19:54:28 -07007320 const VkDescriptorSet* pDescriptorSets) {
7321 deviceObject := GetDevice(device)
7322 descriptorPoolObject := GetDescriptorPool(descriptorPool)
7323
Jesse Hall03b6fe12015-11-24 12:44:21 -08007324 descriptorSets := pDescriptorSets[0:descriptorSetCount]
7325 for i in (0 .. descriptorSetCount) {
Jesse Hallf09c6b12015-08-15 19:54:28 -07007326 descriptorSet := descriptorSets[i]
7327 descriptorSetObject := GetDescriptorSet(descriptorSet)
7328 assert(descriptorSetObject.device == device)
7329 State.DescriptorSets[descriptorSet] = null
7330 }
7331
7332 return ?
7333}
7334
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007335cmd void vkUpdateDescriptorSets(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007336 VkDevice device,
Jesse Hallb00daad2015-11-29 19:46:20 -08007337 u32 descriptorWriteCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007338 const VkWriteDescriptorSet* pDescriptorWrites,
Jesse Hallb00daad2015-11-29 19:46:20 -08007339 u32 descriptorCopyCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007340 const VkCopyDescriptorSet* pDescriptorCopies) {
7341 deviceObject := GetDevice(device)
7342
Jesse Hallb00daad2015-11-29 19:46:20 -08007343 descriptorWrites := pDescriptorWrites[0:descriptorWriteCount]
7344 for i in (0 .. descriptorWriteCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007345 descriptorWrite := descriptorWrites[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08007346 descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007347 assert(descriptorWriteObject.device == device)
7348 }
7349
Jesse Hallb00daad2015-11-29 19:46:20 -08007350 descriptorCopies := pDescriptorCopies[0:descriptorCopyCount]
7351 for i in (0 .. descriptorCopyCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007352 descriptorCopy := descriptorCopies[i]
Jesse Hall3fbc8562015-11-29 22:10:52 -08007353 descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007354 assert(descriptorCopyObject.device == device)
7355 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07007356}
7357
7358
7359// Framebuffer functions
7360
7361@threadSafety("system")
7362cmd VkResult vkCreateFramebuffer(
7363 VkDevice device,
7364 const VkFramebufferCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007365 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007366 VkFramebuffer* pFramebuffer) {
7367 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
7368 deviceObject := GetDevice(device)
7369
7370 framebuffer := ?
7371 pFramebuffer[0] = framebuffer
7372 State.Framebuffers[framebuffer] = new!FramebufferObject(device: device)
7373
7374 return ?
7375}
7376
7377@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007378cmd void vkDestroyFramebuffer(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007379 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007380 VkFramebuffer framebuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007381 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007382 deviceObject := GetDevice(device)
7383 framebufferObject := GetFramebuffer(framebuffer)
7384 assert(framebufferObject.device == device)
7385
7386 State.Framebuffers[framebuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007387}
7388
7389
7390// Renderpass functions
7391
7392@threadSafety("system")
7393cmd VkResult vkCreateRenderPass(
7394 VkDevice device,
7395 const VkRenderPassCreateInfo* pCreateInfo,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007396 const VkAllocationCallbacks* pAllocator,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007397 VkRenderPass* pRenderPass) {
7398 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
7399 deviceObject := GetDevice(device)
7400
7401 renderpass := ?
7402 pRenderPass[0] = renderpass
7403 State.RenderPasses[renderpass] = new!RenderPassObject(device: device)
7404
7405 return ?
7406}
7407
7408@threadSafety("system")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007409cmd void vkDestroyRenderPass(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007410 VkDevice device,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007411 VkRenderPass renderPass,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007412 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007413 deviceObject := GetDevice(device)
7414 renderPassObject := GetRenderPass(renderPass)
7415 assert(renderPassObject.device == device)
7416
7417 State.RenderPasses[renderPass] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007418}
7419
Jesse Hall606a54e2015-11-19 22:17:28 -08007420cmd void vkGetRenderAreaGranularity(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007421 VkDevice device,
7422 VkRenderPass renderPass,
7423 VkExtent2D* pGranularity) {
7424 deviceObject := GetDevice(device)
7425 renderPassObject := GetRenderPass(renderPass)
7426
7427 granularity := ?
7428 pGranularity[0] = granularity
Jesse Halld27f6aa2015-08-15 17:58:48 -07007429}
7430
7431// Command pool functions
7432
7433cmd VkResult vkCreateCommandPool(
7434 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007435 const VkCommandPoolCreateInfo* pCreateInfo,
7436 const VkAllocationCallbacks* pAllocator,
7437 VkCommandPool* pCommandPool) {
7438 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007439 deviceObject := GetDevice(device)
7440
Jesse Hall3fbc8562015-11-29 22:10:52 -08007441 commandPool := ?
7442 pCommandPool[0] = commandPool
7443 State.CommandPools[commandPool] = new!CommandPoolObject(device: device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007444
7445 return ?
7446}
7447
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007448cmd void vkDestroyCommandPool(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007449 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007450 VkCommandPool commandPool,
7451 const VkAllocationCallbacks* pAllocator) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007452 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007453 commandPoolObject := GetCommandPool(commandPool)
7454 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007455
Jesse Hall3fbc8562015-11-29 22:10:52 -08007456 State.CommandPools[commandPool] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007457}
7458
7459cmd VkResult vkResetCommandPool(
7460 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007461 VkCommandPool commandPool,
7462 VkCommandPoolResetFlags flags) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007463 deviceObject := GetDevice(device)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007464 commandPoolObject := GetCommandPool(commandPool)
7465 assert(commandPoolObject.device == device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007466
7467 return ?
7468}
7469
7470// Command buffer functions
7471
Jesse Hall3fbc8562015-11-29 22:10:52 -08007472macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
7473 memoryObject := GetDeviceMemory(memory)
7474 memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer
Jesse Halld27f6aa2015-08-15 17:58:48 -07007475
Jesse Hall3fbc8562015-11-29 22:10:52 -08007476 commandBufferObject := GetCommandBuffer(commandBuffer)
7477 commandBufferObject.boundObjects[as!u64(obj)] = memory
Jesse Halld27f6aa2015-08-15 17:58:48 -07007478}
7479
Jesse Hall3fbc8562015-11-29 22:10:52 -08007480macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) {
7481 memoryObject := GetDeviceMemory(memory)
7482 memoryObject.boundCommandBuffers[commandBuffer] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007483
Jesse Hall3fbc8562015-11-29 22:10:52 -08007484 commandBufferObject := GetCommandBuffer(commandBuffer)
7485 commandBufferObject.boundObjects[as!u64(obj)] = null
Jesse Halld27f6aa2015-08-15 17:58:48 -07007486}
7487
7488@threadSafety("system")
Jesse Hall3fbc8562015-11-29 22:10:52 -08007489cmd VkResult vkAllocateCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007490 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007491 const VkCommandBufferAllocateInfo* pAllocateInfo,
7492 VkCommandBuffer* pCommandBuffers) {
Jesse Hallf4ab2b12015-11-30 16:04:55 -08007493 assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007494
Jesse Hall3dd678a2016-01-08 21:52:01 -08007495 count := pAllocateInfo[0].commandBufferCount
Jesse Hall3fbc8562015-11-29 22:10:52 -08007496 commandBuffers := pCommandBuffers[0:count]
Jesse Hallfbf97b02015-11-20 14:17:03 -08007497 for i in (0 .. count) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007498 commandBuffer := ?
7499 commandBuffers[i] = commandBuffer
7500 State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08007501 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07007502
7503 return ?
7504}
7505
7506@threadSafety("system")
Jesse Hallfbf97b02015-11-20 14:17:03 -08007507cmd void vkFreeCommandBuffers(
Jesse Halld27f6aa2015-08-15 17:58:48 -07007508 VkDevice device,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007509 VkCommandPool commandPool,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007510 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007511 const VkCommandBuffer* pCommandBuffers) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007512 deviceObject := GetDevice(device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007513
Jesse Hall3fbc8562015-11-29 22:10:52 -08007514 commandBuffers := pCommandBuffers[0:commandBufferCount]
Jesse Hall03b6fe12015-11-24 12:44:21 -08007515 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007516 commandBufferObject := GetCommandBuffer(commandBuffers[i])
7517 assert(commandBufferObject.device == device)
Jesse Hallfbf97b02015-11-20 14:17:03 -08007518 // TODO: iterate over boundObjects and clear memory bindings
Jesse Hall3fbc8562015-11-29 22:10:52 -08007519 State.CommandBuffers[commandBuffers[i]] = null
Jesse Hallfbf97b02015-11-20 14:17:03 -08007520 }
Jesse Halld27f6aa2015-08-15 17:58:48 -07007521}
7522
7523@threadSafety("app")
7524cmd VkResult vkBeginCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007525 VkCommandBuffer commandBuffer,
7526 const VkCommandBufferBeginInfo* pBeginInfo) {
7527 assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
7528 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007529
7530 // TODO: iterate over boundObjects and clear memory bindings
7531
7532 return ?
7533}
7534
7535@threadSafety("app")
7536cmd VkResult vkEndCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007537 VkCommandBuffer commandBuffer) {
7538 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007539
7540 return ?
7541}
7542
7543@threadSafety("app")
7544cmd VkResult vkResetCommandBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007545 VkCommandBuffer commandBuffer,
7546 VkCommandBufferResetFlags flags) {
7547 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007548
7549 // TODO: iterate over boundObjects and clear memory bindings
7550
7551 return ?
7552}
7553
7554
7555// Command buffer building functions
7556
7557@threadSafety("app")
7558cmd void vkCmdBindPipeline(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007559 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007560 VkPipelineBindPoint pipelineBindPoint,
7561 VkPipeline pipeline) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007562 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007563 pipelineObject := GetPipeline(pipeline)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007564 assert(commandBufferObject.device == pipelineObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007565
Jesse Halld8bade02015-11-24 10:24:18 -08007566 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007567 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
7568 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
7569 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08007570 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007571}
7572
7573@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007574cmd void vkCmdSetViewport(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007575 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007576 u32 firstViewport,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007577 u32 viewportCount,
7578 const VkViewport* pViewports) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007579 commandBufferObject := GetCommandBuffer(commandBuffer)
7580 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007581}
7582
7583@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007584cmd void vkCmdSetScissor(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007585 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007586 u32 firstScissor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007587 u32 scissorCount,
7588 const VkRect2D* pScissors) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007589 commandBufferObject := GetCommandBuffer(commandBuffer)
7590 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007591}
7592
7593@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007594cmd void vkCmdSetLineWidth(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007595 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007596 f32 lineWidth) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007597 commandBufferObject := GetCommandBuffer(commandBuffer)
7598 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007599}
7600
7601@threadSafety("app")
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007602cmd void vkCmdSetDepthBias(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007603 VkCommandBuffer commandBuffer,
Jesse Halla9bb62b2015-11-21 19:31:56 -08007604 f32 depthBiasConstantFactor,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007605 f32 depthBiasClamp,
Jesse Halla9bb62b2015-11-21 19:31:56 -08007606 f32 depthBiasSlopeFactor) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007607 commandBufferObject := GetCommandBuffer(commandBuffer)
7608 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007609}
Jesse Halld27f6aa2015-08-15 17:58:48 -07007610
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007611@threadSafety("app")
7612cmd void vkCmdSetBlendConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007613 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007614 // TODO(jessehall): apic only supports 'const' on pointer types. Using
7615 // an annotation as a quick hack to pass this to the template without
7616 // having to modify the AST and semantic model.
Jesse Hallb00daad2015-11-29 19:46:20 -08007617 @readonly f32[4] blendConstants) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007618 commandBufferObject := GetCommandBuffer(commandBuffer)
7619 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007620}
7621
7622@threadSafety("app")
7623cmd void vkCmdSetDepthBounds(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007624 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007625 f32 minDepthBounds,
7626 f32 maxDepthBounds) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007627 commandBufferObject := GetCommandBuffer(commandBuffer)
7628 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007629}
7630
7631@threadSafety("app")
7632cmd void vkCmdSetStencilCompareMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007633 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007634 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08007635 u32 compareMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007636 commandBufferObject := GetCommandBuffer(commandBuffer)
7637 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007638}
7639
7640@threadSafety("app")
7641cmd void vkCmdSetStencilWriteMask(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007642 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007643 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08007644 u32 writeMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007645 commandBufferObject := GetCommandBuffer(commandBuffer)
7646 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007647}
7648
7649@threadSafety("app")
7650cmd void vkCmdSetStencilReference(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007651 VkCommandBuffer commandBuffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007652 VkStencilFaceFlags faceMask,
Jesse Hall65ab5522015-11-30 00:07:16 -08007653 u32 reference) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007654 commandBufferObject := GetCommandBuffer(commandBuffer)
7655 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007656}
7657
7658@threadSafety("app")
7659cmd void vkCmdBindDescriptorSets(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007660 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007661 VkPipelineBindPoint pipelineBindPoint,
7662 VkPipelineLayout layout,
7663 u32 firstSet,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007664 u32 descriptorSetCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007665 const VkDescriptorSet* pDescriptorSets,
7666 u32 dynamicOffsetCount,
7667 const u32* pDynamicOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007668 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007669
Jesse Hall03b6fe12015-11-24 12:44:21 -08007670 descriptorSets := pDescriptorSets[0:descriptorSetCount]
7671 for i in (0 .. descriptorSetCount) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007672 descriptorSet := descriptorSets[i]
7673 descriptorSetObject := GetDescriptorSet(descriptorSet)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007674 assert(commandBufferObject.device == descriptorSetObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007675 }
7676
7677 dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount]
7678 for i in (0 .. dynamicOffsetCount) {
7679 dynamicOffset := dynamicOffsets[i]
7680 }
7681
Jesse Halld8bade02015-11-24 10:24:18 -08007682 queue := switch (pipelineBindPoint) {
Jesse Halld27f6aa2015-08-15 17:58:48 -07007683 case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT
7684 case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT
7685 }
Jesse Hall3fbc8562015-11-29 22:10:52 -08007686 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007687}
7688
7689@threadSafety("app")
7690cmd void vkCmdBindIndexBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007691 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007692 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007693 VkDeviceSize offset,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007694 VkIndexType indexType) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007695 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007696 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007697 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007698
Jesse Hall3fbc8562015-11-29 22:10:52 -08007699 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007700
Jesse Hall3fbc8562015-11-29 22:10:52 -08007701 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007702}
7703
7704@threadSafety("app")
7705cmd void vkCmdBindVertexBuffers(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007706 VkCommandBuffer commandBuffer,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007707 u32 firstBinding,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007708 u32 bindingCount,
7709 const VkBuffer* pBuffers,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007710 const VkDeviceSize* pOffsets) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007711 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007712
Jesse Hallf9fa9a52016-01-08 16:08:51 -08007713 // TODO: check if not [firstBinding:firstBinding+bindingCount]
Jesse Halld27f6aa2015-08-15 17:58:48 -07007714 buffers := pBuffers[0:bindingCount]
7715 offsets := pOffsets[0:bindingCount]
7716 for i in (0 .. bindingCount) {
7717 buffer := buffers[i]
7718 offset := offsets[i]
7719 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007720 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007721
Jesse Hall3fbc8562015-11-29 22:10:52 -08007722 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007723 }
7724
Jesse Hall3fbc8562015-11-29 22:10:52 -08007725 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007726}
7727
7728@threadSafety("app")
7729cmd void vkCmdDraw(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007730 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007731 u32 vertexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007732 u32 instanceCount,
7733 u32 firstVertex,
7734 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007735 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007736
Jesse Hall3fbc8562015-11-29 22:10:52 -08007737 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007738}
7739
7740@threadSafety("app")
7741cmd void vkCmdDrawIndexed(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007742 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007743 u32 indexCount,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007744 u32 instanceCount,
7745 u32 firstIndex,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007746 s32 vertexOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007747 u32 firstInstance) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007748 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007749
Jesse Hall3fbc8562015-11-29 22:10:52 -08007750 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007751}
7752
7753@threadSafety("app")
7754cmd void vkCmdDrawIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007755 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007756 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007757 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007758 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007759 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007760 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007761 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007762 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007763
Jesse Hall3fbc8562015-11-29 22:10:52 -08007764 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007765
Jesse Hall3fbc8562015-11-29 22:10:52 -08007766 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007767}
7768
7769@threadSafety("app")
7770cmd void vkCmdDrawIndexedIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007771 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007772 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007773 VkDeviceSize offset,
Jesse Hall03b6fe12015-11-24 12:44:21 -08007774 u32 drawCount,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007775 u32 stride) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007776 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007777 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007778 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007779
Jesse Hall3fbc8562015-11-29 22:10:52 -08007780 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007781
Jesse Hall3fbc8562015-11-29 22:10:52 -08007782 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007783}
7784
7785@threadSafety("app")
7786cmd void vkCmdDispatch(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007787 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08007788 u32 groupCountX,
7789 u32 groupCountY,
7790 u32 groupCountZ) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007791 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007792
Jesse Hall3fbc8562015-11-29 22:10:52 -08007793 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007794}
7795
7796@threadSafety("app")
7797cmd void vkCmdDispatchIndirect(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007798 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007799 VkBuffer buffer,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007800 VkDeviceSize offset) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007801 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007802 bufferObject := GetBuffer(buffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007803 assert(commandBufferObject.device == bufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007804
Jesse Hall3fbc8562015-11-29 22:10:52 -08007805 bindCommandBuffer(commandBuffer, buffer, bufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007806
Jesse Hall3fbc8562015-11-29 22:10:52 -08007807 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007808}
7809
7810@threadSafety("app")
7811cmd void vkCmdCopyBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007812 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007813 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007814 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007815 u32 regionCount,
7816 const VkBufferCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007817 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007818 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007819 dstBufferObject := GetBuffer(dstBuffer)
7820 assert(commandBufferObject.device == srcBufferObject.device)
7821 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007822
7823 regions := pRegions[0:regionCount]
7824 for i in (0 .. regionCount) {
7825 region := regions[i]
7826 }
7827
Jesse Hall3fbc8562015-11-29 22:10:52 -08007828 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
7829 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007830
Jesse Hall65ab5522015-11-30 00:07:16 -08007831 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007832}
7833
7834@threadSafety("app")
7835cmd void vkCmdCopyImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007836 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007837 VkImage srcImage,
7838 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007839 VkImage dstImage,
7840 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007841 u32 regionCount,
7842 const VkImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007843 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007844 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007845 dstImageObject := GetImage(dstImage)
7846 assert(commandBufferObject.device == srcImageObject.device)
7847 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007848
7849 regions := pRegions[0:regionCount]
7850 for i in (0 .. regionCount) {
7851 region := regions[i]
7852 }
7853
Jesse Hall3fbc8562015-11-29 22:10:52 -08007854 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
7855 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007856
Jesse Hall65ab5522015-11-30 00:07:16 -08007857 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007858}
7859
7860@threadSafety("app")
7861cmd void vkCmdBlitImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007862 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007863 VkImage srcImage,
7864 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007865 VkImage dstImage,
7866 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007867 u32 regionCount,
7868 const VkImageBlit* pRegions,
Jesse Hall23ff73f2015-11-29 14:36:39 -08007869 VkFilter filter) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007870 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007871 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007872 dstImageObject := GetImage(dstImage)
7873 assert(commandBufferObject.device == srcImageObject.device)
7874 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007875
7876 regions := pRegions[0:regionCount]
7877 for i in (0 .. regionCount) {
7878 region := regions[i]
7879 }
7880
Jesse Hall3fbc8562015-11-29 22:10:52 -08007881 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
7882 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007883
Jesse Hall3fbc8562015-11-29 22:10:52 -08007884 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007885}
7886
7887@threadSafety("app")
7888cmd void vkCmdCopyBufferToImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007889 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007890 VkBuffer srcBuffer,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007891 VkImage dstImage,
7892 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007893 u32 regionCount,
7894 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007895 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007896 srcBufferObject := GetBuffer(srcBuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007897 dstImageObject := GetImage(dstImage)
7898 assert(commandBufferObject.device == srcBufferObject.device)
7899 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007900
7901 regions := pRegions[0:regionCount]
7902 for i in (0 .. regionCount) {
7903 region := regions[i]
7904 }
7905
Jesse Hall3fbc8562015-11-29 22:10:52 -08007906 bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory)
7907 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007908
Jesse Hall65ab5522015-11-30 00:07:16 -08007909 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007910}
7911
7912@threadSafety("app")
7913cmd void vkCmdCopyImageToBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007914 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007915 VkImage srcImage,
7916 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08007917 VkBuffer dstBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007918 u32 regionCount,
7919 const VkBufferImageCopy* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007920 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007921 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007922 dstBufferObject := GetBuffer(dstBuffer)
7923 assert(commandBufferObject.device == srcImageObject.device)
7924 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007925
7926 regions := pRegions[0:regionCount]
7927 for i in (0 .. regionCount) {
7928 region := regions[i]
7929 }
7930
Jesse Hall3fbc8562015-11-29 22:10:52 -08007931 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
7932 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007933
Jesse Hall65ab5522015-11-30 00:07:16 -08007934 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007935}
7936
7937@threadSafety("app")
7938cmd void vkCmdUpdateBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007939 VkCommandBuffer commandBuffer,
7940 VkBuffer dstBuffer,
7941 VkDeviceSize dstOffset,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007942 VkDeviceSize dataSize,
Jesse Hall56d386a2016-07-26 15:20:40 -07007943 const void* pData) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007944 commandBufferObject := GetCommandBuffer(commandBuffer)
7945 dstBufferObject := GetBuffer(dstBuffer)
7946 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007947
7948 data := pData[0:dataSize]
7949
Jesse Hall3fbc8562015-11-29 22:10:52 -08007950 bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007951
Jesse Hall65ab5522015-11-30 00:07:16 -08007952 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007953}
7954
7955@threadSafety("app")
7956cmd void vkCmdFillBuffer(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007957 VkCommandBuffer commandBuffer,
7958 VkBuffer dstBuffer,
7959 VkDeviceSize dstOffset,
Jesse Hallb00daad2015-11-29 19:46:20 -08007960 VkDeviceSize size,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007961 u32 data) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007962 commandBufferObject := GetCommandBuffer(commandBuffer)
7963 dstBufferObject := GetBuffer(dstBuffer)
7964 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007965
Jesse Hall65ab5522015-11-30 00:07:16 -08007966 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007967}
7968
7969@threadSafety("app")
7970cmd void vkCmdClearColorImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007971 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007972 VkImage image,
7973 VkImageLayout imageLayout,
7974 const VkClearColorValue* pColor,
7975 u32 rangeCount,
7976 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007977 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007978 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08007979 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007980
7981 ranges := pRanges[0:rangeCount]
7982 for i in (0 .. rangeCount) {
7983 range := ranges[i]
7984 }
7985
Jesse Hall3fbc8562015-11-29 22:10:52 -08007986 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007987
Jesse Hall3fbc8562015-11-29 22:10:52 -08007988 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07007989}
7990
7991@threadSafety("app")
7992cmd void vkCmdClearDepthStencilImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08007993 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007994 VkImage image,
7995 VkImageLayout imageLayout,
Jesse Hall5ae3abb2015-10-08 14:00:22 -07007996 const VkClearDepthStencilValue* pDepthStencil,
Jesse Halld27f6aa2015-08-15 17:58:48 -07007997 u32 rangeCount,
7998 const VkImageSubresourceRange* pRanges) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08007999 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008000 imageObject := GetImage(image)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008001 assert(commandBufferObject.device == imageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008002
8003 ranges := pRanges[0:rangeCount]
8004 for i in (0 .. rangeCount) {
8005 range := ranges[i]
8006 }
8007
Jesse Hall3fbc8562015-11-29 22:10:52 -08008008 bindCommandBuffer(commandBuffer, image, imageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008009
Jesse Hall3fbc8562015-11-29 22:10:52 -08008010 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008011}
8012
8013@threadSafety("app")
Jesse Hallae38f732015-11-19 21:32:50 -08008014cmd void vkCmdClearAttachments(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008015 VkCommandBuffer commandBuffer,
Jesse Hallae38f732015-11-19 21:32:50 -08008016 u32 attachmentCount,
8017 const VkClearAttachment* pAttachments,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008018 u32 rectCount,
Jesse Halla15a4bf2015-11-19 22:48:02 -08008019 const VkClearRect* pRects) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008020 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008021
8022 rects := pRects[0:rectCount]
8023 for i in (0 .. rectCount) {
8024 rect := rects[i]
8025 }
8026
Jesse Hall3fbc8562015-11-29 22:10:52 -08008027 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008028}
8029
8030@threadSafety("app")
8031cmd void vkCmdResolveImage(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008032 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008033 VkImage srcImage,
8034 VkImageLayout srcImageLayout,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008035 VkImage dstImage,
8036 VkImageLayout dstImageLayout,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008037 u32 regionCount,
8038 const VkImageResolve* pRegions) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008039 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008040 srcImageObject := GetImage(srcImage)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008041 dstImageObject := GetImage(dstImage)
8042 assert(commandBufferObject.device == srcImageObject.device)
8043 assert(commandBufferObject.device == dstImageObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008044
8045 regions := pRegions[0:regionCount]
8046 for i in (0 .. regionCount) {
8047 region := regions[i]
8048 }
8049
Jesse Hall3fbc8562015-11-29 22:10:52 -08008050 bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory)
8051 bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008052
Jesse Hall3fbc8562015-11-29 22:10:52 -08008053 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008054}
8055
8056@threadSafety("app")
8057cmd void vkCmdSetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008058 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008059 VkEvent event,
8060 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008061 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008062 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008063 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008064}
8065
8066@threadSafety("app")
8067cmd void vkCmdResetEvent(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008068 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008069 VkEvent event,
8070 VkPipelineStageFlags stageMask) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008071 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008072 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008073 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008074}
8075
8076@threadSafety("app")
8077cmd void vkCmdWaitEvents(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008078 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008079 u32 eventCount,
8080 const VkEvent* pEvents,
8081 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008082 VkPipelineStageFlags dstStageMask,
8083 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008084 const VkMemoryBarrier* pMemoryBarriers,
8085 u32 bufferMemoryBarrierCount,
8086 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
8087 u32 imageMemoryBarrierCount,
8088 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008089 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008090
8091 events := pEvents[0:eventCount]
8092 for i in (0 .. eventCount) {
8093 event := events[i]
8094 eventObject := GetEvent(event)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008095 assert(commandBufferObject.device == eventObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008096 }
8097
Jesse Hall3dd678a2016-01-08 21:52:01 -08008098 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08008099 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08008100 memoryBarrier := memoryBarriers[i]
8101 }
8102 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
8103 for i in (0 .. bufferMemoryBarrierCount) {
8104 bufferMemoryBarrier := bufferMemoryBarriers[i]
8105 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
8106 assert(bufferObject.device == commandBufferObject.device)
8107 }
8108 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
8109 for i in (0 .. imageMemoryBarrierCount) {
8110 imageMemoryBarrier := imageMemoryBarriers[i]
8111 imageObject := GetImage(imageMemoryBarrier.image)
8112 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008113 }
8114}
8115
8116@threadSafety("app")
8117cmd void vkCmdPipelineBarrier(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008118 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008119 VkPipelineStageFlags srcStageMask,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008120 VkPipelineStageFlags dstStageMask,
Jesse Halldc6d36c2015-11-29 19:12:15 -08008121 VkDependencyFlags dependencyFlags,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008122 u32 memoryBarrierCount,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008123 const VkMemoryBarrier* pMemoryBarriers,
8124 u32 bufferMemoryBarrierCount,
8125 const VkBufferMemoryBarrier* pBufferMemoryBarriers,
8126 u32 imageMemoryBarrierCount,
8127 const VkImageMemoryBarrier* pImageMemoryBarriers) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008128 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008129
Jesse Hall3dd678a2016-01-08 21:52:01 -08008130 memoryBarriers := pMemoryBarriers[0:memoryBarrierCount]
Jesse Hall3fbc8562015-11-29 22:10:52 -08008131 for i in (0 .. memoryBarrierCount) {
Jesse Hall3dd678a2016-01-08 21:52:01 -08008132 memoryBarrier := memoryBarriers[i]
8133 }
8134 bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount]
8135 for i in (0 .. bufferMemoryBarrierCount) {
8136 bufferMemoryBarrier := bufferMemoryBarriers[i]
8137 bufferObject := GetBuffer(bufferMemoryBarrier.buffer)
8138 assert(bufferObject.device == commandBufferObject.device)
8139 }
8140 imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount]
8141 for i in (0 .. imageMemoryBarrierCount) {
8142 imageMemoryBarrier := imageMemoryBarriers[i]
8143 imageObject := GetImage(imageMemoryBarrier.image)
8144 assert(imageObject.device == commandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008145 }
8146}
8147
8148@threadSafety("app")
8149cmd void vkCmdBeginQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008150 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008151 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008152 u32 query,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008153 VkQueryControlFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008154 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008155 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008156 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008157}
8158
8159@threadSafety("app")
8160cmd void vkCmdEndQuery(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008161 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008162 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008163 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008164 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008165 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008166 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008167}
8168
8169@threadSafety("app")
8170cmd void vkCmdResetQueryPool(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008171 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008172 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008173 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008174 u32 queryCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008175 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008176 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008177 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008178}
8179
8180@threadSafety("app")
8181cmd void vkCmdWriteTimestamp(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008182 VkCommandBuffer commandBuffer,
Jesse Hall6f39a6d2015-11-24 11:08:36 -08008183 VkPipelineStageFlagBits pipelineStage,
Jesse Halla3a7a1d2015-11-24 11:37:23 -08008184 VkQueryPool queryPool,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008185 u32 query) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008186 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halla3a7a1d2015-11-24 11:37:23 -08008187 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008188 assert(commandBufferObject.device == queryPoolObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008189}
8190
8191@threadSafety("app")
8192cmd void vkCmdCopyQueryPoolResults(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008193 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008194 VkQueryPool queryPool,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008195 u32 firstQuery,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008196 u32 queryCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008197 VkBuffer dstBuffer,
8198 VkDeviceSize dstOffset,
Jesse Halla9bb62b2015-11-21 19:31:56 -08008199 VkDeviceSize stride,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008200 VkQueryResultFlags flags) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008201 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008202 queryPoolObject := GetQueryPool(queryPool)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008203 dstBufferObject := GetBuffer(dstBuffer)
8204 assert(commandBufferObject.device == queryPoolObject.device)
8205 assert(commandBufferObject.device == dstBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008206}
8207
8208cmd void vkCmdPushConstants(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008209 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008210 VkPipelineLayout layout,
8211 VkShaderStageFlags stageFlags,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008212 u32 offset,
8213 u32 size,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08008214 const void* pValues) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008215 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008216 layoutObject := GetPipelineLayout(layout)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008217 assert(commandBufferObject.device == layoutObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008218}
8219
8220@threadSafety("app")
8221cmd void vkCmdBeginRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008222 VkCommandBuffer commandBuffer,
Jesse Halld27f6aa2015-08-15 17:58:48 -07008223 const VkRenderPassBeginInfo* pRenderPassBegin,
Jesse Hall65ab5522015-11-30 00:07:16 -08008224 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008225 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008226 renderPassObject := GetRenderPass(pRenderPassBegin.renderPass)
8227 framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer)
Jesse Hall3fbc8562015-11-29 22:10:52 -08008228 assert(commandBufferObject.device == renderPassObject.device)
8229 assert(commandBufferObject.device == framebufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008230
Jesse Hall3fbc8562015-11-29 22:10:52 -08008231 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008232}
8233
8234cmd void vkCmdNextSubpass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008235 VkCommandBuffer commandBuffer,
Jesse Hall65ab5522015-11-30 00:07:16 -08008236 VkSubpassContents contents) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008237 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008238}
8239
8240@threadSafety("app")
8241cmd void vkCmdEndRenderPass(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008242 VkCommandBuffer commandBuffer) {
8243 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008244
Jesse Hall3fbc8562015-11-29 22:10:52 -08008245 commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008246}
8247
8248cmd void vkCmdExecuteCommands(
Jesse Hall3fbc8562015-11-29 22:10:52 -08008249 VkCommandBuffer commandBuffer,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008250 u32 commandBufferCount,
Jesse Hall3fbc8562015-11-29 22:10:52 -08008251 const VkCommandBuffer* pCommandBuffers) {
8252 commandBufferObject := GetCommandBuffer(commandBuffer)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008253
Jesse Hall3dd678a2016-01-08 21:52:01 -08008254 commandBuffers := pCommandBuffers[0:commandBufferCount]
8255 for i in (0 .. commandBufferCount) {
Jesse Hall3fbc8562015-11-29 22:10:52 -08008256 secondaryCommandBuffer := commandBuffers[i]
8257 secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer)
8258 assert(commandBufferObject.device == secondaryCommandBufferObject.device)
Jesse Halld27f6aa2015-08-15 17:58:48 -07008259 }
8260}
8261
Daniel Kochf25f5bb2017-10-05 00:26:58 -04008262//@version 1.1 functions
8263
8264cmd VkResult vkEnumerateInstanceVersion(
8265 u32* pApiVersion) {
8266 return ?
8267}
8268
8269cmd VkResult vkBindBufferMemory2(
8270 VkDevice device,
8271 u32 bindInfoCount,
8272 const VkBindBufferMemoryInfo* pBindInfos) {
8273 return ?
8274}
8275
8276cmd VkResult vkBindImageMemory2(
8277 VkDevice device,
8278 u32 bindInfoCount,
8279 const VkBindImageMemoryInfo* pBindInfos) {
8280 return ?
8281}
8282
8283cmd void vkGetDeviceGroupPeerMemoryFeatures(
8284 VkDevice device,
8285 u32 heapIndex,
8286 u32 localDeviceIndex,
8287 u32 remoteDeviceIndex,
8288 VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) {
8289}
8290
8291cmd void vkCmdSetDeviceMask(
8292 VkCommandBuffer commandBuffer,
8293 u32 deviceMask) {
8294}
8295
8296cmd void vkCmdDispatchBase(
8297 VkCommandBuffer commandBuffer,
8298 u32 baseGroupX,
8299 u32 baseGroupY,
8300 u32 baseGroupZ,
8301 u32 groupCountX,
8302 u32 groupCountY,
8303 u32 groupCountZ) {
8304}
8305
8306@threadSafety("system")
8307cmd VkResult vkEnumeratePhysicalDeviceGroups(
8308 VkInstance instance,
8309 u32* pPhysicalDeviceGroupCount,
8310 VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) {
8311 instanceObject := GetInstance(instance)
8312
8313 physicalDeviceGroupCount := as!u32(?)
8314 pPhysicalDeviceGroupCount[0] = physicalDeviceGroupCount
8315 physicalDevices := pPhysicalDeviceGroupProperties[0:physicalDeviceGroupCount]
8316
8317 for i in (0 .. physicalDeviceGroupCount) {
8318 physicalDevice := ?
8319 physicalDevices[i] = physicalDevice
8320 if !(physicalDevice in State.PhysicalDevices) {
8321 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
8322 }
8323 }
8324
8325 return ?
8326}
8327
8328cmd void vkGetImageMemoryRequirements2(
8329 VkDevice device,
8330 const VkImageMemoryRequirementsInfo2* pInfo,
8331 VkMemoryRequirements2* pMemoryRequirements) {
8332}
8333
8334cmd void vkGetBufferMemoryRequirements2(
8335 VkDevice device,
8336 const VkBufferMemoryRequirementsInfo2* pInfo,
8337 VkMemoryRequirements2* pMemoryRequirements) {
8338}
8339
8340cmd void vkGetImageSparseMemoryRequirements2(
8341 VkDevice device,
8342 const VkImageSparseMemoryRequirementsInfo2* pInfo,
8343 u32* pSparseMemoryRequirementCount,
8344 VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) {
8345}
8346
8347cmd void vkGetPhysicalDeviceFeatures2(
8348 VkPhysicalDevice physicalDevice,
8349 VkPhysicalDeviceFeatures2* pFeatures) {
8350}
8351
8352cmd void vkGetPhysicalDeviceProperties2(
8353 VkPhysicalDevice physicalDevice,
8354 VkPhysicalDeviceProperties2* pProperties) {
8355}
8356
8357cmd void vkGetPhysicalDeviceFormatProperties2(
8358 VkPhysicalDevice physicalDevice,
8359 VkFormat format,
8360 VkFormatProperties2* pFormatProperties) {
8361}
8362
8363cmd VkResult vkGetPhysicalDeviceImageFormatProperties2(
8364 VkPhysicalDevice physicalDevice,
8365 const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
8366 VkImageFormatProperties2* pImageFormatProperties) {
8367 return ?
8368}
8369
8370cmd void vkGetPhysicalDeviceQueueFamilyProperties2(
8371 VkPhysicalDevice physicalDevice,
8372 u32* pQueueFamilyPropertyCount,
8373 VkQueueFamilyProperties2* pQueueFamilyProperties) {
8374}
8375
8376cmd void vkGetPhysicalDeviceMemoryProperties2(
8377 VkPhysicalDevice physicalDevice,
8378 VkPhysicalDeviceMemoryProperties2* pMemoryProperties) {
8379}
8380
8381cmd void vkGetPhysicalDeviceSparseImageFormatProperties2(
8382 VkPhysicalDevice physicalDevice,
8383 const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
8384 u32* pPropertyCount,
8385 VkSparseImageFormatProperties2* pProperties) {
8386}
8387
8388cmd void vkTrimCommandPool(
8389 VkDevice device,
8390 VkCommandPool commandPool,
8391 VkCommandPoolTrimFlags flags) {
8392}
8393
8394
8395cmd void vkGetDeviceQueue2(
8396 VkDevice device,
8397 const VkDeviceQueueInfo2* pQueueInfo,
8398 VkQueue* pQueue) {
8399 deviceObject := GetDevice(device)
8400
8401 queue := ?
8402 pQueue[0] = queue
8403
8404 if !(queue in State.Queues) {
8405 State.Queues[queue] = new!QueueObject(device: device)
8406 }
8407}
8408
8409cmd VkResult vkCreateSamplerYcbcrConversion(
8410 VkDevice device,
8411 const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
8412 const VkAllocationCallbacks* pAllocator,
8413 VkSamplerYcbcrConversion* pYcbcrConversion) {
8414 return ?
8415}
8416
8417cmd void vkDestroySamplerYcbcrConversion(
8418 VkDevice device,
8419 VkSamplerYcbcrConversion ycbcrConversion,
8420 const VkAllocationCallbacks* pAllocator) {
8421}
8422
8423cmd VkResult vkCreateDescriptorUpdateTemplate(
8424 VkDevice device,
8425 const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
8426 const VkAllocationCallbacks* pAllocator,
8427 VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) {
8428 return ?
8429}
8430
8431cmd void vkDestroyDescriptorUpdateTemplate(
8432 VkDevice device,
8433 VkDescriptorUpdateTemplate descriptorUpdateTemplate,
8434 const VkAllocationCallbacks* pAllocator) {
8435}
8436
8437cmd void vkUpdateDescriptorSetWithTemplate(
8438 VkDevice device,
8439 VkDescriptorSet descriptorSet,
8440 VkDescriptorUpdateTemplate descriptorUpdateTemplate,
8441 const void* pData) {
8442}
8443
8444cmd void vkGetPhysicalDeviceExternalBufferProperties(
8445 VkPhysicalDevice physicalDevice,
8446 const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
8447 VkExternalBufferProperties* pExternalBufferProperties) {
8448}
8449
8450cmd void vkGetPhysicalDeviceExternalFenceProperties(
8451 VkPhysicalDevice physicalDevice,
8452 const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
8453 VkExternalFenceProperties* pExternalFenceProperties) {
8454}
8455
8456cmd void vkGetPhysicalDeviceExternalSemaphoreProperties(
8457 VkPhysicalDevice physicalDevice,
8458 const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
8459 VkExternalSemaphoreProperties* pExternalSemaphoreProperties) {
8460}
8461
8462cmd void vkGetDescriptorSetLayoutSupport(
8463 VkDevice device,
8464 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
8465 VkDescriptorSetLayoutSupport* pSupport) {
8466}
8467
8468
Jesse Hallad250842017-03-10 18:35:38 -08008469@extension("VK_KHR_surface") // 1
Jesse Hall1356b0d2015-11-23 17:24:58 -08008470cmd void vkDestroySurfaceKHR(
8471 VkInstance instance,
Jesse Hall0e74f002015-11-30 11:37:59 -08008472 VkSurfaceKHR surface,
8473 const VkAllocationCallbacks* pAllocator) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008474 instanceObject := GetInstance(instance)
8475 surfaceObject := GetSurface(surface)
8476 assert(surfaceObject.instance == instance)
Michael Lentine88594d72015-11-12 12:49:45 -08008477
Jesse Hall1356b0d2015-11-23 17:24:58 -08008478 State.Surfaces[surface] = null
Jesse Hall2818f932015-11-19 21:19:17 -08008479}
8480
Jesse Hallad250842017-03-10 18:35:38 -08008481@extension("VK_KHR_surface") // 1
Jesse Halla6429252015-11-29 18:59:42 -08008482cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008483 VkPhysicalDevice physicalDevice,
8484 u32 queueFamilyIndex,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008485 VkSurfaceKHR surface,
Jesse Hallb00daad2015-11-29 19:46:20 -08008486 VkBool32* pSupported) {
8487 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08008488
8489 return ?
8490}
8491
Jesse Hallad250842017-03-10 18:35:38 -08008492@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08008493cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
8494 VkPhysicalDevice physicalDevice,
8495 VkSurfaceKHR surface,
8496 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
8497 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8498
8499 surfaceCapabilities := ?
8500 pSurfaceCapabilities[0] = surfaceCapabilities
8501
8502 return ?
8503}
8504
Jesse Hallad250842017-03-10 18:35:38 -08008505@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08008506cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
8507 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008508 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008509 u32* pSurfaceFormatCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008510 VkSurfaceFormatKHR* pSurfaceFormats) {
Jesse Hallb00daad2015-11-29 19:46:20 -08008511 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08008512
8513 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08008514 pSurfaceFormatCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08008515 surfaceFormats := pSurfaceFormats[0:count]
8516
8517 for i in (0 .. count) {
8518 surfaceFormat := ?
8519 surfaceFormats[i] = surfaceFormat
8520 }
8521
8522 return ?
8523}
8524
Jesse Hallad250842017-03-10 18:35:38 -08008525@extension("VK_KHR_surface") // 1
Jesse Hallb00daad2015-11-29 19:46:20 -08008526cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
8527 VkPhysicalDevice physicalDevice,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008528 VkSurfaceKHR surface,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008529 u32* pPresentModeCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008530 VkPresentModeKHR* pPresentModes) {
Jesse Hallb00daad2015-11-29 19:46:20 -08008531 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Michael Lentine88594d72015-11-12 12:49:45 -08008532
8533 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08008534 pPresentModeCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08008535 presentModes := pPresentModes[0:count]
8536
8537 for i in (0 .. count) {
8538 presentMode := ?
8539 presentModes[i] = presentMode
8540 }
8541
8542 return ?
8543}
8544
Jesse Hallad250842017-03-10 18:35:38 -08008545@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008546cmd VkResult vkCreateSwapchainKHR(
8547 VkDevice device,
8548 const VkSwapchainCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008549 const VkAllocationCallbacks* pAllocator,
Michael Lentine88594d72015-11-12 12:49:45 -08008550 VkSwapchainKHR* pSwapchain) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008551 assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Michael Lentine88594d72015-11-12 12:49:45 -08008552 deviceObject := GetDevice(device)
8553
8554 swapchain := ?
8555 pSwapchain[0] = swapchain
8556 State.Swapchains[swapchain] = new!SwapchainObject(device: device)
8557
8558 return ?
8559}
8560
Jesse Hallad250842017-03-10 18:35:38 -08008561@extension("VK_KHR_swapchain") // 2
Jesse Hall1356b0d2015-11-23 17:24:58 -08008562cmd void vkDestroySwapchainKHR(
Michael Lentine88594d72015-11-12 12:49:45 -08008563 VkDevice device,
Jesse Hall0e74f002015-11-30 11:37:59 -08008564 VkSwapchainKHR swapchain,
8565 const VkAllocationCallbacks* pAllocator) {
Michael Lentine88594d72015-11-12 12:49:45 -08008566 deviceObject := GetDevice(device)
8567 swapchainObject := GetSwapchain(swapchain)
8568 assert(swapchainObject.device == device)
8569
8570 State.Swapchains[swapchain] = null
Michael Lentine88594d72015-11-12 12:49:45 -08008571}
8572
Jesse Hallad250842017-03-10 18:35:38 -08008573@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008574cmd VkResult vkGetSwapchainImagesKHR(
8575 VkDevice device,
8576 VkSwapchainKHR swapchain,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008577 u32* pSwapchainImageCount,
Michael Lentine88594d72015-11-12 12:49:45 -08008578 VkImage* pSwapchainImages) {
8579 deviceObject := GetDevice(device)
8580
8581 count := as!u32(?)
Jesse Hall03b6fe12015-11-24 12:44:21 -08008582 pSwapchainImageCount[0] = count
Michael Lentine88594d72015-11-12 12:49:45 -08008583 swapchainImages := pSwapchainImages[0:count]
8584
8585 for i in (0 .. count) {
8586 swapchainImage := ?
8587 swapchainImages[i] = swapchainImage
Jesse Hall1356b0d2015-11-23 17:24:58 -08008588 State.Images[swapchainImage] = new!ImageObject(device: device)
Michael Lentine88594d72015-11-12 12:49:45 -08008589 }
8590
8591 return ?
8592}
8593
Jesse Hallad250842017-03-10 18:35:38 -08008594@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008595cmd VkResult vkAcquireNextImageKHR(
8596 VkDevice device,
8597 VkSwapchainKHR swapchain,
8598 u64 timeout,
8599 VkSemaphore semaphore,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008600 VkFence fence,
Michael Lentine88594d72015-11-12 12:49:45 -08008601 u32* pImageIndex) {
8602 deviceObject := GetDevice(device)
8603 swapchainObject := GetSwapchain(swapchain)
8604
8605 imageIndex := ?
8606 pImageIndex[0] = imageIndex
8607
8608 return ?
8609}
8610
Jesse Hallad250842017-03-10 18:35:38 -08008611@extension("VK_KHR_swapchain") // 2
Michael Lentine88594d72015-11-12 12:49:45 -08008612cmd VkResult vkQueuePresentKHR(
8613 VkQueue queue,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08008614 const VkPresentInfoKHR* pPresentInfo) {
Michael Lentine88594d72015-11-12 12:49:45 -08008615 queueObject := GetQueue(queue)
8616
8617 presentInfo := ?
8618 pPresentInfo[0] = presentInfo
8619
8620 return ?
8621}
8622
Daniel Kochf25f5bb2017-10-05 00:26:58 -04008623//@version 1.1
8624@extension("VK_KHR_swapchain") // 2
8625cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHR(
8626 VkDevice device,
8627 VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) {
8628 return ?
8629}
8630
8631//@version 1.1
8632@extension("VK_KHR_swapchain") // 2
8633cmd VkResult vkGetDeviceGroupSurfacePresentModesKHR(
8634 VkDevice device,
8635 VkSurfaceKHR surface,
8636 VkDeviceGroupPresentModeFlagsKHR* pModes) {
8637 return ?
8638}
8639
8640//@version 1.1
8641@extension("VK_KHR_swapchain") // 2
8642cmd VkResult vkGetPhysicalDevicePresentRectanglesKHR(
8643 VkPhysicalDevice physicalDevice,
8644 VkSurfaceKHR surface,
8645 u32* pRectCount,
8646 VkRect2D* pRects) {
8647 return ?
8648}
8649
8650//@version 1.1
8651@extension("VK_KHR_swapchain") // 2
8652cmd VkResult vkAcquireNextImage2KHR(
8653 VkDevice device,
8654 const VkAcquireNextImageInfoKHR* pAcquireInfo,
8655 u32* pImageIndex) {
8656 return ?
8657}
8658
Jesse Hallad250842017-03-10 18:35:38 -08008659@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08008660cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
8661 VkPhysicalDevice physicalDevice,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008662 u32* pPropertyCount,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008663 VkDisplayPropertiesKHR* pProperties) {
8664 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8665 return ?
8666}
8667
Jesse Hallad250842017-03-10 18:35:38 -08008668@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008669cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
8670 VkPhysicalDevice physicalDevice,
8671 u32* pPropertyCount,
8672 VkDisplayPlanePropertiesKHR* pProperties) {
8673 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8674 return ?
8675}
8676
Jesse Hallad250842017-03-10 18:35:38 -08008677@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008678cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
8679 VkPhysicalDevice physicalDevice,
Jesse Hall3dd678a2016-01-08 21:52:01 -08008680 u32 planeIndex,
Jesse Hallf4ab2b12015-11-30 16:04:55 -08008681 u32* pDisplayCount,
8682 VkDisplayKHR* pDisplays) {
Jesse Halla6429252015-11-29 18:59:42 -08008683 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8684 return ?
8685}
8686
Jesse Hallad250842017-03-10 18:35:38 -08008687@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08008688cmd VkResult vkGetDisplayModePropertiesKHR(
8689 VkPhysicalDevice physicalDevice,
8690 VkDisplayKHR display,
Jesse Hall03b6fe12015-11-24 12:44:21 -08008691 u32* pPropertyCount,
8692 VkDisplayModePropertiesKHR* pProperties) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008693 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8694 return ?
8695}
8696
Jesse Hallad250842017-03-10 18:35:38 -08008697@extension("VK_KHR_display") // 3
Jesse Hall1356b0d2015-11-23 17:24:58 -08008698cmd VkResult vkCreateDisplayModeKHR(
8699 VkPhysicalDevice physicalDevice,
8700 VkDisplayKHR display,
8701 const VkDisplayModeCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008702 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008703 VkDisplayModeKHR* pMode) {
8704 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8705 return ?
8706}
8707
Jesse Hallad250842017-03-10 18:35:38 -08008708@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008709cmd VkResult vkGetDisplayPlaneCapabilitiesKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008710 VkPhysicalDevice physicalDevice,
Jesse Hall9ba8bc82015-11-30 16:22:16 -08008711 VkDisplayModeKHR mode,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008712 u32 planeIndex,
Jesse Halla6429252015-11-29 18:59:42 -08008713 VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Jesse Hall1356b0d2015-11-23 17:24:58 -08008714 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8715 return ?
8716}
8717
Jesse Hallad250842017-03-10 18:35:38 -08008718@extension("VK_KHR_display") // 3
Jesse Halla6429252015-11-29 18:59:42 -08008719cmd VkResult vkCreateDisplayPlaneSurfaceKHR(
8720 VkInstance instance,
8721 const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008722 const VkAllocationCallbacks* pAllocator,
Jesse Halla6429252015-11-29 18:59:42 -08008723 VkSurfaceKHR* pSurface) {
8724 return ?
8725}
8726
Jesse Hallad250842017-03-10 18:35:38 -08008727@extension("VK_KHR_display_swapchain") // 4
Jesse Hall9ba8bc82015-11-30 16:22:16 -08008728cmd VkResult vkCreateSharedSwapchainsKHR(
8729 VkDevice device,
8730 u32 swapchainCount,
8731 const VkSwapchainCreateInfoKHR* pCreateInfos,
8732 const VkAllocationCallbacks* pAllocator,
8733 VkSwapchainKHR* pSwapchains) {
8734 return ?
8735}
8736
Jesse Hallad250842017-03-10 18:35:38 -08008737@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08008738cmd VkResult vkCreateXlibSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008739 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008740 const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008741 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008742 VkSurfaceKHR* pSurface) {
8743 instanceObject := GetInstance(instance)
8744 return ?
8745}
8746
Jesse Hallad250842017-03-10 18:35:38 -08008747@extension("VK_KHR_xlib_surface") // 5
Jesse Halla6429252015-11-29 18:59:42 -08008748cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR(
8749 VkPhysicalDevice physicalDevice,
8750 u32 queueFamilyIndex,
8751 platform.Display* dpy,
Jesse Hall65ab5522015-11-30 00:07:16 -08008752 platform.VisualID visualID) {
Jesse Halla6429252015-11-29 18:59:42 -08008753 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8754 return ?
8755}
8756
Jesse Hallad250842017-03-10 18:35:38 -08008757@extension("VK_KHR_xcb_surface") // 6
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008758cmd VkResult vkCreateXcbSurfaceKHR(
Jesse Hall1356b0d2015-11-23 17:24:58 -08008759 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008760 const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008761 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008762 VkSurfaceKHR* pSurface) {
8763 instanceObject := GetInstance(instance)
8764 return ?
8765}
8766
Jesse Hallad250842017-03-10 18:35:38 -08008767@extension("VK_KHR_xcb_surface") // 6
Jesse Halla6429252015-11-29 18:59:42 -08008768cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR(
8769 VkPhysicalDevice physicalDevice,
8770 u32 queueFamilyIndex,
8771 platform.xcb_connection_t* connection,
8772 platform.xcb_visualid_t visual_id) {
8773 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8774 return ?
8775}
8776
Jesse Hallad250842017-03-10 18:35:38 -08008777@extension("VK_KHR_wayland_surface") // 7
Jesse Hall1356b0d2015-11-23 17:24:58 -08008778cmd VkResult vkCreateWaylandSurfaceKHR(
8779 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008780 const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008781 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008782 VkSurfaceKHR* pSurface) {
8783 instanceObject := GetInstance(instance)
8784 return ?
8785}
8786
Jesse Hallad250842017-03-10 18:35:38 -08008787@extension("VK_KHR_wayland_surface") // 7
Jesse Halla6429252015-11-29 18:59:42 -08008788cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
8789 VkPhysicalDevice physicalDevice,
8790 u32 queueFamilyIndex,
8791 platform.wl_display* display) {
8792 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8793 return ?
8794}
8795
Jesse Hallad250842017-03-10 18:35:38 -08008796@extension("VK_KHR_mir_surface") // 8
Jesse Hall1356b0d2015-11-23 17:24:58 -08008797cmd VkResult vkCreateMirSurfaceKHR(
8798 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008799 const VkMirSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008800 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008801 VkSurfaceKHR* pSurface) {
8802 instanceObject := GetInstance(instance)
8803 return ?
8804}
8805
Jesse Hallad250842017-03-10 18:35:38 -08008806@extension("VK_KHR_mir_surface") // 8
Jesse Halla6429252015-11-29 18:59:42 -08008807cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR(
8808 VkPhysicalDevice physicalDevice,
8809 u32 queueFamilyIndex,
8810 platform.MirConnection* connection) {
8811 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
8812 return ?
8813}
8814
Jesse Hallad250842017-03-10 18:35:38 -08008815@extension("VK_KHR_android_surface") // 9
Jesse Hall1356b0d2015-11-23 17:24:58 -08008816cmd VkResult vkCreateAndroidSurfaceKHR(
8817 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008818 const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008819 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008820 VkSurfaceKHR* pSurface) {
8821 instanceObject := GetInstance(instance)
8822 return ?
8823}
8824
Jesse Hallad250842017-03-10 18:35:38 -08008825@extension("VK_KHR_win32_surface") // 10
Jesse Hall1356b0d2015-11-23 17:24:58 -08008826cmd VkResult vkCreateWin32SurfaceKHR(
8827 VkInstance instance,
Jesse Hallf9fa9a52016-01-08 16:08:51 -08008828 const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
Jesse Hall0e74f002015-11-30 11:37:59 -08008829 const VkAllocationCallbacks* pAllocator,
Jesse Hall1356b0d2015-11-23 17:24:58 -08008830 VkSurfaceKHR* pSurface) {
8831 instanceObject := GetInstance(instance)
8832 return ?
8833}
8834
Jesse Hallad250842017-03-10 18:35:38 -08008835@extension("VK_KHR_win32_surface") // 10
Jesse Halla6429252015-11-29 18:59:42 -08008836cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
8837 VkPhysicalDevice physicalDevice,
8838 u32 queueFamilyIndex) {
Jesse Halle2948d82016-02-25 04:19:32 -08008839 physicalDeviceObject := GetPhysicalDevice(physicalDevice)
Jesse Halla6429252015-11-29 18:59:42 -08008840 return ?
8841}
8842
Jesse Hallad250842017-03-10 18:35:38 -08008843@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08008844@optional
Chia-I Wub262ddc2016-03-22 07:38:20 +08008845cmd VkResult vkGetSwapchainGrallocUsageANDROID(
8846 VkDevice device,
8847 VkFormat format,
8848 VkImageUsageFlags imageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08008849 s32* grallocUsage) {
Chia-I Wub262ddc2016-03-22 07:38:20 +08008850 return ?
8851}
8852
Jesse Hallad250842017-03-10 18:35:38 -08008853@extension("VK_ANDROID_native_buffer") // 11
Jesse Halld1abd742017-02-09 21:45:51 -08008854@optional
Chris Forbes8e4438b2016-12-07 16:26:49 +13008855cmd VkResult vkGetSwapchainGrallocUsage2ANDROID(
8856 VkDevice device,
8857 VkFormat format,
8858 VkImageUsageFlags imageUsage,
8859 VkSwapchainImageUsageFlagsANDROID swapchainImageUsage,
Jesse Halld1abd742017-02-09 21:45:51 -08008860 u64* grallocConsumerUsage,
8861 u64* grallocProducerUsage) {
Chris Forbes8e4438b2016-12-07 16:26:49 +13008862 return ?
8863}
8864
Jesse Hallad250842017-03-10 18:35:38 -08008865@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08008866cmd VkResult vkAcquireImageANDROID(
8867 VkDevice device,
8868 VkImage image,
8869 int nativeFenceFd,
8870 VkSemaphore semaphore,
8871 VkFence fence) {
8872 return ?
8873}
8874
Jesse Hallad250842017-03-10 18:35:38 -08008875@extension("VK_ANDROID_native_buffer") // 11
Chia-I Wub262ddc2016-03-22 07:38:20 +08008876cmd VkResult vkQueueSignalReleaseImageANDROID(
8877 VkQueue queue,
8878 u32 waitSemaphoreCount,
8879 const VkSemaphore* pWaitSemaphores,
8880 VkImage image,
8881 int* pNativeFenceFd) {
8882 return ?
8883}
8884
Jesse Hallad250842017-03-10 18:35:38 -08008885@extension("VK_EXT_debug_report") // 12
8886@external type void* PFN_vkDebugReportCallbackEXT
8887@extension("VK_EXT_debug_report") // 12
8888@pfn cmd VkBool32 vkDebugReportCallbackEXT(
8889 VkDebugReportFlagsEXT flags,
8890 VkDebugReportObjectTypeEXT objectType,
8891 u64 object,
8892 platform.size_t location,
8893 s32 messageCode,
8894 const char* pLayerPrefix,
8895 const char* pMessage,
8896 void* pUserData) {
8897 return ?
8898}
8899
8900@extension("VK_EXT_debug_report") // 12
8901cmd VkResult vkCreateDebugReportCallbackEXT(
8902 VkInstance instance,
8903 const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
8904 const VkAllocationCallbacks* pAllocator,
8905 VkDebugReportCallbackEXT* pCallback) {
8906 return ?
8907}
8908
8909@extension("VK_EXT_debug_report") // 12
8910cmd void vkDestroyDebugReportCallbackEXT(
8911 VkInstance instance,
8912 VkDebugReportCallbackEXT callback,
8913 const VkAllocationCallbacks* pAllocator) {
8914}
8915
8916@extension("VK_EXT_debug_report") // 12
8917cmd void vkDebugReportMessageEXT(
8918 VkInstance instance,
8919 VkDebugReportFlagsEXT flags,
8920 VkDebugReportObjectTypeEXT objectType,
8921 u64 object,
8922 platform.size_t location,
8923 s32 messageCode,
8924 const char* pLayerPrefix,
8925 const char* pMessage) {
8926}
8927
8928@extension("VK_EXT_debug_marker") // 23
8929cmd VkResult vkDebugMarkerSetObjectTagEXT(
8930 VkDevice device,
Jesse Hall77726222017-09-19 14:49:27 -05008931 const VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008932 return ?
8933}
8934
8935@extension("VK_EXT_debug_marker") // 23
8936cmd VkResult vkDebugMarkerSetObjectNameEXT(
8937 VkDevice device,
Jesse Hall77726222017-09-19 14:49:27 -05008938 const VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008939 return ?
8940}
8941
8942@extension("VK_EXT_debug_marker") // 23
8943cmd void vkCmdDebugMarkerBeginEXT(
8944 VkCommandBuffer commandBuffer,
Jesse Hall77726222017-09-19 14:49:27 -05008945 const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008946}
8947
8948@extension("VK_EXT_debug_marker") // 23
8949cmd void vkCmdDebugMarkerEndEXT(
8950 VkCommandBuffer commandBuffer) {
8951}
8952
8953@extension("VK_EXT_debug_marker") // 23
8954cmd void vkCmdDebugMarkerInsertEXT(
8955 VkCommandBuffer commandBuffer,
Jesse Hall77726222017-09-19 14:49:27 -05008956 const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08008957}
8958
8959@extension("VK_AMD_draw_indirect_count") // 34
8960cmd void vkCmdDrawIndirectCountAMD(
8961 VkCommandBuffer commandBuffer,
8962 VkBuffer buffer,
8963 VkDeviceSize offset,
8964 VkBuffer countBuffer,
8965 VkDeviceSize countBufferOffset,
8966 u32 maxDrawCount,
8967 u32 stride) {
8968}
8969
8970@extension("VK_AMD_draw_indirect_count") // 34
8971cmd void vkCmdDrawIndexedIndirectCountAMD(
8972 VkCommandBuffer commandBuffer,
8973 VkBuffer buffer,
8974 VkDeviceSize offset,
8975 VkBuffer countBuffer,
8976 VkDeviceSize countBufferOffset,
8977 u32 maxDrawCount,
8978 u32 stride) {
8979}
8980
8981@extension("VK_NV_external_memory_capabilities") // 56
8982cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
8983 VkPhysicalDevice physicalDevice,
8984 VkFormat format,
8985 VkImageType type,
8986 VkImageTiling tiling,
8987 VkImageUsageFlags usage,
8988 VkImageCreateFlags flags,
8989 VkExternalMemoryHandleTypeFlagsNV externalHandleType,
8990 VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) {
8991 return ?
8992}
8993
8994@extension("VK_NV_external_memory_win32") // 58
8995cmd VkResult vkGetMemoryWin32HandleNV(
8996 VkDevice device,
8997 VkDeviceMemory memory,
8998 VkExternalMemoryHandleTypeFlagsNV handleType,
8999 platform.HANDLE* pHandle) {
9000 return ?
9001}
9002
9003@extension("VK_KHR_get_physical_device_properties2") // 60
9004cmd void vkGetPhysicalDeviceFeatures2KHR(
9005 VkPhysicalDevice physicalDevice,
9006 VkPhysicalDeviceFeatures2KHR* pFeatures) {
9007}
9008
9009@extension("VK_KHR_get_physical_device_properties2") // 60
9010cmd void vkGetPhysicalDeviceProperties2KHR(
9011 VkPhysicalDevice physicalDevice,
9012 VkPhysicalDeviceProperties2KHR* pProperties) {
9013}
9014
9015@extension("VK_KHR_get_physical_device_properties2") // 60
9016cmd void vkGetPhysicalDeviceFormatProperties2KHR(
9017 VkPhysicalDevice physicalDevice,
9018 VkFormat format,
9019 VkFormatProperties2KHR* pFormatProperties) {
9020}
9021
9022@extension("VK_KHR_get_physical_device_properties2") // 60
9023cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
9024 VkPhysicalDevice physicalDevice,
9025 const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
9026 VkImageFormatProperties2KHR* pImageFormatProperties) {
9027 return ?
9028}
9029
9030@extension("VK_KHR_get_physical_device_properties2") // 60
9031cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR(
9032 VkPhysicalDevice physicalDevice,
9033 u32* pQueueFamilyPropertyCount,
9034 VkQueueFamilyProperties2KHR* pQueueFamilyProperties) {
9035}
9036
9037@extension("VK_KHR_get_physical_device_properties2") // 60
9038cmd void vkGetPhysicalDeviceMemoryProperties2KHR(
9039 VkPhysicalDevice physicalDevice,
9040 VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) {
9041}
9042
9043@extension("VK_KHR_get_physical_device_properties2") // 60
9044cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
9045 VkPhysicalDevice physicalDevice,
9046 const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
9047 u32* pPropertyCount,
9048 VkSparseImageFormatProperties2KHR* pProperties) {
9049}
9050
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009051@extension("VK_KHR_device_group") // 61
9052cmd void vkGetDeviceGroupPeerMemoryFeaturesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009053 VkDevice device,
9054 u32 heapIndex,
9055 u32 localDeviceIndex,
9056 u32 remoteDeviceIndex,
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009057 VkPeerMemoryFeatureFlagsKHR* pPeerMemoryFeatures) {
Jesse Hallad250842017-03-10 18:35:38 -08009058}
9059
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009060@extension("VK_KHR_device_group") // 61
9061cmd void vkCmdSetDeviceMaskKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009062 VkCommandBuffer commandBuffer,
9063 u32 deviceMask) {
9064}
9065
Jesse Hallad250842017-03-10 18:35:38 -08009066
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009067@extension("VK_KHR_device_group") // 61
9068cmd void vkCmdDispatchBaseKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009069 VkCommandBuffer commandBuffer,
9070 u32 baseGroupX,
9071 u32 baseGroupY,
9072 u32 baseGroupZ,
9073 u32 groupCountX,
9074 u32 groupCountY,
9075 u32 groupCountZ) {
9076}
9077
Jesse Hallad250842017-03-10 18:35:38 -08009078@extension("VK_NN_vi_surface") // 63
9079cmd VkResult vkCreateViSurfaceNN(
9080 VkInstance instance,
9081 const VkViSurfaceCreateInfoNN* pCreateInfo,
9082 const VkAllocationCallbacks* pAllocator,
9083 VkSurfaceKHR* pSurface) {
9084 return ?
9085}
9086
9087@extension("VK_KHR_maintenance1") // 70
9088cmd void vkTrimCommandPoolKHR(
9089 VkDevice device,
9090 VkCommandPool commandPool,
9091 VkCommandPoolTrimFlagsKHR flags) {
9092}
9093
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009094@extension("VK_KHR_device_group_creation") // 71
9095@threadSafety("system")
9096cmd VkResult vkEnumeratePhysicalDeviceGroupsKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009097 VkInstance instance,
9098 u32* pPhysicalDeviceGroupCount,
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009099 VkPhysicalDeviceGroupPropertiesKHR* pPhysicalDeviceGroupProperties) {
9100 instanceObject := GetInstance(instance)
9101
9102 physicalDeviceGroupCount := as!u32(?)
9103 pPhysicalDeviceGroupCount[0] = physicalDeviceGroupCount
9104 physicalDevices := pPhysicalDeviceGroupProperties[0:physicalDeviceGroupCount]
9105
9106 for i in (0 .. physicalDeviceGroupCount) {
9107 physicalDevice := ?
9108 physicalDevices[i] = physicalDevice
9109 if !(physicalDevice in State.PhysicalDevices) {
9110 State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance)
9111 }
9112 }
9113
Jesse Hallad250842017-03-10 18:35:38 -08009114 return ?
9115}
9116
Jesse Hall9492f992017-08-28 12:10:06 -07009117@extension("VK_KHR_external_memory_capabilities") // 72
9118cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009119 VkPhysicalDevice physicalDevice,
Jesse Hall9492f992017-08-28 12:10:06 -07009120 const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo,
9121 VkExternalBufferPropertiesKHR* pExternalBufferProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009122}
9123
Jesse Hall9492f992017-08-28 12:10:06 -07009124@extension("VK_KHR_external_memory_win32") // 74
9125cmd VkResult vkGetMemoryWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009126 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009127 const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009128 platform.HANDLE* pHandle) {
9129 return ?
9130}
9131
Jesse Hall9492f992017-08-28 12:10:06 -07009132@extension("VK_KHR_external_memory_win32") // 74
9133cmd VkResult vkGetMemoryWin32HandlePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009134 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009135 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08009136 platform.HANDLE handle,
Jesse Hall9492f992017-08-28 12:10:06 -07009137 VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009138 return ?
9139}
9140
Jesse Hall9492f992017-08-28 12:10:06 -07009141@extension("VK_KHR_external_memory_fd") // 75
9142cmd VkResult vkGetMemoryFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009143 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009144 const VkMemoryGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009145 s32* pFd) {
9146 return ?
9147}
9148
Jesse Hall9492f992017-08-28 12:10:06 -07009149@extension("VK_KHR_external_memory_fd") // 75
9150cmd VkResult vkGetMemoryFdPropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009151 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009152 VkExternalMemoryHandleTypeFlagBitsKHR handleType,
Jesse Hallad250842017-03-10 18:35:38 -08009153 s32 fd,
Jesse Hall9492f992017-08-28 12:10:06 -07009154 VkMemoryFdPropertiesKHR* pMemoryFdProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009155 return ?
9156}
9157
Jesse Hall9492f992017-08-28 12:10:06 -07009158@extension("VK_KHR_external_semaphore_capabilities") // 77
9159cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009160 VkPhysicalDevice physicalDevice,
Jesse Hall9492f992017-08-28 12:10:06 -07009161 const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
9162 VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties) {
Jesse Hallad250842017-03-10 18:35:38 -08009163}
9164
Jesse Hall9492f992017-08-28 12:10:06 -07009165@extension("VK_KHR_external_semaphore_win32") // 79
9166cmd VkResult vkImportSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009167 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009168 const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08009169 return ?
9170}
9171
Jesse Hall9492f992017-08-28 12:10:06 -07009172@extension("VK_KHR_external_semaphore_win32") // 79
9173cmd VkResult vkGetSemaphoreWin32HandleKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009174 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009175 const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009176 platform.HANDLE* pHandle) {
9177 return ?
9178}
9179
Jesse Hall9492f992017-08-28 12:10:06 -07009180@extension("VK_KHR_external_semaphore_fd") // 80
9181cmd VkResult vkImportSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009182 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009183 const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) {
Jesse Hallad250842017-03-10 18:35:38 -08009184 return ?
9185}
9186
Jesse Hall9492f992017-08-28 12:10:06 -07009187@extension("VK_KHR_external_semaphore_fd") // 80
9188cmd VkResult vkGetSemaphoreFdKHR(
Jesse Hallad250842017-03-10 18:35:38 -08009189 VkDevice device,
Jesse Hall9492f992017-08-28 12:10:06 -07009190 const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
Jesse Hallad250842017-03-10 18:35:38 -08009191 s32* pFd) {
9192 return ?
9193}
9194
9195@extension("VK_KHR_push_descriptor") // 81
9196cmd void vkCmdPushDescriptorSetKHR(
9197 VkCommandBuffer commandBuffer,
9198 VkPipelineBindPoint pipelineBindPoint,
9199 VkPipelineLayout layout,
9200 u32 set,
9201 u32 descriptorWriteCount,
9202 const VkWriteDescriptorSet* pDescriptorWrites) {
9203}
9204
9205@extension("VK_KHR_descriptor_update_template") // 86
9206cmd VkResult vkCreateDescriptorUpdateTemplateKHR(
9207 VkDevice device,
9208 const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
9209 const VkAllocationCallbacks* pAllocator,
9210 VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) {
9211 return ?
9212}
9213
9214@extension("VK_KHR_descriptor_update_template") // 86
9215cmd void vkDestroyDescriptorUpdateTemplateKHR(
9216 VkDevice device,
9217 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
9218 const VkAllocationCallbacks* pAllocator) {
9219}
9220
9221@extension("VK_KHR_descriptor_update_template") // 86
9222cmd void vkUpdateDescriptorSetWithTemplateKHR(
9223 VkDevice device,
9224 VkDescriptorSet descriptorSet,
9225 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
9226 const void* pData) {
9227}
9228
9229@extension("VK_KHR_descriptor_update_template") // 86
9230cmd void vkCmdPushDescriptorSetWithTemplateKHR(
9231 VkCommandBuffer commandBuffer,
9232 VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
9233 VkPipelineLayout layout,
9234 u32 set,
9235 const void* pData) {
9236}
9237
9238@extension("VK_NVX_device_generated_commands") // 87
9239cmd void vkCmdProcessCommandsNVX(
9240 VkCommandBuffer commandBuffer,
9241 const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) {
9242}
9243
9244@extension("VK_NVX_device_generated_commands") // 87
9245cmd void vkCmdReserveSpaceForCommandsNVX(
9246 VkCommandBuffer commandBuffer,
9247 const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) {
9248}
9249
9250@extension("VK_NVX_device_generated_commands") // 87
9251cmd VkResult vkCreateIndirectCommandsLayoutNVX(
9252 VkDevice device,
9253 const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
9254 const VkAllocationCallbacks* pAllocator,
9255 VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) {
9256 return ?
9257}
9258
9259@extension("VK_NVX_device_generated_commands") // 87
9260cmd void vkDestroyIndirectCommandsLayoutNVX(
9261 VkDevice device,
9262 VkIndirectCommandsLayoutNVX indirectCommandsLayout,
9263 const VkAllocationCallbacks* pAllocator) {
9264}
9265
9266@extension("VK_NVX_device_generated_commands") // 87
9267cmd VkResult vkCreateObjectTableNVX(
9268 VkDevice device,
9269 const VkObjectTableCreateInfoNVX* pCreateInfo,
9270 const VkAllocationCallbacks* pAllocator,
9271 VkObjectTableNVX* pObjectTable) {
9272 return ?
9273}
9274
9275@extension("VK_NVX_device_generated_commands") // 87
9276cmd void vkDestroyObjectTableNVX(
9277 VkDevice device,
9278 VkObjectTableNVX objectTable,
9279 const VkAllocationCallbacks* pAllocator) {
9280}
9281
9282@extension("VK_NVX_device_generated_commands") // 87
9283cmd VkResult vkRegisterObjectsNVX(
9284 VkDevice device,
9285 VkObjectTableNVX objectTable,
9286 u32 objectCount,
9287 const VkObjectTableEntryNVX* const* ppObjectTableEntries,
9288 const u32* pObjectIndices) {
9289 return ?
9290}
9291
9292@extension("VK_NVX_device_generated_commands") // 87
9293cmd VkResult vkUnregisterObjectsNVX(
9294 VkDevice device,
9295 VkObjectTableNVX objectTable,
9296 u32 objectCount,
9297 const VkObjectEntryTypeNVX* pObjectEntryTypes,
9298 const u32* pObjectIndices) {
9299 return ?
9300}
9301
9302@extension("VK_NVX_device_generated_commands") // 87
9303cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
9304 VkPhysicalDevice physicalDevice,
9305 VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
9306 VkDeviceGeneratedCommandsLimitsNVX* pLimits) {
9307}
9308
9309@extension("VK_NV_clip_space_w_scaling") // 88
9310cmd void vkCmdSetViewportWScalingNV(
9311 VkCommandBuffer commandBuffer,
9312 u32 firstViewport,
9313 u32 viewportCount,
9314 const VkViewportWScalingNV* pViewportWScalings) {
9315}
9316
9317@extension("VK_EXT_direct_mode_display") // 89
9318cmd VkResult vkReleaseDisplayEXT(
9319 VkPhysicalDevice physicalDevice,
9320 VkDisplayKHR display) {
9321 return ?
9322}
9323
9324@extension("VK_EXT_acquire_xlib_display") // 90
9325cmd VkResult vkAcquireXlibDisplayEXT(
9326 VkPhysicalDevice physicalDevice,
9327 platform.Display* dpy,
9328 VkDisplayKHR display) {
9329 return ?
9330}
9331
9332@extension("VK_EXT_acquire_xlib_display") // 90
9333cmd VkResult vkGetRandROutputDisplayEXT(
9334 VkPhysicalDevice physicalDevice,
9335 platform.Display* dpy,
9336 platform.RROutput rrOutput,
9337 VkDisplayKHR* pDisplay) {
9338 return ?
9339}
9340
9341@extension("VK_EXT_display_surface_counter") // 91
9342cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
9343 VkPhysicalDevice physicalDevice,
9344 VkSurfaceKHR surface,
9345 VkSurfaceCapabilities2EXT* pSurfaceCapabilities) {
9346 return ?
9347}
9348
9349@extension("VK_EXT_display_control") // 92
9350cmd VkResult vkDisplayPowerControlEXT(
9351 VkDevice device,
9352 VkDisplayKHR display,
9353 const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
9354 return ?
9355}
9356
9357@extension("VK_EXT_display_control") // 92
9358cmd VkResult vkRegisterDeviceEventEXT(
9359 VkDevice device,
9360 const VkDeviceEventInfoEXT* pDeviceEventInfo,
9361 const VkAllocationCallbacks* pAllocator,
9362 VkFence* pFence) {
9363 return ?
9364}
9365
9366@extension("VK_EXT_display_control") // 92
9367cmd VkResult vkRegisterDisplayEventEXT(
9368 VkDevice device,
9369 VkDisplayKHR display,
9370 const VkDisplayEventInfoEXT* pDisplayEventInfo,
9371 const VkAllocationCallbacks* pAllocator,
9372 VkFence* pFence) {
9373 return ?
9374}
9375
9376@extension("VK_EXT_display_control") // 92
9377cmd VkResult vkGetSwapchainCounterEXT(
9378 VkDevice device,
9379 VkSwapchainKHR swapchain,
9380 VkSurfaceCounterFlagBitsEXT counter,
9381 u64* pCounterValue) {
9382 return ?
9383}
9384
9385@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009386cmd VkResult vkGetRefreshCycleDurationGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08009387 VkDevice device,
9388 VkSwapchainKHR swapchain,
9389 VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009390 deviceObject := GetDevice(device)
9391 swapchainObject := GetSwapchain(swapchain)
9392
9393 displayTimingProperties := ?
9394 pDisplayTimingProperties[0] = displayTimingProperties
9395
9396 return ?
9397}
9398
Jesse Hallad250842017-03-10 18:35:38 -08009399@extension("VK_GOOGLE_display_timing") // 93
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009400cmd VkResult vkGetPastPresentationTimingGOOGLE(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08009401 VkDevice device,
9402 VkSwapchainKHR swapchain,
9403 u32* pPresentationTimingCount,
9404 VkPastPresentationTimingGOOGLE* pPresentationTimings) {
Ian Elliott4c8bb2a2016-12-29 11:07:26 -07009405 return ?
9406}
9407
Jesse Hallad250842017-03-10 18:35:38 -08009408@extension("VK_EXT_discard_rectangles") // 100
9409cmd void vkCmdSetDiscardRectangleEXT(
Jesse Hall26763382016-05-20 07:13:52 -07009410 VkCommandBuffer commandBuffer,
Jesse Hallad250842017-03-10 18:35:38 -08009411 u32 firstDiscardRectangle,
9412 u32 discardRectangleCount,
9413 const VkRect2D* pDiscardRectangles) {
Jesse Hall26763382016-05-20 07:13:52 -07009414}
9415
Jesse Hallad250842017-03-10 18:35:38 -08009416@extension("VK_EXT_hdr_metadata") // 106
Jesse Hall889cd9a2017-02-25 22:12:23 -08009417cmd void vkSetHdrMetadataEXT(
Jesse Hallfdc8ab32017-03-10 21:01:57 -08009418 VkDevice device,
9419 u32 swapchainCount,
9420 const VkSwapchainKHR* pSwapchains,
9421 const VkHdrMetadataEXT* pMetadata) {
Jesse Hall889cd9a2017-02-25 22:12:23 -08009422}
9423
Jesse Hallad250842017-03-10 18:35:38 -08009424@extension("VK_KHR_shared_presentable_image") // 112
Chris Forbes2e12cb82017-01-18 11:45:17 +13009425cmd VkResult vkGetSwapchainStatusKHR(
9426 VkDevice device,
9427 VkSwapchainKHR swapchain) {
9428 return ?
9429}
9430
Jesse Hall9492f992017-08-28 12:10:06 -07009431@extension("VK_KHR_external_fence_capabilities") // 113
9432cmd void vkGetPhysicalDeviceExternalFencePropertiesKHR(
9433 VkPhysicalDevice physicalDevice,
9434 const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
9435 VkExternalFencePropertiesKHR* pExternalFenceProperties) {
9436}
9437
9438@extension("VK_KHR_external_fence_win32") // 115
9439cmd VkResult vkImportFenceWin32HandleKHR(
9440 VkDevice device,
9441 const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) {
9442 return ?
9443}
9444
9445@extension("VK_KHR_external_fence_win32") // 115
9446cmd VkResult vkGetFenceWin32HandleKHR(
9447 VkDevice device,
9448 const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
9449 platform.HANDLE* pHandle) {
9450 return ?
9451}
9452
9453@extension("VK_KHR_external_fence_fd") // 116
9454cmd VkResult vkImportFenceFdKHR(
9455 VkDevice device,
9456 const VkImportFenceFdInfoKHR* pImportFenceFdInfo) {
9457 return ?
9458}
9459
9460@extension("VK_KHR_external_fence_fd") // 116
9461cmd VkResult vkGetFenceFdKHR(
9462 VkDevice device,
9463 const VkFenceGetFdInfoKHR* pGetFdInfo,
9464 int* pFd) {
9465 return ?
9466}
9467
Jesse Hall05556b12017-05-18 17:40:25 -07009468@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13009469cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
9470 VkPhysicalDevice physicalDevice,
9471 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
9472 VkSurfaceCapabilities2KHR* pSurfaceCapabilities) {
9473 return ?
9474}
9475
Jesse Hall05556b12017-05-18 17:40:25 -07009476@extension("VK_KHR_get_surface_capabilities2") // 120
Chris Forbese2d3ee12017-03-16 16:10:15 +13009477cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
9478 VkPhysicalDevice physicalDevice,
9479 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
9480 u32* pSurfaceFormatCount,
9481 VkSurfaceFormat2KHR* pSurfaceFormats) {
9482 return ?
9483}
9484
Jesse Hallad250842017-03-10 18:35:38 -08009485@extension("VK_MVK_ios_surface") // 123
9486cmd VkResult vkCreateIOSSurfaceMVK(
9487 VkInstance instance,
9488 const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
9489 const VkAllocationCallbacks* pAllocator,
9490 VkSurfaceKHR* pSurface) {
9491 return ?
9492}
9493
9494@extension("VK_MVK_macos_surface") // 124
9495cmd VkResult vkCreateMacOSSurfaceMVK(
9496 VkInstance instance,
9497 const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
9498 const VkAllocationCallbacks* pAllocator,
9499 VkSurfaceKHR* pSurface) {
9500 return ?
9501}
9502
Jesse Hall77726222017-09-19 14:49:27 -05009503@extension("VK_EXT_sample_locations") // 144
9504cmd void vkCmdSetSampleLocationsEXT(
9505 VkCommandBuffer commandBuffer,
9506 const VkSampleLocationsInfoEXT* pSampleLocationsInfo) {
9507}
9508
9509@extension("VK_EXT_sample_locations") // 144
9510cmd void vkGetPhysicalDeviceMultisamplePropertiesEXT(
9511 VkPhysicalDevice physicalDevice,
9512 VkSampleCountFlagBits samples,
9513 VkMultisamplePropertiesEXT* pMultisampleProperties) {
9514}
9515
Jesse Hall9492f992017-08-28 12:10:06 -07009516@extension("VK_KHR_get_memory_requirements2") // 147
9517cmd void vkGetImageMemoryRequirements2KHR(
9518 VkDevice device,
9519 const VkImageMemoryRequirementsInfo2KHR* pInfo,
9520 VkMemoryRequirements2KHR* pMemoryRequirements) {
9521}
9522
9523@extension("VK_KHR_get_memory_requirements2") // 147
9524cmd void vkGetBufferMemoryRequirements2KHR(
9525 VkDevice device,
9526 const VkBufferMemoryRequirementsInfo2KHR* pInfo,
9527 VkMemoryRequirements2KHR* pMemoryRequirements) {
9528}
9529
9530@extension("VK_KHR_get_memory_requirements2") // 147
9531cmd void vkGetImageSparseMemoryRequirements2KHR(
9532 VkDevice device,
9533 const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
9534 u32* pSparseMemoryRequirementCount,
9535 VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) {
9536}
9537
Jesse Hall076f95d2017-09-20 11:34:47 -07009538@extension("VK_KHR_sampler_ycbcr_conversion") // 157
9539cmd VkResult vkCreateSamplerYcbcrConversionKHR(
9540 VkDevice device,
9541 const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo,
9542 const VkAllocationCallbacks* pAllocator,
9543 VkSamplerYcbcrConversionKHR* pYcbcrConversion) {
9544 return ?
9545}
9546
9547@extension("VK_KHR_sampler_ycbcr_conversion") // 157
9548cmd void vkDestroySamplerYcbcrConversionKHR(
9549 VkDevice device,
9550 VkSamplerYcbcrConversionKHR ycbcrConversion,
9551 const VkAllocationCallbacks* pAllocator) {
9552}
9553
9554@extension("VK_KHR_bind_memory2") // 158
9555cmd VkResult vkBindBufferMemory2KHR(
9556 VkDevice device,
9557 u32 bindInfoCount,
9558 const VkBindBufferMemoryInfoKHR* pBindInfos) {
9559 return ?
9560}
9561
9562@extension("VK_KHR_bind_memory2") // 158
9563cmd VkResult vkBindImageMemory2KHR(
9564 VkDevice device,
9565 u32 bindInfoCount,
9566 const VkBindImageMemoryInfoKHR* pBindInfos) {
9567 return ?
9568}
9569
Jesse Hall77726222017-09-19 14:49:27 -05009570@extension("VK_EXT_validation_cache") // 161
9571cmd VkResult vkCreateValidationCacheEXT(
9572 VkDevice device,
9573 const VkValidationCacheCreateInfoEXT* pCreateInfo,
9574 const VkAllocationCallbacks* pAllocator,
9575 VkValidationCacheEXT* pValidationCache) {
9576 return ?
9577}
9578
9579@extension("VK_EXT_validation_cache") // 161
9580cmd void vkDestroyValidationCacheEXT(
9581 VkDevice device,
9582 VkValidationCacheEXT validationCache,
9583 const VkAllocationCallbacks* pAllocator) {
9584}
9585
9586@extension("VK_EXT_validation_cache") // 161
9587cmd VkResult vkMergeValidationCachesEXT(
9588 VkDevice device,
9589 VkValidationCacheEXT dstCache,
9590 u32 srcCacheCount,
9591 const VkValidationCacheEXT* pSrcCaches) {
9592 return ?
9593}
9594
9595@extension("VK_EXT_validation_cache") // 161
9596cmd VkResult vkGetValidationCacheDataEXT(
9597 VkDevice device,
9598 VkValidationCacheEXT validationCache,
9599 platform.size_t* pDataSize,
9600 void* pData) {
9601 return ?
9602}
9603
Daniel Kochf25f5bb2017-10-05 00:26:58 -04009604@extension("VK_KHR_maintenance3") // 169
9605cmd void vkGetDescriptorSetLayoutSupportKHR(
9606 VkDevice device,
9607 const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
9608 VkDescriptorSetLayoutSupportKHR* pSupport) {
9609}
9610
Jesse Halld27f6aa2015-08-15 17:58:48 -07009611////////////////
9612// Validation //
9613////////////////
9614
9615extern void validate(string layerName, bool condition, string message)
9616
9617
9618/////////////////////////////
9619// Internal State Tracking //
9620/////////////////////////////
9621
9622StateObject State
9623
9624@internal class StateObject {
9625 // Dispatchable objects.
9626 map!(VkInstance, ref!InstanceObject) Instances
9627 map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices
9628 map!(VkDevice, ref!DeviceObject) Devices
9629 map!(VkQueue, ref!QueueObject) Queues
Jesse Hall3fbc8562015-11-29 22:10:52 -08009630 map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07009631
9632 // Non-dispatchable objects.
9633 map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories
9634 map!(VkBuffer, ref!BufferObject) Buffers
9635 map!(VkBufferView, ref!BufferViewObject) BufferViews
9636 map!(VkImage, ref!ImageObject) Images
9637 map!(VkImageView, ref!ImageViewObject) ImageViews
Jesse Halld27f6aa2015-08-15 17:58:48 -07009638 map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules
Jesse Halld27f6aa2015-08-15 17:58:48 -07009639 map!(VkPipeline, ref!PipelineObject) Pipelines
9640 map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts
9641 map!(VkSampler, ref!SamplerObject) Samplers
9642 map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets
9643 map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts
9644 map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools
Jesse Halld27f6aa2015-08-15 17:58:48 -07009645 map!(VkFence, ref!FenceObject) Fences
9646 map!(VkSemaphore, ref!SemaphoreObject) Semaphores
9647 map!(VkEvent, ref!EventObject) Events
9648 map!(VkQueryPool, ref!QueryPoolObject) QueryPools
9649 map!(VkFramebuffer, ref!FramebufferObject) Framebuffers
9650 map!(VkRenderPass, ref!RenderPassObject) RenderPasses
9651 map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches
Jesse Hall3fbc8562015-11-29 22:10:52 -08009652 map!(VkCommandPool, ref!CommandPoolObject) CommandPools
Jesse Hall1356b0d2015-11-23 17:24:58 -08009653 map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces
Michael Lentine88594d72015-11-12 12:49:45 -08009654 map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains
Jesse Halld27f6aa2015-08-15 17:58:48 -07009655}
9656
9657@internal class InstanceObject {
9658}
9659
9660@internal class PhysicalDeviceObject {
9661 VkInstance instance
9662}
9663
9664@internal class DeviceObject {
9665 VkPhysicalDevice physicalDevice
9666}
9667
9668@internal class QueueObject {
9669 VkDevice device
9670 VkQueueFlags flags
9671}
9672
Jesse Hall3fbc8562015-11-29 22:10:52 -08009673@internal class CommandBufferObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07009674 VkDevice device
9675 map!(u64, VkDeviceMemory) boundObjects
9676 VkQueueFlags queueFlags
9677}
9678
9679@internal class DeviceMemoryObject {
Jesse Hall3fbc8562015-11-29 22:10:52 -08009680 VkDevice device
9681 VkDeviceSize allocationSize
9682 map!(u64, VkDeviceSize) boundObjects
9683 map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers
Jesse Halld27f6aa2015-08-15 17:58:48 -07009684}
9685
9686@internal class BufferObject {
9687 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08009688 VkDeviceMemory memory
9689 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07009690}
9691
9692@internal class BufferViewObject {
9693 VkDevice device
9694 VkBuffer buffer
9695}
9696
9697@internal class ImageObject {
9698 VkDevice device
Jesse Hall3fbc8562015-11-29 22:10:52 -08009699 VkDeviceMemory memory
9700 VkDeviceSize memoryOffset
Jesse Halld27f6aa2015-08-15 17:58:48 -07009701}
9702
9703@internal class ImageViewObject {
9704 VkDevice device
9705 VkImage image
9706}
9707
Jesse Halld27f6aa2015-08-15 17:58:48 -07009708@internal class ShaderObject {
9709 VkDevice device
9710}
9711
9712@internal class ShaderModuleObject {
9713 VkDevice device
9714}
9715
9716@internal class PipelineObject {
9717 VkDevice device
9718}
9719
9720@internal class PipelineLayoutObject {
9721 VkDevice device
9722}
9723
9724@internal class SamplerObject {
9725 VkDevice device
9726}
9727
9728@internal class DescriptorSetObject {
9729 VkDevice device
9730}
9731
9732@internal class DescriptorSetLayoutObject {
9733 VkDevice device
9734}
9735
9736@internal class DescriptorPoolObject {
9737 VkDevice device
9738}
9739
Jesse Halld27f6aa2015-08-15 17:58:48 -07009740@internal class FenceObject {
9741 VkDevice device
9742 bool signaled
9743}
9744
9745@internal class SemaphoreObject {
9746 VkDevice device
9747}
9748
9749@internal class EventObject {
9750 VkDevice device
9751}
9752
9753@internal class QueryPoolObject {
9754 VkDevice device
9755}
9756
9757@internal class FramebufferObject {
9758 VkDevice device
9759}
9760
9761@internal class RenderPassObject {
9762 VkDevice device
9763}
9764
9765@internal class PipelineCacheObject {
9766 VkDevice device
9767}
9768
Jesse Hall3fbc8562015-11-29 22:10:52 -08009769@internal class CommandPoolObject {
Jesse Halld27f6aa2015-08-15 17:58:48 -07009770 VkDevice device
9771}
9772
Jesse Hall1356b0d2015-11-23 17:24:58 -08009773@internal class SurfaceObject {
9774 VkInstance instance
9775}
9776
Michael Lentine88594d72015-11-12 12:49:45 -08009777@internal class SwapchainObject {
9778 VkDevice device
9779}
9780
Jesse Halld27f6aa2015-08-15 17:58:48 -07009781macro ref!InstanceObject GetInstance(VkInstance instance) {
9782 assert(instance in State.Instances)
9783 return State.Instances[instance]
9784}
9785
9786macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) {
9787 assert(physicalDevice in State.PhysicalDevices)
9788 return State.PhysicalDevices[physicalDevice]
9789}
9790
9791macro ref!DeviceObject GetDevice(VkDevice device) {
9792 assert(device in State.Devices)
9793 return State.Devices[device]
9794}
9795
9796macro ref!QueueObject GetQueue(VkQueue queue) {
9797 assert(queue in State.Queues)
9798 return State.Queues[queue]
9799}
9800
Jesse Hall3fbc8562015-11-29 22:10:52 -08009801macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) {
9802 assert(commandBuffer in State.CommandBuffers)
9803 return State.CommandBuffers[commandBuffer]
Jesse Halld27f6aa2015-08-15 17:58:48 -07009804}
9805
Jesse Hall3fbc8562015-11-29 22:10:52 -08009806macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) {
9807 assert(memory in State.DeviceMemories)
9808 return State.DeviceMemories[memory]
Jesse Halld27f6aa2015-08-15 17:58:48 -07009809}
9810
9811macro ref!BufferObject GetBuffer(VkBuffer buffer) {
9812 assert(buffer in State.Buffers)
9813 return State.Buffers[buffer]
9814}
9815
9816macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) {
9817 assert(bufferView in State.BufferViews)
9818 return State.BufferViews[bufferView]
9819}
9820
9821macro ref!ImageObject GetImage(VkImage image) {
9822 assert(image in State.Images)
9823 return State.Images[image]
9824}
9825
9826macro ref!ImageViewObject GetImageView(VkImageView imageView) {
9827 assert(imageView in State.ImageViews)
9828 return State.ImageViews[imageView]
9829}
9830
Jesse Halld27f6aa2015-08-15 17:58:48 -07009831macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) {
9832 assert(shaderModule in State.ShaderModules)
9833 return State.ShaderModules[shaderModule]
9834}
9835
9836macro ref!PipelineObject GetPipeline(VkPipeline pipeline) {
9837 assert(pipeline in State.Pipelines)
9838 return State.Pipelines[pipeline]
9839}
9840
9841macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) {
9842 assert(pipelineLayout in State.PipelineLayouts)
9843 return State.PipelineLayouts[pipelineLayout]
9844}
9845
9846macro ref!SamplerObject GetSampler(VkSampler sampler) {
9847 assert(sampler in State.Samplers)
9848 return State.Samplers[sampler]
9849}
9850
9851macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) {
9852 assert(descriptorSet in State.DescriptorSets)
9853 return State.DescriptorSets[descriptorSet]
9854}
9855
9856macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) {
9857 assert(descriptorSetLayout in State.DescriptorSetLayouts)
9858 return State.DescriptorSetLayouts[descriptorSetLayout]
9859}
9860
9861macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) {
9862 assert(descriptorPool in State.DescriptorPools)
9863 return State.DescriptorPools[descriptorPool]
9864}
9865
Jesse Halld27f6aa2015-08-15 17:58:48 -07009866macro ref!FenceObject GetFence(VkFence fence) {
9867 assert(fence in State.Fences)
9868 return State.Fences[fence]
9869}
9870
9871macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) {
9872 assert(semaphore in State.Semaphores)
9873 return State.Semaphores[semaphore]
9874}
9875
9876macro ref!EventObject GetEvent(VkEvent event) {
9877 assert(event in State.Events)
9878 return State.Events[event]
9879}
9880
9881macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) {
9882 assert(queryPool in State.QueryPools)
9883 return State.QueryPools[queryPool]
9884}
9885
9886macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) {
9887 assert(framebuffer in State.Framebuffers)
9888 return State.Framebuffers[framebuffer]
9889}
9890
9891macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) {
9892 assert(renderPass in State.RenderPasses)
9893 return State.RenderPasses[renderPass]
9894}
9895
9896macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) {
9897 assert(pipelineCache in State.PipelineCaches)
9898 return State.PipelineCaches[pipelineCache]
9899}
9900
Jesse Hall3fbc8562015-11-29 22:10:52 -08009901macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) {
9902 assert(commandPool in State.CommandPools)
9903 return State.CommandPools[commandPool]
Jesse Hallf09c6b12015-08-15 19:54:28 -07009904}
Michael Lentine88594d72015-11-12 12:49:45 -08009905
Jesse Hall1356b0d2015-11-23 17:24:58 -08009906macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) {
9907 assert(surface in State.Surfaces)
9908 return State.Surfaces[surface]
9909}
9910
Michael Lentine88594d72015-11-12 12:49:45 -08009911macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) {
9912 assert(swapchain in State.Swapchains)
9913 return State.Swapchains[swapchain]
9914}
Jesse Halld8bade02015-11-24 10:24:18 -08009915
9916macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) {
9917 return as!VkQueueFlags(as!u32(flags) | as!u32(bit))
9918}