Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1 | // 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 | |
| 22 | import platform "platform.api" |
| 23 | |
| 24 | /////////////// |
| 25 | // Constants // |
| 26 | /////////////// |
| 27 | |
| 28 | // API version (major.minor.patch) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 29 | define VERSION_MAJOR 1 |
| 30 | define VERSION_MINOR 0 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 31 | define VERSION_PATCH 46 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 32 | |
| 33 | // API limits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 34 | define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256 |
| 35 | define VK_UUID_SIZE 16 |
| 36 | define VK_MAX_EXTENSION_NAME_SIZE 256 |
| 37 | define VK_MAX_DESCRIPTION_SIZE 256 |
| 38 | define VK_MAX_MEMORY_TYPES 32 |
| 39 | define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types. |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 40 | define VK_MAX_DEVICE_GROUP_SIZE_KHX 32 |
| 41 | define VK_LUID_SIZE_KHX 8 |
| 42 | define VK_QUEUE_FAMILY_EXTERNAL_KHX -2 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 43 | |
| 44 | // API keywords |
| 45 | define VK_TRUE 1 |
| 46 | define VK_FALSE 0 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 47 | |
| 48 | // API keyword, but needs special handling by some templates |
| 49 | define NULL_HANDLE 0 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 50 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 51 | // 1 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 52 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 53 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 54 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 55 | // 2 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 56 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 57 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 58 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 59 | // 3 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 60 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 61 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 62 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 63 | // 4 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 64 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 65 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 66 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 67 | // 5 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 68 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 69 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 70 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 71 | // 6 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 72 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 73 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 74 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 75 | // 7 |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 76 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 77 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 78 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 79 | // 8 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 80 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 81 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 82 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 83 | // 9 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 84 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 85 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 86 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 87 | // 10 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 88 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 89 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 90 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 91 | // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 92 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 93 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer" |
| 94 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 95 | // 12 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 96 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 6 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 97 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report" |
| 98 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 99 | // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 100 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1 |
| 101 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader" |
| 102 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 103 | // 15 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 104 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 |
| 105 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge" |
| 106 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 107 | // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 108 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 |
| 109 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic" |
| 110 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 111 | // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 112 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 |
| 113 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order" |
| 114 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 115 | // 21 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 116 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 |
| 117 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" |
| 118 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 119 | // 22 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 120 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 |
| 121 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" |
| 122 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 123 | // 23 |
Jesse Hall | 8f49fcb | 2017-03-06 16:02:58 -0800 | [diff] [blame] | 124 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 125 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker" |
| 126 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 127 | // 26 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 128 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 |
| 129 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" |
| 130 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 131 | // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 132 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 |
| 133 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" |
| 134 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 135 | // 28 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 136 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 |
| 137 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" |
| 138 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 139 | // 34 |
| 140 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 |
| 141 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" |
| 142 | |
| 143 | // 36 |
| 144 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 |
| 145 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" |
| 146 | |
| 147 | // 37 |
| 148 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 |
| 149 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" |
| 150 | |
| 151 | // 38 |
| 152 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 |
| 153 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" |
| 154 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 155 | // 54 |
| 156 | @extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1 |
| 157 | @extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview" |
| 158 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 159 | // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 160 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 161 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" |
| 162 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 163 | // 57 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 164 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 165 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" |
| 166 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 167 | // 58 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 168 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 169 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" |
| 170 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 171 | // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 172 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 173 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" |
| 174 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 175 | // 60 |
| 176 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 |
| 177 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" |
| 178 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 179 | // 61 |
| 180 | @extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1 |
| 181 | @extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group" |
| 182 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 183 | // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 184 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 |
| 185 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" |
| 186 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 187 | // 63 |
| 188 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1 |
| 189 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" |
| 190 | |
| 191 | // 64 |
| 192 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 |
| 193 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" |
| 194 | |
| 195 | // 65 |
| 196 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 |
| 197 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" |
| 198 | |
| 199 | // 66 |
| 200 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 |
| 201 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" |
| 202 | |
| 203 | // 70 |
| 204 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1 |
| 205 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" |
| 206 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 207 | // 71 |
| 208 | @extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1 |
| 209 | @extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation" |
| 210 | |
| 211 | // 72 |
| 212 | @extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 213 | @extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities" |
| 214 | |
| 215 | // 73 |
| 216 | @extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 217 | @extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory" |
| 218 | |
| 219 | // 74 |
| 220 | @extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 221 | @extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32" |
| 222 | |
| 223 | // 75 |
| 224 | @extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 |
| 225 | @extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd" |
| 226 | |
| 227 | // 76 |
| 228 | @extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 229 | @extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex" |
| 230 | |
| 231 | // 77 |
| 232 | @extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 |
| 233 | @extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities" |
| 234 | |
| 235 | // 78 |
| 236 | @extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 |
| 237 | @extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore" |
| 238 | |
| 239 | // 79 |
| 240 | @extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 |
| 241 | @extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32" |
| 242 | |
| 243 | // 80 |
| 244 | @extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 |
| 245 | @extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd" |
| 246 | |
| 247 | // 81 |
| 248 | @extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1 |
| 249 | @extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" |
| 250 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 251 | // 85 |
| 252 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 253 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 254 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 255 | // 86 |
| 256 | @extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 |
| 257 | @extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" |
| 258 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 259 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 260 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 |
| 261 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" |
| 262 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 263 | // 88 |
| 264 | @extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 |
| 265 | @extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" |
| 266 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 267 | // 89 |
| 268 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 |
| 269 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" |
| 270 | |
| 271 | // 90 |
| 272 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 |
| 273 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" |
| 274 | |
| 275 | // 91 |
| 276 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 |
| 277 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" |
| 278 | |
| 279 | // 92 |
| 280 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 |
| 281 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control" |
| 282 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 283 | // 93 |
| 284 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 285 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing" |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 286 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 287 | // 95 |
| 288 | @extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 |
| 289 | @extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" |
| 290 | |
| 291 | // 96 |
| 292 | @extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 |
| 293 | @extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" |
| 294 | |
| 295 | // 97 |
| 296 | @extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 |
| 297 | @extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" |
| 298 | |
| 299 | // 98 |
| 300 | @extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 |
| 301 | @extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" |
| 302 | |
| 303 | // 99 |
| 304 | @extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 |
| 305 | @extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" |
| 306 | |
| 307 | // 100 |
| 308 | @extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 |
| 309 | @extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" |
| 310 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 311 | // 105 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 312 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 2 |
| 313 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 314 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 315 | // 106 |
| 316 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1 |
| 317 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" |
| 318 | |
| 319 | // 112 |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 320 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 |
| 321 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 322 | |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 323 | // 119 |
| 324 | @extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 |
| 325 | @extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" |
| 326 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 327 | // 123 |
| 328 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1 |
| 329 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" |
| 330 | |
| 331 | // 124 |
| 332 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1 |
| 333 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" |
| 334 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 335 | ///////////// |
| 336 | // Types // |
| 337 | ///////////// |
| 338 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 339 | type u32 VkBool32 |
| 340 | type u32 VkFlags |
| 341 | type u64 VkDeviceSize |
| 342 | type u32 VkSampleMask |
| 343 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 344 | /// Dispatchable handle types. |
| 345 | @dispatchHandle type u64 VkInstance |
| 346 | @dispatchHandle type u64 VkPhysicalDevice |
| 347 | @dispatchHandle type u64 VkDevice |
| 348 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 349 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 350 | |
| 351 | /// Non dispatchable handle types. |
| 352 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 353 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 354 | @nonDispatchHandle type u64 VkBuffer |
| 355 | @nonDispatchHandle type u64 VkBufferView |
| 356 | @nonDispatchHandle type u64 VkImage |
| 357 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 358 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 359 | @nonDispatchHandle type u64 VkPipeline |
| 360 | @nonDispatchHandle type u64 VkPipelineLayout |
| 361 | @nonDispatchHandle type u64 VkSampler |
| 362 | @nonDispatchHandle type u64 VkDescriptorSet |
| 363 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 364 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 365 | @nonDispatchHandle type u64 VkFence |
| 366 | @nonDispatchHandle type u64 VkSemaphore |
| 367 | @nonDispatchHandle type u64 VkEvent |
| 368 | @nonDispatchHandle type u64 VkQueryPool |
| 369 | @nonDispatchHandle type u64 VkFramebuffer |
| 370 | @nonDispatchHandle type u64 VkRenderPass |
| 371 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 372 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 373 | // 1 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 374 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 375 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 376 | // 2 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 377 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 378 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 379 | // 3 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 380 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 381 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 382 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 383 | // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 384 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 385 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 386 | // 86 |
| 387 | @extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR |
| 388 | |
| 389 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 390 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 391 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 392 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 393 | |
| 394 | ///////////// |
| 395 | // Enums // |
| 396 | ///////////// |
| 397 | |
| 398 | enum VkImageLayout { |
| 399 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 400 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 401 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 402 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 403 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 404 | VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, /// Optimal layout when image is used for read only shader access |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 405 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 406 | VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 0x00000007, /// Optimal layout when image is used only as destination of transfer operations |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 407 | VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 408 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 409 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 410 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Chris Forbes | af3a111 | 2017-01-31 15:37:03 +1300 | [diff] [blame] | 411 | |
| 412 | //@extension("VK_KHR_shared_presentable_image") |
| 413 | VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | enum VkAttachmentLoadOp { |
| 417 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 418 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 419 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 420 | } |
| 421 | |
| 422 | enum VkAttachmentStoreOp { |
| 423 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 424 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 425 | } |
| 426 | |
| 427 | enum VkImageType { |
| 428 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 429 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 430 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 431 | } |
| 432 | |
| 433 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 434 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 435 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 436 | } |
| 437 | |
| 438 | enum VkImageViewType { |
| 439 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 440 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 441 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 442 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 443 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 444 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 445 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 446 | } |
| 447 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 448 | enum VkCommandBufferLevel { |
| 449 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 450 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 451 | } |
| 452 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 453 | enum VkComponentSwizzle { |
| 454 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 455 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 456 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 457 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 458 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 459 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 460 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | enum VkDescriptorType { |
| 464 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 465 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 466 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 467 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 468 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 469 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 470 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 471 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 472 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 473 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 474 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 475 | } |
| 476 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 477 | enum VkQueryType { |
| 478 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 479 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 480 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 481 | } |
| 482 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 483 | enum VkBorderColor { |
| 484 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 485 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 486 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 487 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 488 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 489 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 490 | } |
| 491 | |
| 492 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 493 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 494 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 495 | } |
| 496 | |
| 497 | enum VkPrimitiveTopology { |
| 498 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 499 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 500 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 501 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 502 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 503 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 504 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 505 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 506 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 507 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 508 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 509 | } |
| 510 | |
| 511 | enum VkSharingMode { |
| 512 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 513 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 514 | } |
| 515 | |
| 516 | enum VkIndexType { |
| 517 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 518 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 519 | } |
| 520 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 521 | enum VkFilter { |
| 522 | VK_FILTER_NEAREST = 0x00000000, |
| 523 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 524 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 525 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 526 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 527 | } |
| 528 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 529 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 530 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 531 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 532 | } |
| 533 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 534 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 535 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 536 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 537 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 538 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 539 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 540 | } |
| 541 | |
| 542 | enum VkCompareOp { |
| 543 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 544 | VK_COMPARE_OP_LESS = 0x00000001, |
| 545 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 546 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 547 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 548 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 549 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 550 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 551 | } |
| 552 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 553 | enum VkPolygonMode { |
| 554 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 555 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 556 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 557 | } |
| 558 | |
| 559 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 560 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 561 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 562 | } |
| 563 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 564 | enum VkBlendFactor { |
| 565 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 566 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 567 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 568 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 569 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 570 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 571 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 572 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 573 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 574 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 575 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 576 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 577 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 578 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 579 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 580 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 581 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 582 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 583 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 584 | } |
| 585 | |
| 586 | enum VkBlendOp { |
| 587 | VK_BLEND_OP_ADD = 0x00000000, |
| 588 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 589 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 590 | VK_BLEND_OP_MIN = 0x00000003, |
| 591 | VK_BLEND_OP_MAX = 0x00000004, |
| 592 | } |
| 593 | |
| 594 | enum VkStencilOp { |
| 595 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 596 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 597 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 598 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 599 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 600 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 601 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 602 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 603 | } |
| 604 | |
| 605 | enum VkLogicOp { |
| 606 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 607 | VK_LOGIC_OP_AND = 0x00000001, |
| 608 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 609 | VK_LOGIC_OP_COPY = 0x00000003, |
| 610 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 611 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 612 | VK_LOGIC_OP_XOR = 0x00000006, |
| 613 | VK_LOGIC_OP_OR = 0x00000007, |
| 614 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 615 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 616 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 617 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 618 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 619 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 620 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 621 | VK_LOGIC_OP_SET = 0x0000000f, |
| 622 | } |
| 623 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 624 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 625 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 626 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 627 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 628 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 629 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 630 | } |
| 631 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 632 | enum VkInternalAllocationType { |
| 633 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 634 | } |
| 635 | |
| 636 | enum VkPhysicalDeviceType { |
| 637 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 638 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 639 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 640 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 641 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 642 | } |
| 643 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 644 | enum VkVertexInputRate { |
| 645 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 646 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 647 | } |
| 648 | |
| 649 | /// Vulkan format definitions |
| 650 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 651 | VK_FORMAT_UNDEFINED = 0, |
| 652 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 653 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 654 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 655 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 656 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 657 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 658 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 659 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 660 | VK_FORMAT_R8_UNORM = 9, |
| 661 | VK_FORMAT_R8_SNORM = 10, |
| 662 | VK_FORMAT_R8_USCALED = 11, |
| 663 | VK_FORMAT_R8_SSCALED = 12, |
| 664 | VK_FORMAT_R8_UINT = 13, |
| 665 | VK_FORMAT_R8_SINT = 14, |
| 666 | VK_FORMAT_R8_SRGB = 15, |
| 667 | VK_FORMAT_R8G8_UNORM = 16, |
| 668 | VK_FORMAT_R8G8_SNORM = 17, |
| 669 | VK_FORMAT_R8G8_USCALED = 18, |
| 670 | VK_FORMAT_R8G8_SSCALED = 19, |
| 671 | VK_FORMAT_R8G8_UINT = 20, |
| 672 | VK_FORMAT_R8G8_SINT = 21, |
| 673 | VK_FORMAT_R8G8_SRGB = 22, |
| 674 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 675 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 676 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 677 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 678 | VK_FORMAT_R8G8B8_UINT = 27, |
| 679 | VK_FORMAT_R8G8B8_SINT = 28, |
| 680 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 681 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 682 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 683 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 684 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 685 | VK_FORMAT_B8G8R8_UINT = 34, |
| 686 | VK_FORMAT_B8G8R8_SINT = 35, |
| 687 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 688 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 689 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 690 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 691 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 692 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 693 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 694 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 695 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 696 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 697 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 698 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 699 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 700 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 701 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 702 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 703 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 704 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 705 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 706 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 707 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 708 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 709 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 710 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 711 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 712 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 713 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 714 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 715 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 716 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 717 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 718 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 719 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 720 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 721 | VK_FORMAT_R16_UNORM = 70, |
| 722 | VK_FORMAT_R16_SNORM = 71, |
| 723 | VK_FORMAT_R16_USCALED = 72, |
| 724 | VK_FORMAT_R16_SSCALED = 73, |
| 725 | VK_FORMAT_R16_UINT = 74, |
| 726 | VK_FORMAT_R16_SINT = 75, |
| 727 | VK_FORMAT_R16_SFLOAT = 76, |
| 728 | VK_FORMAT_R16G16_UNORM = 77, |
| 729 | VK_FORMAT_R16G16_SNORM = 78, |
| 730 | VK_FORMAT_R16G16_USCALED = 79, |
| 731 | VK_FORMAT_R16G16_SSCALED = 80, |
| 732 | VK_FORMAT_R16G16_UINT = 81, |
| 733 | VK_FORMAT_R16G16_SINT = 82, |
| 734 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 735 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 736 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 737 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 738 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 739 | VK_FORMAT_R16G16B16_UINT = 88, |
| 740 | VK_FORMAT_R16G16B16_SINT = 89, |
| 741 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 742 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 743 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 744 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 745 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 746 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 747 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 748 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 749 | VK_FORMAT_R32_UINT = 98, |
| 750 | VK_FORMAT_R32_SINT = 99, |
| 751 | VK_FORMAT_R32_SFLOAT = 100, |
| 752 | VK_FORMAT_R32G32_UINT = 101, |
| 753 | VK_FORMAT_R32G32_SINT = 102, |
| 754 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 755 | VK_FORMAT_R32G32B32_UINT = 104, |
| 756 | VK_FORMAT_R32G32B32_SINT = 105, |
| 757 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 758 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 759 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 760 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 761 | VK_FORMAT_R64_UINT = 110, |
| 762 | VK_FORMAT_R64_SINT = 111, |
| 763 | VK_FORMAT_R64_SFLOAT = 112, |
| 764 | VK_FORMAT_R64G64_UINT = 113, |
| 765 | VK_FORMAT_R64G64_SINT = 114, |
| 766 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 767 | VK_FORMAT_R64G64B64_UINT = 116, |
| 768 | VK_FORMAT_R64G64B64_SINT = 117, |
| 769 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 770 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 771 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 772 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 773 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 774 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 775 | VK_FORMAT_D16_UNORM = 124, |
| 776 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 777 | VK_FORMAT_D32_SFLOAT = 126, |
| 778 | VK_FORMAT_S8_UINT = 127, |
| 779 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 780 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 781 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 782 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 783 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 784 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 785 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 786 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 787 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 788 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 789 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 790 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 791 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 792 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 793 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 794 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 795 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 796 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 797 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 798 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 799 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 800 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 801 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 802 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 803 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 804 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 805 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 806 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 807 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 808 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 809 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 810 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 811 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 812 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 813 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 814 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 815 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 816 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 817 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 818 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 819 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 820 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 821 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 822 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 823 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 824 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 825 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 826 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 827 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 828 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 829 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 830 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 831 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 832 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 833 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 834 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 835 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 836 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 837 | //@extension("VK_IMG_format_pvrtc") // 28 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 838 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 839 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 840 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 841 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 842 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 843 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 844 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 845 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 846 | } |
| 847 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 848 | /// Structure type enumerant |
| 849 | enum VkStructureType { |
| 850 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 851 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 852 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 853 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 854 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 855 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 856 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 857 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 858 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 859 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 860 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 861 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 862 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 863 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 864 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 865 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 866 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 867 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 868 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 869 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 870 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 871 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 872 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 873 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 874 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 875 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 876 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 877 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 878 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 879 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 880 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 881 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 882 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 883 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 884 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 885 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 886 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 887 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 888 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 889 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 890 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 891 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 892 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 893 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 894 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 895 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 896 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 897 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 898 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 899 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 900 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 901 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 902 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 903 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 904 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 905 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 906 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 907 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 908 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 909 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 910 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 911 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 912 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 913 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 914 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 915 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 916 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 917 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 918 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 919 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 920 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 921 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 922 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 923 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 924 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 925 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 926 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 927 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 928 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 929 | //@extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 930 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 931 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 932 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 933 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 934 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 935 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 936 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 937 | //@extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 938 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 939 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 940 | //@extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 941 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 942 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 943 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 944 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 945 | //@extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 946 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 947 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 948 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 949 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 950 | //@extension("VK_KHX_multiview") // 54 |
| 951 | VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000, |
| 952 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001, |
| 953 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002, |
| 954 | |
| 955 | //@extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 956 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 957 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 958 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 959 | //@extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 960 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 961 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 962 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 963 | //@extension("VK_NV_win32_keyed_mutex") // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 964 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 965 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 966 | //@extension("VK_KHR_get_physical_device_properties2") // 60 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 967 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 968 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 969 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 970 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 971 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 972 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 973 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 974 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 975 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 976 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 977 | //@extension("VK_KHX_device_group") // 61 |
| 978 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000, |
| 979 | VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001, |
| 980 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002, |
| 981 | VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003, |
| 982 | VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004, |
| 983 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005, |
| 984 | VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006, |
| 985 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007, |
| 986 | VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008, |
| 987 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009, |
| 988 | VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, |
| 989 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011, |
| 990 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012, |
| 991 | |
| 992 | //@extension("VK_EXT_validation_flags") // 62 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 993 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 994 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 995 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 996 | VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, |
| 997 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 998 | //@extension("VK_KHX_device_group_creation") // 71 |
| 999 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000, |
| 1000 | VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001, |
| 1001 | |
| 1002 | //@extension("VK_KHX_external_memory_capabilities") // 72 |
| 1003 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000, |
| 1004 | VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001, |
| 1005 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002, |
| 1006 | VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003, |
| 1007 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004, |
| 1008 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005, |
| 1009 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006, |
| 1010 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007, |
| 1011 | |
| 1012 | //@extension("VK_KHX_external_memory") // 73 |
| 1013 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000, |
| 1014 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001, |
| 1015 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002, |
| 1016 | |
| 1017 | //@extension("VK_KHX_external_memory_win32") // 74 |
| 1018 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000, |
| 1019 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001, |
| 1020 | VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002, |
| 1021 | |
| 1022 | //@extension("VK_KHX_external_memory_fd") // 75 |
| 1023 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000, |
| 1024 | VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001, |
| 1025 | |
| 1026 | //@extension("VK_KHX_win32_keyed_mutex") // 76 |
| 1027 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000, |
| 1028 | |
| 1029 | //@extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1030 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000, |
| 1031 | VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001, |
| 1032 | |
| 1033 | //@extension("VK_KHX_external_semaphore") // 78 |
| 1034 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000, |
| 1035 | |
| 1036 | //@extension("VK_KHX_external_semaphore_win32") // 79 |
| 1037 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000, |
| 1038 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001, |
| 1039 | VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002, |
| 1040 | |
| 1041 | //@extension("VK_KHX_external_semaphore_fd") // 80 |
| 1042 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000, |
| 1043 | |
| 1044 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1045 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, |
| 1046 | |
| 1047 | //@extension("VK_KHR_incremental_present") // 85 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1048 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1049 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1050 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 1051 | VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, |
| 1052 | |
| 1053 | //@extension("VK_NVX_device_generated_commands") // 87 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1054 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 1055 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 1056 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 1057 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 1058 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 1059 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1060 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1061 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1062 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, |
| 1063 | |
| 1064 | //@extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1065 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, |
| 1066 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1067 | //@extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1068 | VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, |
| 1069 | VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, |
| 1070 | VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, |
| 1071 | VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1072 | |
| 1073 | //@extension("VK_GOOGLE_display_timing") // 93 |
| 1074 | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, |
| 1075 | |
| 1076 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1077 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, |
| 1078 | |
| 1079 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 1080 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, |
| 1081 | |
| 1082 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1083 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, |
| 1084 | VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, |
| 1085 | |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 1086 | //@extension("VK_EXT_hdr_metadata") // 106 |
| 1087 | VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, |
| 1088 | |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 1089 | //@extension("VK_KHR_shared_presentable_image") // 111 |
| 1090 | VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, |
| 1091 | |
| 1092 | //@extension("VK_KHR_get_surface_capabilities2") // 119 |
| 1093 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, |
| 1094 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, |
| 1095 | VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, |
| 1096 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1097 | //@extension("VK_MVK_ios_surface") // 123 |
| 1098 | VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, |
| 1099 | |
| 1100 | //@extension("VK_MVK_macos_surface") // 124 |
| 1101 | VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1102 | } |
| 1103 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1104 | enum VkSubpassContents { |
| 1105 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 1106 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1107 | } |
| 1108 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1109 | enum VkPipelineCacheHeaderVersion { |
| 1110 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 1111 | } |
| 1112 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1113 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1114 | /// Error and return codes |
| 1115 | enum VkResult { |
| 1116 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1117 | VK_SUCCESS = 0, |
| 1118 | VK_NOT_READY = 1, |
| 1119 | VK_TIMEOUT = 2, |
| 1120 | VK_EVENT_SET = 3, |
| 1121 | VK_EVENT_RESET = 4, |
| 1122 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1123 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1124 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1125 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1126 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1127 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1128 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 1129 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 1130 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 1131 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 1132 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 1133 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 1134 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 1135 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 1136 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 1137 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 1138 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 1139 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1140 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1141 | //@extension("VK_KHR_surface") // 1 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1142 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1143 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1144 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1145 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1146 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1147 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1148 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1149 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1150 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1151 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1152 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1153 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1154 | //@extension("VK_NV_glsl_shader") // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1155 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1156 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1157 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1158 | VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1159 | |
| 1160 | //@extension("VK_KHX_external_memory") // 73 |
| 1161 | VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1162 | } |
| 1163 | |
| 1164 | enum VkDynamicState { |
| 1165 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 1166 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 1167 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 1168 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 1169 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 1170 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 1171 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 1172 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 1173 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1174 | |
| 1175 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1176 | VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, |
| 1177 | |
| 1178 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1179 | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1180 | } |
| 1181 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1182 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1183 | enum VkPresentModeKHR { |
| 1184 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 1185 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 1186 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1187 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1188 | |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 1189 | //@extension("VK_KHR_shared_presentable_image") |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1190 | VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, |
| 1191 | VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1192 | } |
| 1193 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1194 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1195 | enum VkColorSpaceKHR { |
| 1196 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1197 | |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 1198 | //@extension("VK_EXT_swapchain_colorspace") // 105 |
| 1199 | VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, |
| 1200 | VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, |
| 1201 | VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003, |
| 1202 | VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, |
| 1203 | VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, |
| 1204 | VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, |
| 1205 | VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, |
| 1206 | VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, |
| 1207 | VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009, |
| 1208 | VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010, |
Courtney Goeltzenleuchter | 7f558ed | 2017-01-23 17:15:24 -0700 | [diff] [blame] | 1209 | VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, |
| 1210 | VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 1211 | VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1212 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1213 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1214 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1215 | enum VkDebugReportObjectTypeEXT { |
| 1216 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 1217 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 1218 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 1219 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 1220 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 1221 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 1222 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 1223 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 1224 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 1225 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 1226 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 1227 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 1228 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 1229 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 1230 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 1231 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 1232 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 1233 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 1234 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 1235 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 1236 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 1237 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 1238 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 1239 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 1240 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 1241 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 1242 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 1243 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 1244 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1245 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 1246 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 1247 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 1248 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 1249 | |
| 1250 | //extension("VK_KHR_descriptor_update_template") // 86 |
| 1251 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1252 | } |
| 1253 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1254 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1255 | enum VkDebugReportErrorEXT { |
| 1256 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 1257 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 1258 | } |
| 1259 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1260 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1261 | enum VkRasterizationOrderAMD { |
| 1262 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 1263 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 1264 | } |
| 1265 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1266 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1267 | enum VkValidationCheckEXT { |
| 1268 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 1269 | } |
| 1270 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1271 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 1272 | enum VkDescriptorUpdateTemplateTypeKHR { |
| 1273 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0, |
| 1274 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, |
| 1275 | } |
| 1276 | |
| 1277 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1278 | enum VkIndirectCommandsTokenTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1279 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 1280 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 1281 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 1282 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 1283 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 1284 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 1285 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 1286 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1287 | } |
| 1288 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1289 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1290 | enum VkObjectEntryTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1291 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 1292 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 1293 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 1294 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1295 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1296 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1297 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1298 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1299 | enum VkDisplayPowerStateEXT { |
| 1300 | VK_DISPLAY_POWER_STATE_OFF_EXT = 0, |
| 1301 | VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, |
| 1302 | VK_DISPLAY_POWER_STATE_ON_EXT = 2, |
| 1303 | } |
| 1304 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1305 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1306 | enum VkDeviceEventTypeEXT { |
| 1307 | VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, |
| 1308 | } |
| 1309 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1310 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1311 | enum VkDisplayEventTypeEXT { |
| 1312 | VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, |
| 1313 | } |
| 1314 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1315 | @extension("VK_NV_viewport_swizzle") // 99 |
| 1316 | enum VkViewportCoordinateSwizzleNV { |
| 1317 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, |
| 1318 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, |
| 1319 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, |
| 1320 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, |
| 1321 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, |
| 1322 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, |
| 1323 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, |
| 1324 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, |
| 1325 | } |
| 1326 | |
| 1327 | @extension("VK_EXT_discard_rectangles") // 100 |
| 1328 | enum VkDiscardRectangleModeEXT { |
| 1329 | VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, |
| 1330 | VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, |
| 1331 | } |
| 1332 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1333 | ///////////////// |
| 1334 | // Bitfields // |
| 1335 | ///////////////// |
| 1336 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1337 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1338 | type VkFlags VkQueueFlags |
| 1339 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1340 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1341 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1342 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1343 | VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, /// Queue supports sparse resource memory management operations |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1344 | } |
| 1345 | |
| 1346 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1347 | type VkFlags VkMemoryPropertyFlags |
| 1348 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1349 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1350 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1351 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1352 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1353 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1354 | } |
| 1355 | |
| 1356 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1357 | type VkFlags VkMemoryHeapFlags |
| 1358 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1359 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1360 | |
| 1361 | //@extension("VK_KHX_device_group_creation") // 71 |
| 1362 | VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1363 | } |
| 1364 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1365 | /// Access flags |
| 1366 | type VkFlags VkAccessFlags |
| 1367 | bitfield VkAccessFlagBits { |
| 1368 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1369 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1370 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1371 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1372 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1373 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1374 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1375 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1376 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1377 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1378 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1379 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1380 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1381 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1382 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1383 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1384 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1385 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1386 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1387 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1388 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1389 | } |
| 1390 | |
| 1391 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1392 | type VkFlags VkBufferUsageFlags |
| 1393 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1394 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1395 | VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1396 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1397 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1398 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1399 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1400 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1401 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1402 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1403 | } |
| 1404 | |
| 1405 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1406 | type VkFlags VkBufferCreateFlags |
| 1407 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1408 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1409 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1410 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1411 | } |
| 1412 | |
| 1413 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1414 | type VkFlags VkShaderStageFlags |
| 1415 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1416 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1417 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1418 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1419 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1420 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1421 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1422 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1423 | |
| 1424 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1425 | } |
| 1426 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1427 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1428 | type VkFlags VkDescriptorPoolCreateFlags |
| 1429 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1430 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1431 | } |
| 1432 | |
| 1433 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1434 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1435 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1436 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1437 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1438 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1439 | type VkFlags VkImageUsageFlags |
| 1440 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1441 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1442 | VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, /// Can be used as a destination of transfer operations |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1443 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1444 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1445 | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1446 | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1447 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1448 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1449 | } |
| 1450 | |
| 1451 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1452 | type VkFlags VkImageCreateFlags |
| 1453 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1454 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1455 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1456 | 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 Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1457 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1458 | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1459 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1460 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1461 | VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1462 | |
| 1463 | //@extension("VK_KHX_device_group") // 61 |
| 1464 | VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1465 | } |
| 1466 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1467 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1468 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1469 | //bitfield VkImageViewCreateFlagBits { |
| 1470 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1471 | |
| 1472 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1473 | type VkFlags VkPipelineCreateFlags |
| 1474 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1475 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1476 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1477 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1478 | |
| 1479 | //@extension("VK_KHX_device_group") // 61 |
| 1480 | VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008, |
| 1481 | VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1482 | } |
| 1483 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1484 | /// Color component flags |
| 1485 | type VkFlags VkColorComponentFlags |
| 1486 | bitfield VkColorComponentFlagBits { |
| 1487 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1488 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1489 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1490 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1491 | } |
| 1492 | |
| 1493 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1494 | type VkFlags VkFenceCreateFlags |
| 1495 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1496 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1497 | } |
| 1498 | |
| 1499 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1500 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1501 | //bitfield VkSemaphoreCreateFlagBits { |
| 1502 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1503 | |
| 1504 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1505 | type VkFlags VkFormatFeatureFlags |
| 1506 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1507 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1508 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1509 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1510 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1511 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1512 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1513 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1514 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1515 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1516 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1517 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1518 | VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, /// Format can be used as the destination image of blits with vkCommandBlitImage |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 1519 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1520 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1521 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1522 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1523 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1524 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1525 | VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, |
| 1526 | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1527 | } |
| 1528 | |
| 1529 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1530 | type VkFlags VkQueryControlFlags |
| 1531 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1532 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1533 | } |
| 1534 | |
| 1535 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1536 | type VkFlags VkQueryResultFlags |
| 1537 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1538 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1539 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1540 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1541 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1542 | } |
| 1543 | |
| 1544 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1545 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1546 | //bitfield VkShaderModuleCreateFlagBits { |
| 1547 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1548 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1549 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1550 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1551 | //bitfield VkEventCreateFlagBits { |
| 1552 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1553 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1554 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1555 | type VkFlags VkCommandBufferUsageFlags |
| 1556 | bitfield VkCommandBufferUsageFlagBits { |
| 1557 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1558 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1559 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1560 | } |
| 1561 | |
| 1562 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1563 | type VkFlags VkQueryPipelineStatisticFlags |
| 1564 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1565 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1566 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1567 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1568 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1569 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1570 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1571 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1572 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1573 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1574 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1575 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1576 | } |
| 1577 | |
| 1578 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1579 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1580 | //bitfield VkMemoryMapFlagBits { |
| 1581 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1582 | |
| 1583 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1584 | type VkFlags VkImageAspectFlags |
| 1585 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1586 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1587 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1588 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1589 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1590 | } |
| 1591 | |
| 1592 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1593 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1594 | bitfield VkSparseMemoryBindFlagBits { |
| 1595 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1596 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1597 | |
| 1598 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1599 | type VkFlags VkSparseImageFormatFlags |
| 1600 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1601 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1602 | 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. |
| 1603 | VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, /// Image uses a non-standard sparse block size |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1604 | } |
| 1605 | |
| 1606 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1607 | type VkFlags VkPipelineStageFlags |
| 1608 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1609 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1610 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1611 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1612 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1613 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1614 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1615 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1616 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1617 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1618 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1619 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1620 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1621 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1622 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1623 | VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1624 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1625 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1626 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1627 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1628 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1629 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1630 | } |
| 1631 | |
| 1632 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1633 | type VkFlags VkAttachmentDescriptionFlags |
| 1634 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1635 | VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, /// The attachment may alias physical memory of another attachment in the same renderpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1636 | } |
| 1637 | |
| 1638 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1639 | type VkFlags VkSubpassDescriptionFlags |
| 1640 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1641 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1642 | VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, |
| 1643 | VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1644 | } |
| 1645 | |
| 1646 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1647 | type VkFlags VkCommandPoolCreateFlags |
| 1648 | bitfield VkCommandPoolCreateFlagBits { |
| 1649 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1650 | VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, /// Command buffers may release their memory individually |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1651 | } |
| 1652 | |
| 1653 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1654 | type VkFlags VkCommandPoolResetFlags |
| 1655 | bitfield VkCommandPoolResetFlagBits { |
| 1656 | VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1657 | } |
| 1658 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1659 | type VkFlags VkCommandBufferResetFlags |
| 1660 | bitfield VkCommandBufferResetFlagBits { |
| 1661 | VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1662 | } |
| 1663 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1664 | type VkFlags VkSampleCountFlags |
| 1665 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1666 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1667 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1668 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1669 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1670 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1671 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1672 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1673 | } |
| 1674 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1675 | type VkFlags VkStencilFaceFlags |
| 1676 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1677 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1678 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1679 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1680 | } |
| 1681 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1682 | /// Instance creation flags |
| 1683 | type VkFlags VkInstanceCreateFlags |
| 1684 | //bitfield VkInstanceCreateFlagBits { |
| 1685 | //} |
| 1686 | |
| 1687 | /// Device creation flags |
| 1688 | type VkFlags VkDeviceCreateFlags |
| 1689 | //bitfield VkDeviceCreateFlagBits { |
| 1690 | //} |
| 1691 | |
| 1692 | /// Device queue creation flags |
| 1693 | type VkFlags VkDeviceQueueCreateFlags |
| 1694 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1695 | //} |
| 1696 | |
| 1697 | /// Query pool creation flags |
| 1698 | type VkFlags VkQueryPoolCreateFlags |
| 1699 | //bitfield VkQueryPoolCreateFlagBits { |
| 1700 | //} |
| 1701 | |
| 1702 | /// Buffer view creation flags |
| 1703 | type VkFlags VkBufferViewCreateFlags |
| 1704 | //bitfield VkBufferViewCreateFlagBits { |
| 1705 | //} |
| 1706 | |
| 1707 | /// Pipeline cache creation flags |
| 1708 | type VkFlags VkPipelineCacheCreateFlags |
| 1709 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1710 | //} |
| 1711 | |
| 1712 | /// Pipeline shader stage creation flags |
| 1713 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1714 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1715 | //} |
| 1716 | |
| 1717 | /// Descriptor set layout creation flags |
| 1718 | type VkFlags VkDescriptorSetLayoutCreateFlags |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1719 | bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1720 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1721 | VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, |
| 1722 | } |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1723 | |
| 1724 | /// Pipeline vertex input state creation flags |
| 1725 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1726 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1727 | //} |
| 1728 | |
| 1729 | /// Pipeline input assembly state creation flags |
| 1730 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1731 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1732 | //} |
| 1733 | |
| 1734 | /// Tessellation state creation flags |
| 1735 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1736 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1737 | //} |
| 1738 | |
| 1739 | /// Viewport state creation flags |
| 1740 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1741 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1742 | //} |
| 1743 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1744 | /// Rasterization state creation flags |
| 1745 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1746 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1747 | //} |
| 1748 | |
| 1749 | /// Multisample state creation flags |
| 1750 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1751 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1752 | //} |
| 1753 | |
| 1754 | /// Color blend state creation flags |
| 1755 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1756 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1757 | //} |
| 1758 | |
| 1759 | /// Depth/stencil state creation flags |
| 1760 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1761 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1762 | //} |
| 1763 | |
| 1764 | /// Dynamic state creation flags |
| 1765 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1766 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1767 | //} |
| 1768 | |
| 1769 | /// Pipeline layout creation flags |
| 1770 | type VkFlags VkPipelineLayoutCreateFlags |
| 1771 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1772 | //} |
| 1773 | |
| 1774 | /// Sampler creation flags |
| 1775 | type VkFlags VkSamplerCreateFlags |
| 1776 | //bitfield VkSamplerCreateFlagBits { |
| 1777 | //} |
| 1778 | |
| 1779 | /// Render pass creation flags |
| 1780 | type VkFlags VkRenderPassCreateFlags |
| 1781 | //bitfield VkRenderPassCreateFlagBits { |
| 1782 | //} |
| 1783 | |
| 1784 | /// Framebuffer creation flags |
| 1785 | type VkFlags VkFramebufferCreateFlags |
| 1786 | //bitfield VkFramebufferCreateFlagBits { |
| 1787 | //} |
| 1788 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1789 | /// Dependency flags |
| 1790 | type VkFlags VkDependencyFlags |
| 1791 | bitfield VkDependencyFlagBits { |
| 1792 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1793 | |
| 1794 | //@extension("VK_KHX_multiview") // 54 |
| 1795 | VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002, |
| 1796 | |
| 1797 | //@extension("VK_KHX_device_group") // 61 |
| 1798 | VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1799 | } |
| 1800 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1801 | /// Cull mode flags |
| 1802 | type VkFlags VkCullModeFlags |
| 1803 | bitfield VkCullModeFlagBits { |
| 1804 | VK_CULL_MODE_NONE = 0x00000000, |
| 1805 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1806 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1807 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1808 | } |
| 1809 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1810 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1811 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1812 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1813 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1814 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1815 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1816 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1817 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1818 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1819 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1820 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1821 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1822 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1823 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1824 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1825 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1826 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1827 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1828 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1829 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1830 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1831 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1832 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1833 | } |
| 1834 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1835 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1836 | type VkFlags VkSwapchainCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1837 | @extension("VK_KHR_swapchain") // 2 |
| 1838 | bitfield VkSwapchainCreateFlagBitsKHR { |
| 1839 | //@extension("VK_KHX_device_group") // 61 |
| 1840 | VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001, |
| 1841 | } |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1842 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1843 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1844 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1845 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1846 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1847 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1848 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1849 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1850 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1851 | } |
| 1852 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1853 | @extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1854 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1855 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1856 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1857 | //} |
| 1858 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1859 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1860 | type VkFlags VkDisplayModeCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1861 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1862 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1863 | //} |
| 1864 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1865 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1866 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1867 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1868 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1869 | //} |
| 1870 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1871 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1872 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1873 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1874 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1875 | //} |
| 1876 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1877 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1878 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1879 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1880 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1881 | //} |
| 1882 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1883 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1884 | type VkFlags VkMirSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1885 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1886 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1887 | //} |
| 1888 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1889 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1890 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1891 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1892 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1893 | //} |
| 1894 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1895 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1896 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1897 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1898 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1899 | //} |
| 1900 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1901 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1902 | type VkFlags VkSwapchainImageUsageFlagsANDROID |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1903 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1904 | bitfield VkSwapchainImageUsageFlagBitsANDROID { |
| 1905 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001, |
| 1906 | } |
| 1907 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1908 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1909 | type VkFlags VkDebugReportFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1910 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1911 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1912 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1913 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1914 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1915 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1916 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1917 | } |
| 1918 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1919 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1920 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1921 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1922 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1923 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1924 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1925 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1926 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1927 | } |
| 1928 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1929 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1930 | type VkFlags VkExternalMemoryFeatureFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1931 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1932 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1933 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1934 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1935 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1936 | } |
| 1937 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1938 | @extension("VK_KHX_device_group") // 61 |
| 1939 | type VkFlags VkPeerMemoryFeatureFlagsKHX |
| 1940 | @extension("VK_KHX_device_group") // 61 |
| 1941 | bitfield VkPeerMemoryFeatureFlagBitsKHX { |
| 1942 | VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001, |
| 1943 | VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002, |
| 1944 | VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004, |
| 1945 | VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008, |
| 1946 | } |
| 1947 | |
| 1948 | @extension("VK_KHX_device_group") // 61 |
| 1949 | type VkFlags VkMemoryAllocateFlagsKHX |
| 1950 | @extension("VK_KHX_device_group") // 61 |
| 1951 | bitfield VkMemoryAllocateFlagBitsKHX { |
| 1952 | VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001, |
| 1953 | } |
| 1954 | |
| 1955 | @extension("VK_KHX_device_group") // 61 |
| 1956 | type VkFlags VkDeviceGroupPresentModeFlagsKHX |
| 1957 | @extension("VK_KHX_device_group") // 61 |
| 1958 | bitfield VkDeviceGroupPresentModeFlagBitsKHX { |
| 1959 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001, |
| 1960 | VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002, |
| 1961 | VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004, |
| 1962 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008, |
| 1963 | } |
| 1964 | |
| 1965 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1966 | type VkFlags VkViSurfaceCreateFlagsNN |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1967 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1968 | //bitfield VkViSurfaceCreateFlagBitsNN { |
| 1969 | //} |
| 1970 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1971 | @extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1972 | type VkFlags VkCommandPoolTrimFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1973 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1974 | //bitfield VkCommandPoolTrimFlagBitsKHR { |
| 1975 | //} |
| 1976 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1977 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1978 | type VkFlags VkExternalMemoryHandleTypeFlagsKHX |
| 1979 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1980 | bitfield VkExternalMemoryHandleTypeFlagBitsKHX { |
| 1981 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001, |
| 1982 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002, |
| 1983 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004, |
| 1984 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008, |
| 1985 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010, |
| 1986 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020, |
| 1987 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040, |
| 1988 | } |
| 1989 | |
| 1990 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1991 | type VkFlags VkExternalMemoryFeatureFlagsKHX |
| 1992 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1993 | bitfield VkExternalMemoryFeatureFlagBitsKHX { |
| 1994 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001, |
| 1995 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002, |
| 1996 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004, |
| 1997 | } |
| 1998 | |
| 1999 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2000 | type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX |
| 2001 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2002 | bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX { |
| 2003 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001 |
| 2004 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002 |
| 2005 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004 |
| 2006 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008 |
| 2007 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010 |
| 2008 | } |
| 2009 | |
| 2010 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2011 | type VkFlags VkExternalSemaphoreFeatureFlagsKHX |
| 2012 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2013 | bitfield VkExternalSemaphoreFeatureFlagBitsKHX { |
| 2014 | VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001, |
| 2015 | VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002, |
| 2016 | } |
| 2017 | |
| 2018 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 2019 | type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR |
| 2020 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 2021 | //bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR { |
| 2022 | //} |
| 2023 | |
| 2024 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2025 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2026 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2027 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2028 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 2029 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 2030 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 2031 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2032 | } |
| 2033 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2034 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2035 | type VkFlags VkObjectEntryUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2036 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2037 | bitfield VkObjectEntryUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2038 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 2039 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2040 | } |
| 2041 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2042 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2043 | type VkFlags VkSurfaceCounterFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2044 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2045 | bitfield VkSurfaceCounterFlagBitsEXT { |
| 2046 | VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, |
| 2047 | } |
| 2048 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2049 | @extension("VK_NV_viewport_swizzle") // 99 |
| 2050 | type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV |
| 2051 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 2052 | //bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV { |
| 2053 | //} |
| 2054 | |
| 2055 | @extension("VK_EXT_discard_rectangles") // 100 |
| 2056 | type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT |
| 2057 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 2058 | //bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT { |
| 2059 | //} |
| 2060 | |
| 2061 | @extension("VK_MVK_ios_surface") // 123 |
| 2062 | type VkFlags VkIOSSurfaceCreateFlagsMVK |
| 2063 | //@extension("VK_MVK_ios_surface") // 123 |
| 2064 | //bitfield VkIOSSurfaceCreateFlagBitsMVK { |
| 2065 | //} |
| 2066 | |
| 2067 | @extension("VK_MVK_macos_surface") // 124 |
| 2068 | type VkFlags VkMacOSSurfaceCreateFlagsMVK |
| 2069 | //@extension("VK_MVK_macos_surface") // 124 |
| 2070 | //bitfield VkMacOSSurfaceCreateFlagBitsMVK { |
| 2071 | //} |
| 2072 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2073 | ////////////////// |
| 2074 | // Structures // |
| 2075 | ////////////////// |
| 2076 | |
| 2077 | class VkOffset2D { |
| 2078 | s32 x |
| 2079 | s32 y |
| 2080 | } |
| 2081 | |
| 2082 | class VkOffset3D { |
| 2083 | s32 x |
| 2084 | s32 y |
| 2085 | s32 z |
| 2086 | } |
| 2087 | |
| 2088 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2089 | u32 width |
| 2090 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2091 | } |
| 2092 | |
| 2093 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2094 | u32 width |
| 2095 | u32 height |
| 2096 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2097 | } |
| 2098 | |
| 2099 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2100 | f32 x |
| 2101 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2102 | f32 width |
| 2103 | f32 height |
| 2104 | f32 minDepth |
| 2105 | f32 maxDepth |
| 2106 | } |
| 2107 | |
| 2108 | class VkRect2D { |
| 2109 | VkOffset2D offset |
| 2110 | VkExtent2D extent |
| 2111 | } |
| 2112 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2113 | class VkClearRect { |
| 2114 | VkRect2D rect |
| 2115 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2116 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2117 | } |
| 2118 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2119 | class VkComponentMapping { |
| 2120 | VkComponentSwizzle r |
| 2121 | VkComponentSwizzle g |
| 2122 | VkComponentSwizzle b |
| 2123 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2124 | } |
| 2125 | |
| 2126 | class VkPhysicalDeviceProperties { |
| 2127 | u32 apiVersion |
| 2128 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2129 | u32 vendorID |
| 2130 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2131 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2132 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 2133 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2134 | VkPhysicalDeviceLimits limits |
| 2135 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2136 | } |
| 2137 | |
| 2138 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2139 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2140 | u32 specVersion /// version of the extension specification implemented |
| 2141 | } |
| 2142 | |
| 2143 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2144 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2145 | u32 specVersion /// version of the layer specification implemented |
| 2146 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2147 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2148 | } |
| 2149 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2150 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2151 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 2152 | const void* pNext /// Next structure in chain |
| 2153 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2154 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2155 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2156 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2157 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2158 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2159 | const VkSemaphore* pSignalSemaphores |
| 2160 | } |
| 2161 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2162 | class VkApplicationInfo { |
| 2163 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 2164 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2165 | const char* pApplicationName |
| 2166 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2167 | const char* pEngineName |
| 2168 | u32 engineVersion |
| 2169 | u32 apiVersion |
| 2170 | } |
| 2171 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2172 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2173 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2174 | PFN_vkAllocationFunction pfnAllocation |
| 2175 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2176 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2177 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2178 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2179 | } |
| 2180 | |
| 2181 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2182 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 2183 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2184 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2185 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2186 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2187 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2188 | } |
| 2189 | |
| 2190 | class VkDeviceCreateInfo { |
| 2191 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 2192 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2193 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2194 | u32 queueCreateInfoCount |
| 2195 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2196 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2197 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2198 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2199 | const char* const* ppEnabledExtensionNames |
| 2200 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2201 | } |
| 2202 | |
| 2203 | class VkInstanceCreateInfo { |
| 2204 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 2205 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2206 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2207 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2208 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2209 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2210 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2211 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 2212 | } |
| 2213 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2214 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2215 | VkQueueFlags queueFlags /// Queue flags |
| 2216 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2217 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2218 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2219 | } |
| 2220 | |
| 2221 | class VkPhysicalDeviceMemoryProperties { |
| 2222 | u32 memoryTypeCount |
| 2223 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 2224 | u32 memoryHeapCount |
| 2225 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 2226 | } |
| 2227 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2228 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2229 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2230 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2231 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2232 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 2233 | } |
| 2234 | |
| 2235 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2236 | VkDeviceSize size /// Specified in bytes |
| 2237 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2238 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 2239 | } |
| 2240 | |
| 2241 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2242 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2243 | VkExtent3D imageGranularity |
| 2244 | VkSparseImageFormatFlags flags |
| 2245 | } |
| 2246 | |
| 2247 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2248 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2249 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2250 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 2251 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 2252 | VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2253 | } |
| 2254 | |
| 2255 | class VkMemoryType { |
| 2256 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 2257 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 2258 | } |
| 2259 | |
| 2260 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2261 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2262 | VkMemoryHeapFlags flags /// Flags for the heap |
| 2263 | } |
| 2264 | |
| 2265 | class VkMappedMemoryRange { |
| 2266 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 2267 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2268 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2269 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 2270 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2271 | } |
| 2272 | |
| 2273 | class VkFormatProperties { |
| 2274 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 2275 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2276 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2277 | } |
| 2278 | |
| 2279 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2280 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 2281 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2282 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2283 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 2284 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 2285 | } |
| 2286 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2287 | class VkDescriptorImageInfo { |
| 2288 | VkSampler sampler |
| 2289 | VkImageView imageView |
| 2290 | VkImageLayout imageLayout |
| 2291 | } |
| 2292 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2293 | class VkDescriptorBufferInfo { |
| 2294 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 2295 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 2296 | VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update. |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2297 | } |
| 2298 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2299 | class VkWriteDescriptorSet { |
| 2300 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 2301 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2302 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2303 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 2304 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2305 | u32 descriptorCount /// Number of descriptors to write (determines the size of the array pointed by <pDescriptors>) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2306 | VkDescriptorType descriptorType /// Descriptor type to write (determines which fields of the array pointed by <pDescriptors> are going to be used) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2307 | const VkDescriptorImageInfo* pImageInfo |
| 2308 | const VkDescriptorBufferInfo* pBufferInfo |
| 2309 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2310 | } |
| 2311 | |
| 2312 | class VkCopyDescriptorSet { |
| 2313 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 2314 | const void* pNext /// Pointer to next structure |
| 2315 | VkDescriptorSet srcSet /// Source descriptor set |
| 2316 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 2317 | u32 srcArrayElement /// Array element within the source binding to copy from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2318 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2319 | u32 dstBinding /// Binding within the destination descriptor set to copy to |
| 2320 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2321 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2322 | } |
| 2323 | |
| 2324 | class VkBufferCreateInfo { |
| 2325 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 2326 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2327 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2328 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2329 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2330 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2331 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2332 | const u32* pQueueFamilyIndices |
| 2333 | } |
| 2334 | |
| 2335 | class VkBufferViewCreateInfo { |
| 2336 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 2337 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2338 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2339 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2340 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2341 | VkDeviceSize offset /// Specified in bytes |
| 2342 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2343 | } |
| 2344 | |
| 2345 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2346 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2347 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2348 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2349 | } |
| 2350 | |
| 2351 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2352 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2353 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2354 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2355 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2356 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2357 | } |
| 2358 | |
| 2359 | class VkMemoryBarrier { |
| 2360 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 2361 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2362 | VkAccessFlags srcAccessMask |
| 2363 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2364 | } |
| 2365 | |
| 2366 | class VkBufferMemoryBarrier { |
| 2367 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 2368 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2369 | VkAccessFlags srcAccessMask |
| 2370 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2371 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2372 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2373 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2374 | VkDeviceSize offset /// Offset within the buffer to sync |
| 2375 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2376 | } |
| 2377 | |
| 2378 | class VkImageMemoryBarrier { |
| 2379 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 2380 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2381 | VkAccessFlags srcAccessMask |
| 2382 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2383 | VkImageLayout oldLayout /// Current layout of the image |
| 2384 | VkImageLayout newLayout /// New layout to transition the image to |
| 2385 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2386 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2387 | VkImage image /// Image to sync |
| 2388 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 2389 | } |
| 2390 | |
| 2391 | class VkImageCreateInfo { |
| 2392 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 2393 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2394 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2395 | VkImageType imageType |
| 2396 | VkFormat format |
| 2397 | VkExtent3D extent |
| 2398 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2399 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2400 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2401 | VkImageTiling tiling |
| 2402 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2403 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2404 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2405 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2406 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2407 | } |
| 2408 | |
| 2409 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2410 | VkDeviceSize offset /// Specified in bytes |
| 2411 | VkDeviceSize size /// Specified in bytes |
| 2412 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2413 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2414 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2415 | } |
| 2416 | |
| 2417 | class VkImageViewCreateInfo { |
| 2418 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 2419 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2420 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2421 | VkImage image |
| 2422 | VkImageViewType viewType |
| 2423 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2424 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2425 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2426 | } |
| 2427 | |
| 2428 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2429 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2430 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2431 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2432 | } |
| 2433 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2434 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2435 | VkDeviceSize resourceOffset /// Specified in bytes |
| 2436 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2437 | VkDeviceMemory memory |
| 2438 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2439 | VkSparseMemoryBindFlags flags |
| 2440 | } |
| 2441 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2442 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2443 | VkImageSubresource subresource |
| 2444 | VkOffset3D offset |
| 2445 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2446 | VkDeviceMemory memory |
| 2447 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2448 | VkSparseMemoryBindFlags flags |
| 2449 | } |
| 2450 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2451 | class VkSparseBufferMemoryBindInfo { |
| 2452 | VkBuffer buffer |
| 2453 | u32 bindCount |
| 2454 | const VkSparseMemoryBind* pBinds |
| 2455 | } |
| 2456 | |
| 2457 | class VkSparseImageOpaqueMemoryBindInfo { |
| 2458 | VkImage image |
| 2459 | u32 bindCount |
| 2460 | const VkSparseMemoryBind* pBinds |
| 2461 | } |
| 2462 | |
| 2463 | class VkSparseImageMemoryBindInfo { |
| 2464 | VkImage image |
| 2465 | u32 bindCount |
| 2466 | const VkSparseMemoryBind* pBinds |
| 2467 | } |
| 2468 | |
| 2469 | class VkBindSparseInfo { |
| 2470 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 2471 | const void* pNext |
| 2472 | u32 waitSemaphoreCount |
| 2473 | const VkSemaphore* pWaitSemaphores |
| 2474 | u32 numBufferBinds |
| 2475 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2476 | u32 numImageOpaqueBinds |
| 2477 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2478 | u32 numImageBinds |
| 2479 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2480 | u32 signalSemaphoreCount |
| 2481 | const VkSemaphore* pSignalSemaphores |
| 2482 | } |
| 2483 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2484 | class VkImageSubresourceLayers { |
| 2485 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2486 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2487 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2488 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2489 | } |
| 2490 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2491 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2492 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2493 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2494 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2495 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2496 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2497 | } |
| 2498 | |
| 2499 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2500 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2501 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2502 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2503 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2504 | } |
| 2505 | |
| 2506 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2507 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2508 | u32 bufferRowLength /// Specified in texels |
| 2509 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2510 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2511 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2512 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2513 | } |
| 2514 | |
| 2515 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2516 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2517 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2518 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2519 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2520 | VkExtent3D extent |
| 2521 | } |
| 2522 | |
| 2523 | class VkShaderModuleCreateInfo { |
| 2524 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2525 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2526 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2527 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2528 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2529 | } |
| 2530 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2531 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2532 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2533 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2534 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2535 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2536 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2537 | } |
| 2538 | |
| 2539 | class VkDescriptorSetLayoutCreateInfo { |
| 2540 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2541 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2542 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2543 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2544 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2545 | } |
| 2546 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2547 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2548 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2549 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2550 | } |
| 2551 | |
| 2552 | class VkDescriptorPoolCreateInfo { |
| 2553 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2554 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2555 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2556 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2557 | u32 poolSizeCount |
| 2558 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2559 | } |
| 2560 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2561 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2562 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2563 | const void* pNext /// Pointer to next structure |
| 2564 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2565 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2566 | const VkDescriptorSetLayout* pSetLayouts |
| 2567 | } |
| 2568 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2569 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2570 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2571 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2572 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2573 | } |
| 2574 | |
| 2575 | class VkSpecializationInfo { |
| 2576 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2577 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2578 | platform.size_t dataSize /// Size in bytes of pData |
| 2579 | const void* pData /// Pointer to SpecConstant data |
| 2580 | } |
| 2581 | |
| 2582 | class VkPipelineShaderStageCreateInfo { |
| 2583 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2584 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2585 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2586 | VkShaderStageFlagBits stage |
| 2587 | VkShaderModule module |
| 2588 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2589 | const VkSpecializationInfo* pSpecializationInfo |
| 2590 | } |
| 2591 | |
| 2592 | class VkComputePipelineCreateInfo { |
| 2593 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2594 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2595 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2596 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2597 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2598 | 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 |
| 2599 | 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 |
| 2600 | } |
| 2601 | |
| 2602 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2603 | u32 binding /// Vertex buffer binding id |
| 2604 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2605 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2606 | } |
| 2607 | |
| 2608 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2609 | u32 location /// location of the shader vertex attrib |
| 2610 | u32 binding /// Vertex buffer binding id |
| 2611 | VkFormat format /// format of source data |
| 2612 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2613 | } |
| 2614 | |
| 2615 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2616 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2617 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2618 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2619 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2620 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2621 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2622 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2623 | } |
| 2624 | |
| 2625 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2626 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2627 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2628 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2629 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2630 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2631 | } |
| 2632 | |
| 2633 | class VkPipelineTessellationStateCreateInfo { |
| 2634 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2635 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2636 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2637 | u32 patchControlPoints |
| 2638 | } |
| 2639 | |
| 2640 | class VkPipelineViewportStateCreateInfo { |
| 2641 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2642 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2643 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2644 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2645 | const VkViewport* pViewports |
| 2646 | u32 scissorCount |
| 2647 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2648 | } |
| 2649 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2650 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2651 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2652 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2653 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2654 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2655 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2656 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2657 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2658 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2659 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2660 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2661 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2662 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2663 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2664 | } |
| 2665 | |
| 2666 | class VkPipelineMultisampleStateCreateInfo { |
| 2667 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2668 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2669 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2670 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2671 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2672 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2673 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2674 | VkBool32 alphaToCoverageEnable |
| 2675 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2676 | } |
| 2677 | |
| 2678 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2679 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2680 | VkBlendFactor srcColorBlendFactor |
| 2681 | VkBlendFactor dstColorBlendFactor |
| 2682 | VkBlendOp colorBlendOp |
| 2683 | VkBlendFactor srcAlphaBlendFactor |
| 2684 | VkBlendFactor dstAlphaBlendFactor |
| 2685 | VkBlendOp alphaBlendOp |
| 2686 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2687 | } |
| 2688 | |
| 2689 | class VkPipelineColorBlendStateCreateInfo { |
| 2690 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2691 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2692 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2693 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2694 | VkLogicOp logicOp |
| 2695 | u32 attachmentCount /// # of pAttachments |
| 2696 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2697 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2698 | } |
| 2699 | |
| 2700 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2701 | VkStencilOp failOp |
| 2702 | VkStencilOp passOp |
| 2703 | VkStencilOp depthFailOp |
| 2704 | VkCompareOp compareOp |
| 2705 | u32 compareMask |
| 2706 | u32 writeMask |
| 2707 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2708 | } |
| 2709 | |
| 2710 | class VkPipelineDepthStencilStateCreateInfo { |
| 2711 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2712 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2713 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2714 | VkBool32 depthTestEnable |
| 2715 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2716 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2717 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2718 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2719 | VkStencilOpState front |
| 2720 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2721 | f32 minDepthBounds |
| 2722 | f32 maxDepthBounds |
| 2723 | } |
| 2724 | |
| 2725 | class VkPipelineDynamicStateCreateInfo { |
| 2726 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2727 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2728 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2729 | u32 dynamicStateCount |
| 2730 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2731 | } |
| 2732 | |
| 2733 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2734 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2735 | const void* pNext /// Pointer to next structure |
| 2736 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2737 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2738 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2739 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2740 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2741 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2742 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2743 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2744 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2745 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2746 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2747 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2748 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2749 | VkRenderPass renderPass |
| 2750 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2751 | 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 |
| 2752 | 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 Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2753 | } |
| 2754 | |
| 2755 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2756 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2757 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2758 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2759 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2760 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2761 | } |
| 2762 | |
| 2763 | class VkPushConstantRange { |
| 2764 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2765 | u32 offset /// Start of the range, in bytes |
| 2766 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2767 | } |
| 2768 | |
| 2769 | class VkPipelineLayoutCreateInfo { |
| 2770 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2771 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2772 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2773 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2774 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2775 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2776 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2777 | } |
| 2778 | |
| 2779 | class VkSamplerCreateInfo { |
| 2780 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2781 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2782 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2783 | VkFilter magFilter /// Filter mode for magnification |
| 2784 | VkFilter minFilter /// Filter mode for minifiation |
| 2785 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2786 | VkSamplerAddressMode addressModeU |
| 2787 | VkSamplerAddressMode addressModeV |
| 2788 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2789 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2790 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2791 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2792 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2793 | VkCompareOp compareOp |
| 2794 | f32 minLod |
| 2795 | f32 maxLod |
| 2796 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2797 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2798 | } |
| 2799 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2800 | class VkCommandPoolCreateInfo { |
| 2801 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2802 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2803 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2804 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2805 | } |
| 2806 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2807 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2808 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2809 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2810 | VkCommandPool commandPool |
| 2811 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2812 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2813 | } |
| 2814 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2815 | class VkCommandBufferInheritanceInfo { |
| 2816 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2817 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2818 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2819 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2820 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2821 | VkBool32 occlusionQueryEnable |
| 2822 | VkQueryControlFlags queryFlags |
| 2823 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2824 | } |
| 2825 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2826 | class VkCommandBufferBeginInfo { |
| 2827 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2828 | const void* pNext /// Pointer to next structure |
| 2829 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2830 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2831 | } |
| 2832 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2833 | class VkRenderPassBeginInfo { |
| 2834 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2835 | const void* pNext /// Pointer to next structure |
| 2836 | VkRenderPass renderPass |
| 2837 | VkFramebuffer framebuffer |
| 2838 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2839 | u32 clearValueCount |
| 2840 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2841 | } |
| 2842 | |
| 2843 | @union |
| 2844 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2845 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2846 | f32[4] float32 |
| 2847 | s32[4] int32 |
| 2848 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2849 | } |
| 2850 | |
| 2851 | class VkClearDepthStencilValue { |
| 2852 | f32 depth |
| 2853 | u32 stencil |
| 2854 | } |
| 2855 | |
| 2856 | @union |
| 2857 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2858 | class VkClearValue { |
| 2859 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2860 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2861 | } |
| 2862 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2863 | class VkClearAttachment { |
| 2864 | VkImageAspectFlags aspectMask |
| 2865 | u32 colorAttachment |
| 2866 | VkClearValue clearValue |
| 2867 | } |
| 2868 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2869 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2870 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2871 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2872 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2873 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2874 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2875 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2876 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2877 | VkImageLayout initialLayout |
| 2878 | VkImageLayout finalLayout |
| 2879 | } |
| 2880 | |
| 2881 | class VkAttachmentReference { |
| 2882 | u32 attachment |
| 2883 | VkImageLayout layout |
| 2884 | } |
| 2885 | |
| 2886 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2887 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2888 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2889 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2890 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2891 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2892 | const VkAttachmentReference* pColorAttachments |
| 2893 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2894 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2895 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2896 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2897 | } |
| 2898 | |
| 2899 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2900 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2901 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2902 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2903 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2904 | VkAccessFlags srcAccessMask |
| 2905 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2906 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2907 | } |
| 2908 | |
| 2909 | class VkRenderPassCreateInfo { |
| 2910 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2911 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2912 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2913 | u32 attachmentCount |
| 2914 | const VkAttachmentDescription* pAttachments |
| 2915 | u32 subpassCount |
| 2916 | const VkSubpassDescription* pSubpasses |
| 2917 | u32 dependencyCount |
| 2918 | const VkSubpassDependency* pDependencies |
| 2919 | } |
| 2920 | |
| 2921 | class VkEventCreateInfo { |
| 2922 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2923 | const void* pNext /// Pointer to next structure |
| 2924 | VkEventCreateFlags flags /// Event creation flags |
| 2925 | } |
| 2926 | |
| 2927 | class VkFenceCreateInfo { |
| 2928 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2929 | const void* pNext /// Pointer to next structure |
| 2930 | VkFenceCreateFlags flags /// Fence creation flags |
| 2931 | } |
| 2932 | |
| 2933 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2934 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2935 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2936 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2937 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2938 | VkBool32 geometryShader /// geometry stage |
| 2939 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2940 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2941 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2942 | VkBool32 logicOp /// logic operations |
| 2943 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2944 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2945 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2946 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2947 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2948 | VkBool32 depthBounds /// depth bounds test |
| 2949 | VkBool32 wideLines /// lines with width greater than 1 |
| 2950 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2951 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2952 | VkBool32 multiViewport |
| 2953 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2954 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 2955 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 2956 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2957 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2958 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2959 | VkBool32 vertexPipelineStoresAndAtomics |
| 2960 | VkBool32 fragmentStoresAndAtomics |
| 2961 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2962 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 2963 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 2964 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2965 | VkBool32 shaderStorageImageReadWithoutFormat |
| 2966 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2967 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 2968 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 2969 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 2970 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 2971 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 2972 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 2973 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 2974 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 2975 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 2976 | VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2977 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2978 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 2979 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 2980 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 2981 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 2982 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 2983 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 2984 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 2985 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 2986 | VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2987 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2988 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2989 | } |
| 2990 | |
| 2991 | class VkPhysicalDeviceLimits { |
| 2992 | /// resource maximum sizes |
| 2993 | u32 maxImageDimension1D /// max 1D image dimension |
| 2994 | u32 maxImageDimension2D /// max 2D image dimension |
| 2995 | u32 maxImageDimension3D /// max 3D image dimension |
| 2996 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 2997 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2998 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2999 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 3000 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3001 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 3002 | /// memory limits |
| 3003 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3004 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3005 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 3006 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3007 | /// descriptor set limits |
| 3008 | u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3009 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 3010 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 3011 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 3012 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 3013 | u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 3014 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3015 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3016 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 3017 | u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3018 | u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3019 | u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3020 | u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3021 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 3022 | u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 3023 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3024 | /// vertex stage limits |
| 3025 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3026 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3027 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 3028 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 3029 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 3030 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3031 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 3032 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 3033 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 3034 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 3035 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 3036 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 3037 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 3038 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3039 | /// geometry stage limits |
| 3040 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 3041 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 3042 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 3043 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 3044 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 3045 | /// fragment stage limits |
| 3046 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3047 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3048 | u32 maxFragmentDualSrcAttachments /// max num of output attachments written when using dual source blending |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3049 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 3050 | /// compute stage limits |
| 3051 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 3052 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 3053 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 3054 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 3055 | |
| 3056 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 3057 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 3058 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 3059 | |
| 3060 | u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices) |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3061 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3062 | |
| 3063 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 3064 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 3065 | |
| 3066 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3067 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 3068 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 3069 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 3070 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 3071 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 3072 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 3073 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 3074 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3075 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3076 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3077 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3078 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3079 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 3080 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 3081 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 3082 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 3083 | |
| 3084 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 3085 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 3086 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3087 | VkSampleCountFlags framebufferColorSampleCounts |
| 3088 | VkSampleCountFlags framebufferDepthSampleCounts |
| 3089 | VkSampleCountFlags framebufferStencilSampleCounts |
| 3090 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3091 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 3092 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3093 | VkSampleCountFlags sampledImageColorSampleCounts |
| 3094 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 3095 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 3096 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 3097 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3098 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3099 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3100 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3101 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3102 | |
| 3103 | u32 maxClipDistances /// max number of clip distances |
| 3104 | u32 maxCullDistances /// max number of cull distances |
| 3105 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 3106 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3107 | u32 discreteQueuePriorities |
| 3108 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3109 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 3110 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3111 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 3112 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3113 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3114 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3115 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 3116 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 3117 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3118 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3119 | } |
| 3120 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3121 | class VkPhysicalDeviceSparseProperties { |
| 3122 | VkBool32 residencyStandard2DBlockShape /// Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format) |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3123 | VkBool32 residencyStandard2DMultisampleBlockShape /// Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3124 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 3125 | 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 Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3126 | 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 |
| 3127 | } |
| 3128 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3129 | class VkSemaphoreCreateInfo { |
| 3130 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 3131 | const void* pNext /// Pointer to next structure |
| 3132 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 3133 | } |
| 3134 | |
| 3135 | class VkQueryPoolCreateInfo { |
| 3136 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 3137 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3138 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3139 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3140 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3141 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 3142 | } |
| 3143 | |
| 3144 | class VkFramebufferCreateInfo { |
| 3145 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 3146 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3147 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3148 | VkRenderPass renderPass |
| 3149 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3150 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3151 | u32 width |
| 3152 | u32 height |
| 3153 | u32 layers |
| 3154 | } |
| 3155 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3156 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3157 | u32 vertexCount |
| 3158 | u32 instanceCount |
| 3159 | u32 firstVertex |
| 3160 | u32 firstInstance |
| 3161 | } |
| 3162 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3163 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3164 | u32 indexCount |
| 3165 | u32 instanceCount |
| 3166 | u32 firstIndex |
| 3167 | s32 vertexOffset |
| 3168 | u32 firstInstance |
| 3169 | } |
| 3170 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3171 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3172 | u32 x |
| 3173 | u32 y |
| 3174 | u32 z |
| 3175 | } |
| 3176 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3177 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3178 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3179 | u32 minImageCount |
| 3180 | u32 maxImageCount |
| 3181 | VkExtent2D currentExtent |
| 3182 | VkExtent2D minImageExtent |
| 3183 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3184 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3185 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3186 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3187 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3188 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3189 | } |
| 3190 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3191 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3192 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3193 | VkFormat format |
| 3194 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3195 | } |
| 3196 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3197 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3198 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3199 | VkStructureType sType |
| 3200 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3201 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3202 | VkSurfaceKHR surface |
| 3203 | u32 minImageCount |
| 3204 | VkFormat imageFormat |
| 3205 | VkColorSpaceKHR imageColorSpace |
| 3206 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3207 | u32 imageArrayLayers |
| 3208 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3209 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3210 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3211 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3212 | VkSurfaceTransformFlagBitsKHR preTransform |
| 3213 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3214 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3215 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3216 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3217 | } |
| 3218 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3219 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3220 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3221 | VkStructureType sType |
| 3222 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3223 | u32 waitSemaphoreCount |
| 3224 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3225 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3226 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3227 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 3228 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3229 | } |
| 3230 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3231 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3232 | class VkDisplayPropertiesKHR { |
| 3233 | VkDisplayKHR display |
| 3234 | const char* displayName |
| 3235 | VkExtent2D physicalDimensions |
| 3236 | VkExtent2D physicalResolution |
| 3237 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3238 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3239 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3240 | } |
| 3241 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3242 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3243 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3244 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3245 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3246 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3247 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3248 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3249 | class VkDisplayModePropertiesKHR { |
| 3250 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3251 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3252 | } |
| 3253 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3254 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3255 | class VkDisplayModeCreateInfoKHR { |
| 3256 | VkStructureType sType |
| 3257 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 3258 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3259 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3260 | } |
| 3261 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3262 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3263 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3264 | VkDisplayKHR currentDisplay |
| 3265 | u32 currentStackIndex |
| 3266 | } |
| 3267 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3268 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3269 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3270 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 3271 | VkOffset2D minSrcPosition |
| 3272 | VkOffset2D maxSrcPosition |
| 3273 | VkExtent2D minSrcExtent |
| 3274 | VkExtent2D maxSrcExtent |
| 3275 | VkOffset2D minDstPosition |
| 3276 | VkOffset2D maxDstPosition |
| 3277 | VkExtent2D minDstExtent |
| 3278 | VkExtent2D maxDstExtent |
| 3279 | } |
| 3280 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3281 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3282 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3283 | VkStructureType sType |
| 3284 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3285 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3286 | VkDisplayModeKHR displayMode |
| 3287 | u32 planeIndex |
| 3288 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3289 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3290 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3291 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 3292 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3293 | } |
| 3294 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3295 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3296 | class VkDisplayPresentInfoKHR { |
| 3297 | VkStructureType sType |
| 3298 | const void* pNext |
| 3299 | VkRect2D srcRect |
| 3300 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3301 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3302 | } |
| 3303 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3304 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3305 | class VkXlibSurfaceCreateInfoKHR { |
| 3306 | VkStructureType sType |
| 3307 | const void* pNext |
| 3308 | VkXlibSurfaceCreateFlagsKHR flags |
| 3309 | platform.Display* dpy |
| 3310 | platform.Window window |
| 3311 | } |
| 3312 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3313 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3314 | class VkXcbSurfaceCreateInfoKHR { |
| 3315 | VkStructureType sType |
| 3316 | const void* pNext |
| 3317 | VkXcbSurfaceCreateFlagsKHR flags |
| 3318 | platform.xcb_connection_t* connection |
| 3319 | platform.xcb_window_t window |
| 3320 | } |
| 3321 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3322 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3323 | class VkWaylandSurfaceCreateInfoKHR { |
| 3324 | VkStructureType sType |
| 3325 | const void* pNext |
| 3326 | VkWaylandSurfaceCreateFlagsKHR flags |
| 3327 | platform.wl_display* display |
| 3328 | platform.wl_surface* surface |
| 3329 | } |
| 3330 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3331 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3332 | class VkMirSurfaceCreateInfoKHR { |
| 3333 | VkStructureType sType |
| 3334 | const void* pNext |
| 3335 | VkMirSurfaceCreateFlagsKHR flags |
| 3336 | platform.MirConnection* connection |
| 3337 | platform.MirSurface* mirSurface |
| 3338 | } |
| 3339 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3340 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3341 | class VkAndroidSurfaceCreateInfoKHR { |
| 3342 | VkStructureType sType |
| 3343 | const void* pNext |
| 3344 | VkAndroidSurfaceCreateFlagsKHR flags |
| 3345 | platform.ANativeWindow* window |
| 3346 | } |
| 3347 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3348 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3349 | class VkWin32SurfaceCreateInfoKHR { |
| 3350 | VkStructureType sType |
| 3351 | const void* pNext |
| 3352 | VkWin32SurfaceCreateFlagsKHR flags |
| 3353 | platform.HINSTANCE hinstance |
| 3354 | platform.HWND hwnd |
| 3355 | } |
| 3356 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3357 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3358 | @internal class Gralloc1Usage { |
| 3359 | u64 consumer |
| 3360 | u64 producer |
| 3361 | } |
| 3362 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3363 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3364 | class VkNativeBufferANDROID { |
| 3365 | VkStructureType sType |
| 3366 | const void* pNext |
| 3367 | platform.buffer_handle_t handle |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3368 | s32 stride |
| 3369 | s32 format |
| 3370 | s32 usage |
| 3371 | Gralloc1Usage usage2 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3372 | } |
| 3373 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3374 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 3375 | class VkSwapchainImageCreateInfoANDROID { |
| 3376 | VkStructureType sType |
| 3377 | const void* pNext |
Chris Forbes | 134d958 | 2017-01-12 14:26:37 +1300 | [diff] [blame] | 3378 | VkSwapchainImageUsageFlagsANDROID flags |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 3379 | } |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 3380 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3381 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 3382 | class VkPhysicalDevicePresentationPropertiesANDROID { |
| 3383 | VkStructureType sType |
| 3384 | void* pNext |
| 3385 | VkBool32 sharedImage |
| 3386 | } |
| 3387 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3388 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 3389 | class VkDebugReportCallbackCreateInfoEXT { |
| 3390 | VkStructureType sType |
| 3391 | const void* pNext |
| 3392 | VkDebugReportFlagsEXT flags |
| 3393 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 3394 | void* pUserData |
| 3395 | } |
| 3396 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3397 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3398 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 3399 | VkStructureType sType |
| 3400 | const void* pNext |
| 3401 | VkRasterizationOrderAMD rasterizationOrder |
| 3402 | } |
| 3403 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3404 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3405 | class VkDebugMarkerObjectNameInfoEXT { |
| 3406 | VkStructureType sType |
| 3407 | const void* pNext |
| 3408 | VkDebugReportObjectTypeEXT objectType |
| 3409 | u64 object |
| 3410 | const char* pObjectName |
| 3411 | } |
| 3412 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3413 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3414 | class VkDebugMarkerObjectTagInfoEXT { |
| 3415 | VkStructureType sType |
| 3416 | const void* pNext |
| 3417 | VkDebugReportObjectTypeEXT objectType |
| 3418 | u64 object |
| 3419 | u64 tagName |
| 3420 | platform.size_t tagSize |
| 3421 | const void* pTag |
| 3422 | } |
| 3423 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3424 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3425 | class VkDebugMarkerMarkerInfoEXT { |
| 3426 | VkStructureType sType |
| 3427 | const void* pNext |
| 3428 | const char* pMarkerName |
| 3429 | f32[4] color |
| 3430 | } |
| 3431 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3432 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3433 | class VkDedicatedAllocationImageCreateInfoNV { |
| 3434 | VkStructureType sType |
| 3435 | const void* pNext |
| 3436 | VkBool32 dedicatedAllocation |
| 3437 | } |
| 3438 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3439 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3440 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 3441 | VkStructureType sType |
| 3442 | const void* pNext |
| 3443 | VkBool32 dedicatedAllocation |
| 3444 | } |
| 3445 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3446 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3447 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 3448 | VkStructureType sType |
| 3449 | const void* pNext |
| 3450 | VkImage image |
| 3451 | VkBuffer buffer |
| 3452 | } |
| 3453 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3454 | @extension("VK_KHX_multiview") // 54 |
| 3455 | class VkRenderPassMultiviewCreateInfoKHX { |
| 3456 | VkStructureType sType |
| 3457 | const void* pNext |
| 3458 | u32 subpassCount |
| 3459 | const u32* pViewMasks |
| 3460 | u32 dependencyCount |
| 3461 | const s32* pViewOffsets |
| 3462 | u32 correlationMaskCount |
| 3463 | const u32* pCorrelationMasks |
| 3464 | } |
| 3465 | |
| 3466 | @extension("VK_KHX_multiview") // 54 |
| 3467 | class VkPhysicalDeviceMultiviewFeaturesKHX { |
| 3468 | VkStructureType sType |
| 3469 | void* pNext |
| 3470 | VkBool32 multiview |
| 3471 | VkBool32 multiviewGeometryShader |
| 3472 | VkBool32 multiviewTessellationShader |
| 3473 | } |
| 3474 | |
| 3475 | @extension("VK_KHX_multiview") // 54 |
| 3476 | class VkPhysicalDeviceMultiviewPropertiesKHX { |
| 3477 | VkStructureType sType |
| 3478 | void* pNext |
| 3479 | u32 maxMultiviewViewCount |
| 3480 | u32 maxMultiviewInstanceIndex |
| 3481 | } |
| 3482 | |
| 3483 | @extension("VK_NV_external_memory_capabilities") // 56 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3484 | class VkExternalImageFormatPropertiesNV { |
| 3485 | VkImageFormatProperties imageFormatProperties |
| 3486 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3487 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3488 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3489 | } |
| 3490 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3491 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3492 | class VkExternalMemoryImageCreateInfoNV { |
| 3493 | VkStructureType sType |
| 3494 | const void* pNext |
| 3495 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3496 | } |
| 3497 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3498 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3499 | class VkExportMemoryAllocateInfoNV { |
| 3500 | VkStructureType sType |
| 3501 | const void* pNext |
| 3502 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3503 | } |
| 3504 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3505 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3506 | class VkImportMemoryWin32HandleInfoNV { |
| 3507 | VkStructureType sType |
| 3508 | const void* pNext |
| 3509 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3510 | platform.HANDLE handle |
| 3511 | } |
| 3512 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3513 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3514 | class VkExportMemoryWin32HandleInfoNV { |
| 3515 | VkStructureType sType |
| 3516 | const void* pNext |
| 3517 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3518 | platform.DWORD dwAccess |
| 3519 | } |
| 3520 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3521 | @extension("VK_NV_win32_keyed_mutex") // 59 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3522 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3523 | VkStructureType sType |
| 3524 | const void* pNext |
| 3525 | u32 acquireCount |
| 3526 | const VkDeviceMemory* pAcquireSyncs |
| 3527 | const u64* pAcquireKeys |
| 3528 | const u32* pAcquireTimeoutMilliseconds |
| 3529 | u32 releaseCount |
| 3530 | const VkDeviceMemory* pReleaseSyncs |
| 3531 | const u64* pReleaseKeys |
| 3532 | } |
| 3533 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3534 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3535 | class VkPhysicalDeviceFeatures2KHR { |
| 3536 | VkStructureType sType |
| 3537 | void* pNext |
| 3538 | VkPhysicalDeviceFeatures features |
| 3539 | } |
| 3540 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3541 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3542 | class VkPhysicalDeviceProperties2KHR { |
| 3543 | VkStructureType sType |
| 3544 | void* pNext |
| 3545 | VkPhysicalDeviceProperties properties |
| 3546 | } |
| 3547 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3548 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3549 | class VkFormatProperties2KHR { |
| 3550 | VkStructureType sType |
| 3551 | void* pNext |
| 3552 | VkFormatProperties formatProperties |
| 3553 | } |
| 3554 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3555 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3556 | class VkImageFormatProperties2KHR { |
| 3557 | VkStructureType sType |
| 3558 | void* pNext |
| 3559 | VkImageFormatProperties imageFormatProperties |
| 3560 | } |
| 3561 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3562 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3563 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3564 | VkStructureType sType |
| 3565 | const void* pNext |
| 3566 | VkFormat format |
| 3567 | VkImageType type |
| 3568 | VkImageTiling tiling |
| 3569 | VkImageUsageFlags usage |
| 3570 | VkImageCreateFlags flags |
| 3571 | } |
| 3572 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3573 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3574 | class VkQueueFamilyProperties2KHR { |
| 3575 | VkStructureType sType |
| 3576 | void* pNext |
| 3577 | VkQueueFamilyProperties queueFamilyProperties |
| 3578 | } |
| 3579 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3580 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3581 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3582 | VkStructureType sType |
| 3583 | void* pNext |
| 3584 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3585 | } |
| 3586 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3587 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3588 | class VkSparseImageFormatProperties2KHR { |
| 3589 | VkStructureType sType |
| 3590 | void* pNext |
| 3591 | VkSparseImageFormatProperties properties |
| 3592 | } |
| 3593 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3594 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3595 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3596 | VkStructureType sType |
| 3597 | const void* pNext |
| 3598 | VkFormat format |
| 3599 | VkImageType type |
| 3600 | VkSampleCountFlagBits samples |
| 3601 | VkImageUsageFlags usage |
| 3602 | VkImageTiling tiling |
| 3603 | } |
| 3604 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3605 | @extension("VK_KHX_device_group") // 61 |
| 3606 | class VkMemoryAllocateFlagsInfoKHX { |
| 3607 | VkStructureType sType |
| 3608 | const void* pNext |
| 3609 | VkMemoryAllocateFlagsKHX flags |
| 3610 | u32 deviceMask |
| 3611 | } |
| 3612 | |
| 3613 | @extension("VK_KHX_device_group") // 61 |
| 3614 | class VkBindBufferMemoryInfoKHX { |
| 3615 | VkStructureType sType |
| 3616 | const void* pNext |
| 3617 | VkBuffer buffer |
| 3618 | VkDeviceMemory memory |
| 3619 | VkDeviceSize memoryOffset |
| 3620 | u32 deviceIndexCount |
| 3621 | const u32* pDeviceIndices |
| 3622 | } |
| 3623 | |
| 3624 | @extension("VK_KHX_device_group") // 61 |
| 3625 | class VkBindImageMemoryInfoKHX { |
| 3626 | VkStructureType sType |
| 3627 | const void* pNext |
| 3628 | VkImage image |
| 3629 | VkDeviceMemory memory |
| 3630 | VkDeviceSize memoryOffset |
| 3631 | u32 deviceIndexCount |
| 3632 | const u32* pDeviceIndices |
| 3633 | u32 SFRRectCount |
| 3634 | const VkRect2D* pSFRRects |
| 3635 | } |
| 3636 | |
| 3637 | @extension("VK_KHX_device_group") // 61 |
| 3638 | class VkDeviceGroupRenderPassBeginInfoKHX { |
| 3639 | VkStructureType sType |
| 3640 | const void* pNext |
| 3641 | u32 deviceMask |
| 3642 | u32 deviceRenderAreaCount |
| 3643 | const VkRect2D* pDeviceRenderAreas |
| 3644 | } |
| 3645 | |
| 3646 | @extension("VK_KHX_device_group") // 61 |
| 3647 | class VkDeviceGroupCommandBufferBeginInfoKHX { |
| 3648 | VkStructureType sType |
| 3649 | const void* pNext |
| 3650 | u32 deviceMask |
| 3651 | } |
| 3652 | |
| 3653 | @extension("VK_KHX_device_group") // 61 |
| 3654 | class VkDeviceGroupSubmitInfoKHX { |
| 3655 | VkStructureType sType |
| 3656 | const void* pNext |
| 3657 | u32 waitSemaphoreCount |
| 3658 | const u32* pWaitSemaphoreDeviceIndices |
| 3659 | u32 commandBufferCount |
| 3660 | const u32* pCommandBufferDeviceMasks |
| 3661 | u32 signalSemaphoreCount |
| 3662 | const u32* pSignalSemaphoreDeviceIndices |
| 3663 | } |
| 3664 | |
| 3665 | @extension("VK_KHX_device_group") // 61 |
| 3666 | class VkDeviceGroupBindSparseInfoKHX { |
| 3667 | VkStructureType sType |
| 3668 | const void* pNext |
| 3669 | u32 resourceDeviceIndex |
| 3670 | u32 memoryDeviceIndex |
| 3671 | } |
| 3672 | |
| 3673 | @extension("VK_KHX_device_group") // 61 |
| 3674 | class VkDeviceGroupPresentCapabilitiesKHX { |
| 3675 | VkStructureType sType |
| 3676 | const void* pNext |
| 3677 | u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask |
| 3678 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3679 | } |
| 3680 | |
| 3681 | @extension("VK_KHX_device_group") // 61 |
| 3682 | class VkImageSwapchainCreateInfoKHX { |
| 3683 | VkStructureType sType |
| 3684 | const void* pNext |
| 3685 | VkSwapchainKHR swapchain |
| 3686 | } |
| 3687 | |
| 3688 | @extension("VK_KHX_device_group") // 61 |
| 3689 | class VkBindImageMemorySwapchainInfoKHX { |
| 3690 | VkStructureType sType |
| 3691 | const void* pNext |
| 3692 | VkSwapchainKHR swapchain |
| 3693 | u32 imageIndex |
| 3694 | } |
| 3695 | |
| 3696 | @extension("VK_KHX_device_group") // 61 |
| 3697 | class VkAcquireNextImageInfoKHX { |
| 3698 | VkStructureType sType |
| 3699 | const void* pNext |
| 3700 | VkSwapchainKHR swapchain |
| 3701 | u64 timeout |
| 3702 | VkSemaphore semaphore |
| 3703 | VkFence fence |
| 3704 | u32 deviceMask |
| 3705 | } |
| 3706 | |
| 3707 | @extension("VK_KHX_device_group") // 61 |
| 3708 | class VkDeviceGroupPresentInfoKHX { |
| 3709 | VkStructureType sType |
| 3710 | const void* pNext |
| 3711 | u32 swapchainCount |
| 3712 | const u32* pDeviceMasks |
| 3713 | VkDeviceGroupPresentModeFlagBitsKHX mode |
| 3714 | } |
| 3715 | |
| 3716 | @extension("VK_KHX_device_group") // 61 |
| 3717 | class VkDeviceGroupSwapchainCreateInfoKHX { |
| 3718 | VkStructureType sType |
| 3719 | const void* pNext |
| 3720 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3721 | } |
| 3722 | |
| 3723 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3724 | class VkValidationFlagsEXT { |
| 3725 | VkStructureType sType |
| 3726 | const void* pNext |
| 3727 | u32 disabledValidationCheckCount |
| 3728 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3729 | } |
| 3730 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3731 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 3732 | class VkViSurfaceCreateInfoNN { |
| 3733 | VkStructureType sType |
| 3734 | const void* pNext |
| 3735 | VkViSurfaceCreateFlagsNN flags |
| 3736 | void* window |
| 3737 | } |
| 3738 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3739 | @extension("VK_KHX_device_group_creation") // 71 |
| 3740 | class VkPhysicalDeviceGroupPropertiesKHX { |
| 3741 | VkStructureType sType |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 3742 | void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3743 | u32 physicalDeviceCount |
| 3744 | VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices |
| 3745 | VkBool32 subsetAllocation |
| 3746 | } |
| 3747 | |
| 3748 | @extension("VK_KHX_device_group_creation") // 71 |
| 3749 | class VkDeviceGroupDeviceCreateInfoKHX { |
| 3750 | VkStructureType sType |
| 3751 | const void* pNext |
| 3752 | u32 physicalDeviceCount |
| 3753 | const VkPhysicalDevice* pPhysicalDevices |
| 3754 | } |
| 3755 | |
| 3756 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3757 | class VkExternalMemoryPropertiesKHX { |
| 3758 | VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures |
| 3759 | VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3760 | VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes |
| 3761 | } |
| 3762 | |
| 3763 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3764 | class VkPhysicalDeviceExternalImageFormatInfoKHX { |
| 3765 | VkStructureType sType |
| 3766 | const void* pNext |
| 3767 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3768 | } |
| 3769 | |
| 3770 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3771 | class VkExternalImageFormatPropertiesKHX { |
| 3772 | VkStructureType sType |
| 3773 | void* pNext |
| 3774 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3775 | } |
| 3776 | |
| 3777 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3778 | class VkPhysicalDeviceExternalBufferInfoKHX { |
| 3779 | VkStructureType sType |
| 3780 | const void* pNext |
| 3781 | VkBufferCreateFlags flags |
| 3782 | VkBufferUsageFlags usage |
| 3783 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3784 | } |
| 3785 | |
| 3786 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3787 | class VkExternalBufferPropertiesKHX { |
| 3788 | VkStructureType sType |
| 3789 | void* pNext |
| 3790 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3791 | } |
| 3792 | |
| 3793 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3794 | class VkPhysicalDeviceIDPropertiesKHX { |
| 3795 | VkStructureType sType |
| 3796 | void* pNext |
| 3797 | u8[VK_UUID_SIZE] deviceUUID |
| 3798 | u8[VK_UUID_SIZE] driverUUID |
| 3799 | u8[VK_LUID_SIZE_KHX] deviceLUID |
| 3800 | VkBool32 deviceLUIDValid |
| 3801 | } |
| 3802 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3803 | @extension("VK_KHX_external_memory") // 73 |
| 3804 | class VkExternalMemoryImageCreateInfoKHX { |
| 3805 | VkStructureType sType |
| 3806 | const void* pNext |
| 3807 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3808 | } |
| 3809 | |
| 3810 | @extension("VK_KHX_external_memory") // 73 |
| 3811 | class VkExternalMemoryBufferCreateInfoKHX { |
| 3812 | VkStructureType sType |
| 3813 | const void* pNext |
| 3814 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3815 | } |
| 3816 | |
| 3817 | @extension("VK_KHX_external_memory") // 73 |
| 3818 | class VkExportMemoryAllocateInfoKHX { |
| 3819 | VkStructureType sType |
| 3820 | const void* pNext |
| 3821 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3822 | } |
| 3823 | |
| 3824 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3825 | class VkImportMemoryWin32HandleInfoKHX { |
| 3826 | VkStructureType sType |
| 3827 | const void* pNext |
| 3828 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3829 | platform.HANDLE handle |
| 3830 | } |
| 3831 | |
| 3832 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3833 | class VkExportMemoryWin32HandleInfoKHX { |
| 3834 | VkStructureType sType |
| 3835 | const void* pNext |
| 3836 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3837 | platform.DWORD dwAccess |
| 3838 | platform.LPCWSTR name |
| 3839 | } |
| 3840 | |
| 3841 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3842 | class VkMemoryWin32HandlePropertiesKHX { |
| 3843 | VkStructureType sType |
| 3844 | void* pNext |
| 3845 | u32 memoryTypeBits |
| 3846 | } |
| 3847 | |
| 3848 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3849 | class VkImportMemoryFdInfoKHX { |
| 3850 | VkStructureType sType |
| 3851 | const void* pNext |
| 3852 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3853 | int fd |
| 3854 | } |
| 3855 | |
| 3856 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3857 | class VkMemoryFdPropertiesKHX { |
| 3858 | VkStructureType sType |
| 3859 | void* pNext |
| 3860 | u32 memoryTypeBits |
| 3861 | } |
| 3862 | |
| 3863 | @extension("VK_KHX_win32_keyed_mutex") // 76 |
| 3864 | class VkWin32KeyedMutexAcquireReleaseInfoKHX { |
| 3865 | VkStructureType sType |
| 3866 | const void* pNext |
| 3867 | u32 acquireCount |
| 3868 | const VkDeviceMemory* pAcquireSyncs |
| 3869 | const u64* pAcquireKeys |
| 3870 | const u32* pAcquireTimeouts |
| 3871 | u32 releaseCount |
| 3872 | const VkDeviceMemory* pReleaseSyncs |
| 3873 | const u64* pReleaseKeys |
| 3874 | } |
| 3875 | |
| 3876 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3877 | class VkPhysicalDeviceExternalSemaphoreInfoKHX { |
| 3878 | VkStructureType sType |
| 3879 | const void* pNext |
| 3880 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3881 | } |
| 3882 | |
| 3883 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3884 | class VkExternalSemaphorePropertiesKHX { |
| 3885 | VkStructureType sType |
| 3886 | void* pNext |
| 3887 | VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3888 | VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes |
| 3889 | VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures |
| 3890 | } |
| 3891 | |
| 3892 | @extension("VK_KHX_external_semaphore") // 78 |
| 3893 | class VkExportSemaphoreCreateInfoKHX { |
| 3894 | VkStructureType sType |
| 3895 | const void* pNext |
| 3896 | VkExternalSemaphoreHandleTypeFlagsKHX handleTypes |
| 3897 | } |
| 3898 | |
| 3899 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3900 | class VkImportSemaphoreWin32HandleInfoKHX { |
| 3901 | VkStructureType sType |
| 3902 | const void* pNext |
| 3903 | VkSemaphore semaphore |
| 3904 | VkExternalSemaphoreHandleTypeFlagsKHX handleType |
| 3905 | platform.HANDLE handle |
| 3906 | } |
| 3907 | |
| 3908 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3909 | class VkExportSemaphoreWin32HandleInfoKHX { |
| 3910 | VkStructureType sType |
| 3911 | const void* pNext |
| 3912 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3913 | platform.DWORD dwAccess |
| 3914 | platform.LPCWSTR name |
| 3915 | } |
| 3916 | |
| 3917 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3918 | class VkD3D12FenceSubmitInfoKHX { |
| 3919 | VkStructureType sType |
| 3920 | const void* pNext |
| 3921 | u32 waitSemaphoreValuesCount |
| 3922 | const u64* pWaitSemaphoreValues |
| 3923 | u32 signalSemaphoreValuesCount |
| 3924 | const u64* pSignalSemaphoreValues |
| 3925 | } |
| 3926 | |
| 3927 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 3928 | class VkImportSemaphoreFdInfoKHX { |
| 3929 | VkStructureType sType |
| 3930 | const void* pNext |
| 3931 | VkSemaphore semaphore |
| 3932 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3933 | s32 fd |
| 3934 | } |
| 3935 | |
| 3936 | @extension("VK_KHR_push_descriptor") // 81 |
| 3937 | class VkPhysicalDevicePushDescriptorPropertiesKHR { |
| 3938 | VkStructureType sType |
| 3939 | void* pNext |
| 3940 | u32 maxPushDescriptors |
| 3941 | } |
| 3942 | |
| 3943 | @extension("VK_KHR_incremental_present") // 85 |
| 3944 | class VkRectLayerKHR { |
| 3945 | VkOffset2D offset |
| 3946 | VkExtent2D extent |
| 3947 | u32 layer |
| 3948 | } |
| 3949 | |
| 3950 | @extension("VK_KHR_incremental_present") // 85 |
| 3951 | class VkPresentRegionKHR { |
| 3952 | u32 rectangleCount |
| 3953 | const VkRectLayerKHR* pRectangles |
| 3954 | } |
| 3955 | |
| 3956 | @extension("VK_KHR_incremental_present") // 85 |
| 3957 | class VkPresentRegionsKHR { |
| 3958 | VkStructureType sType |
| 3959 | const void* pNext |
| 3960 | u32 swapchainCount |
| 3961 | const VkPresentRegionKHR* pRegions |
| 3962 | } |
| 3963 | |
| 3964 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 3965 | class VkDescriptorUpdateTemplateEntryKHR { |
| 3966 | u32 dstBinding |
| 3967 | u32 dstArrayElement |
| 3968 | u32 descriptorCount |
| 3969 | VkDescriptorType descriptorType |
| 3970 | platform.size_t offset |
| 3971 | platform.size_t stride |
| 3972 | } |
| 3973 | |
| 3974 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 3975 | class VkDescriptorUpdateTemplateCreateInfoKHR { |
| 3976 | VkStructureType sType |
| 3977 | void* pNext |
| 3978 | VkDescriptorUpdateTemplateCreateFlagsKHR flags |
| 3979 | u32 descriptorUpdateEntryCount |
| 3980 | const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries |
| 3981 | VkDescriptorUpdateTemplateTypeKHR templateType |
| 3982 | VkDescriptorSetLayout descriptorSetLayout |
| 3983 | VkPipelineBindPoint pipelineBindPoint |
| 3984 | VkPipelineLayout pipelineLayout |
| 3985 | u32 set |
| 3986 | } |
| 3987 | |
| 3988 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3989 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 3990 | VkStructureType sType |
| 3991 | const void* pNext |
| 3992 | VkBool32 computeBindingPointSupport |
| 3993 | } |
| 3994 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3995 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3996 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 3997 | VkStructureType sType |
| 3998 | const void* pNext |
| 3999 | u32 maxIndirectCommandsLayoutTokenCount |
| 4000 | u32 maxObjectEntryCounts |
| 4001 | u32 minSequenceCountBufferOffsetAlignment |
| 4002 | u32 minSequenceIndexBufferOffsetAlignment |
| 4003 | u32 minCommandsTokenBufferOffsetAlignment |
| 4004 | } |
| 4005 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4006 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4007 | class VkIndirectCommandsTokenNVX { |
| 4008 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4009 | VkBuffer buffer |
| 4010 | VkDeviceSize offset |
| 4011 | } |
| 4012 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4013 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4014 | class VkIndirectCommandsLayoutTokenNVX { |
| 4015 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4016 | u32 bindingUnit |
| 4017 | u32 dynamicCount |
| 4018 | u32 divisor |
| 4019 | } |
| 4020 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4021 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4022 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 4023 | VkStructureType sType |
| 4024 | const void* pNext |
| 4025 | VkPipelineBindPoint pipelineBindPoint |
| 4026 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 4027 | u32 tokenCount |
| 4028 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 4029 | } |
| 4030 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4031 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4032 | class VkCmdProcessCommandsInfoNVX { |
| 4033 | VkStructureType sType |
| 4034 | const void* pNext |
| 4035 | VkObjectTableNVX objectTable |
| 4036 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4037 | u32 indirectCommandsTokenCount |
| 4038 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 4039 | u32 maxSequencesCount |
| 4040 | VkCommandBuffer targetCommandBuffer |
| 4041 | VkBuffer sequencesCountBuffer |
| 4042 | VkDeviceSize sequencesCountOffset |
| 4043 | VkBuffer sequencesIndexBuffer |
| 4044 | VkDeviceSize sequencesIndexOffset |
| 4045 | } |
| 4046 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4047 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4048 | class VkCmdReserveSpaceForCommandsInfoNVX { |
| 4049 | VkStructureType sType |
| 4050 | const void* pNext |
| 4051 | VkObjectTableNVX objectTable |
| 4052 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4053 | u32 maxSequencesCount |
| 4054 | } |
| 4055 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4056 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4057 | class VkObjectTableCreateInfoNVX { |
| 4058 | VkStructureType sType |
| 4059 | const void* pNext |
| 4060 | u32 objectCount |
| 4061 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 4062 | const u32* pObjectEntryCounts |
| 4063 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 4064 | u32 maxUniformBuffersPerDescriptor |
| 4065 | u32 maxStorageBuffersPerDescriptor |
| 4066 | u32 maxStorageImagesPerDescriptor |
| 4067 | u32 maxSampledImagesPerDescriptor |
| 4068 | u32 maxPipelineLayouts |
| 4069 | } |
| 4070 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4071 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4072 | class VkObjectTableEntryNVX { |
| 4073 | VkObjectEntryTypeNVX type |
| 4074 | VkObjectEntryUsageFlagsNVX flags |
| 4075 | } |
| 4076 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4077 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4078 | class VkObjectTablePipelineEntryNVX { |
| 4079 | VkObjectEntryTypeNVX type |
| 4080 | VkObjectEntryUsageFlagsNVX flags |
| 4081 | VkPipeline pipeline |
| 4082 | } |
| 4083 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4084 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4085 | class VkObjectTableDescriptorSetEntryNVX { |
| 4086 | VkObjectEntryTypeNVX type |
| 4087 | VkObjectEntryUsageFlagsNVX flags |
| 4088 | VkPipelineLayout pipelineLayout |
| 4089 | VkDescriptorSet descriptorSet |
| 4090 | } |
| 4091 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4092 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4093 | class VkObjectTableVertexBufferEntryNVX { |
| 4094 | VkObjectEntryTypeNVX type |
| 4095 | VkObjectEntryUsageFlagsNVX flags |
| 4096 | VkBuffer buffer |
| 4097 | } |
| 4098 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4099 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4100 | class VkObjectTableIndexBufferEntryNVX { |
| 4101 | VkObjectEntryTypeNVX type |
| 4102 | VkObjectEntryUsageFlagsNVX flags |
| 4103 | VkBuffer buffer |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4104 | VkIndexType indexType |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4105 | } |
| 4106 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4107 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4108 | class VkObjectTablePushConstantEntryNVX { |
| 4109 | VkObjectEntryTypeNVX type |
| 4110 | VkObjectEntryUsageFlagsNVX flags |
| 4111 | VkPipelineLayout pipelineLayout |
| 4112 | VkShaderStageFlags stageFlags |
| 4113 | } |
| 4114 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4115 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4116 | class VkViewportWScalingNV { |
| 4117 | f32 xcoeff |
| 4118 | f32 ycoeff |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4119 | } |
| 4120 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4121 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4122 | class VkPipelineViewportWScalingStateCreateInfoNV { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4123 | VkStructureType sType |
| 4124 | const void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4125 | VkBool32 viewportWScalingEnable |
| 4126 | u32 viewportCount |
| 4127 | const VkViewportWScalingNV* pViewportWScalings |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4128 | } |
| 4129 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4130 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4131 | class VkSurfaceCapabilities2EXT { |
| 4132 | VkStructureType sType |
| 4133 | void* pNext |
| 4134 | u32 minImageCount |
| 4135 | u32 maxImageCount |
| 4136 | VkExtent2D currentExtent |
| 4137 | VkExtent2D minImageExtent |
| 4138 | VkExtent2D maxImageExtent |
| 4139 | u32 maxImageArrayLayers |
| 4140 | VkSurfaceTransformFlagsKHR supportedTransforms |
| 4141 | VkSurfaceTransformFlagBitsKHR currentTransform |
| 4142 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
| 4143 | VkImageUsageFlags supportedUsageFlags |
| 4144 | VkSurfaceCounterFlagsEXT supportedSurfaceCounters |
| 4145 | } |
| 4146 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4147 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4148 | class VkDisplayPowerInfoEXT { |
| 4149 | VkStructureType sType |
| 4150 | const void* pNext |
| 4151 | VkDisplayPowerStateEXT powerState |
| 4152 | } |
| 4153 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4154 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4155 | class VkDeviceEventInfoEXT { |
| 4156 | VkStructureType sType |
| 4157 | const void* pNext |
| 4158 | VkDeviceEventTypeEXT deviceEvent |
| 4159 | } |
| 4160 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4161 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4162 | class VkDisplayEventInfoEXT { |
| 4163 | VkStructureType sType |
| 4164 | const void* pNext |
| 4165 | VkDisplayEventTypeEXT displayEvent |
| 4166 | } |
| 4167 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4168 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4169 | class VkSwapchainCounterCreateInfoEXT { |
| 4170 | VkStructureType sType |
| 4171 | const void* pNext |
| 4172 | VkSurfaceCounterFlagsEXT surfaceCounters |
| 4173 | } |
| 4174 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4175 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4176 | class VkRefreshCycleDurationGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4177 | u64 refreshDuration |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4178 | } |
| 4179 | |
| 4180 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4181 | class VkPastPresentationTimingGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4182 | u32 presentID |
| 4183 | u64 desiredPresentTime |
| 4184 | u64 actualPresentTime |
| 4185 | u64 earliestPresentTime |
| 4186 | u64 presentMargin |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4187 | } |
| 4188 | |
| 4189 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4190 | class VkPresentTimeGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4191 | u32 presentID |
| 4192 | u64 desiredPresentTime |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4193 | } |
| 4194 | |
| 4195 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4196 | class VkPresentTimesInfoGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4197 | VkStructureType sType |
| 4198 | const void* pNext |
| 4199 | u32 swapchainCount |
| 4200 | const VkPresentTimeGOOGLE* pTimes |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4201 | } |
| 4202 | |
| 4203 | @extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 4204 | class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { |
| 4205 | VkStructureType sType |
| 4206 | void* pNext |
| 4207 | VkBool32 perViewPositionAllComponents |
| 4208 | } |
| 4209 | |
| 4210 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4211 | class VkViewportSwizzleNV { |
| 4212 | VkViewportCoordinateSwizzleNV x |
| 4213 | VkViewportCoordinateSwizzleNV y |
| 4214 | VkViewportCoordinateSwizzleNV z |
| 4215 | VkViewportCoordinateSwizzleNV w |
| 4216 | } |
| 4217 | |
| 4218 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4219 | class VkPipelineViewportSwizzleStateCreateInfoNV { |
| 4220 | VkStructureType sType |
| 4221 | const void* pNext |
| 4222 | VkPipelineViewportSwizzleStateCreateFlagsNV flags |
| 4223 | u32 viewportCount |
| 4224 | const VkViewportSwizzleNV* pViewportSwizzles |
| 4225 | } |
| 4226 | |
| 4227 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4228 | class VkPhysicalDeviceDiscardRectanglePropertiesEXT { |
| 4229 | VkStructureType sType |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame^] | 4230 | void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4231 | u32 maxDiscardRectangles |
| 4232 | } |
| 4233 | |
| 4234 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4235 | class VkPipelineDiscardRectangleStateCreateInfoEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4236 | VkStructureType sType |
| 4237 | const void* pNext |
| 4238 | VkPipelineDiscardRectangleStateCreateFlagsEXT flags |
| 4239 | VkDiscardRectangleModeEXT discardRectangleMode |
| 4240 | u32 discardRectangleCount |
| 4241 | const VkRect2D* pDiscardRectangles |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4242 | } |
| 4243 | |
| 4244 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4245 | class VkXYColorEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4246 | f32 x |
| 4247 | f32 y |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4248 | } |
| 4249 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4250 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4251 | class VkHdrMetadataEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4252 | VkStructureType sType |
| 4253 | const void* pNext |
| 4254 | VkXYColorEXT displayPrimaryRed |
| 4255 | VkXYColorEXT displayPrimaryGreen |
| 4256 | VkXYColorEXT displayPrimaryBlue |
| 4257 | VkXYColorEXT whitePoint |
| 4258 | f32 maxLuminance |
| 4259 | f32 minLuminance |
| 4260 | f32 maxContentLightLevel |
| 4261 | f32 maxFrameAverageLightLevel |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4262 | } |
| 4263 | |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 4264 | @extension("VK_KHR_shared_presentable_image") // 111 |
| 4265 | class VkSharedPresentSurfaceCapabilitiesKHR { |
| 4266 | VkStructureType sType |
| 4267 | const void* pNext |
| 4268 | VkImageUsageFlags sharedPresentSupportedUsageFlags |
| 4269 | } |
| 4270 | |
| 4271 | @extension("VK_KHR_get_surface_capabilities2") // 119 |
| 4272 | class VkPhysicalDeviceSurfaceInfo2KHR { |
| 4273 | VkStructureType sType |
| 4274 | const void* pNext |
| 4275 | VkSurfaceKHR surface |
| 4276 | } |
| 4277 | |
| 4278 | @extension("VK_KHR_get_surface_capabilities2") // 119 |
| 4279 | class VkSurfaceCapabilities2KHR { |
| 4280 | VkStructureType sType |
| 4281 | void* pNext |
| 4282 | VkSurfaceCapabilitiesKHR surfaceCapabilities |
| 4283 | } |
| 4284 | |
| 4285 | @extension("VK_KHR_get_surface_capabilities2") // 119 |
| 4286 | class VkSurfaceFormat2KHR { |
| 4287 | VkStructureType sType |
| 4288 | void* pNext |
| 4289 | VkSurfaceFormatKHR surfaceFormat |
| 4290 | } |
| 4291 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4292 | @extension("VK_MVK_ios_surface") // 123 |
| 4293 | class VkIOSSurfaceCreateInfoMVK { |
| 4294 | VkStructureType sType |
| 4295 | const void* pNext |
| 4296 | VkIOSSurfaceCreateFlagsMVK flags |
| 4297 | const void* pView |
| 4298 | } |
| 4299 | |
| 4300 | @extension("VK_MVK_macos_surface") // 124 |
| 4301 | class VkMacOSSurfaceCreateInfoMVK { |
| 4302 | VkStructureType sType |
| 4303 | const void* pNext |
| 4304 | VkMacOSSurfaceCreateFlagsMVK flags |
| 4305 | const void* pView |
| 4306 | } |
| 4307 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4308 | //////////////// |
| 4309 | // Commands // |
| 4310 | //////////////// |
| 4311 | |
| 4312 | // Function pointers. TODO: add support for function pointers. |
| 4313 | |
| 4314 | @external type void* PFN_vkVoidFunction |
| 4315 | @pfn cmd void vkVoidFunction() { |
| 4316 | } |
| 4317 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4318 | @external type void* PFN_vkAllocationFunction |
| 4319 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4320 | void* pUserData, |
| 4321 | platform.size_t size, |
| 4322 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4323 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4324 | return ? |
| 4325 | } |
| 4326 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4327 | @external type void* PFN_vkReallocationFunction |
| 4328 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4329 | void* pUserData, |
| 4330 | void* pOriginal, |
| 4331 | platform.size_t size, |
| 4332 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4333 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4334 | return ? |
| 4335 | } |
| 4336 | |
| 4337 | @external type void* PFN_vkFreeFunction |
| 4338 | @pfn cmd void vkFreeFunction( |
| 4339 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4340 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4341 | } |
| 4342 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4343 | @external type void* PFN_vkInternalAllocationNotification |
| 4344 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4345 | void* pUserData, |
| 4346 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4347 | VkInternalAllocationType allocationType, |
| 4348 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4349 | } |
| 4350 | |
| 4351 | @external type void* PFN_vkInternalFreeNotification |
| 4352 | @pfn cmd void vkInternalFreeNotification( |
| 4353 | void* pUserData, |
| 4354 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4355 | VkInternalAllocationType allocationType, |
| 4356 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4357 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4358 | |
| 4359 | // Global functions |
| 4360 | |
| 4361 | @threadSafety("system") |
| 4362 | cmd VkResult vkCreateInstance( |
| 4363 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4364 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4365 | VkInstance* pInstance) { |
| 4366 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 4367 | |
| 4368 | instance := ? |
| 4369 | pInstance[0] = instance |
| 4370 | State.Instances[instance] = new!InstanceObject() |
| 4371 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4372 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 4373 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4374 | |
| 4375 | return ? |
| 4376 | } |
| 4377 | |
| 4378 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4379 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4380 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4381 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4382 | instanceObject := GetInstance(instance) |
| 4383 | |
| 4384 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4385 | } |
| 4386 | |
| 4387 | @threadSafety("system") |
| 4388 | cmd VkResult vkEnumeratePhysicalDevices( |
| 4389 | VkInstance instance, |
| 4390 | u32* pPhysicalDeviceCount, |
| 4391 | VkPhysicalDevice* pPhysicalDevices) { |
| 4392 | instanceObject := GetInstance(instance) |
| 4393 | |
| 4394 | physicalDeviceCount := as!u32(?) |
| 4395 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 4396 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 4397 | |
| 4398 | for i in (0 .. physicalDeviceCount) { |
| 4399 | physicalDevice := ? |
| 4400 | physicalDevices[i] = physicalDevice |
| 4401 | if !(physicalDevice in State.PhysicalDevices) { |
| 4402 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 4403 | } |
| 4404 | } |
| 4405 | |
| 4406 | return ? |
| 4407 | } |
| 4408 | |
| 4409 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 4410 | VkDevice device, |
| 4411 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4412 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4413 | device := GetDevice(device) |
| 4414 | } |
| 4415 | |
| 4416 | return ? |
| 4417 | } |
| 4418 | |
| 4419 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 4420 | VkInstance instance, |
| 4421 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4422 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4423 | instanceObject := GetInstance(instance) |
| 4424 | } |
| 4425 | |
| 4426 | return ? |
| 4427 | } |
| 4428 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4429 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4430 | VkPhysicalDevice physicalDevice, |
| 4431 | VkPhysicalDeviceProperties* pProperties) { |
| 4432 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4433 | |
| 4434 | properties := ? |
| 4435 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4436 | } |
| 4437 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4438 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4439 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4440 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4441 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4442 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4443 | // TODO: Figure out how to express fetch-count-or-properties |
| 4444 | // This version fails 'apic validate' with 'fence not allowed in |
| 4445 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 4446 | // errors. |
| 4447 | // if pQueueFamilyProperties != null { |
| 4448 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 4449 | // for i in (0 .. pCount[0]) { |
| 4450 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 4451 | // queuesProperties[i] = queueProperties |
| 4452 | // } |
| 4453 | // } else { |
| 4454 | // count := ? |
| 4455 | // pCount[0] = count |
| 4456 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4457 | } |
| 4458 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4459 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4460 | VkPhysicalDevice physicalDevice, |
| 4461 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 4462 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4463 | |
| 4464 | memoryProperties := ? |
| 4465 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4466 | } |
| 4467 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4468 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4469 | VkPhysicalDevice physicalDevice, |
| 4470 | VkPhysicalDeviceFeatures* pFeatures) { |
| 4471 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4472 | |
| 4473 | features := ? |
| 4474 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4475 | } |
| 4476 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4477 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4478 | VkPhysicalDevice physicalDevice, |
| 4479 | VkFormat format, |
| 4480 | VkFormatProperties* pFormatProperties) { |
| 4481 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4482 | |
| 4483 | formatProperties := ? |
| 4484 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4485 | } |
| 4486 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4487 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4488 | VkPhysicalDevice physicalDevice, |
| 4489 | VkFormat format, |
| 4490 | VkImageType type, |
| 4491 | VkImageTiling tiling, |
| 4492 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4493 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4494 | VkImageFormatProperties* pImageFormatProperties) { |
| 4495 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4496 | |
| 4497 | imageFormatProperties := ? |
| 4498 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4499 | |
| 4500 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4501 | } |
| 4502 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4503 | |
| 4504 | // Device functions |
| 4505 | |
| 4506 | @threadSafety("system") |
| 4507 | cmd VkResult vkCreateDevice( |
| 4508 | VkPhysicalDevice physicalDevice, |
| 4509 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4510 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4511 | VkDevice* pDevice) { |
| 4512 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 4513 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4514 | |
| 4515 | device := ? |
| 4516 | pDevice[0] = device |
| 4517 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 4518 | |
| 4519 | return ? |
| 4520 | } |
| 4521 | |
| 4522 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4523 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4524 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4525 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4526 | deviceObject := GetDevice(device) |
| 4527 | |
| 4528 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4529 | } |
| 4530 | |
| 4531 | |
| 4532 | // Extension discovery functions |
| 4533 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4534 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4535 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4536 | VkLayerProperties* pProperties) { |
| 4537 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4538 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4539 | |
| 4540 | properties := pProperties[0:count] |
| 4541 | for i in (0 .. count) { |
| 4542 | property := ? |
| 4543 | properties[i] = property |
| 4544 | } |
| 4545 | |
| 4546 | return ? |
| 4547 | } |
| 4548 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4549 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4550 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4551 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4552 | VkExtensionProperties* pProperties) { |
| 4553 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4554 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4555 | |
| 4556 | properties := pProperties[0:count] |
| 4557 | for i in (0 .. count) { |
| 4558 | property := ? |
| 4559 | properties[i] = property |
| 4560 | } |
| 4561 | |
| 4562 | return ? |
| 4563 | } |
| 4564 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4565 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4566 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4567 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4568 | VkLayerProperties* pProperties) { |
| 4569 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4570 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4571 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4572 | |
| 4573 | properties := pProperties[0:count] |
| 4574 | for i in (0 .. count) { |
| 4575 | property := ? |
| 4576 | properties[i] = property |
| 4577 | } |
| 4578 | |
| 4579 | return ? |
| 4580 | } |
| 4581 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4582 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4583 | VkPhysicalDevice physicalDevice, |
| 4584 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4585 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4586 | VkExtensionProperties* pProperties) { |
| 4587 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4588 | |
| 4589 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4590 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4591 | |
| 4592 | properties := pProperties[0:count] |
| 4593 | for i in (0 .. count) { |
| 4594 | property := ? |
| 4595 | properties[i] = property |
| 4596 | } |
| 4597 | |
| 4598 | return ? |
| 4599 | } |
| 4600 | |
| 4601 | |
| 4602 | // Queue functions |
| 4603 | |
| 4604 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4605 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4606 | VkDevice device, |
| 4607 | u32 queueFamilyIndex, |
| 4608 | u32 queueIndex, |
| 4609 | VkQueue* pQueue) { |
| 4610 | deviceObject := GetDevice(device) |
| 4611 | |
| 4612 | queue := ? |
| 4613 | pQueue[0] = queue |
| 4614 | |
| 4615 | if !(queue in State.Queues) { |
| 4616 | State.Queues[queue] = new!QueueObject(device: device) |
| 4617 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4618 | } |
| 4619 | |
| 4620 | @threadSafety("app") |
| 4621 | cmd VkResult vkQueueSubmit( |
| 4622 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4623 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4624 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4625 | VkFence fence) { |
| 4626 | queueObject := GetQueue(queue) |
| 4627 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4628 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4629 | fenceObject := GetFence(fence) |
| 4630 | assert(fenceObject.device == queueObject.device) |
| 4631 | } |
| 4632 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4633 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 4634 | // for i in (0 .. commandBufferCount) { |
| 4635 | // commandBuffer := commandBuffers[i] |
| 4636 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4637 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4638 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4639 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 4640 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4641 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4642 | |
| 4643 | return ? |
| 4644 | } |
| 4645 | |
| 4646 | @threadSafety("system") |
| 4647 | cmd VkResult vkQueueWaitIdle( |
| 4648 | VkQueue queue) { |
| 4649 | queueObject := GetQueue(queue) |
| 4650 | |
| 4651 | return ? |
| 4652 | } |
| 4653 | |
| 4654 | @threadSafety("system") |
| 4655 | cmd VkResult vkDeviceWaitIdle( |
| 4656 | VkDevice device) { |
| 4657 | deviceObject := GetDevice(device) |
| 4658 | |
| 4659 | return ? |
| 4660 | } |
| 4661 | |
| 4662 | |
| 4663 | // Memory functions |
| 4664 | |
| 4665 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4666 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4667 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4668 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 4669 | const VkAllocationCallbacks* pAllocator, |
| 4670 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4671 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4672 | deviceObject := GetDevice(device) |
| 4673 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4674 | memory := ? |
| 4675 | pMemory[0] = memory |
| 4676 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4677 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4678 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4679 | |
| 4680 | return ? |
| 4681 | } |
| 4682 | |
| 4683 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4684 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4685 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4686 | VkDeviceMemory memory, |
| 4687 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4688 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4689 | memoryObject := GetDeviceMemory(memory) |
| 4690 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4691 | |
| 4692 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4693 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4694 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4695 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 4696 | "vkFreeMemory: commandBuffers still bound") |
| 4697 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4698 | } |
| 4699 | |
| 4700 | @threadSafety("app") |
| 4701 | cmd VkResult vkMapMemory( |
| 4702 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4703 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4704 | VkDeviceSize offset, |
| 4705 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4706 | VkMemoryMapFlags flags, |
| 4707 | void** ppData) { |
| 4708 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4709 | memoryObject := GetDeviceMemory(memory) |
| 4710 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4711 | |
| 4712 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4713 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4714 | |
| 4715 | return ? |
| 4716 | } |
| 4717 | |
| 4718 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4719 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4720 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4721 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4722 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4723 | memoryObject := GetDeviceMemory(memory) |
| 4724 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4725 | } |
| 4726 | |
| 4727 | cmd VkResult vkFlushMappedMemoryRanges( |
| 4728 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4729 | u32 memoryRangeCount |
| 4730 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4731 | deviceObject := GetDevice(device) |
| 4732 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4733 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4734 | for i in (0 .. memoryRangeCount) { |
| 4735 | memoryRange := memoryRanges[i] |
| 4736 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4737 | assert(memoryObject.device == device) |
| 4738 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4739 | } |
| 4740 | |
| 4741 | return ? |
| 4742 | } |
| 4743 | |
| 4744 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 4745 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4746 | u32 memoryRangeCount, |
| 4747 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4748 | deviceObject := GetDevice(device) |
| 4749 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4750 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4751 | for i in (0 .. memoryRangeCount) { |
| 4752 | memoryRange := memoryRanges[i] |
| 4753 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4754 | assert(memoryObject.device == device) |
| 4755 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4756 | } |
| 4757 | |
| 4758 | return ? |
| 4759 | } |
| 4760 | |
| 4761 | |
| 4762 | // Memory management API functions |
| 4763 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4764 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4765 | VkDevice device, |
| 4766 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4767 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4768 | deviceObject := GetDevice(device) |
| 4769 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4770 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4771 | memoryObject := GetDeviceMemory(memory) |
| 4772 | assert(memoryObject.device == device) |
| 4773 | } |
| 4774 | |
| 4775 | committedMemoryInBytes := ? |
| 4776 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4777 | } |
| 4778 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4779 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4780 | VkDevice device, |
| 4781 | VkBuffer buffer, |
| 4782 | VkMemoryRequirements* pMemoryRequirements) { |
| 4783 | deviceObject := GetDevice(device) |
| 4784 | bufferObject := GetBuffer(buffer) |
| 4785 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4786 | } |
| 4787 | |
| 4788 | cmd VkResult vkBindBufferMemory( |
| 4789 | VkDevice device, |
| 4790 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4791 | VkDeviceMemory memory, |
| 4792 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4793 | deviceObject := GetDevice(device) |
| 4794 | bufferObject := GetBuffer(buffer) |
| 4795 | assert(bufferObject.device == device) |
| 4796 | |
| 4797 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4798 | if bufferObject.memory != NULL_HANDLE { |
| 4799 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 4800 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4801 | } |
| 4802 | |
| 4803 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4804 | if memory != NULL_HANDLE { |
| 4805 | memoryObject := GetDeviceMemory(memory) |
| 4806 | assert(memoryObject.device == device) |
| 4807 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4808 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4809 | bufferObject.memory = memory |
| 4810 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4811 | |
| 4812 | return ? |
| 4813 | } |
| 4814 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4815 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4816 | VkDevice device, |
| 4817 | VkImage image, |
| 4818 | VkMemoryRequirements* pMemoryRequirements) { |
| 4819 | deviceObject := GetDevice(device) |
| 4820 | imageObject := GetImage(image) |
| 4821 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4822 | } |
| 4823 | |
| 4824 | cmd VkResult vkBindImageMemory( |
| 4825 | VkDevice device, |
| 4826 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4827 | VkDeviceMemory memory, |
| 4828 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4829 | deviceObject := GetDevice(device) |
| 4830 | imageObject := GetImage(image) |
| 4831 | assert(imageObject.device == device) |
| 4832 | |
| 4833 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4834 | if imageObject.memory != NULL_HANDLE { |
| 4835 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 4836 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4837 | } |
| 4838 | |
| 4839 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4840 | if memory != NULL_HANDLE { |
| 4841 | memoryObject := GetDeviceMemory(memory) |
| 4842 | assert(memoryObject.device == device) |
| 4843 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4844 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4845 | imageObject.memory = memory |
| 4846 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4847 | |
| 4848 | return ? |
| 4849 | } |
| 4850 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4851 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4852 | VkDevice device, |
| 4853 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4854 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4855 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 4856 | deviceObject := GetDevice(device) |
| 4857 | imageObject := GetImage(image) |
| 4858 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4859 | } |
| 4860 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4861 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4862 | VkPhysicalDevice physicalDevice, |
| 4863 | VkFormat format, |
| 4864 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 4865 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4866 | VkImageUsageFlags usage, |
| 4867 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4868 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4869 | VkSparseImageFormatProperties* pProperties) { |
| 4870 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4871 | } |
| 4872 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4873 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4874 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4875 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4876 | const VkBindSparseInfo* pBindInfo, |
| 4877 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4878 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4879 | |
| 4880 | return ? |
| 4881 | } |
| 4882 | |
| 4883 | |
| 4884 | // Fence functions |
| 4885 | |
| 4886 | @threadSafety("system") |
| 4887 | cmd VkResult vkCreateFence( |
| 4888 | VkDevice device, |
| 4889 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4890 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4891 | VkFence* pFence) { |
| 4892 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 4893 | deviceObject := GetDevice(device) |
| 4894 | |
| 4895 | fence := ? |
| 4896 | pFence[0] = fence |
| 4897 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4898 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4899 | |
| 4900 | return ? |
| 4901 | } |
| 4902 | |
| 4903 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4904 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4905 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4906 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4907 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4908 | deviceObject := GetDevice(device) |
| 4909 | fenceObject := GetFence(fence) |
| 4910 | assert(fenceObject.device == device) |
| 4911 | |
| 4912 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4913 | } |
| 4914 | |
| 4915 | @threadSafety("system") |
| 4916 | cmd VkResult vkResetFences( |
| 4917 | VkDevice device, |
| 4918 | u32 fenceCount, |
| 4919 | const VkFence* pFences) { |
| 4920 | deviceObject := GetDevice(device) |
| 4921 | |
| 4922 | fences := pFences[0:fenceCount] |
| 4923 | for i in (0 .. fenceCount) { |
| 4924 | fence := fences[i] |
| 4925 | fenceObject := GetFence(fence) |
| 4926 | assert(fenceObject.device == device) |
| 4927 | fenceObject.signaled = false |
| 4928 | } |
| 4929 | |
| 4930 | return ? |
| 4931 | } |
| 4932 | |
| 4933 | @threadSafety("system") |
| 4934 | cmd VkResult vkGetFenceStatus( |
| 4935 | VkDevice device, |
| 4936 | VkFence fence) { |
| 4937 | deviceObject := GetDevice(device) |
| 4938 | fenceObject := GetFence(fence) |
| 4939 | assert(fenceObject.device == device) |
| 4940 | |
| 4941 | return ? |
| 4942 | } |
| 4943 | |
| 4944 | @threadSafety("system") |
| 4945 | cmd VkResult vkWaitForFences( |
| 4946 | VkDevice device, |
| 4947 | u32 fenceCount, |
| 4948 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4949 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4950 | u64 timeout) { /// timeout in nanoseconds |
| 4951 | deviceObject := GetDevice(device) |
| 4952 | |
| 4953 | fences := pFences[0:fenceCount] |
| 4954 | for i in (0 .. fenceCount) { |
| 4955 | fence := fences[i] |
| 4956 | fenceObject := GetFence(fence) |
| 4957 | assert(fenceObject.device == device) |
| 4958 | } |
| 4959 | |
| 4960 | return ? |
| 4961 | } |
| 4962 | |
| 4963 | |
| 4964 | // Queue semaphore functions |
| 4965 | |
| 4966 | @threadSafety("system") |
| 4967 | cmd VkResult vkCreateSemaphore( |
| 4968 | VkDevice device, |
| 4969 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4970 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | VkSemaphore* pSemaphore) { |
| 4972 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 4973 | deviceObject := GetDevice(device) |
| 4974 | |
| 4975 | semaphore := ? |
| 4976 | pSemaphore[0] = semaphore |
| 4977 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 4978 | |
| 4979 | return ? |
| 4980 | } |
| 4981 | |
| 4982 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4983 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4984 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4985 | VkSemaphore semaphore, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4986 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4987 | deviceObject := GetDevice(device) |
| 4988 | semaphoreObject := GetSemaphore(semaphore) |
| 4989 | assert(semaphoreObject.device == device) |
| 4990 | |
| 4991 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4992 | } |
| 4993 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4994 | |
| 4995 | // Event functions |
| 4996 | |
| 4997 | @threadSafety("system") |
| 4998 | cmd VkResult vkCreateEvent( |
| 4999 | VkDevice device, |
| 5000 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5001 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5002 | VkEvent* pEvent) { |
| 5003 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 5004 | deviceObject := GetDevice(device) |
| 5005 | |
| 5006 | event := ? |
| 5007 | pEvent[0] = event |
| 5008 | State.Events[event] = new!EventObject(device: device) |
| 5009 | |
| 5010 | return ? |
| 5011 | } |
| 5012 | |
| 5013 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5014 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5015 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5016 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5017 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5018 | deviceObject := GetDevice(device) |
| 5019 | eventObject := GetEvent(event) |
| 5020 | assert(eventObject.device == device) |
| 5021 | |
| 5022 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5023 | } |
| 5024 | |
| 5025 | @threadSafety("system") |
| 5026 | cmd VkResult vkGetEventStatus( |
| 5027 | VkDevice device, |
| 5028 | VkEvent event) { |
| 5029 | deviceObject := GetDevice(device) |
| 5030 | eventObject := GetEvent(event) |
| 5031 | assert(eventObject.device == device) |
| 5032 | |
| 5033 | return ? |
| 5034 | } |
| 5035 | |
| 5036 | @threadSafety("system") |
| 5037 | cmd VkResult vkSetEvent( |
| 5038 | VkDevice device, |
| 5039 | VkEvent event) { |
| 5040 | deviceObject := GetDevice(device) |
| 5041 | eventObject := GetEvent(event) |
| 5042 | assert(eventObject.device == device) |
| 5043 | |
| 5044 | return ? |
| 5045 | } |
| 5046 | |
| 5047 | @threadSafety("system") |
| 5048 | cmd VkResult vkResetEvent( |
| 5049 | VkDevice device, |
| 5050 | VkEvent event) { |
| 5051 | deviceObject := GetDevice(device) |
| 5052 | eventObject := GetEvent(event) |
| 5053 | assert(eventObject.device == device) |
| 5054 | |
| 5055 | return ? |
| 5056 | } |
| 5057 | |
| 5058 | |
| 5059 | // Query functions |
| 5060 | |
| 5061 | @threadSafety("system") |
| 5062 | cmd VkResult vkCreateQueryPool( |
| 5063 | VkDevice device, |
| 5064 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5065 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5066 | VkQueryPool* pQueryPool) { |
| 5067 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 5068 | deviceObject := GetDevice(device) |
| 5069 | |
| 5070 | queryPool := ? |
| 5071 | pQueryPool[0] = queryPool |
| 5072 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 5073 | |
| 5074 | return ? |
| 5075 | } |
| 5076 | |
| 5077 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5078 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5079 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5080 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5081 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5082 | deviceObject := GetDevice(device) |
| 5083 | queryPoolObject := GetQueryPool(queryPool) |
| 5084 | assert(queryPoolObject.device == device) |
| 5085 | |
| 5086 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5087 | } |
| 5088 | |
| 5089 | @threadSafety("system") |
| 5090 | cmd VkResult vkGetQueryPoolResults( |
| 5091 | VkDevice device, |
| 5092 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5093 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5094 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5095 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5096 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5097 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5098 | VkQueryResultFlags flags) { |
| 5099 | deviceObject := GetDevice(device) |
| 5100 | queryPoolObject := GetQueryPool(queryPool) |
| 5101 | assert(queryPoolObject.device == device) |
| 5102 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5103 | data := pData[0:dataSize] |
| 5104 | |
| 5105 | return ? |
| 5106 | } |
| 5107 | |
| 5108 | // Buffer functions |
| 5109 | |
| 5110 | @threadSafety("system") |
| 5111 | cmd VkResult vkCreateBuffer( |
| 5112 | VkDevice device, |
| 5113 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5114 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5115 | VkBuffer* pBuffer) { |
| 5116 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 5117 | deviceObject := GetDevice(device) |
| 5118 | |
| 5119 | buffer := ? |
| 5120 | pBuffer[0] = buffer |
| 5121 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 5122 | |
| 5123 | return ? |
| 5124 | } |
| 5125 | |
| 5126 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5127 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5128 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5129 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5130 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5131 | deviceObject := GetDevice(device) |
| 5132 | bufferObject := GetBuffer(buffer) |
| 5133 | assert(bufferObject.device == device) |
| 5134 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5135 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5136 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5137 | } |
| 5138 | |
| 5139 | |
| 5140 | // Buffer view functions |
| 5141 | |
| 5142 | @threadSafety("system") |
| 5143 | cmd VkResult vkCreateBufferView( |
| 5144 | VkDevice device, |
| 5145 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5146 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5147 | VkBufferView* pView) { |
| 5148 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 5149 | deviceObject := GetDevice(device) |
| 5150 | |
| 5151 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 5152 | assert(bufferObject.device == device) |
| 5153 | |
| 5154 | view := ? |
| 5155 | pView[0] = view |
| 5156 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 5157 | |
| 5158 | return ? |
| 5159 | } |
| 5160 | |
| 5161 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5162 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5163 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5164 | VkBufferView bufferView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5165 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5166 | deviceObject := GetDevice(device) |
| 5167 | bufferViewObject := GetBufferView(bufferView) |
| 5168 | assert(bufferViewObject.device == device) |
| 5169 | |
| 5170 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5171 | } |
| 5172 | |
| 5173 | |
| 5174 | // Image functions |
| 5175 | |
| 5176 | @threadSafety("system") |
| 5177 | cmd VkResult vkCreateImage( |
| 5178 | VkDevice device, |
| 5179 | const VkImageCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5180 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5181 | VkImage* pImage) { |
| 5182 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 5183 | deviceObject := GetDevice(device) |
| 5184 | |
| 5185 | image := ? |
| 5186 | pImage[0] = image |
| 5187 | State.Images[image] = new!ImageObject(device: device) |
| 5188 | |
| 5189 | return ? |
| 5190 | } |
| 5191 | |
| 5192 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5193 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5194 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5195 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5196 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5197 | deviceObject := GetDevice(device) |
| 5198 | imageObject := GetImage(image) |
| 5199 | assert(imageObject.device == device) |
| 5200 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5201 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5202 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5203 | } |
| 5204 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5205 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5206 | VkDevice device, |
| 5207 | VkImage image, |
| 5208 | const VkImageSubresource* pSubresource, |
| 5209 | VkSubresourceLayout* pLayout) { |
| 5210 | deviceObject := GetDevice(device) |
| 5211 | imageObject := GetImage(image) |
| 5212 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5213 | } |
| 5214 | |
| 5215 | |
| 5216 | // Image view functions |
| 5217 | |
| 5218 | @threadSafety("system") |
| 5219 | cmd VkResult vkCreateImageView( |
| 5220 | VkDevice device, |
| 5221 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5222 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5223 | VkImageView* pView) { |
| 5224 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 5225 | deviceObject := GetDevice(device) |
| 5226 | |
| 5227 | imageObject := GetImage(pCreateInfo.image) |
| 5228 | assert(imageObject.device == device) |
| 5229 | |
| 5230 | view := ? |
| 5231 | pView[0] = view |
| 5232 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 5233 | |
| 5234 | return ? |
| 5235 | } |
| 5236 | |
| 5237 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5238 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5239 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5240 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5241 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5242 | deviceObject := GetDevice(device) |
| 5243 | imageViewObject := GetImageView(imageView) |
| 5244 | assert(imageViewObject.device == device) |
| 5245 | |
| 5246 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5247 | } |
| 5248 | |
| 5249 | |
| 5250 | // Shader functions |
| 5251 | |
| 5252 | cmd VkResult vkCreateShaderModule( |
| 5253 | VkDevice device, |
| 5254 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5255 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5256 | VkShaderModule* pShaderModule) { |
| 5257 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 5258 | deviceObject := GetDevice(device) |
| 5259 | |
| 5260 | shaderModule := ? |
| 5261 | pShaderModule[0] = shaderModule |
| 5262 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 5263 | |
| 5264 | return ? |
| 5265 | } |
| 5266 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5267 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5268 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5269 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5270 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5271 | deviceObject := GetDevice(device) |
| 5272 | shaderModuleObject := GetShaderModule(shaderModule) |
| 5273 | assert(shaderModuleObject.device == device) |
| 5274 | |
| 5275 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5276 | } |
| 5277 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5278 | |
| 5279 | // Pipeline functions |
| 5280 | |
| 5281 | cmd VkResult vkCreatePipelineCache( |
| 5282 | VkDevice device, |
| 5283 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5284 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5285 | VkPipelineCache* pPipelineCache) { |
| 5286 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 5287 | deviceObject := GetDevice(device) |
| 5288 | |
| 5289 | pipelineCache := ? |
| 5290 | pPipelineCache[0] = pipelineCache |
| 5291 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 5292 | |
| 5293 | return ? |
| 5294 | } |
| 5295 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5296 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5297 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5298 | VkPipelineCache pipelineCache, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5299 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5300 | deviceObject := GetDevice(device) |
| 5301 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5302 | assert(pipelineCacheObject.device == device) |
| 5303 | |
| 5304 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5305 | } |
| 5306 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5307 | cmd VkResult vkGetPipelineCacheData( |
| 5308 | VkDevice device, |
| 5309 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5310 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5311 | void* pData) { |
| 5312 | deviceObject := GetDevice(device) |
| 5313 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5314 | assert(pipelineCacheObject.device == device) |
| 5315 | |
| 5316 | return ? |
| 5317 | } |
| 5318 | |
| 5319 | cmd VkResult vkMergePipelineCaches( |
| 5320 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5321 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5322 | u32 srcCacheCount, |
| 5323 | const VkPipelineCache* pSrcCaches) { |
| 5324 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5325 | dstCacheObject := GetPipelineCache(dstCache) |
| 5326 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5327 | |
| 5328 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 5329 | for i in (0 .. srcCacheCount) { |
| 5330 | srcCache := srcCaches[i] |
| 5331 | srcCacheObject := GetPipelineCache(srcCache) |
| 5332 | assert(srcCacheObject.device == device) |
| 5333 | } |
| 5334 | |
| 5335 | return ? |
| 5336 | } |
| 5337 | |
| 5338 | cmd VkResult vkCreateGraphicsPipelines( |
| 5339 | VkDevice device, |
| 5340 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5341 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5342 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5343 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5344 | VkPipeline* pPipelines) { |
| 5345 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5346 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5347 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5348 | assert(pipelineCacheObject.device == device) |
| 5349 | } |
| 5350 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5351 | createInfos := pCreateInfos[0:createInfoCount] |
| 5352 | pipelines := pPipelines[0:createInfoCount] |
| 5353 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5354 | pipeline := ? |
| 5355 | pipelines[i] = pipeline |
| 5356 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5357 | } |
| 5358 | |
| 5359 | return ? |
| 5360 | } |
| 5361 | |
| 5362 | cmd VkResult vkCreateComputePipelines( |
| 5363 | VkDevice device, |
| 5364 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5365 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5366 | const VkComputePipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5367 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5368 | VkPipeline* pPipelines) { |
| 5369 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5370 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5371 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5372 | assert(pipelineCacheObject.device == device) |
| 5373 | } |
| 5374 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5375 | createInfos := pCreateInfos[0:createInfoCount] |
| 5376 | pipelines := pPipelines[0:createInfoCount] |
| 5377 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5378 | pipeline := ? |
| 5379 | pipelines[i] = pipeline |
| 5380 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5381 | } |
| 5382 | |
| 5383 | return ? |
| 5384 | } |
| 5385 | |
| 5386 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5387 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5388 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5389 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5390 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5391 | deviceObject := GetDevice(device) |
| 5392 | pipelineObjects := GetPipeline(pipeline) |
| 5393 | assert(pipelineObjects.device == device) |
| 5394 | |
| 5395 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5396 | } |
| 5397 | |
| 5398 | |
| 5399 | // Pipeline layout functions |
| 5400 | |
| 5401 | @threadSafety("system") |
| 5402 | cmd VkResult vkCreatePipelineLayout( |
| 5403 | VkDevice device, |
| 5404 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5405 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5406 | VkPipelineLayout* pPipelineLayout) { |
| 5407 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 5408 | deviceObject := GetDevice(device) |
| 5409 | |
| 5410 | pipelineLayout := ? |
| 5411 | pPipelineLayout[0] = pipelineLayout |
| 5412 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) |
| 5413 | |
| 5414 | return ? |
| 5415 | } |
| 5416 | |
| 5417 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5418 | cmd void vkDestroyPipelineLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5419 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5420 | VkPipelineLayout pipelineLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5421 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5422 | deviceObject := GetDevice(device) |
| 5423 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 5424 | assert(pipelineLayoutObjects.device == device) |
| 5425 | |
| 5426 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5427 | } |
| 5428 | |
| 5429 | |
| 5430 | // Sampler functions |
| 5431 | |
| 5432 | @threadSafety("system") |
| 5433 | cmd VkResult vkCreateSampler( |
| 5434 | VkDevice device, |
| 5435 | const VkSamplerCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5436 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5437 | VkSampler* pSampler) { |
| 5438 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 5439 | deviceObject := GetDevice(device) |
| 5440 | |
| 5441 | sampler := ? |
| 5442 | pSampler[0] = sampler |
| 5443 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 5444 | |
| 5445 | return ? |
| 5446 | } |
| 5447 | |
| 5448 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5449 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5450 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5451 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5452 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5453 | deviceObject := GetDevice(device) |
| 5454 | samplerObject := GetSampler(sampler) |
| 5455 | assert(samplerObject.device == device) |
| 5456 | |
| 5457 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5458 | } |
| 5459 | |
| 5460 | |
| 5461 | // Descriptor set functions |
| 5462 | |
| 5463 | @threadSafety("system") |
| 5464 | cmd VkResult vkCreateDescriptorSetLayout( |
| 5465 | VkDevice device, |
| 5466 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5467 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5468 | VkDescriptorSetLayout* pSetLayout) { |
| 5469 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 5470 | deviceObject := GetDevice(device) |
| 5471 | |
| 5472 | setLayout := ? |
| 5473 | pSetLayout[0] = setLayout |
| 5474 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 5475 | |
| 5476 | return ? |
| 5477 | } |
| 5478 | |
| 5479 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5480 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5481 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5482 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5483 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5484 | deviceObject := GetDevice(device) |
| 5485 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 5486 | assert(descriptorSetLayoutObject.device == device) |
| 5487 | |
| 5488 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5489 | } |
| 5490 | |
| 5491 | @threadSafety("system") |
| 5492 | cmd VkResult vkCreateDescriptorPool( |
| 5493 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5494 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5495 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5496 | VkDescriptorPool* pDescriptorPool) { |
| 5497 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 5498 | deviceObject := GetDevice(device) |
| 5499 | |
| 5500 | descriptorPool := ? |
| 5501 | pDescriptorPool[0] = descriptorPool |
| 5502 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 5503 | |
| 5504 | return ? |
| 5505 | } |
| 5506 | |
| 5507 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5508 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5509 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5510 | VkDescriptorPool descriptorPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5511 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5512 | deviceObject := GetDevice(device) |
| 5513 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5514 | assert(descriptorPoolObject.device == device) |
| 5515 | |
| 5516 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5517 | } |
| 5518 | |
| 5519 | @threadSafety("app") |
| 5520 | cmd VkResult vkResetDescriptorPool( |
| 5521 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5522 | VkDescriptorPool descriptorPool, |
| 5523 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5524 | deviceObject := GetDevice(device) |
| 5525 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5526 | assert(descriptorPoolObject.device == device) |
| 5527 | |
| 5528 | return ? |
| 5529 | } |
| 5530 | |
| 5531 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5532 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5533 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5534 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5535 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5536 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5537 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5538 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5539 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5540 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 5541 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5542 | setLayout := setLayouts[i] |
| 5543 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 5544 | assert(setLayoutObject.device == device) |
| 5545 | } |
| 5546 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5547 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 5548 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5549 | descriptorSet := ? |
| 5550 | descriptorSets[i] = descriptorSet |
| 5551 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 5552 | } |
| 5553 | |
| 5554 | return ? |
| 5555 | } |
| 5556 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5557 | cmd VkResult vkFreeDescriptorSets( |
| 5558 | VkDevice device, |
| 5559 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5560 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5561 | const VkDescriptorSet* pDescriptorSets) { |
| 5562 | deviceObject := GetDevice(device) |
| 5563 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5564 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5565 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5566 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5567 | descriptorSet := descriptorSets[i] |
| 5568 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 5569 | assert(descriptorSetObject.device == device) |
| 5570 | State.DescriptorSets[descriptorSet] = null |
| 5571 | } |
| 5572 | |
| 5573 | return ? |
| 5574 | } |
| 5575 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5576 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5577 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5578 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5579 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5580 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5581 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 5582 | deviceObject := GetDevice(device) |
| 5583 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5584 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 5585 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5586 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5587 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5588 | assert(descriptorWriteObject.device == device) |
| 5589 | } |
| 5590 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5591 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 5592 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5593 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5594 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5595 | assert(descriptorCopyObject.device == device) |
| 5596 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5597 | } |
| 5598 | |
| 5599 | |
| 5600 | // Framebuffer functions |
| 5601 | |
| 5602 | @threadSafety("system") |
| 5603 | cmd VkResult vkCreateFramebuffer( |
| 5604 | VkDevice device, |
| 5605 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5606 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5607 | VkFramebuffer* pFramebuffer) { |
| 5608 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 5609 | deviceObject := GetDevice(device) |
| 5610 | |
| 5611 | framebuffer := ? |
| 5612 | pFramebuffer[0] = framebuffer |
| 5613 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 5614 | |
| 5615 | return ? |
| 5616 | } |
| 5617 | |
| 5618 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5619 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5620 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5621 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5622 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5623 | deviceObject := GetDevice(device) |
| 5624 | framebufferObject := GetFramebuffer(framebuffer) |
| 5625 | assert(framebufferObject.device == device) |
| 5626 | |
| 5627 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5628 | } |
| 5629 | |
| 5630 | |
| 5631 | // Renderpass functions |
| 5632 | |
| 5633 | @threadSafety("system") |
| 5634 | cmd VkResult vkCreateRenderPass( |
| 5635 | VkDevice device, |
| 5636 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5637 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5638 | VkRenderPass* pRenderPass) { |
| 5639 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 5640 | deviceObject := GetDevice(device) |
| 5641 | |
| 5642 | renderpass := ? |
| 5643 | pRenderPass[0] = renderpass |
| 5644 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 5645 | |
| 5646 | return ? |
| 5647 | } |
| 5648 | |
| 5649 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5650 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5651 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5652 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5653 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5654 | deviceObject := GetDevice(device) |
| 5655 | renderPassObject := GetRenderPass(renderPass) |
| 5656 | assert(renderPassObject.device == device) |
| 5657 | |
| 5658 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5659 | } |
| 5660 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5661 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5662 | VkDevice device, |
| 5663 | VkRenderPass renderPass, |
| 5664 | VkExtent2D* pGranularity) { |
| 5665 | deviceObject := GetDevice(device) |
| 5666 | renderPassObject := GetRenderPass(renderPass) |
| 5667 | |
| 5668 | granularity := ? |
| 5669 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5670 | } |
| 5671 | |
| 5672 | // Command pool functions |
| 5673 | |
| 5674 | cmd VkResult vkCreateCommandPool( |
| 5675 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5676 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 5677 | const VkAllocationCallbacks* pAllocator, |
| 5678 | VkCommandPool* pCommandPool) { |
| 5679 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5680 | deviceObject := GetDevice(device) |
| 5681 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5682 | commandPool := ? |
| 5683 | pCommandPool[0] = commandPool |
| 5684 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5685 | |
| 5686 | return ? |
| 5687 | } |
| 5688 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5689 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5690 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5691 | VkCommandPool commandPool, |
| 5692 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5693 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5694 | commandPoolObject := GetCommandPool(commandPool) |
| 5695 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5696 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5697 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5698 | } |
| 5699 | |
| 5700 | cmd VkResult vkResetCommandPool( |
| 5701 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5702 | VkCommandPool commandPool, |
| 5703 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5704 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5705 | commandPoolObject := GetCommandPool(commandPool) |
| 5706 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5707 | |
| 5708 | return ? |
| 5709 | } |
| 5710 | |
| 5711 | // Command buffer functions |
| 5712 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5713 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5714 | memoryObject := GetDeviceMemory(memory) |
| 5715 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5716 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5717 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5718 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5719 | } |
| 5720 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5721 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5722 | memoryObject := GetDeviceMemory(memory) |
| 5723 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5724 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5725 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5726 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5727 | } |
| 5728 | |
| 5729 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5730 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5731 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5732 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 5733 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5734 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5735 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5736 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5737 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5738 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5739 | commandBuffer := ? |
| 5740 | commandBuffers[i] = commandBuffer |
| 5741 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5742 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5743 | |
| 5744 | return ? |
| 5745 | } |
| 5746 | |
| 5747 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5748 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5749 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5750 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5751 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5752 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5753 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5754 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5755 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5756 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5757 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 5758 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5759 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5760 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5761 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5762 | } |
| 5763 | |
| 5764 | @threadSafety("app") |
| 5765 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5766 | VkCommandBuffer commandBuffer, |
| 5767 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 5768 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 5769 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5770 | |
| 5771 | // TODO: iterate over boundObjects and clear memory bindings |
| 5772 | |
| 5773 | return ? |
| 5774 | } |
| 5775 | |
| 5776 | @threadSafety("app") |
| 5777 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5778 | VkCommandBuffer commandBuffer) { |
| 5779 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5780 | |
| 5781 | return ? |
| 5782 | } |
| 5783 | |
| 5784 | @threadSafety("app") |
| 5785 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5786 | VkCommandBuffer commandBuffer, |
| 5787 | VkCommandBufferResetFlags flags) { |
| 5788 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5789 | |
| 5790 | // TODO: iterate over boundObjects and clear memory bindings |
| 5791 | |
| 5792 | return ? |
| 5793 | } |
| 5794 | |
| 5795 | |
| 5796 | // Command buffer building functions |
| 5797 | |
| 5798 | @threadSafety("app") |
| 5799 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5800 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5801 | VkPipelineBindPoint pipelineBindPoint, |
| 5802 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5803 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5804 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5805 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5806 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5807 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5808 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5809 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5810 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5811 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5812 | } |
| 5813 | |
| 5814 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5815 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5816 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5817 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5818 | u32 viewportCount, |
| 5819 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5820 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5821 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5822 | } |
| 5823 | |
| 5824 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5825 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5826 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5827 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5828 | u32 scissorCount, |
| 5829 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5830 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5831 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5832 | } |
| 5833 | |
| 5834 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5835 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5836 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5837 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5838 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5839 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5840 | } |
| 5841 | |
| 5842 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5843 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5844 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5845 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5846 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5847 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5848 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5849 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5850 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5851 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5852 | @threadSafety("app") |
| 5853 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5854 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5855 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 5856 | // an annotation as a quick hack to pass this to the template without |
| 5857 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5858 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5859 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5860 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5861 | } |
| 5862 | |
| 5863 | @threadSafety("app") |
| 5864 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5865 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5866 | f32 minDepthBounds, |
| 5867 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5868 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5869 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5870 | } |
| 5871 | |
| 5872 | @threadSafety("app") |
| 5873 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5874 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5875 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5876 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5877 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5878 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5879 | } |
| 5880 | |
| 5881 | @threadSafety("app") |
| 5882 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5883 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5884 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5885 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5886 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5887 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5888 | } |
| 5889 | |
| 5890 | @threadSafety("app") |
| 5891 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5892 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5893 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5894 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5895 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5896 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5897 | } |
| 5898 | |
| 5899 | @threadSafety("app") |
| 5900 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5901 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5902 | VkPipelineBindPoint pipelineBindPoint, |
| 5903 | VkPipelineLayout layout, |
| 5904 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5905 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5906 | const VkDescriptorSet* pDescriptorSets, |
| 5907 | u32 dynamicOffsetCount, |
| 5908 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5909 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5910 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5911 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5912 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5913 | descriptorSet := descriptorSets[i] |
| 5914 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5915 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5916 | } |
| 5917 | |
| 5918 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 5919 | for i in (0 .. dynamicOffsetCount) { |
| 5920 | dynamicOffset := dynamicOffsets[i] |
| 5921 | } |
| 5922 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5923 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5924 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5925 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5926 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5927 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5928 | } |
| 5929 | |
| 5930 | @threadSafety("app") |
| 5931 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5932 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5933 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5934 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5935 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5936 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5937 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5938 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5939 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5940 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5941 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5942 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5943 | } |
| 5944 | |
| 5945 | @threadSafety("app") |
| 5946 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5947 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5948 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5949 | u32 bindingCount, |
| 5950 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5951 | const VkDeviceSize* pOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5952 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5953 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5954 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5955 | buffers := pBuffers[0:bindingCount] |
| 5956 | offsets := pOffsets[0:bindingCount] |
| 5957 | for i in (0 .. bindingCount) { |
| 5958 | buffer := buffers[i] |
| 5959 | offset := offsets[i] |
| 5960 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5961 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5962 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5963 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5964 | } |
| 5965 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5966 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5967 | } |
| 5968 | |
| 5969 | @threadSafety("app") |
| 5970 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5971 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5972 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5973 | u32 instanceCount, |
| 5974 | u32 firstVertex, |
| 5975 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5976 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5977 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5978 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5979 | } |
| 5980 | |
| 5981 | @threadSafety("app") |
| 5982 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5983 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5984 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5985 | u32 instanceCount, |
| 5986 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5987 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5988 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5989 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5990 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5991 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5992 | } |
| 5993 | |
| 5994 | @threadSafety("app") |
| 5995 | cmd void vkCmdDrawIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5996 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5997 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5998 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5999 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6000 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6001 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6002 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6003 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6004 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6005 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6006 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6007 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6008 | } |
| 6009 | |
| 6010 | @threadSafety("app") |
| 6011 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6012 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6013 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6014 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6015 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6016 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6017 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6018 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6019 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6020 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6021 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6022 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6023 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6024 | } |
| 6025 | |
| 6026 | @threadSafety("app") |
| 6027 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6028 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6029 | u32 groupCountX, |
| 6030 | u32 groupCountY, |
| 6031 | u32 groupCountZ) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6032 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6033 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6034 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6035 | } |
| 6036 | |
| 6037 | @threadSafety("app") |
| 6038 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6039 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6040 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6041 | VkDeviceSize offset) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6042 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6043 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6044 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6045 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6046 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6047 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6048 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6049 | } |
| 6050 | |
| 6051 | @threadSafety("app") |
| 6052 | cmd void vkCmdCopyBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6053 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6054 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6055 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6056 | u32 regionCount, |
| 6057 | const VkBufferCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6058 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6059 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6060 | dstBufferObject := GetBuffer(dstBuffer) |
| 6061 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6062 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6063 | |
| 6064 | regions := pRegions[0:regionCount] |
| 6065 | for i in (0 .. regionCount) { |
| 6066 | region := regions[i] |
| 6067 | } |
| 6068 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6069 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6070 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6071 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6072 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6073 | } |
| 6074 | |
| 6075 | @threadSafety("app") |
| 6076 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6077 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6078 | VkImage srcImage, |
| 6079 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6080 | VkImage dstImage, |
| 6081 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6082 | u32 regionCount, |
| 6083 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6084 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6085 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6086 | dstImageObject := GetImage(dstImage) |
| 6087 | assert(commandBufferObject.device == srcImageObject.device) |
| 6088 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6089 | |
| 6090 | regions := pRegions[0:regionCount] |
| 6091 | for i in (0 .. regionCount) { |
| 6092 | region := regions[i] |
| 6093 | } |
| 6094 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6095 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6096 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6097 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6098 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6099 | } |
| 6100 | |
| 6101 | @threadSafety("app") |
| 6102 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6103 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6104 | VkImage srcImage, |
| 6105 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6106 | VkImage dstImage, |
| 6107 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6108 | u32 regionCount, |
| 6109 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 6110 | VkFilter filter) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6111 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6112 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6113 | dstImageObject := GetImage(dstImage) |
| 6114 | assert(commandBufferObject.device == srcImageObject.device) |
| 6115 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6116 | |
| 6117 | regions := pRegions[0:regionCount] |
| 6118 | for i in (0 .. regionCount) { |
| 6119 | region := regions[i] |
| 6120 | } |
| 6121 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6122 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6123 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6124 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6125 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6126 | } |
| 6127 | |
| 6128 | @threadSafety("app") |
| 6129 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6130 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6131 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6132 | VkImage dstImage, |
| 6133 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6134 | u32 regionCount, |
| 6135 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6136 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6137 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6138 | dstImageObject := GetImage(dstImage) |
| 6139 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6140 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6141 | |
| 6142 | regions := pRegions[0:regionCount] |
| 6143 | for i in (0 .. regionCount) { |
| 6144 | region := regions[i] |
| 6145 | } |
| 6146 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6147 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6148 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6149 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6150 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6151 | } |
| 6152 | |
| 6153 | @threadSafety("app") |
| 6154 | cmd void vkCmdCopyImageToBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6155 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6156 | VkImage srcImage, |
| 6157 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6158 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6159 | u32 regionCount, |
| 6160 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6161 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6162 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6163 | dstBufferObject := GetBuffer(dstBuffer) |
| 6164 | assert(commandBufferObject.device == srcImageObject.device) |
| 6165 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6166 | |
| 6167 | regions := pRegions[0:regionCount] |
| 6168 | for i in (0 .. regionCount) { |
| 6169 | region := regions[i] |
| 6170 | } |
| 6171 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6172 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6173 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6174 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6175 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6176 | } |
| 6177 | |
| 6178 | @threadSafety("app") |
| 6179 | cmd void vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6180 | VkCommandBuffer commandBuffer, |
| 6181 | VkBuffer dstBuffer, |
| 6182 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6183 | VkDeviceSize dataSize, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 6184 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6185 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6186 | dstBufferObject := GetBuffer(dstBuffer) |
| 6187 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6188 | |
| 6189 | data := pData[0:dataSize] |
| 6190 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6191 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6192 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6193 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6194 | } |
| 6195 | |
| 6196 | @threadSafety("app") |
| 6197 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6198 | VkCommandBuffer commandBuffer, |
| 6199 | VkBuffer dstBuffer, |
| 6200 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6201 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6202 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6203 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6204 | dstBufferObject := GetBuffer(dstBuffer) |
| 6205 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6206 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6207 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6208 | } |
| 6209 | |
| 6210 | @threadSafety("app") |
| 6211 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6212 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6213 | VkImage image, |
| 6214 | VkImageLayout imageLayout, |
| 6215 | const VkClearColorValue* pColor, |
| 6216 | u32 rangeCount, |
| 6217 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6218 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6219 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6220 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6221 | |
| 6222 | ranges := pRanges[0:rangeCount] |
| 6223 | for i in (0 .. rangeCount) { |
| 6224 | range := ranges[i] |
| 6225 | } |
| 6226 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6227 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6228 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6229 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6230 | } |
| 6231 | |
| 6232 | @threadSafety("app") |
| 6233 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6234 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6235 | VkImage image, |
| 6236 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6237 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6238 | u32 rangeCount, |
| 6239 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6240 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6241 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6242 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6243 | |
| 6244 | ranges := pRanges[0:rangeCount] |
| 6245 | for i in (0 .. rangeCount) { |
| 6246 | range := ranges[i] |
| 6247 | } |
| 6248 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6249 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6250 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6251 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6252 | } |
| 6253 | |
| 6254 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6255 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6256 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6257 | u32 attachmentCount, |
| 6258 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6259 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 6260 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6261 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6262 | |
| 6263 | rects := pRects[0:rectCount] |
| 6264 | for i in (0 .. rectCount) { |
| 6265 | rect := rects[i] |
| 6266 | } |
| 6267 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6268 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6269 | } |
| 6270 | |
| 6271 | @threadSafety("app") |
| 6272 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6273 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6274 | VkImage srcImage, |
| 6275 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6276 | VkImage dstImage, |
| 6277 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6278 | u32 regionCount, |
| 6279 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6280 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6281 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6282 | dstImageObject := GetImage(dstImage) |
| 6283 | assert(commandBufferObject.device == srcImageObject.device) |
| 6284 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6285 | |
| 6286 | regions := pRegions[0:regionCount] |
| 6287 | for i in (0 .. regionCount) { |
| 6288 | region := regions[i] |
| 6289 | } |
| 6290 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6291 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6292 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6293 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6294 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6295 | } |
| 6296 | |
| 6297 | @threadSafety("app") |
| 6298 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6299 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6300 | VkEvent event, |
| 6301 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6302 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6303 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6304 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6305 | } |
| 6306 | |
| 6307 | @threadSafety("app") |
| 6308 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6309 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6310 | VkEvent event, |
| 6311 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6312 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6313 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6314 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6315 | } |
| 6316 | |
| 6317 | @threadSafety("app") |
| 6318 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6319 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6320 | u32 eventCount, |
| 6321 | const VkEvent* pEvents, |
| 6322 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6323 | VkPipelineStageFlags dstStageMask, |
| 6324 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6325 | const VkMemoryBarrier* pMemoryBarriers, |
| 6326 | u32 bufferMemoryBarrierCount, |
| 6327 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6328 | u32 imageMemoryBarrierCount, |
| 6329 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6330 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6331 | |
| 6332 | events := pEvents[0:eventCount] |
| 6333 | for i in (0 .. eventCount) { |
| 6334 | event := events[i] |
| 6335 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6336 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6337 | } |
| 6338 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6339 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6340 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6341 | memoryBarrier := memoryBarriers[i] |
| 6342 | } |
| 6343 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6344 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6345 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6346 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6347 | assert(bufferObject.device == commandBufferObject.device) |
| 6348 | } |
| 6349 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6350 | for i in (0 .. imageMemoryBarrierCount) { |
| 6351 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6352 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6353 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6354 | } |
| 6355 | } |
| 6356 | |
| 6357 | @threadSafety("app") |
| 6358 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6359 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6360 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6361 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 6362 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6363 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6364 | const VkMemoryBarrier* pMemoryBarriers, |
| 6365 | u32 bufferMemoryBarrierCount, |
| 6366 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6367 | u32 imageMemoryBarrierCount, |
| 6368 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6369 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6370 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6371 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6372 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6373 | memoryBarrier := memoryBarriers[i] |
| 6374 | } |
| 6375 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6376 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6377 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6378 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6379 | assert(bufferObject.device == commandBufferObject.device) |
| 6380 | } |
| 6381 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6382 | for i in (0 .. imageMemoryBarrierCount) { |
| 6383 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6384 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6385 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6386 | } |
| 6387 | } |
| 6388 | |
| 6389 | @threadSafety("app") |
| 6390 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6391 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6392 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6393 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6394 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6395 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6396 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6397 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6398 | } |
| 6399 | |
| 6400 | @threadSafety("app") |
| 6401 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6402 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6403 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6404 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6405 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6406 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6407 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6408 | } |
| 6409 | |
| 6410 | @threadSafety("app") |
| 6411 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6412 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6413 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6414 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6415 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6416 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6417 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6418 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6419 | } |
| 6420 | |
| 6421 | @threadSafety("app") |
| 6422 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6423 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 6424 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6425 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6426 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6427 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6428 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6429 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6430 | } |
| 6431 | |
| 6432 | @threadSafety("app") |
| 6433 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6434 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6435 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6436 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6437 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6438 | VkBuffer dstBuffer, |
| 6439 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 6440 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6441 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6442 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6443 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6444 | dstBufferObject := GetBuffer(dstBuffer) |
| 6445 | assert(commandBufferObject.device == queryPoolObject.device) |
| 6446 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6447 | } |
| 6448 | |
| 6449 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6450 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6451 | VkPipelineLayout layout, |
| 6452 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6453 | u32 offset, |
| 6454 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6455 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6456 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6457 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6458 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6459 | } |
| 6460 | |
| 6461 | @threadSafety("app") |
| 6462 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6463 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6464 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6465 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6466 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6467 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 6468 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6469 | assert(commandBufferObject.device == renderPassObject.device) |
| 6470 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6471 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6472 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6473 | } |
| 6474 | |
| 6475 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6476 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6477 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6478 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6479 | } |
| 6480 | |
| 6481 | @threadSafety("app") |
| 6482 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6483 | VkCommandBuffer commandBuffer) { |
| 6484 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6485 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6486 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6487 | } |
| 6488 | |
| 6489 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6490 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6491 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6492 | const VkCommandBuffer* pCommandBuffers) { |
| 6493 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6494 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6495 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 6496 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6497 | secondaryCommandBuffer := commandBuffers[i] |
| 6498 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 6499 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6500 | } |
| 6501 | } |
| 6502 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6503 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6504 | cmd void vkDestroySurfaceKHR( |
| 6505 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6506 | VkSurfaceKHR surface, |
| 6507 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6508 | instanceObject := GetInstance(instance) |
| 6509 | surfaceObject := GetSurface(surface) |
| 6510 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6511 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6512 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 6513 | } |
| 6514 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6515 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6516 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6517 | VkPhysicalDevice physicalDevice, |
| 6518 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6519 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6520 | VkBool32* pSupported) { |
| 6521 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6522 | |
| 6523 | return ? |
| 6524 | } |
| 6525 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6526 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6527 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 6528 | VkPhysicalDevice physicalDevice, |
| 6529 | VkSurfaceKHR surface, |
| 6530 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 6531 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6532 | |
| 6533 | surfaceCapabilities := ? |
| 6534 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 6535 | |
| 6536 | return ? |
| 6537 | } |
| 6538 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6539 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6540 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 6541 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6542 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6543 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6544 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6545 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6546 | |
| 6547 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6548 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6549 | surfaceFormats := pSurfaceFormats[0:count] |
| 6550 | |
| 6551 | for i in (0 .. count) { |
| 6552 | surfaceFormat := ? |
| 6553 | surfaceFormats[i] = surfaceFormat |
| 6554 | } |
| 6555 | |
| 6556 | return ? |
| 6557 | } |
| 6558 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6559 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6560 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 6561 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6562 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6563 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6564 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6565 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6566 | |
| 6567 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6568 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6569 | presentModes := pPresentModes[0:count] |
| 6570 | |
| 6571 | for i in (0 .. count) { |
| 6572 | presentMode := ? |
| 6573 | presentModes[i] = presentMode |
| 6574 | } |
| 6575 | |
| 6576 | return ? |
| 6577 | } |
| 6578 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6579 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6580 | cmd VkResult vkCreateSwapchainKHR( |
| 6581 | VkDevice device, |
| 6582 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6583 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6584 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6585 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6586 | deviceObject := GetDevice(device) |
| 6587 | |
| 6588 | swapchain := ? |
| 6589 | pSwapchain[0] = swapchain |
| 6590 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 6591 | |
| 6592 | return ? |
| 6593 | } |
| 6594 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6595 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6596 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6597 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6598 | VkSwapchainKHR swapchain, |
| 6599 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6600 | deviceObject := GetDevice(device) |
| 6601 | swapchainObject := GetSwapchain(swapchain) |
| 6602 | assert(swapchainObject.device == device) |
| 6603 | |
| 6604 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6605 | } |
| 6606 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6607 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6608 | cmd VkResult vkGetSwapchainImagesKHR( |
| 6609 | VkDevice device, |
| 6610 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6611 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6612 | VkImage* pSwapchainImages) { |
| 6613 | deviceObject := GetDevice(device) |
| 6614 | |
| 6615 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6616 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6617 | swapchainImages := pSwapchainImages[0:count] |
| 6618 | |
| 6619 | for i in (0 .. count) { |
| 6620 | swapchainImage := ? |
| 6621 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6622 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6623 | } |
| 6624 | |
| 6625 | return ? |
| 6626 | } |
| 6627 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6628 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6629 | cmd VkResult vkAcquireNextImageKHR( |
| 6630 | VkDevice device, |
| 6631 | VkSwapchainKHR swapchain, |
| 6632 | u64 timeout, |
| 6633 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6634 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6635 | u32* pImageIndex) { |
| 6636 | deviceObject := GetDevice(device) |
| 6637 | swapchainObject := GetSwapchain(swapchain) |
| 6638 | |
| 6639 | imageIndex := ? |
| 6640 | pImageIndex[0] = imageIndex |
| 6641 | |
| 6642 | return ? |
| 6643 | } |
| 6644 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6645 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6646 | cmd VkResult vkQueuePresentKHR( |
| 6647 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6648 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6649 | queueObject := GetQueue(queue) |
| 6650 | |
| 6651 | presentInfo := ? |
| 6652 | pPresentInfo[0] = presentInfo |
| 6653 | |
| 6654 | return ? |
| 6655 | } |
| 6656 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6657 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6658 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6659 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6660 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6661 | VkDisplayPropertiesKHR* pProperties) { |
| 6662 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6663 | return ? |
| 6664 | } |
| 6665 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6666 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6667 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6668 | VkPhysicalDevice physicalDevice, |
| 6669 | u32* pPropertyCount, |
| 6670 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 6671 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6672 | return ? |
| 6673 | } |
| 6674 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6675 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6676 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6677 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6678 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6679 | u32* pDisplayCount, |
| 6680 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6681 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6682 | return ? |
| 6683 | } |
| 6684 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6685 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6686 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 6687 | VkPhysicalDevice physicalDevice, |
| 6688 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6689 | u32* pPropertyCount, |
| 6690 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6691 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6692 | return ? |
| 6693 | } |
| 6694 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6695 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6696 | cmd VkResult vkCreateDisplayModeKHR( |
| 6697 | VkPhysicalDevice physicalDevice, |
| 6698 | VkDisplayKHR display, |
| 6699 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6700 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6701 | VkDisplayModeKHR* pMode) { |
| 6702 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6703 | return ? |
| 6704 | } |
| 6705 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6706 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6707 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6708 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6709 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6710 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6711 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6712 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6713 | return ? |
| 6714 | } |
| 6715 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6716 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6717 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 6718 | VkInstance instance, |
| 6719 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6720 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6721 | VkSurfaceKHR* pSurface) { |
| 6722 | return ? |
| 6723 | } |
| 6724 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6725 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6726 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 6727 | VkDevice device, |
| 6728 | u32 swapchainCount, |
| 6729 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6730 | const VkAllocationCallbacks* pAllocator, |
| 6731 | VkSwapchainKHR* pSwapchains) { |
| 6732 | return ? |
| 6733 | } |
| 6734 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6735 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6736 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6737 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6738 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6739 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6740 | VkSurfaceKHR* pSurface) { |
| 6741 | instanceObject := GetInstance(instance) |
| 6742 | return ? |
| 6743 | } |
| 6744 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6745 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6746 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6747 | VkPhysicalDevice physicalDevice, |
| 6748 | u32 queueFamilyIndex, |
| 6749 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6750 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6751 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6752 | return ? |
| 6753 | } |
| 6754 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6755 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6756 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6757 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6758 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6759 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6760 | VkSurfaceKHR* pSurface) { |
| 6761 | instanceObject := GetInstance(instance) |
| 6762 | return ? |
| 6763 | } |
| 6764 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6765 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6766 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6767 | VkPhysicalDevice physicalDevice, |
| 6768 | u32 queueFamilyIndex, |
| 6769 | platform.xcb_connection_t* connection, |
| 6770 | platform.xcb_visualid_t visual_id) { |
| 6771 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6772 | return ? |
| 6773 | } |
| 6774 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6775 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6776 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 6777 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6778 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6779 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6780 | VkSurfaceKHR* pSurface) { |
| 6781 | instanceObject := GetInstance(instance) |
| 6782 | return ? |
| 6783 | } |
| 6784 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6785 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6786 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6787 | VkPhysicalDevice physicalDevice, |
| 6788 | u32 queueFamilyIndex, |
| 6789 | platform.wl_display* display) { |
| 6790 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6791 | return ? |
| 6792 | } |
| 6793 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6794 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6795 | cmd VkResult vkCreateMirSurfaceKHR( |
| 6796 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6797 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6798 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6799 | VkSurfaceKHR* pSurface) { |
| 6800 | instanceObject := GetInstance(instance) |
| 6801 | return ? |
| 6802 | } |
| 6803 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6804 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6805 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6806 | VkPhysicalDevice physicalDevice, |
| 6807 | u32 queueFamilyIndex, |
| 6808 | platform.MirConnection* connection) { |
| 6809 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6810 | return ? |
| 6811 | } |
| 6812 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6813 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6814 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 6815 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6816 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6817 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6818 | VkSurfaceKHR* pSurface) { |
| 6819 | instanceObject := GetInstance(instance) |
| 6820 | return ? |
| 6821 | } |
| 6822 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6823 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6824 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 6825 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6826 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6827 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6828 | VkSurfaceKHR* pSurface) { |
| 6829 | instanceObject := GetInstance(instance) |
| 6830 | return ? |
| 6831 | } |
| 6832 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6833 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6834 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6835 | VkPhysicalDevice physicalDevice, |
| 6836 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 6837 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6838 | return ? |
| 6839 | } |
| 6840 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6841 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6842 | @optional |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6843 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 6844 | VkDevice device, |
| 6845 | VkFormat format, |
| 6846 | VkImageUsageFlags imageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6847 | s32* grallocUsage) { |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6848 | return ? |
| 6849 | } |
| 6850 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6851 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6852 | @optional |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6853 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( |
| 6854 | VkDevice device, |
| 6855 | VkFormat format, |
| 6856 | VkImageUsageFlags imageUsage, |
| 6857 | VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6858 | u64* grallocConsumerUsage, |
| 6859 | u64* grallocProducerUsage) { |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6860 | return ? |
| 6861 | } |
| 6862 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6863 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6864 | cmd VkResult vkAcquireImageANDROID( |
| 6865 | VkDevice device, |
| 6866 | VkImage image, |
| 6867 | int nativeFenceFd, |
| 6868 | VkSemaphore semaphore, |
| 6869 | VkFence fence) { |
| 6870 | return ? |
| 6871 | } |
| 6872 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6873 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6874 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 6875 | VkQueue queue, |
| 6876 | u32 waitSemaphoreCount, |
| 6877 | const VkSemaphore* pWaitSemaphores, |
| 6878 | VkImage image, |
| 6879 | int* pNativeFenceFd) { |
| 6880 | return ? |
| 6881 | } |
| 6882 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6883 | @extension("VK_EXT_debug_report") // 12 |
| 6884 | @external type void* PFN_vkDebugReportCallbackEXT |
| 6885 | @extension("VK_EXT_debug_report") // 12 |
| 6886 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 6887 | VkDebugReportFlagsEXT flags, |
| 6888 | VkDebugReportObjectTypeEXT objectType, |
| 6889 | u64 object, |
| 6890 | platform.size_t location, |
| 6891 | s32 messageCode, |
| 6892 | const char* pLayerPrefix, |
| 6893 | const char* pMessage, |
| 6894 | void* pUserData) { |
| 6895 | return ? |
| 6896 | } |
| 6897 | |
| 6898 | @extension("VK_EXT_debug_report") // 12 |
| 6899 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 6900 | VkInstance instance, |
| 6901 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 6902 | const VkAllocationCallbacks* pAllocator, |
| 6903 | VkDebugReportCallbackEXT* pCallback) { |
| 6904 | return ? |
| 6905 | } |
| 6906 | |
| 6907 | @extension("VK_EXT_debug_report") // 12 |
| 6908 | cmd void vkDestroyDebugReportCallbackEXT( |
| 6909 | VkInstance instance, |
| 6910 | VkDebugReportCallbackEXT callback, |
| 6911 | const VkAllocationCallbacks* pAllocator) { |
| 6912 | } |
| 6913 | |
| 6914 | @extension("VK_EXT_debug_report") // 12 |
| 6915 | cmd void vkDebugReportMessageEXT( |
| 6916 | VkInstance instance, |
| 6917 | VkDebugReportFlagsEXT flags, |
| 6918 | VkDebugReportObjectTypeEXT objectType, |
| 6919 | u64 object, |
| 6920 | platform.size_t location, |
| 6921 | s32 messageCode, |
| 6922 | const char* pLayerPrefix, |
| 6923 | const char* pMessage) { |
| 6924 | } |
| 6925 | |
| 6926 | @extension("VK_EXT_debug_marker") // 23 |
| 6927 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 6928 | VkDevice device, |
| 6929 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 6930 | return ? |
| 6931 | } |
| 6932 | |
| 6933 | @extension("VK_EXT_debug_marker") // 23 |
| 6934 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 6935 | VkDevice device, |
| 6936 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 6937 | return ? |
| 6938 | } |
| 6939 | |
| 6940 | @extension("VK_EXT_debug_marker") // 23 |
| 6941 | cmd void vkCmdDebugMarkerBeginEXT( |
| 6942 | VkCommandBuffer commandBuffer, |
| 6943 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6944 | } |
| 6945 | |
| 6946 | @extension("VK_EXT_debug_marker") // 23 |
| 6947 | cmd void vkCmdDebugMarkerEndEXT( |
| 6948 | VkCommandBuffer commandBuffer) { |
| 6949 | } |
| 6950 | |
| 6951 | @extension("VK_EXT_debug_marker") // 23 |
| 6952 | cmd void vkCmdDebugMarkerInsertEXT( |
| 6953 | VkCommandBuffer commandBuffer, |
| 6954 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6955 | } |
| 6956 | |
| 6957 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 6958 | cmd void vkCmdDrawIndirectCountAMD( |
| 6959 | VkCommandBuffer commandBuffer, |
| 6960 | VkBuffer buffer, |
| 6961 | VkDeviceSize offset, |
| 6962 | VkBuffer countBuffer, |
| 6963 | VkDeviceSize countBufferOffset, |
| 6964 | u32 maxDrawCount, |
| 6965 | u32 stride) { |
| 6966 | } |
| 6967 | |
| 6968 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 6969 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 6970 | VkCommandBuffer commandBuffer, |
| 6971 | VkBuffer buffer, |
| 6972 | VkDeviceSize offset, |
| 6973 | VkBuffer countBuffer, |
| 6974 | VkDeviceSize countBufferOffset, |
| 6975 | u32 maxDrawCount, |
| 6976 | u32 stride) { |
| 6977 | } |
| 6978 | |
| 6979 | @extension("VK_NV_external_memory_capabilities") // 56 |
| 6980 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 6981 | VkPhysicalDevice physicalDevice, |
| 6982 | VkFormat format, |
| 6983 | VkImageType type, |
| 6984 | VkImageTiling tiling, |
| 6985 | VkImageUsageFlags usage, |
| 6986 | VkImageCreateFlags flags, |
| 6987 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 6988 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 6989 | return ? |
| 6990 | } |
| 6991 | |
| 6992 | @extension("VK_NV_external_memory_win32") // 58 |
| 6993 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 6994 | VkDevice device, |
| 6995 | VkDeviceMemory memory, |
| 6996 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 6997 | platform.HANDLE* pHandle) { |
| 6998 | return ? |
| 6999 | } |
| 7000 | |
| 7001 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7002 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 7003 | VkPhysicalDevice physicalDevice, |
| 7004 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 7005 | } |
| 7006 | |
| 7007 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7008 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 7009 | VkPhysicalDevice physicalDevice, |
| 7010 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 7011 | } |
| 7012 | |
| 7013 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7014 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 7015 | VkPhysicalDevice physicalDevice, |
| 7016 | VkFormat format, |
| 7017 | VkFormatProperties2KHR* pFormatProperties) { |
| 7018 | } |
| 7019 | |
| 7020 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7021 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 7022 | VkPhysicalDevice physicalDevice, |
| 7023 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 7024 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 7025 | return ? |
| 7026 | } |
| 7027 | |
| 7028 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7029 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 7030 | VkPhysicalDevice physicalDevice, |
| 7031 | u32* pQueueFamilyPropertyCount, |
| 7032 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 7033 | } |
| 7034 | |
| 7035 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7036 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 7037 | VkPhysicalDevice physicalDevice, |
| 7038 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 7039 | } |
| 7040 | |
| 7041 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7042 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 7043 | VkPhysicalDevice physicalDevice, |
| 7044 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 7045 | u32* pPropertyCount, |
| 7046 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 7047 | } |
| 7048 | |
| 7049 | @extension("VK_KHX_device_group") // 61 |
| 7050 | cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX( |
| 7051 | VkDevice device, |
| 7052 | u32 heapIndex, |
| 7053 | u32 localDeviceIndex, |
| 7054 | u32 remoteDeviceIndex, |
| 7055 | VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) { |
| 7056 | } |
| 7057 | |
| 7058 | @extension("VK_KHX_device_group") // 61 |
| 7059 | cmd VkResult vkBindBufferMemory2KHX( |
| 7060 | VkDevice device, |
| 7061 | u32 bindInfoCount, |
| 7062 | const VkBindBufferMemoryInfoKHX* pBindInfos) { |
| 7063 | return ? |
| 7064 | } |
| 7065 | |
| 7066 | @extension("VK_KHX_device_group") // 61 |
| 7067 | cmd VkResult vkBindImageMemory2KHX( |
| 7068 | VkDevice device, |
| 7069 | u32 bindInfoCount, |
| 7070 | const VkBindImageMemoryInfoKHX* pBindInfos) { |
| 7071 | return ? |
| 7072 | } |
| 7073 | |
| 7074 | @extension("VK_KHX_device_group") // 61 |
| 7075 | cmd void vkCmdSetDeviceMaskKHX( |
| 7076 | VkCommandBuffer commandBuffer, |
| 7077 | u32 deviceMask) { |
| 7078 | } |
| 7079 | |
| 7080 | @extension("VK_KHX_device_group") // 61 |
| 7081 | cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX( |
| 7082 | VkDevice device, |
| 7083 | VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) { |
| 7084 | return ? |
| 7085 | } |
| 7086 | |
| 7087 | @extension("VK_KHX_device_group") // 61 |
| 7088 | cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX( |
| 7089 | VkDevice device, |
| 7090 | VkSurfaceKHR surface, |
| 7091 | VkDeviceGroupPresentModeFlagsKHX* pModes) { |
| 7092 | return ? |
| 7093 | } |
| 7094 | |
| 7095 | @extension("VK_KHX_device_group") // 61 |
| 7096 | cmd VkResult vkAcquireNextImage2KHX( |
| 7097 | VkDevice device, |
| 7098 | const VkAcquireNextImageInfoKHX* pAcquireInfo, |
| 7099 | u32* pImageIndex) { |
| 7100 | return ? |
| 7101 | } |
| 7102 | |
| 7103 | @extension("VK_KHX_device_group") // 61 |
| 7104 | cmd void vkCmdDispatchBaseKHX( |
| 7105 | VkCommandBuffer commandBuffer, |
| 7106 | u32 baseGroupX, |
| 7107 | u32 baseGroupY, |
| 7108 | u32 baseGroupZ, |
| 7109 | u32 groupCountX, |
| 7110 | u32 groupCountY, |
| 7111 | u32 groupCountZ) { |
| 7112 | } |
| 7113 | |
| 7114 | @extension("VK_KHX_device_group") // 61 |
| 7115 | cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX( |
| 7116 | VkPhysicalDevice physicalDevice, |
| 7117 | VkSurfaceKHR surface, |
| 7118 | u32* pRectCount, |
| 7119 | VkRect2D* pRects) { |
| 7120 | return ? |
| 7121 | } |
| 7122 | |
| 7123 | @extension("VK_NN_vi_surface") // 63 |
| 7124 | cmd VkResult vkCreateViSurfaceNN( |
| 7125 | VkInstance instance, |
| 7126 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 7127 | const VkAllocationCallbacks* pAllocator, |
| 7128 | VkSurfaceKHR* pSurface) { |
| 7129 | return ? |
| 7130 | } |
| 7131 | |
| 7132 | @extension("VK_KHR_maintenance1") // 70 |
| 7133 | cmd void vkTrimCommandPoolKHR( |
| 7134 | VkDevice device, |
| 7135 | VkCommandPool commandPool, |
| 7136 | VkCommandPoolTrimFlagsKHR flags) { |
| 7137 | } |
| 7138 | |
| 7139 | @extension("VK_KHX_device_group_creation") // 71 |
| 7140 | cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX( |
| 7141 | VkInstance instance, |
| 7142 | u32* pPhysicalDeviceGroupCount, |
| 7143 | VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) { |
| 7144 | return ? |
| 7145 | } |
| 7146 | |
| 7147 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 7148 | cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX( |
| 7149 | VkPhysicalDevice physicalDevice, |
| 7150 | const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo, |
| 7151 | VkExternalBufferPropertiesKHX* pExternalBufferProperties) { |
| 7152 | } |
| 7153 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7154 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7155 | cmd VkResult vkGetMemoryWin32HandleKHX( |
| 7156 | VkDevice device, |
| 7157 | VkDeviceMemory memory, |
| 7158 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7159 | platform.HANDLE* pHandle) { |
| 7160 | return ? |
| 7161 | } |
| 7162 | |
| 7163 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7164 | cmd VkResult vkGetMemoryWin32HandlePropertiesKHX( |
| 7165 | VkDevice device, |
| 7166 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7167 | platform.HANDLE handle, |
| 7168 | VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) { |
| 7169 | return ? |
| 7170 | } |
| 7171 | |
| 7172 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7173 | cmd VkResult vkGetMemoryFdKHX( |
| 7174 | VkDevice device, |
| 7175 | VkDeviceMemory memory, |
| 7176 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7177 | s32* pFd) { |
| 7178 | return ? |
| 7179 | } |
| 7180 | |
| 7181 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7182 | cmd VkResult vkGetMemoryFdPropertiesKHX( |
| 7183 | VkDevice device, |
| 7184 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7185 | s32 fd, |
| 7186 | VkMemoryFdPropertiesKHX* pMemoryFdProperties) { |
| 7187 | return ? |
| 7188 | } |
| 7189 | |
| 7190 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 7191 | cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX( |
| 7192 | VkPhysicalDevice physicalDevice, |
| 7193 | const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo, |
| 7194 | VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) { |
| 7195 | } |
| 7196 | |
| 7197 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7198 | cmd VkResult vkImportSemaphoreWin32HandleKHX( |
| 7199 | VkDevice device, |
| 7200 | const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) { |
| 7201 | return ? |
| 7202 | } |
| 7203 | |
| 7204 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7205 | cmd VkResult vkGetSemaphoreWin32HandleKHX( |
| 7206 | VkDevice device, |
| 7207 | VkSemaphore semaphore, |
| 7208 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7209 | platform.HANDLE* pHandle) { |
| 7210 | return ? |
| 7211 | } |
| 7212 | |
| 7213 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7214 | cmd VkResult vkImportSemaphoreFdKHX( |
| 7215 | VkDevice device, |
| 7216 | const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) { |
| 7217 | return ? |
| 7218 | } |
| 7219 | |
| 7220 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7221 | cmd VkResult vkGetSemaphoreFdKHX( |
| 7222 | VkDevice device, |
| 7223 | VkSemaphore semaphore, |
| 7224 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7225 | s32* pFd) { |
| 7226 | return ? |
| 7227 | } |
| 7228 | |
| 7229 | @extension("VK_KHR_push_descriptor") // 81 |
| 7230 | cmd void vkCmdPushDescriptorSetKHR( |
| 7231 | VkCommandBuffer commandBuffer, |
| 7232 | VkPipelineBindPoint pipelineBindPoint, |
| 7233 | VkPipelineLayout layout, |
| 7234 | u32 set, |
| 7235 | u32 descriptorWriteCount, |
| 7236 | const VkWriteDescriptorSet* pDescriptorWrites) { |
| 7237 | } |
| 7238 | |
| 7239 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7240 | cmd VkResult vkCreateDescriptorUpdateTemplateKHR( |
| 7241 | VkDevice device, |
| 7242 | const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, |
| 7243 | const VkAllocationCallbacks* pAllocator, |
| 7244 | VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) { |
| 7245 | return ? |
| 7246 | } |
| 7247 | |
| 7248 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7249 | cmd void vkDestroyDescriptorUpdateTemplateKHR( |
| 7250 | VkDevice device, |
| 7251 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7252 | const VkAllocationCallbacks* pAllocator) { |
| 7253 | } |
| 7254 | |
| 7255 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7256 | cmd void vkUpdateDescriptorSetWithTemplateKHR( |
| 7257 | VkDevice device, |
| 7258 | VkDescriptorSet descriptorSet, |
| 7259 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7260 | const void* pData) { |
| 7261 | } |
| 7262 | |
| 7263 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7264 | cmd void vkCmdPushDescriptorSetWithTemplateKHR( |
| 7265 | VkCommandBuffer commandBuffer, |
| 7266 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7267 | VkPipelineLayout layout, |
| 7268 | u32 set, |
| 7269 | const void* pData) { |
| 7270 | } |
| 7271 | |
| 7272 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7273 | cmd void vkCmdProcessCommandsNVX( |
| 7274 | VkCommandBuffer commandBuffer, |
| 7275 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 7276 | } |
| 7277 | |
| 7278 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7279 | cmd void vkCmdReserveSpaceForCommandsNVX( |
| 7280 | VkCommandBuffer commandBuffer, |
| 7281 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 7282 | } |
| 7283 | |
| 7284 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7285 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
| 7286 | VkDevice device, |
| 7287 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 7288 | const VkAllocationCallbacks* pAllocator, |
| 7289 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 7290 | return ? |
| 7291 | } |
| 7292 | |
| 7293 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7294 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
| 7295 | VkDevice device, |
| 7296 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 7297 | const VkAllocationCallbacks* pAllocator) { |
| 7298 | } |
| 7299 | |
| 7300 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7301 | cmd VkResult vkCreateObjectTableNVX( |
| 7302 | VkDevice device, |
| 7303 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 7304 | const VkAllocationCallbacks* pAllocator, |
| 7305 | VkObjectTableNVX* pObjectTable) { |
| 7306 | return ? |
| 7307 | } |
| 7308 | |
| 7309 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7310 | cmd void vkDestroyObjectTableNVX( |
| 7311 | VkDevice device, |
| 7312 | VkObjectTableNVX objectTable, |
| 7313 | const VkAllocationCallbacks* pAllocator) { |
| 7314 | } |
| 7315 | |
| 7316 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7317 | cmd VkResult vkRegisterObjectsNVX( |
| 7318 | VkDevice device, |
| 7319 | VkObjectTableNVX objectTable, |
| 7320 | u32 objectCount, |
| 7321 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 7322 | const u32* pObjectIndices) { |
| 7323 | return ? |
| 7324 | } |
| 7325 | |
| 7326 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7327 | cmd VkResult vkUnregisterObjectsNVX( |
| 7328 | VkDevice device, |
| 7329 | VkObjectTableNVX objectTable, |
| 7330 | u32 objectCount, |
| 7331 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 7332 | const u32* pObjectIndices) { |
| 7333 | return ? |
| 7334 | } |
| 7335 | |
| 7336 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7337 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 7338 | VkPhysicalDevice physicalDevice, |
| 7339 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 7340 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 7341 | } |
| 7342 | |
| 7343 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 7344 | cmd void vkCmdSetViewportWScalingNV( |
| 7345 | VkCommandBuffer commandBuffer, |
| 7346 | u32 firstViewport, |
| 7347 | u32 viewportCount, |
| 7348 | const VkViewportWScalingNV* pViewportWScalings) { |
| 7349 | } |
| 7350 | |
| 7351 | @extension("VK_EXT_direct_mode_display") // 89 |
| 7352 | cmd VkResult vkReleaseDisplayEXT( |
| 7353 | VkPhysicalDevice physicalDevice, |
| 7354 | VkDisplayKHR display) { |
| 7355 | return ? |
| 7356 | } |
| 7357 | |
| 7358 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7359 | cmd VkResult vkAcquireXlibDisplayEXT( |
| 7360 | VkPhysicalDevice physicalDevice, |
| 7361 | platform.Display* dpy, |
| 7362 | VkDisplayKHR display) { |
| 7363 | return ? |
| 7364 | } |
| 7365 | |
| 7366 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7367 | cmd VkResult vkGetRandROutputDisplayEXT( |
| 7368 | VkPhysicalDevice physicalDevice, |
| 7369 | platform.Display* dpy, |
| 7370 | platform.RROutput rrOutput, |
| 7371 | VkDisplayKHR* pDisplay) { |
| 7372 | return ? |
| 7373 | } |
| 7374 | |
| 7375 | @extension("VK_EXT_display_surface_counter") // 91 |
| 7376 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 7377 | VkPhysicalDevice physicalDevice, |
| 7378 | VkSurfaceKHR surface, |
| 7379 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { |
| 7380 | return ? |
| 7381 | } |
| 7382 | |
| 7383 | @extension("VK_EXT_display_control") // 92 |
| 7384 | cmd VkResult vkDisplayPowerControlEXT( |
| 7385 | VkDevice device, |
| 7386 | VkDisplayKHR display, |
| 7387 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { |
| 7388 | return ? |
| 7389 | } |
| 7390 | |
| 7391 | @extension("VK_EXT_display_control") // 92 |
| 7392 | cmd VkResult vkRegisterDeviceEventEXT( |
| 7393 | VkDevice device, |
| 7394 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 7395 | const VkAllocationCallbacks* pAllocator, |
| 7396 | VkFence* pFence) { |
| 7397 | return ? |
| 7398 | } |
| 7399 | |
| 7400 | @extension("VK_EXT_display_control") // 92 |
| 7401 | cmd VkResult vkRegisterDisplayEventEXT( |
| 7402 | VkDevice device, |
| 7403 | VkDisplayKHR display, |
| 7404 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 7405 | const VkAllocationCallbacks* pAllocator, |
| 7406 | VkFence* pFence) { |
| 7407 | return ? |
| 7408 | } |
| 7409 | |
| 7410 | @extension("VK_EXT_display_control") // 92 |
| 7411 | cmd VkResult vkGetSwapchainCounterEXT( |
| 7412 | VkDevice device, |
| 7413 | VkSwapchainKHR swapchain, |
| 7414 | VkSurfaceCounterFlagBitsEXT counter, |
| 7415 | u64* pCounterValue) { |
| 7416 | return ? |
| 7417 | } |
| 7418 | |
| 7419 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7420 | cmd VkResult vkGetRefreshCycleDurationGOOGLE( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 7421 | VkDevice device, |
| 7422 | VkSwapchainKHR swapchain, |
| 7423 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7424 | deviceObject := GetDevice(device) |
| 7425 | swapchainObject := GetSwapchain(swapchain) |
| 7426 | |
| 7427 | displayTimingProperties := ? |
| 7428 | pDisplayTimingProperties[0] = displayTimingProperties |
| 7429 | |
| 7430 | return ? |
| 7431 | } |
| 7432 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7433 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7434 | cmd VkResult vkGetPastPresentationTimingGOOGLE( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 7435 | VkDevice device, |
| 7436 | VkSwapchainKHR swapchain, |
| 7437 | u32* pPresentationTimingCount, |
| 7438 | VkPastPresentationTimingGOOGLE* pPresentationTimings) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7439 | return ? |
| 7440 | } |
| 7441 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7442 | @extension("VK_EXT_discard_rectangles") // 100 |
| 7443 | cmd void vkCmdSetDiscardRectangleEXT( |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7444 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7445 | u32 firstDiscardRectangle, |
| 7446 | u32 discardRectangleCount, |
| 7447 | const VkRect2D* pDiscardRectangles) { |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7448 | } |
| 7449 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7450 | @extension("VK_EXT_hdr_metadata") // 106 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7451 | cmd void vkSetHdrMetadataEXT( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 7452 | VkDevice device, |
| 7453 | u32 swapchainCount, |
| 7454 | const VkSwapchainKHR* pSwapchains, |
| 7455 | const VkHdrMetadataEXT* pMetadata) { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7456 | } |
| 7457 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7458 | @extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 7459 | cmd VkResult vkGetSwapchainStatusKHR( |
| 7460 | VkDevice device, |
| 7461 | VkSwapchainKHR swapchain) { |
| 7462 | return ? |
| 7463 | } |
| 7464 | |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 7465 | @extension("VK_KHR_get_surface_capabilities2") // 119 |
| 7466 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( |
| 7467 | VkPhysicalDevice physicalDevice, |
| 7468 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 7469 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { |
| 7470 | return ? |
| 7471 | } |
| 7472 | |
| 7473 | @extension("VK_KHR_get_surface_capabilities2") // 119 |
| 7474 | cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( |
| 7475 | VkPhysicalDevice physicalDevice, |
| 7476 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 7477 | u32* pSurfaceFormatCount, |
| 7478 | VkSurfaceFormat2KHR* pSurfaceFormats) { |
| 7479 | return ? |
| 7480 | } |
| 7481 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7482 | @extension("VK_MVK_ios_surface") // 123 |
| 7483 | cmd VkResult vkCreateIOSSurfaceMVK( |
| 7484 | VkInstance instance, |
| 7485 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7486 | const VkAllocationCallbacks* pAllocator, |
| 7487 | VkSurfaceKHR* pSurface) { |
| 7488 | return ? |
| 7489 | } |
| 7490 | |
| 7491 | @extension("VK_MVK_macos_surface") // 124 |
| 7492 | cmd VkResult vkCreateMacOSSurfaceMVK( |
| 7493 | VkInstance instance, |
| 7494 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7495 | const VkAllocationCallbacks* pAllocator, |
| 7496 | VkSurfaceKHR* pSurface) { |
| 7497 | return ? |
| 7498 | } |
| 7499 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7500 | //////////////// |
| 7501 | // Validation // |
| 7502 | //////////////// |
| 7503 | |
| 7504 | extern void validate(string layerName, bool condition, string message) |
| 7505 | |
| 7506 | |
| 7507 | ///////////////////////////// |
| 7508 | // Internal State Tracking // |
| 7509 | ///////////////////////////// |
| 7510 | |
| 7511 | StateObject State |
| 7512 | |
| 7513 | @internal class StateObject { |
| 7514 | // Dispatchable objects. |
| 7515 | map!(VkInstance, ref!InstanceObject) Instances |
| 7516 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 7517 | map!(VkDevice, ref!DeviceObject) Devices |
| 7518 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7519 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7520 | |
| 7521 | // Non-dispatchable objects. |
| 7522 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 7523 | map!(VkBuffer, ref!BufferObject) Buffers |
| 7524 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 7525 | map!(VkImage, ref!ImageObject) Images |
| 7526 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7527 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7528 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 7529 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 7530 | map!(VkSampler, ref!SamplerObject) Samplers |
| 7531 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 7532 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 7533 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7534 | map!(VkFence, ref!FenceObject) Fences |
| 7535 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 7536 | map!(VkEvent, ref!EventObject) Events |
| 7537 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 7538 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 7539 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 7540 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7541 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7542 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7543 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7544 | } |
| 7545 | |
| 7546 | @internal class InstanceObject { |
| 7547 | } |
| 7548 | |
| 7549 | @internal class PhysicalDeviceObject { |
| 7550 | VkInstance instance |
| 7551 | } |
| 7552 | |
| 7553 | @internal class DeviceObject { |
| 7554 | VkPhysicalDevice physicalDevice |
| 7555 | } |
| 7556 | |
| 7557 | @internal class QueueObject { |
| 7558 | VkDevice device |
| 7559 | VkQueueFlags flags |
| 7560 | } |
| 7561 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7562 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7563 | VkDevice device |
| 7564 | map!(u64, VkDeviceMemory) boundObjects |
| 7565 | VkQueueFlags queueFlags |
| 7566 | } |
| 7567 | |
| 7568 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7569 | VkDevice device |
| 7570 | VkDeviceSize allocationSize |
| 7571 | map!(u64, VkDeviceSize) boundObjects |
| 7572 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7573 | } |
| 7574 | |
| 7575 | @internal class BufferObject { |
| 7576 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7577 | VkDeviceMemory memory |
| 7578 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7579 | } |
| 7580 | |
| 7581 | @internal class BufferViewObject { |
| 7582 | VkDevice device |
| 7583 | VkBuffer buffer |
| 7584 | } |
| 7585 | |
| 7586 | @internal class ImageObject { |
| 7587 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7588 | VkDeviceMemory memory |
| 7589 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7590 | } |
| 7591 | |
| 7592 | @internal class ImageViewObject { |
| 7593 | VkDevice device |
| 7594 | VkImage image |
| 7595 | } |
| 7596 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7597 | @internal class ShaderObject { |
| 7598 | VkDevice device |
| 7599 | } |
| 7600 | |
| 7601 | @internal class ShaderModuleObject { |
| 7602 | VkDevice device |
| 7603 | } |
| 7604 | |
| 7605 | @internal class PipelineObject { |
| 7606 | VkDevice device |
| 7607 | } |
| 7608 | |
| 7609 | @internal class PipelineLayoutObject { |
| 7610 | VkDevice device |
| 7611 | } |
| 7612 | |
| 7613 | @internal class SamplerObject { |
| 7614 | VkDevice device |
| 7615 | } |
| 7616 | |
| 7617 | @internal class DescriptorSetObject { |
| 7618 | VkDevice device |
| 7619 | } |
| 7620 | |
| 7621 | @internal class DescriptorSetLayoutObject { |
| 7622 | VkDevice device |
| 7623 | } |
| 7624 | |
| 7625 | @internal class DescriptorPoolObject { |
| 7626 | VkDevice device |
| 7627 | } |
| 7628 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7629 | @internal class FenceObject { |
| 7630 | VkDevice device |
| 7631 | bool signaled |
| 7632 | } |
| 7633 | |
| 7634 | @internal class SemaphoreObject { |
| 7635 | VkDevice device |
| 7636 | } |
| 7637 | |
| 7638 | @internal class EventObject { |
| 7639 | VkDevice device |
| 7640 | } |
| 7641 | |
| 7642 | @internal class QueryPoolObject { |
| 7643 | VkDevice device |
| 7644 | } |
| 7645 | |
| 7646 | @internal class FramebufferObject { |
| 7647 | VkDevice device |
| 7648 | } |
| 7649 | |
| 7650 | @internal class RenderPassObject { |
| 7651 | VkDevice device |
| 7652 | } |
| 7653 | |
| 7654 | @internal class PipelineCacheObject { |
| 7655 | VkDevice device |
| 7656 | } |
| 7657 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7658 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7659 | VkDevice device |
| 7660 | } |
| 7661 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7662 | @internal class SurfaceObject { |
| 7663 | VkInstance instance |
| 7664 | } |
| 7665 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7666 | @internal class SwapchainObject { |
| 7667 | VkDevice device |
| 7668 | } |
| 7669 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7670 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 7671 | assert(instance in State.Instances) |
| 7672 | return State.Instances[instance] |
| 7673 | } |
| 7674 | |
| 7675 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 7676 | assert(physicalDevice in State.PhysicalDevices) |
| 7677 | return State.PhysicalDevices[physicalDevice] |
| 7678 | } |
| 7679 | |
| 7680 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 7681 | assert(device in State.Devices) |
| 7682 | return State.Devices[device] |
| 7683 | } |
| 7684 | |
| 7685 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 7686 | assert(queue in State.Queues) |
| 7687 | return State.Queues[queue] |
| 7688 | } |
| 7689 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7690 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 7691 | assert(commandBuffer in State.CommandBuffers) |
| 7692 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7693 | } |
| 7694 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7695 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 7696 | assert(memory in State.DeviceMemories) |
| 7697 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7698 | } |
| 7699 | |
| 7700 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 7701 | assert(buffer in State.Buffers) |
| 7702 | return State.Buffers[buffer] |
| 7703 | } |
| 7704 | |
| 7705 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 7706 | assert(bufferView in State.BufferViews) |
| 7707 | return State.BufferViews[bufferView] |
| 7708 | } |
| 7709 | |
| 7710 | macro ref!ImageObject GetImage(VkImage image) { |
| 7711 | assert(image in State.Images) |
| 7712 | return State.Images[image] |
| 7713 | } |
| 7714 | |
| 7715 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 7716 | assert(imageView in State.ImageViews) |
| 7717 | return State.ImageViews[imageView] |
| 7718 | } |
| 7719 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7720 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 7721 | assert(shaderModule in State.ShaderModules) |
| 7722 | return State.ShaderModules[shaderModule] |
| 7723 | } |
| 7724 | |
| 7725 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 7726 | assert(pipeline in State.Pipelines) |
| 7727 | return State.Pipelines[pipeline] |
| 7728 | } |
| 7729 | |
| 7730 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 7731 | assert(pipelineLayout in State.PipelineLayouts) |
| 7732 | return State.PipelineLayouts[pipelineLayout] |
| 7733 | } |
| 7734 | |
| 7735 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 7736 | assert(sampler in State.Samplers) |
| 7737 | return State.Samplers[sampler] |
| 7738 | } |
| 7739 | |
| 7740 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 7741 | assert(descriptorSet in State.DescriptorSets) |
| 7742 | return State.DescriptorSets[descriptorSet] |
| 7743 | } |
| 7744 | |
| 7745 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 7746 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 7747 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 7748 | } |
| 7749 | |
| 7750 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 7751 | assert(descriptorPool in State.DescriptorPools) |
| 7752 | return State.DescriptorPools[descriptorPool] |
| 7753 | } |
| 7754 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7755 | macro ref!FenceObject GetFence(VkFence fence) { |
| 7756 | assert(fence in State.Fences) |
| 7757 | return State.Fences[fence] |
| 7758 | } |
| 7759 | |
| 7760 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 7761 | assert(semaphore in State.Semaphores) |
| 7762 | return State.Semaphores[semaphore] |
| 7763 | } |
| 7764 | |
| 7765 | macro ref!EventObject GetEvent(VkEvent event) { |
| 7766 | assert(event in State.Events) |
| 7767 | return State.Events[event] |
| 7768 | } |
| 7769 | |
| 7770 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 7771 | assert(queryPool in State.QueryPools) |
| 7772 | return State.QueryPools[queryPool] |
| 7773 | } |
| 7774 | |
| 7775 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 7776 | assert(framebuffer in State.Framebuffers) |
| 7777 | return State.Framebuffers[framebuffer] |
| 7778 | } |
| 7779 | |
| 7780 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 7781 | assert(renderPass in State.RenderPasses) |
| 7782 | return State.RenderPasses[renderPass] |
| 7783 | } |
| 7784 | |
| 7785 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 7786 | assert(pipelineCache in State.PipelineCaches) |
| 7787 | return State.PipelineCaches[pipelineCache] |
| 7788 | } |
| 7789 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7790 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 7791 | assert(commandPool in State.CommandPools) |
| 7792 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 7793 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7794 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7795 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 7796 | assert(surface in State.Surfaces) |
| 7797 | return State.Surfaces[surface] |
| 7798 | } |
| 7799 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7800 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 7801 | assert(swapchain in State.Swapchains) |
| 7802 | return State.Swapchains[swapchain] |
| 7803 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 7804 | |
| 7805 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 7806 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 7807 | } |